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>.
|
#include <qssgrendershadercache_p.h>
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 () |
Friends | |
class | QSSGBuiltInRhiShaderCache |
Definition at line 164 of file qssgrendershadercache_p.h.
using QSSGShaderCache::InitBakerFunc = void (*)(QShaderBaker *baker, QRhi *rhi) |
Definition at line 174 of file qssgrendershadercache_p.h.
|
strong |
Enumerator | |
---|---|
Vertex | |
Fragment |
Definition at line 168 of file qssgrendershadercache_p.h.
QSSGShaderCache::QSSGShaderCache | ( | QSSGRhiContext & | ctx, |
const InitBakerFunc | initBakeFn = nullptr ) |
Definition at line 252 of file qssgrendershadercache.cpp.
References QQsbInMemoryCollection::availableEntries(), QSet< T >::count(), QSSGRhiContextPrivate::editorMode(), QFileInfo::exists(), initBakerForNonPersistentUse(), initBakerForPersistentUse(), isAutoDiskCacheEnabled(), QString::isEmpty(), QQsbInMemoryCollection::load(), persistentQsbcFileName(), qDebug, qEnvironmentVariableIntValue(), qPrintable, and QSSGRhiContextPrivate::shaderDebuggingEnabled().
QSSGShaderCache::~QSSGShaderCache | ( | ) |
Definition at line 289 of file qssgrendershadercache.cpp.
References QString::isEmpty(), and QQsbInMemoryCollection::save().
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 374 of file qssgrendershadercache.cpp.
References QQsbInMemoryCollection::addEntry(), dumpFilename(), QSSGRhiContextPrivate::editorMode(), QRhiShaderStage::Fragment, Fragment, QShader::FragmentStage, i, QHash< Key, T >::insert(), QShader::isValid(), Q_UNUSED, qDebug, qPrintable, qWarning, QSSGRhiContext::rhi(), s_statusCallback, QSSGRhiContextPrivate::shaderDebuggingEnabled(), QString::split(), QIODeviceBase::Text, QQsbCollection::toFeatureSet(), tryGetRhiShaderPipeline(), QRhiShaderStage::Vertex, Vertex, QShader::VertexStage, and QIODeviceBase::WriteOnly.
|
inline |
Definition at line 227 of file qssgrendershadercache_p.h.
QSSGRhiShaderPipelinePtr QSSGShaderCache::newPipelineFromPregenerated | ( | const QByteArray & | inKey, |
const QSSGShaderFeatures & | inFeatures, | ||
QQsbCollection::Entry | entry, | ||
const QSSGRenderGraphObject & | obj, | ||
QSSGRhiShaderPipeline::StageFlags | stageFlags = {} ) |
Definition at line 520 of file qssgrendershadercache.cpp.
References cacheKey(), QSSGRhiContextPrivate::editorMode(), QRhiShaderStage::Fragment, QString::fromLatin1(), QHash< Key, T >::insert(), Q_QUICK3D_PROFILE_END_WITH_ID, Q_QUICK3D_PROFILE_START, Q_TRACE_SCOPE, Q_UNUSED, qDebug, qWarning, QQsbIODeviceCollection::Read, resourceFolder(), shaderCollectionFile(), QSSGRhiContextPrivate::shaderDebuggingEnabled(), and QRhiShaderStage::Vertex.
Referenced by QSSGRendererPrivate::generateRhiShaderPipelineImpl().
|
inline |
Definition at line 203 of file qssgrendershadercache_p.h.
void QSSGShaderCache::releaseCachedResources | ( | ) |
Definition at line 295 of file qssgrendershadercache.cpp.
References QHash< Key, T >::clear(), and QSSGBuiltInRhiShaderCache::releaseCachedResources().
|
static |
Definition at line 364 of file qssgrendershadercache.cpp.
References QByteArrayLiteral.
Referenced by QSSGShaderLibraryManager::loadPregeneratedShaderInfo(), and newPipelineFromPregenerated().
|
static |
Definition at line 369 of file qssgrendershadercache.cpp.
References QByteArrayLiteral.
Referenced by QSSGShaderLibraryManager::loadPregeneratedShaderInfo(), and newPipelineFromPregenerated().
QSSGRhiShaderPipelinePtr QSSGShaderCache::tryGetRhiShaderPipeline | ( | const QByteArray & | inKey, |
const QSSGShaderFeatures & | inFeatures ) |
Definition at line 305 of file qssgrendershadercache.cpp.
References cacheKey(), QHash< Key, T >::cend(), and QHash< Key, T >::constFind().
Referenced by compileForRhi(), and QSSGRendererPrivate::generateRhiShaderPipelineImpl().
QSSGRhiShaderPipelinePtr QSSGShaderCache::tryNewPipelineFromPersistentCache | ( | const QByteArray & | qsbcKey, |
const QByteArray & | inKey, | ||
const QSSGShaderFeatures & | inFeatures, | ||
QSSGRhiShaderPipeline::StageFlags | stageFlags = {} ) |
Definition at line 574 of file qssgrendershadercache.cpp.
References cacheKey(), QSSGRhiContextPrivate::editorMode(), QQsbInMemoryCollection::extractEntry(), QRhiShaderStage::Fragment, QHash< Key, T >::insert(), qDebug, QSSGRhiContextPrivate::shaderDebuggingEnabled(), and QRhiShaderStage::Vertex.
Referenced by QSSGRendererPrivate::generateRhiShaderPipelineImpl().
|
friend |
Definition at line 176 of file qssgrendershadercache_p.h.