Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qssgrenderbuffermanager.cpp File Reference

(a2456c7a773e439843e12d3d5611437197f1c989)

#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 <QtQuick3DUtils/private/qssgassert_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 "../utils/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 "../qssgrendercontextcore.h"
#include <QtQuick3DRuntimeRender/private/qssglightmapper_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrenderresourceloader_p.h>
#include <qtquick3d_tracepoints_p.h>
#include "../extensionapi/qssgrenderextensions.h"
+ Include dependency graph for qssgrenderbuffermanager.cpp:

Go to the source code of this file.

Classes

struct  QSSGBufferManagerStat
 
struct  MeshStorageRef
 

Typedefs

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

Enumerations

enum class  Level { Debug = 0x1 , Usage = 0x2 }
 

Functions

QT_BEGIN_NAMESPACE struct QSSGBufferManagerStat Q_TRACE_POINT (qtquick3d, QSSG_textureLoad_entry)
 
static constexpr bool enabled (Level)
 
 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

struct MeshStorageRef Q_TRACE_POINT
 
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 78 of file qssgrenderbuffermanager.cpp.

◆ MeshIdxNamePair

Definition at line 88 of file qssgrenderbuffermanager.cpp.

Enumeration Type Documentation

◆ Level

enum class Level
strong
Enumerator
Debug 
Usage 

Definition at line 0 of file qssgrenderbuffermanager.cpp.

Function Documentation

◆ bufferMemorySize()

static quint64 bufferMemorySize ( const QSSGRhiBufferPtr & buffer)
inlinestatic

Definition at line 2036 of file qssgrenderbuffermanager.cpp.

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

+ Here is the caller graph for this function:

◆ enabled()

static constexpr bool Q_TRACE_POINT::enabled ( Level )
staticconstexpr

Definition at line 15 of file qssgrenderbuffermanager.cpp.

◆ 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 struct QSSGBufferManagerStat 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 124 of file qssgrenderbuffermanager.cpp.

References qMax().

+ Here is the call graph for this function:

◆ splitRuntimeMeshPath()

static MeshIdxNamePair splitRuntimeMeshPath ( const QSSGRenderPath & rpath)
static

Definition at line 89 of file qssgrenderbuffermanager.cpp.

References ok, 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 1978 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 423 of file qssgrenderbuffermanager.cpp.

◆ nPrimitives

const int nPrimitives = 5
static

Definition at line 113 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 114 of file qssgrenderbuffermanager.cpp.

Referenced by QSSGBufferManager::primitivePath().

◆ primitivesDirectory

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

Definition at line 122 of file qssgrenderbuffermanager.cpp.

Referenced by QSSGBufferManager::primitivePath().

◆ Q_TRACE_POINT

struct MeshStorageRef Q_TRACE_POINT