![]() |
Qt 6.x
The Qt SDK
|
#include <qssgrendershadercache_p.h>
Collaboration diagram for QSSGShaderCache:Public Types | |
| enum class | ShaderType { Vertex = 0 , Fragment = 1 } |
| using | InitBakerFunc = void(*)(QShaderBaker *baker, QRhi *rhi) |
Static Public Member Functions | |
| static QByteArray | resourceFolder () |
| static QByteArray | shaderCollectionFile () |
Definition at line 160 of file qssgrendershadercache_p.h.
| using QSSGShaderCache::InitBakerFunc = void (*)(QShaderBaker *baker, QRhi *rhi) |
Definition at line 170 of file qssgrendershadercache_p.h.
|
strong |
| Enumerator | |
|---|---|
| Vertex | |
| Fragment | |
Definition at line 164 of file qssgrendershadercache_p.h.
| QSSGShaderCache::QSSGShaderCache | ( | QSSGRhiContext & | ctx, |
| const InitBakerFunc | initBakeFn = nullptr |
||
| ) |
Definition at line 247 of file qssgrendershadercache.cpp.
References QQsbInMemoryCollection::availableEntries(), QSet< T >::count(), QSSGRhiContext::editorMode(), QFileInfo::exists(), initBakerForNonPersistentUse(), initBakerForPersistentUse(), isAutoDiskCacheEnabled(), QString::isEmpty(), QQsbInMemoryCollection::load(), persistentQsbcFileName(), qDebug, qEnvironmentVariableIntValue(), qPrintable, and QSSGRhiContext::shaderDebuggingEnabled().
Here is the call graph for this function:| QSSGShaderCache::~QSSGShaderCache | ( | ) |
Definition at line 283 of file qssgrendershadercache.cpp.
References QString::isEmpty(), and QQsbInMemoryCollection::save().
Here is the call graph for this function:| QSSGRhiShaderPipelinePtr QSSGShaderCache::compileForRhi | ( | const QByteArray & | inKey, |
| const QByteArray & | inVert, | ||
| const QByteArray & | inFrag, | ||
| const QSSGShaderFeatures & | inFeatures, | ||
| QSSGRhiShaderPipeline::StageFlags | stageFlags | ||
| ) |
Definition at line 360 of file qssgrendershadercache.cpp.
References QQsbInMemoryCollection::addEntry(), dumpFilename(), QSSGRhiContext::editorMode(), QRhiShaderStage::Fragment, Fragment, QShader::FragmentStage, QQsbCollection::EntryDesc::generateSha(), i, QHash< Key, T >::insert(), QByteArray::isEmpty(), QShader::isValid(), QSSGShaderCacheKey::m_features, Q_UNUSED, qDebug, qWarning, QSSGRhiContext::rhi(), s_statusCallback, QSSGRhiContext::shaderDebuggingEnabled(), QString::split(), QIODeviceBase::Text, QQsbCollection::toFeatureSet(), tryGetRhiShaderPipeline(), QSSGShaderCacheKey::updateHashCode(), QRhiShaderStage::Vertex, Vertex, QShader::VertexStage, and QIODeviceBase::WriteOnly.
Referenced by QSSGProgramGenerator::compileGeneratedRhiShader().
Here is the call graph for this function:
Here is the caller graph for this function:| QSSGRhiShaderPipelinePtr QSSGShaderCache::loadBuiltinForRhi | ( | const QByteArray & | inKey | ) |
Definition at line 581 of file qssgrendershadercache.cpp.
References QByteArray::constData(), QSSGRhiContext::editorMode(), QRhiShaderStage::Fragment, QShader::fromSerialized(), QString::fromUtf8(), QHash< Key, T >::insert(), QShader::isValid(), QSSGShaderCacheKey::m_features, Q_QUICK3D_PROFILE_END_WITH_STRING, Q_QUICK3D_PROFILE_START, Q_TRACE_SCOPE, qDebug, qPrintable, qWarning, QIODeviceBase::ReadOnly, resourceFolder(), QSSGRhiContext::shaderDebuggingEnabled(), tryGetRhiShaderPipeline(), QSSGShaderCacheKey::updateHashCode(), QSSGRhiShaderPipeline::UsedWithoutIa, and QRhiShaderStage::Vertex.
Here is the call graph for this function:| QSSGRhiShaderPipelinePtr QSSGShaderCache::newPipelineFromPregenerated | ( | const QByteArray & | inKey, |
| const QSSGShaderFeatures & | inFeatures, | ||
| QQsbCollection::Entry | entry, | ||
| const QSSGRenderGraphObject & | obj, | ||
| QSSGRhiShaderPipeline::StageFlags | stageFlags = {} |
||
| ) |
Definition at line 495 of file qssgrendershadercache.cpp.
References QSSGRhiContext::editorMode(), QQsbIODeviceCollection::extractEntry(), QRhiShaderStage::Fragment, QQsbCollection::EntryDesc::fragShader, QString::fromLatin1(), QHash< Key, T >::insert(), QShader::isValid(), QSSGShaderCacheKey::m_features, QQsbIODeviceCollection::map(), Q_QUICK3D_PROFILE_END_WITH_ID, Q_QUICK3D_PROFILE_START, Q_TRACE_SCOPE, qDebug, qWarning, QQsbIODeviceCollection::Read, resourceFolder(), shaderCollectionFile(), QSSGRhiContext::shaderDebuggingEnabled(), QQsbIODeviceCollection::unmap(), QSSGShaderCacheKey::updateHashCode(), QRhiShaderStage::Vertex, and QQsbCollection::EntryDesc::vertShader.
Referenced by QSSGRenderer::generateRhiShaderPipelineImpl().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 192 of file qssgrendershadercache_p.h.
| void QSSGShaderCache::releaseCachedResources | ( | ) |
Definition at line 289 of file qssgrendershadercache.cpp.
References QHash< Key, T >::clear().
Here is the call graph for this function:
|
static |
Definition at line 350 of file qssgrendershadercache.cpp.
References QByteArrayLiteral.
Referenced by loadBuiltinForRhi(), QSSGShaderLibraryManager::loadPregeneratedShaderInfo(), and newPipelineFromPregenerated().
Here is the caller graph for this function:
|
static |
Definition at line 355 of file qssgrendershadercache.cpp.
References QByteArrayLiteral.
Referenced by QSSGShaderLibraryManager::loadPregeneratedShaderInfo(), and newPipelineFromPregenerated().
Here is the caller graph for this function:| QSSGRhiShaderPipelinePtr QSSGShaderCache::tryGetRhiShaderPipeline | ( | const QByteArray & | inKey, |
| const QSSGShaderFeatures & | inFeatures | ||
| ) |
Definition at line 297 of file qssgrendershadercache.cpp.
References QHash< Key, T >::cend(), QHash< Key, T >::constFind(), QSSGShaderCacheKey::m_features, and QSSGShaderCacheKey::updateHashCode().
Referenced by compileForRhi(), QSSGRenderer::generateRhiShaderPipelineImpl(), and loadBuiltinForRhi().
Here is the call graph for this function:
Here is the caller graph for this function:| QSSGRhiShaderPipelinePtr QSSGShaderCache::tryNewPipelineFromPersistentCache | ( | const QByteArray & | qsbcKey, |
| const QByteArray & | inKey, | ||
| const QSSGShaderFeatures & | inFeatures, | ||
| QSSGRhiShaderPipeline::StageFlags | stageFlags = {} |
||
| ) |
Definition at line 545 of file qssgrendershadercache.cpp.
References QByteArray::constData(), QSSGRhiContext::editorMode(), QQsbInMemoryCollection::extractEntry(), QRhiShaderStage::Fragment, QQsbCollection::EntryDesc::fragShader, QHash< Key, T >::insert(), QShader::isValid(), QSSGShaderCacheKey::m_features, qDebug, QSSGRhiContext::shaderDebuggingEnabled(), QSSGShaderCacheKey::updateHashCode(), QRhiShaderStage::Vertex, and QQsbCollection::EntryDesc::vertShader.
Referenced by QSSGRenderer::generateRhiShaderPipelineImpl().
Here is the call graph for this function:
Here is the caller graph for this function: