Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qssgrenderbuffermanager.cpp File Reference
#include "qssgrenderbuffermanager_p.h"
#include <QtQuick3DRuntimeRender/private/qssgrenderloadedtexture_p.h>
#include <QtQuick3DRuntimeRender/private/qssgruntimerenderlogging_p.h>
#include <QtQuick3DUtils/private/qssgmeshbvhbuilder_p.h>
#include <QtQuick3DUtils/private/qssgbounds3_p.h>
#include <QtQuick/QSGTexture>
#include <QtCore/QDir>
#include <QtGui/private/qimage_p.h>
#include <QtQuick/private/qsgtexture_p.h>
#include <QtQuick/private/qsgcompressedtexture_p.h>
#include <QtQuick3DUtils/private/qssgrenderbasetypes_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrendergeometry_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrendermodel_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrenderimage_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrendertexturedata_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrendercontextcore_p.h>
#include <QtQuick3DRuntimeRender/private/qssglightmapper_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrenderresourceloader_p.h>
#include <qtquick3d_tracepoints_p.h>
+ Include dependency graph for qssgrenderbuffermanager.cpp:

Go to the source code of this file.

Classes

struct  MeshStorageRef
 

Typedefs

using AssetMeshMap = QHash< QString, MeshStorageRef >
 
using MeshIdxNamePair = QPair< qsizetype, QString >
 

Functions

QT_BEGIN_NAMESPACE Q_TRACE_POINT (qtquick3d, QSSG_textureLoad_entry)
 
 Q_TRACE_POINT (qtquick3d, QSSG_textureLoad_exit)
 
 Q_TRACE_POINT (qtquick3d, QSSG_meshLoad_entry)
 
 Q_TRACE_POINT (qtquick3d, QSSG_meshLoad_exit)
 
 Q_TRACE_POINT (qtquick3d, QSSG_meshLoadPath_entry, const QString &path)
 
 Q_TRACE_POINT (qtquick3d, QSSG_meshLoadPath_exit)
 
 Q_TRACE_POINT (qtquick3d, QSSG_textureUnload_entry)
 
 Q_TRACE_POINT (qtquick3d, QSSG_textureUnload_exit)
 
 Q_TRACE_POINT (qtquick3d, QSSG_meshUnload_entry)
 
 Q_TRACE_POINT (qtquick3d, QSSG_meshUnload_exit)
 
 Q_TRACE_POINT (qtquick3d, QSSG_customMeshLoad_entry)
 
 Q_TRACE_POINT (qtquick3d, QSSG_customMeshLoad_exit)
 
 Q_TRACE_POINT (qtquick3d, QSSG_customMeshUnload_entry)
 
 Q_TRACE_POINT (qtquick3d, QSSG_customMeshUnload_exit)
 
 Q_TRACE_POINT (qtquick3d, QSSG_textureLoadPath_entry, const QString &path)
 
 Q_TRACE_POINT (qtquick3d, QSSG_textureLoadPath_exit)
 
static MeshIdxNamePair splitRuntimeMeshPath (const QSSGRenderPath &rpath)
 
static constexpr QSize sizeForMipLevel (int mipLevel, const QSize &baseLevelSize)
 
static quint64 textureMemorySize (QRhiTexture *texture)
 
static quint64 bufferMemorySize (const QSSGRhiBufferPtr &buffer)
 

Variables

static const int nPrimitives = 5
 
static const PrimitiveEntry primitives [nPrimitives]
 
static const char * primitivesDirectory = "res//primitives"
 
static const float cube []
 

Typedef Documentation

◆ AssetMeshMap

Definition at line 57 of file qssgrenderbuffermanager.cpp.

◆ MeshIdxNamePair

Definition at line 67 of file qssgrenderbuffermanager.cpp.

Function Documentation

◆ bufferMemorySize()

static quint64 bufferMemorySize ( const QSSGRhiBufferPtr buffer)
inlinestatic

Definition at line 1943 of file qssgrenderbuffermanager.cpp.

