Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QSSGShaderCache Class Reference

#include <qssgrendershadercache_p.h>

Collaboration diagram for QSSGShaderCache:

Public Types

enum class  ShaderType { Vertex = 0 , Fragment = 1 }
using InitBakerFunc = void (*)(QShaderBaker *baker, QRhi *rhi)

Public Member Functions

 QSSGShaderCache (QSSGRhiContext &ctxctx, const InitBakerFunc initBakeFn=nullptr)
 ~QSSGShaderCache ()
QSSGRhiContext & rhiContext ()
void releaseCachedResources ()
QQsbInMemoryCollection & persistentShaderBakingCache ()
QSSGRhiShaderPipelinePtr tryGetRhiShaderPipeline (const QByteArray &inKey, const QSSGShaderFeatures &inFeatures)
bool hasRhiShaderPipeline (const QByteArray &inKey, const QSSGShaderFeatures &inFeatures) const
QSSGRhiShaderPipelinePtr tryNewPipelineFromPersistentCache (const QByteArray &qsbcKey, const QByteArray &inKey, const QSSGShaderFeatures &inFeatures, QSSGRhiShaderPipeline::StageFlags stageFlags={})
QSSGRhiShaderPipelinePtr newPipelineFromPregenerated (const QByteArray &inKey, const QSSGShaderFeatures &inFeatures, QQsbCollection::Entry entryentry, const QSSGRenderGraphObject &objobj, QSSGRhiShaderPipeline::StageFlags stageFlags={})
QSSGRhiShaderPipelinePtr compileGraphicsPipeline (const QByteArray &inKey, const QByteArray &inVert, const QByteArray &inFrag, const QSSGShaderFeatures &inFeatures, QSSGRhiShaderPipeline::StageFlags stageFlags, const QSSGUserShaderAugmentation &shaderAugmentation, int viewCount, bool perTargetCompilation, const QByteArray &inCacheKey={})
QSSGRhiShaderPipelinePtr compileComputePipeline (const QByteArray &inKey, const QByteArray &inComp, int viewCount, bool perTargetCompilation, const QByteArray &inCacheKey={})
QSSGBuiltInRhiShaderCache & getBuiltInRhiShaders ()

Static Public Member Functions

static QByteArray resourceFolder ()
static QByteArray shaderCollectionFile ()
static QByteArray particleShaderCollectionFile ()
static void initBakerForPersistentUse (QShaderBaker *baker, QRhi *rhi)
static QList< QShaderVersion > glslTargetsForContext (const QSurfaceFormat &formatformat, bool isGLESModule)
static bool isGlslEsTarget (QRhi *rhi)

Friends

class QSSGBuiltInRhiShaderCache

Detailed Description

Definition at line 273 of file qssgrendershadercache_p.h.

Member Typedef Documentation

◆ InitBakerFunc

using QSSGShaderCache::InitBakerFunc = void (*)(QShaderBaker *baker, QRhi *rhi)

Definition at line 283 of file qssgrendershadercache_p.h.

Member Enumeration Documentation

◆ ShaderType

enum class QSSGShaderCache::ShaderType
strong
Enumerator
Vertex 
Fragment 

Definition at line 277 of file qssgrendershadercache_p.h.

Constructor & Destructor Documentation

◆ QSSGShaderCache()

QSSGShaderCache::QSSGShaderCache ( QSSGRhiContext & ctx,
const InitBakerFunc initBakeFn = nullptr )

Definition at line 360 of file qssgrendershadercache.cpp.

◆ ~QSSGShaderCache()

QSSGShaderCache::~QSSGShaderCache ( )

Definition at line 397 of file qssgrendershadercache.cpp.

Member Function Documentation

◆ compileComputePipeline()

QSSGRhiShaderPipelinePtr QSSGShaderCache::compileComputePipeline ( const QByteArray & inKey,
const QByteArray & inComp,
int viewCount,
bool perTargetCompilation,
const QByteArray & inCacheKey = {} )

Definition at line 647 of file qssgrendershadercache.cpp.

◆ compileGraphicsPipeline()

