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 &ctx, const InitBakerFunc initBakeFn=nullptr)
 ~QSSGShaderCache ()
void releaseCachedResources ()
QQsbInMemoryCollectionpersistentShaderBakingCache ()
QSSGRhiShaderPipelinePtr tryGetRhiShaderPipeline (const QByteArray &inKey, const QSSGShaderFeatures &inFeatures)
QSSGRhiShaderPipelinePtr tryNewPipelineFromPersistentCache (const QByteArray &qsbcKey, const QByteArray &inKey, const QSSGShaderFeatures &inFeatures, QSSGRhiShaderPipeline::StageFlags stageFlags={})
QSSGRhiShaderPipelinePtr newPipelineFromPregenerated (const QByteArray &inKey, const QSSGShaderFeatures &inFeatures, QQsbCollection::Entry entry, const QSSGRenderGraphObject &obj, QSSGRhiShaderPipeline::StageFlags stageFlags={})
QSSGRhiShaderPipelinePtr compileForRhi (const QByteArray &inKey, const QByteArray &inVert, const QByteArray &inFrag, const QSSGShaderFeatures &inFeatures, QSSGRhiShaderPipeline::StageFlags stageFlags, int viewCount, bool perTargetCompilation)
QSSGBuiltInRhiShaderCachegetBuiltInRhiShaders ()

Static Public Member Functions

static QByteArray resourceFolder ()
static QByteArray shaderCollectionFile ()

Friends

class QSSGBuiltInRhiShaderCache

Detailed Description

Definition at line 165 of file qssgrendershadercache_p.h.

Member Typedef Documentation

◆ InitBakerFunc

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

Definition at line 175 of file qssgrendershadercache_p.h.

Member Enumeration Documentation

◆ ShaderType

enum class QSSGShaderCache::ShaderType
strong
Enumerator
Vertex 
Fragment 

Definition at line 169 of file qssgrendershadercache_p.h.

Constructor & Destructor Documentation

◆ QSSGShaderCache()

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

Definition at line 264 of file qssgrendershadercache.cpp.

◆ ~QSSGShaderCache()

QSSGShaderCache::~QSSGShaderCache ( )

Definition at line 301 of file qssgrendershadercache.cpp.

Member Function Documentation

◆ compileForRhi()

QSSGRhiShaderPipelinePtr QSSGShaderCache::compileForRhi ( const QByteArray & inKey,
const QByteArray & inVert,
const QByteArray & inFrag,
const QSSGShaderFeatures & inFeatures,
QSSGRhiShaderPipeline::StageFlags stageFlags,
int viewCount,
bool perTargetCompilation )

Definition at line 386 of file qssgrendershadercache.cpp.

◆ getBuiltInRhiShaders()

QSSGBuiltInRhiShaderCache & QSSGShaderCache::getBuiltInRhiShaders ( )
inline

Definition at line 228 of file qssgrendershadercache_p.h.

◆ newPipelineFromPregenerated()

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

Definition at line 541 of file qssgrendershadercache.cpp.

◆ persistentShaderBakingCache()

QQsbInMemoryCollection & QSSGShaderCache::persistentShaderBakingCache ( )
inline

Definition at line 204 of file qssgrendershadercache_p.h.

◆ releaseCachedResources()

void QSSGShaderCache::releaseCachedResources ( )

Definition at line 307 of file qssgrendershadercache.cpp.

◆ resourceFolder()

QByteArray QSSGShaderCache::resourceFolder ( )
static

Definition at line 376 of file qssgrendershadercache.cpp.

◆ shaderCollectionFile()

QByteArray QSSGShaderCache::shaderCollectionFile ( )
static

Definition at line 381 of file qssgrendershadercache.cpp.

◆ tryGetRhiShaderPipeline()

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

Definition at line 317 of file qssgrendershadercache.cpp.

◆ tryNewPipelineFromPersistentCache()

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

Definition at line 595 of file qssgrendershadercache.cpp.

◆ QSSGBuiltInRhiShaderCache

friend class QSSGBuiltInRhiShaderCache
friend

Definition at line 177 of file qssgrendershadercache_p.h.


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