Referenced by QSSGBufferManager::decreaseMemoryStat(), and QSSGBufferManager::increaseMemoryStat().

+ Here is the caller graph for this function:

◆ Q_TRACE_POINT() [1/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_customMeshLoad_entry   
)

◆ Q_TRACE_POINT() [2/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_customMeshLoad_exit   
)

◆ Q_TRACE_POINT() [3/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_customMeshUnload_entry   
)

◆ Q_TRACE_POINT() [4/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_customMeshUnload_exit   
)

◆ Q_TRACE_POINT() [5/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_meshLoad_entry   
)

◆ Q_TRACE_POINT() [6/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_meshLoad_exit   
)

◆ Q_TRACE_POINT() [7/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_meshLoadPath_entry  ,
const QString path 
)

◆ Q_TRACE_POINT() [8/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_meshLoadPath_exit   
)

◆ Q_TRACE_POINT() [9/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_meshUnload_entry   
)

◆ Q_TRACE_POINT() [10/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_meshUnload_exit   
)

◆ Q_TRACE_POINT() [11/16]

QT_BEGIN_NAMESPACE Q_TRACE_POINT ( qtquick3d  ,
QSSG_textureLoad_entry   
)

◆ Q_TRACE_POINT() [12/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_textureLoad_exit   
)

◆ Q_TRACE_POINT() [13/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_textureLoadPath_entry  ,
const QString path 
)

◆ Q_TRACE_POINT() [14/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_textureLoadPath_exit   
)

◆ Q_TRACE_POINT() [15/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_textureUnload_entry   
)

◆ Q_TRACE_POINT() [16/16]

Q_TRACE_POINT ( qtquick3d  ,
QSSG_textureUnload_exit   
)

◆ sizeForMipLevel()

static constexpr QSize sizeForMipLevel ( int  mipLevel,
const QSize baseLevelSize 
)
staticconstexpr

Definition at line 103 of file qssgrenderbuffermanager.cpp.

References QSize::height(), qMax(), and QSize::width().

+ Here is the call graph for this function:

◆ splitRuntimeMeshPath()

static MeshIdxNamePair splitRuntimeMeshPath ( const QSSGRenderPath rpath)
static

Definition at line 68 of file qssgrenderbuffermanager.cpp.

References ok, QSSGRenderPath::path(), Q_ASSERT, and qMakePair().

Referenced by QSSGBufferManager::loadMeshData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ textureMemorySize()

static quint64 textureMemorySize ( QRhiTexture texture)
inlinestatic

Definition at line 1885 of file qssgrenderbuffermanager.cpp.

References QRhiTexture::BC1, QRhiTexture::CubeMap, QRhiTexture::ETC2_RGBA8, QRhiTexture::MipMapped, Q_STATIC_ASSERT_X, and QRhiTexture::UnknownFormat.

Referenced by QSSGBufferManager::decreaseMemoryStat(), and QSSGBufferManager::increaseMemoryStat().

+ Here is the caller graph for this function:

Variable Documentation

◆ cube

const float cube[]
static

Definition at line 389 of file qssgrenderbuffermanager.cpp.

◆ nPrimitives

const int nPrimitives = 5
static

Definition at line 92 of file qssgrenderbuffermanager.cpp.

Referenced by QSSGBufferManager::primitivePath().

◆ primitives

const PrimitiveEntry primitives[nPrimitives]
static
Initial value:
= {
{"#Rectangle", "/Rectangle.mesh"},
{"#Sphere","/Sphere.mesh"},
{"#Cube","/Cube.mesh"},
{"#Cone","/Cone.mesh"},
{"#Cylinder","/Cylinder.mesh"},
}

Definition at line 93 of file qssgrenderbuffermanager.cpp.

Referenced by QSSGBufferManager::primitivePath().

◆ primitivesDirectory

const char* primitivesDirectory = "res//primitives"
static

Definition at line 101 of file qssgrenderbuffermanager.cpp.

Referenced by QSSGBufferManager::primitivePath().