QSSGRhiShaderPipelinePtr QSSGShaderCache::compileGraphicsPipeline ( const QByteArray & inKey,
const QByteArray & inVert,
const QByteArray & inFrag,
const QSSGShaderFeatures & inFeatures,
QSSGRhiShaderPipeline::StageFlags stageFlags,
const QSSGUserShaderAugmentation & shaderAugmentation,
int viewCount,
bool perTargetCompilation,
const QByteArray & inCacheKey = {} )

Definition at line 511 of file qssgrendershadercache.cpp.

◆ getBuiltInRhiShaders()

QSSGBuiltInRhiShaderCache & QSSGShaderCache::getBuiltInRhiShaders ( )
inline

Definition at line 349 of file qssgrendershadercache_p.h.

◆ glslTargetsForContext()

QList< QShaderVersion > QSSGShaderCache::glslTargetsForContext ( const QSurfaceFormat & format,
bool isGLESModule )
static

Definition at line 140 of file qssgrendershadercache.cpp.

◆ hasRhiShaderPipeline()

bool QSSGShaderCache::hasRhiShaderPipeline ( const QByteArray & inKey,
const QSSGShaderFeatures & inFeatures ) const

Definition at line 428 of file qssgrendershadercache.cpp.

◆ initBakerForPersistentUse()

void QSSGShaderCache::initBakerForPersistentUse ( QShaderBaker * baker,
QRhi * rhi )
static

Definition at line 307 of file qssgrendershadercache.cpp.

◆ isGlslEsTarget()

bool QSSGShaderCache::isGlslEsTarget ( QRhi * rhi)
static

Definition at line 209 of file qssgrendershadercache.cpp.

◆ newPipelineFromPregenerated()

QSSGRhiShaderPipelinePtr QSSGShaderCache::newPipelineFromPregenerated ( const QByteArray & inKey,
const QSSGShaderFeatures & inFeatures,
QQsbCollection::Entry entry,
const QSSGRenderGraphObject & obj,
QSSGRhiShaderPipeline::StageFlags stageFlags = {} )

Definition at line 730 of file qssgrendershadercache.cpp.

◆ particleShaderCollectionFile()

QByteArray QSSGShaderCache::particleShaderCollectionFile ( )
static

Definition at line 506 of file qssgrendershadercache.cpp.

◆ persistentShaderBakingCache()

QQsbInMemoryCollection & QSSGShaderCache::persistentShaderBakingCache ( )
inline

Definition at line 316 of file qssgrendershadercache_p.h.

◆ releaseCachedResources()

void QSSGShaderCache::releaseCachedResources ( )

Definition at line 403 of file qssgrendershadercache.cpp.

◆ resourceFolder()

QByteArray QSSGShaderCache::resourceFolder ( )
static

Definition at line 496 of file qssgrendershadercache.cpp.

◆ rhiContext()

QSSGRhiContext & QSSGShaderCache::rhiContext ( )
inline

Definition at line 312 of file qssgrendershadercache_p.h.

◆ shaderCollectionFile()

QByteArray QSSGShaderCache::shaderCollectionFile ( )
static

Definition at line 501 of file qssgrendershadercache.cpp.

◆ tryGetRhiShaderPipeline()

QSSGRhiShaderPipelinePtr QSSGShaderCache::tryGetRhiShaderPipeline ( const QByteArray & inKey,
const QSSGShaderFeatures & inFeatures )

Definition at line 413 of file qssgrendershadercache.cpp.

◆ tryNewPipelineFromPersistentCache()

QSSGRhiShaderPipelinePtr QSSGShaderCache::tryNewPipelineFromPersistentCache ( const QByteArray & qsbcKey,
const QByteArray & inKey,
const QSSGShaderFeatures & inFeatures,
QSSGRhiShaderPipeline::StageFlags stageFlags = {} )

Definition at line 799 of file qssgrendershadercache.cpp.

◆ QSSGBuiltInRhiShaderCache

friend class QSSGBuiltInRhiShaderCache
friend

Definition at line 285 of file qssgrendershadercache_p.h.


The documentation for this class was generated from the following files: