5#include "graphobjects/qssgrendergraphobject_p.h"
9#include <QtQuick3DUtils/private/qssgutils_p.h>
10#include <QtQuick3DUtils/private/qquick3dprofiler_p.h>
12#include <QtQuick3DRuntimeRender/private/qssgruntimerenderlogging_p.h>
13#include <qtquick3d_tracepoints_p.h>
15#include <QCoreApplication>
16#include <QStandardPaths>
21#include <QtGui/qsurfaceformat.h>
23# include <QtGui/qopenglcontext.h>
26#ifdef QT_QUICK3D_HAS_RUNTIME_SHADERS
27#include <rhi/qshaderbaker.h>
30#include <QtCore/qmutex.h>
34Q_TRACE_POINT(qtquick3d, QSSG_loadShader_entry)
35Q_TRACE_POINT(qtquick3d, QSSG_loadShader_exit)
37static QtQuick3DEditorHelpers::ShaderBaker::StatusCallback s_statusCallback =
nullptr;
40size_t qHash(QSSGShaderFeatures features)
noexcept {
return (features.flags & (~QSSGShaderFeatures::IndexMask)); }
45 case QShader::VertexStage:
46 return QStringLiteral(
"failedvert.txt");
48 case QShader::FragmentStage:
49 return QStringLiteral(
"failedfrag.txt");
52 return QStringLiteral(
"failedshader.txt");
58 const char *
name =
nullptr;
63 {
"QSSG_ENABLE_LIGHT_PROBE", QSSGShaderFeatures::Feature::LightProbe },
64 {
"QSSG_ENABLE_IBL_ORIENTATION", QSSGShaderFeatures::Feature::IblOrientation },
65 {
"QSSG_ENABLE_SSM", QSSGShaderFeatures::Feature::Ssm },
66 {
"QSSG_ENABLE_SSAO", QSSGShaderFeatures::Feature::Ssao },
67 {
"QSSG_ENABLE_DEPTH_PASS", QSSGShaderFeatures::Feature::DepthPass },
68 {
"QSSG_ENABLE_ORTHO_SHADOW_PASS", QSSGShaderFeatures::Feature::OrthoShadowPass },
69 {
"QSSG_ENABLE_PERSPECTIVE_SHADOW_PASS", QSSGShaderFeatures::Feature::PerspectiveShadowPass },
70 {
"QSSG_ENABLE_LINEAR_TONEMAPPING", QSSGShaderFeatures::Feature::LinearTonemapping },
71 {
"QSSG_ENABLE_ACES_TONEMAPPING", QSSGShaderFeatures::Feature::AcesTonemapping },
72 {
"QSSG_ENABLE_HEJLDAWSON_TONEMAPPING", QSSGShaderFeatures::Feature::HejlDawsonTonemapping },
73 {
"QSSG_ENABLE_FILMIC_TONEMAPPING", QSSGShaderFeatures::Feature::FilmicTonemapping },
74 {
"QSSG_ENABLE_RGBE_LIGHT_PROBE", QSSGShaderFeatures::Feature::RGBELightProbe },
75 {
"QSSG_ENABLE_OPAQUE_DEPTH_PRE_PASS", QSSGShaderFeatures::Feature::OpaqueDepthPrePass },
76 {
"QSSG_ENABLE_REFLECTION_PROBE", QSSGShaderFeatures::Feature::ReflectionProbe },
77 {
"QSSG_REDUCE_MAX_NUM_LIGHTS", QSSGShaderFeatures::Feature::ReduceMaxNumLights },
78 {
"QSSG_ENABLE_LIGHTMAP", QSSGShaderFeatures::Feature::Lightmap },
79 {
"QSSG_DISABLE_MULTIVIEW", QSSGShaderFeatures::Feature::DisableMultiView },
80 {
"QSSG_FORCE_IBL_EXPOSURE", QSSGShaderFeatures::Feature::ForceIblExposure },
81 {
"QSSG_ENABLE_NORMAL_PASS", QSSGShaderFeatures::Feature::NormalPass }
84static_assert(std::size(DefineTable) == QSSGShaderFeatures::Count,
"Missing feature define?");
86const char *QSSGShaderFeatures::asDefineString(QSSGShaderFeatures::Feature feature) {
return DefineTable[
static_cast<FlagType>(feature) & QSSGShaderFeatures::IndexMask].name; }
87QSSGShaderFeatures::Feature QSSGShaderFeatures::fromIndex(quint32 idx) {
return DefineTable[idx].feature; }
89void QSSGShaderFeatures::set(QSSGShaderFeatures::Feature feature,
bool val)
92 flags |= (
static_cast<FlagType>(feature) & ~IndexMask);
94 flags &= ~(
static_cast<FlagType>(feature) & ~IndexMask);
97#ifdef QT_QUICK3D_HAS_RUNTIME_SHADERS
98static void initBakerForNonPersistentUse(QShaderBaker *baker, QRhi *rhi)
100 QVector<QShaderBaker::GeneratedShader> outputs;
101 switch (rhi->backend()) {
103 outputs.append({ QShader::HlslShader, QShaderVersion(50) });
106 outputs.append({ QShader::HlslShader, QShaderVersion(61) });
109#if defined(Q_OS_VISIONOS)
110 outputs.append({ QShader::MslShader, QShaderVersion(21) });
112 outputs.append({ QShader::MslShader, QShaderVersion(12) });
115 case QRhi::OpenGLES2:
117 QSurfaceFormat format = QSurfaceFormat::defaultFormat();
119 auto h =
static_cast<
const QRhiGles2NativeHandles *>(rhi->nativeHandles());
121 format = h->context->format();
123 if (format.profile() == QSurfaceFormat::CoreProfile && format.version() >= qMakePair(3, 3)) {
124 outputs.append({ QShader::GlslShader, QShaderVersion(330) });
126 bool isGLESModule =
false;
128 isGLESModule = QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES;
130 if (format.renderableType() == QSurfaceFormat::OpenGLES || isGLESModule) {
131 if (format.majorVersion() >= 3)
132 outputs.append({ QShader::GlslShader, QShaderVersion(300, QShaderVersion::GlslEs) });
134 outputs.append({ QShader::GlslShader, QShaderVersion(100, QShaderVersion::GlslEs) });
150 if (format.version() >= qMakePair(3, 1))
151 outputs.append({ QShader::GlslShader, QShaderVersion(140) });
153 outputs.append({ QShader::GlslShader, QShaderVersion(130) });
159 outputs.append({ QShader::SpirvShader, QShaderVersion(100) });
163 baker->setGeneratedShaders(outputs);
164 baker->setGeneratedShaderVariants({ QShader::StandardShader });
167static void initBakerForPersistentUse(QShaderBaker *baker, QRhi *)
169 QVector<QShaderBaker::GeneratedShader> outputs;
173 outputs.append({ QShader::SpirvShader, QShaderVersion(100) });
174 outputs.append({ QShader::HlslShader, QShaderVersion(50) });
175 outputs.append({ QShader::HlslShader, QShaderVersion(61) });
176#if defined(Q_OS_VISIONOS)
177 outputs.append({ QShader::MslShader, QShaderVersion(21) });
179 outputs.append({ QShader::MslShader, QShaderVersion(12) });
181 outputs.append({ QShader::GlslShader, QShaderVersion(330) });
182 outputs.append({ QShader::GlslShader, QShaderVersion(140) });
183 outputs.append({ QShader::GlslShader, QShaderVersion(130) });
184 outputs.append({ QShader::GlslShader, QShaderVersion(100, QShaderVersion::GlslEs) });
186 outputs.append({ QShader::GlslShader, QShaderVersion(300, QShaderVersion::GlslEs) });
200 baker->setBreakOnShaderTranslationError(
false);
202 baker->setGeneratedShaders(outputs);
203 baker->setGeneratedShaderVariants({ QShader::StandardShader });
221 static const bool diskCacheDisabled = qEnvironmentVariableIntValue(
"QT_DISABLE_SHADER_DISK_CACHE")
222 || qEnvironmentVariableIntValue(
"QSG_RHI_DISABLE_DISK_CACHE");
223 const bool attrDiskCacheDisabled = (qApp ? qApp->testAttribute(Qt::AA_DisableShaderDiskCache) :
false);
230 QDir::root().mkpath(name);
231 return QFileInfo(name).isWritable();
236 static bool checked =
false;
237 static QString currentCacheDir;
238 static bool cacheWritable =
false;
241 return cacheWritable ? currentCacheDir : QString();
244 const QString cachePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
245 const QString subPath = QLatin1String(
"/q3dshadercache-") + QSysInfo::buildAbi() + QLatin1Char(
'/');
247 if (!cachePath.isEmpty()) {
248 currentCacheDir = cachePath + subPath;
249 cacheWritable = ensureWritableDir(currentCacheDir);
252 return cacheWritable ? currentCacheDir : QString();
257 const QString cacheDir = persistentQsbcDir();
258 if (!cacheDir.isEmpty())
259 return cacheDir + QLatin1String(
"q3dshadercache.qsbc");
264QSSGShaderCache::QSSGShaderCache(QSSGRhiContext &ctx,
265 const InitBakerFunc initBakeFn)
267 m_initBaker(initBakeFn),
268 m_builtInShaders(*
this)
270 if (isAutoDiskCacheEnabled()) {
271 const bool shaderDebug = !QSSGRhiContextPrivate::editorMode() && QSSGRhiContextPrivate::shaderDebuggingEnabled();
272 m_persistentShaderStorageFileName = persistentQsbcFileName();
273 if (!m_persistentShaderStorageFileName.isEmpty()) {
274 const bool skipCacheFile = qEnvironmentVariableIntValue(
"QT_QUICK3D_NO_SHADER_CACHE_LOAD");
275 if (!skipCacheFile && QFileInfo::exists(m_persistentShaderStorageFileName)) {
277 qDebug(
"Attempting to seed material shader cache from %s", qPrintable(m_persistentShaderStorageFileName));
278 if (m_persistentShaderBakingCache.load(m_persistentShaderStorageFileName)) {
280 const int count = m_persistentShaderBakingCache.availableEntries().count();
281 qDebug(
"Loaded %d shader pipelines into the material shader cache", count);
296 m_initBaker = m_persistentShaderStorageFileName.isEmpty() ? initBakerForNonPersistentUse
297 : initBakerForPersistentUse;
301QSSGShaderCache::~QSSGShaderCache()
303 if (!m_persistentShaderStorageFileName.isEmpty())
304 m_persistentShaderBakingCache.save(m_persistentShaderStorageFileName);
307void QSSGShaderCache::releaseCachedResources()
309 m_builtInShaders.releaseCachedResources();
311 m_rhiShaders.clear();
317QSSGRhiShaderPipelinePtr QSSGShaderCache::tryGetRhiShaderPipeline(
const QByteArray &inKey,
318 const QSSGShaderFeatures &inFeatures)
320 QSSGShaderCacheKey cacheKey(inKey);
321 cacheKey.m_features = inFeatures;
322 cacheKey.updateHashCode();
323 const auto theIter = m_rhiShaders.constFind(cacheKey);
324 if (theIter != m_rhiShaders.cend())
325 return theIter.value();
330void QSSGShaderCache::addShaderPreprocessor(QByteArray &str,
331 const QByteArray &inKey,
332 ShaderType shaderType,
333 const QSSGShaderFeatures &inFeatures,
338 m_insertStr +=
"#version 440\n";
340 if (!inKey.isNull()) {
341 m_insertStr +=
"//Shader name -";
342 m_insertStr += inKey;
346 m_insertStr +=
"#define texture2D texture\n";
349 m_insertStr +=
"#define QSHADER_VIEW_COUNT ";
350 m_insertStr += QByteArray::number(viewCount);
353 str.insert(0, m_insertStr);
354 QString::size_type insertPos =
int(m_insertStr.size());
357 const bool fragOutputEnabled = (!inFeatures.isSet(QSSGShaderFeatures::Feature::DepthPass)) && shaderType == ShaderType::Fragment;
358 for (
const auto &def : DefineTable) {
359 m_insertStr.append(
"#define ");
360 m_insertStr.append(def.name);
361 m_insertStr.append(
" ");
362 m_insertStr.append(inFeatures.isSet(def.feature) ?
"1" :
"0");
363 m_insertStr.append(
"\n");
366 str.insert(insertPos, m_insertStr);
367 insertPos +=
int(m_insertStr.size());
370 if (fragOutputEnabled)
371 m_insertStr +=
"layout(location = 0) out vec4 fragOutput;\n";
373 str.insert(insertPos, m_insertStr);
376QByteArray QSSGShaderCache::resourceFolder()
378 return QByteArrayLiteral(
":/res/rhishaders/");
381QByteArray QSSGShaderCache::shaderCollectionFile()
383 return QByteArrayLiteral(
"qtappshaders.qsbc");
386QSSGRhiShaderPipelinePtr QSSGShaderCache::compileForRhi(
const QByteArray &inKey,
const QByteArray &inVert,
const QByteArray &inFrag,
387 const QSSGShaderFeatures &inFeatures, QSSGRhiShaderPipeline::StageFlags stageFlags,
389 bool perTargetCompilation)
391#ifdef QT_QUICK3D_HAS_RUNTIME_SHADERS
392 const QSSGRhiShaderPipelinePtr &rhiShaders = tryGetRhiShaderPipeline(inKey, inFeatures);
396 QSSGShaderCacheKey tempKey(inKey);
397 tempKey.m_features = inFeatures;
398 tempKey.updateHashCode();
400 QByteArray vertexCode = inVert;
401 QByteArray fragmentCode = inFrag;
403 if (!vertexCode.isEmpty())
404 addShaderPreprocessor(vertexCode, inKey, ShaderType::Vertex, inFeatures, viewCount);
406 if (!fragmentCode.isEmpty())
407 addShaderPreprocessor(fragmentCode, inKey, ShaderType::Fragment, inFeatures, viewCount);
411 QSSGRhiShaderPipelinePtr shaders;
412 QString vertErr, fragErr;
415 m_initBaker(&baker, m_rhiContext.rhi());
420 baker.setPerTargetCompilation(perTargetCompilation);
424 baker.setMultiViewCount(viewCount);
428 const bool mediumPrecision = qEnvironmentVariableIntValue(
"QT_QUICK3D_MEDIUM_PRECISION");
430 baker.setGlslOptions(QShaderBaker::GlslOption::GlslEsFragDefaultFloatPrecisionMedium);
432 const bool editorMode = QSSGRhiContextPrivate::editorMode();
434 const bool shaderDebug = !editorMode && QSSGRhiContextPrivate::shaderDebuggingEnabled();
436 static auto dumpShader = [](QShader::Stage stage,
const QByteArray &code) {
438 case QShader::Stage::VertexStage:
439 qDebug(
"VERTEX SHADER:\n*****\n");
441 case QShader::Stage::FragmentStage:
442 qDebug(
"FRAGMENT SHADER:\n*****\n");
445 qDebug(
"SHADER:\n*****\n");
448 const auto lines = code.split(
'\n');
449 for (
int i = 0; i < lines.size(); i++)
450 qDebug(
"%3d %s", i + 1, lines.at(i).constData());
454 static auto dumpShaderToFile = [](QShader::Stage stage,
const QByteArray &data) {
455 QFile f(dumpFilename(stage));
456 if (f.open(QIODevice::WriteOnly | QIODevice::Text)) {
459 qWarning(
"Failed to write to file: %s (%s)\n",
460 qPrintable(f.fileName()), qPrintable(f.errorString()));
464 baker.setSourceString(vertexCode, QShader::VertexStage);
465 QShader vertexShader = baker.bake();
466 const auto vertShaderValid = vertexShader.isValid();
467 if (!vertShaderValid) {
468 vertErr = baker.errorMessage();
470 qWarning(
"Failed to compile vertex shader: %s\n", qPrintable(vertErr));
472 qWarning() << inKey <<
'\n';
477 dumpShader(QShader::Stage::VertexStage, vertexCode);
478 if (!vertShaderValid)
479 dumpShaderToFile(QShader::Stage::VertexStage, vertexCode);
482 baker.setSourceString(fragmentCode, QShader::FragmentStage);
483 QShader fragmentShader = baker.bake();
484 const bool fragShaderValid = fragmentShader.isValid();
485 if (!fragShaderValid) {
486 fragErr = baker.errorMessage();
488 qWarning(
"Failed to compile fragment shader: %s\n", qPrintable(fragErr));
490 qWarning() << inKey <<
'\n';
495 dumpShader(QShader::Stage::FragmentStage, fragmentCode);
496 if (!fragShaderValid)
497 dumpShaderToFile(QShader::Stage::FragmentStage, fragmentCode);
500 if (vertShaderValid && fragShaderValid) {
501 shaders = std::make_shared<QSSGRhiShaderPipeline>(m_rhiContext);
502 shaders->addStage(QRhiShaderStage(QRhiShaderStage::Vertex, vertexShader), stageFlags);
503 shaders->addStage(QRhiShaderStage(QRhiShaderStage::Fragment, fragmentShader), stageFlags);
505 qDebug(
"Compilation for vertex and fragment stages succeeded");
508 if (editorMode && s_statusCallback) {
509 using namespace QtQuick3DEditorHelpers::ShaderBaker;
510 const auto vertStatus = vertShaderValid ? Status::Success : Status::Error;
511 const auto fragStatus = fragShaderValid ? Status::Success : Status::Error;
512 QMutexLocker locker(&*s_statusMutex);
513 s_statusCallback(inKey, vertStatus, vertErr, QShader::VertexStage);
514 s_statusCallback(inKey, fragStatus, fragErr, QShader::FragmentStage);
517 auto result = m_rhiShaders.insert(tempKey, shaders).value();
518 if (result && result->vertexStage() && result->fragmentStage()) {
519 QQsbCollection::EntryDesc entryDesc = {
521 QQsbCollection::toFeatureSet(inFeatures),
522 result->vertexStage()->shader(),
523 result->fragmentStage()->shader()
525 m_persistentShaderBakingCache.addEntry(entryDesc.generateSha(), entryDesc);
533 Q_UNUSED(inFeatures);
534 Q_UNUSED(stageFlags);
535 qWarning(
"Cannot compile and condition shaders at runtime because this build of Qt Quick 3D is not linking to Qt Shader Tools. "
536 "Only pre-processed materials are supported.");
541QSSGRhiShaderPipelinePtr QSSGShaderCache::newPipelineFromPregenerated(
const QByteArray &inKey,
542 const QSSGShaderFeatures &inFeatures,
543 QQsbCollection::Entry entry,
544 const QSSGRenderGraphObject &obj,
545 QSSGRhiShaderPipeline::StageFlags stageFlags)
554 const bool shaderDebug = !QSSGRhiContextPrivate::editorMode() && QSSGRhiContextPrivate::shaderDebuggingEnabled();
556 qDebug(
"Loading pregenerated rhi shader(s)");
558 Q_TRACE_SCOPE(QSSG_loadShader);
559 Q_QUICK3D_PROFILE_START(QQuick3DProfiler::Quick3DLoadShader);
562 QSSGRhiShaderPipelinePtr shaders(
new QSSGRhiShaderPipeline(m_rhiContext));
564 const QString collectionFile = QString::fromLatin1(resourceFolder() + shaderCollectionFile());
566 QQsbIODeviceCollection qsbc(collectionFile);
567 QQsbCollection::EntryDesc entryDesc;
568 if (qsbc.map(QQsbIODeviceCollection::Read))
569 qsbc.extractEntry(entry, entryDesc);
571 qWarning(
"Failed to open entry %s", entry.key.constData());
573 if (entryDesc.vertShader.isValid() && entryDesc.fragShader.isValid()) {
574 shaders->addStage(QRhiShaderStage(QRhiShaderStage::Vertex, entryDesc.vertShader), stageFlags);
575 shaders->addStage(QRhiShaderStage(QRhiShaderStage::Fragment, entryDesc.fragShader), stageFlags);
577 qDebug(
"Loading of vertex and fragment stages succeeded");
580#if !QT_CONFIG(qml_debug)
583 Q_QUICK3D_PROFILE_END_WITH_ID(QQuick3DProfiler::Quick3DLoadShader, 0, obj.profilingId);
586 QSSGShaderCacheKey cacheKey(inKey);
587 cacheKey.m_features = inFeatures;
588 cacheKey.updateHashCode();
590 const auto inserted = m_rhiShaders.insert(cacheKey, shaders);
592 return inserted.value();
595QSSGRhiShaderPipelinePtr QSSGShaderCache::tryNewPipelineFromPersistentCache(
const QByteArray &qsbcKey,
596 const QByteArray &inKey,
597 const QSSGShaderFeatures &inFeatures,
598 QSSGRhiShaderPipeline::StageFlags stageFlags)
607 QQsbCollection::EntryDesc entryDesc;
611 if (!m_persistentShaderBakingCache.extractEntry(QQsbCollection::Entry(qsbcKey), entryDesc))
614 if (entryDesc.vertShader.isValid() && entryDesc.fragShader.isValid()) {
615 const bool shaderDebug = !QSSGRhiContextPrivate::editorMode() && QSSGRhiContextPrivate::shaderDebuggingEnabled();
617 qDebug(
"Loading rhi shaders from disk cache for %s (%s)", qsbcKey.constData(), inKey.constData());
619 QSSGRhiShaderPipelinePtr shaders(
new QSSGRhiShaderPipeline(m_rhiContext));
620 shaders->addStage(QRhiShaderStage(QRhiShaderStage::Vertex, entryDesc.vertShader), stageFlags);
621 shaders->addStage(QRhiShaderStage(QRhiShaderStage::Fragment, entryDesc.fragShader), stageFlags);
622 QSSGShaderCacheKey cacheKey(inKey);
623 cacheKey.m_features = inFeatures;
624 cacheKey.updateHashCode();
625 return m_rhiShaders.insert(cacheKey, shaders).value();
631QSSGRhiShaderPipelinePtr QSSGShaderCache::loadBuiltinUncached(
const QByteArray &inKey,
int viewCount)
633 const bool shaderDebug = !QSSGRhiContextPrivate::editorMode() && QSSGRhiContextPrivate::shaderDebuggingEnabled();
635 qDebug(
"Loading builtin rhi shader: %s (view count: %d)", inKey.constData(), viewCount);
637 Q_TRACE_SCOPE(QSSG_loadShader);
638 Q_QUICK3D_PROFILE_START(QQuick3DProfiler::Quick3DLoadShader);
641 QSSGRhiShaderPipelinePtr shaders(
new QSSGRhiShaderPipeline(m_rhiContext));
646 const QString prefix = QString::fromUtf8(resourceFolder() + inKey);
647 QString vertexFileName = prefix + QLatin1String(
".vert.qsb");
648 QString fragmentFileName = prefix + QLatin1String(
".frag.qsb");
652 if (viewCount == 2) {
653 vertexFileName += QLatin1String(
".mv2qsb");
654 fragmentFileName += QLatin1String(
".mv2qsb");
657 QShader vertexShader;
658 QShader fragmentShader;
661 f.setFileName(vertexFileName);
662 if (f.open(QIODevice::ReadOnly)) {
663 const QByteArray vsData = f.readAll();
664 vertexShader = QShader::fromSerialized(vsData);
667 qWarning(
"Failed to open %s", qPrintable(f.fileName()));
669 f.setFileName(fragmentFileName);
670 if (f.open(QIODevice::ReadOnly)) {
671 const QByteArray fsData = f.readAll();
672 fragmentShader = QShader::fromSerialized(fsData);
675 qWarning(
"Failed to open %s", qPrintable(f.fileName()));
678 if (vertexShader.isValid() && fragmentShader.isValid()) {
679 shaders->addStage(QRhiShaderStage(QRhiShaderStage::Vertex, vertexShader), QSSGRhiShaderPipeline::UsedWithoutIa);
680 shaders->addStage(QRhiShaderStage(QRhiShaderStage::Fragment, fragmentShader));
682 qDebug(
"Loading of vertex and fragment stages succeeded");
685 Q_QUICK3D_PROFILE_END_WITH_STRING(QQuick3DProfiler::Quick3DLoadShader, 0, inKey);
693 QMutexLocker locker(&*s_statusMutex);
694 s_statusCallback = cb;
Q_QUICK3DRUNTIMERENDER_EXPORT void setStatusCallback(StatusCallback cb)
void(*)(const QByteArray &descKey, Status status, const QString &err, QShader::Stage stage) StatusCallback
Q_QUICK3DRUNTIMERENDER_EXPORT void setAutomaticDiskCache(bool enable)
Q_QUICK3DRUNTIMERENDER_EXPORT bool isAutomaticDiskCacheEnabled()
Q_GLOBAL_STATIC(QReadWriteLock, g_updateMutex)
static QString persistentQsbcFileName()
static bool isAutoDiskCacheEnabled()
size_t qHash(QSSGShaderFeatures features) noexcept
static bool ensureWritableDir(const QString &name)
static bool s_autoDiskCacheEnabled
static QString dumpFilename(QShader::Stage stage)
static void initBakerForPersistentUse(QShaderBaker *, QRhi *)
static QString persistentQsbcDir()
static void initBakerForNonPersistentUse(QShaderBaker *, QRhi *)
static constexpr DefineEntry DefineTable[]