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
qssgrendershadercache.cpp File Reference

(10386f657ca1d85201bfb7b2839caa2083feea52)

#include "graphobjects/qssgrendergraphobject_p.h"
#include "qssgrendershadercache_p.h"
#include "qssgrendercontextcore.h"
#include <QtQuick3DUtils/private/qssgutils_p.h>
#include <QtQuick3DUtils/private/qquick3dprofiler_p.h>
#include <QtQuick3DRuntimeRender/private/qssgruntimerenderlogging_p.h>
#include <qtquick3d_tracepoints_p.h>
#include <QCoreApplication>
#include <QStandardPaths>
#include <QString>
#include <QFile>
#include <QDir>
#include <QtGui/qsurfaceformat.h>
#include <QtCore/qmutex.h>
Include dependency graph for qssgrendershadercache.cpp:

Go to the source code of this file.

Classes

struct  DefineEntry

Namespaces

namespace  QtQuick3DEditorHelpers

Functions

 Q_GLOBAL_STATIC (QMutex, s_statusMutex)
size_t qHash (QSSGShaderFeatures features) noexcept
static QString dumpFilename (QShader::Stage stage)
static void initBakerForNonPersistentUse (QShaderBaker *, QRhi *)
static void initBakerForPersistentUse (QShaderBaker *, QRhi *)
static bool isAutoDiskCacheEnabled ()
static bool ensureWritableDir (const QString &name)
static QString persistentQsbcDir ()
static QString persistentQsbcFileName ()

Variables

static QT_BEGIN_NAMESPACE QtQuick3DEditorHelpers::ShaderBaker::StatusCallback s_statusCallback = nullptr
static constexpr DefineEntry DefineTable []
static bool s_autoDiskCacheEnabled = true

Function Documentation

◆ dumpFilename()

QString dumpFilename ( QShader::Stage stage)
static

Definition at line 42 of file qssgrendershadercache.cpp.

◆ ensureWritableDir()

bool ensureWritableDir ( const QString & name)
inlinestatic

Definition at line 228 of file qssgrendershadercache.cpp.

◆ initBakerForNonPersistentUse()

void initBakerForNonPersistentUse ( QShaderBaker * ,
QRhi *  )
static

Definition at line 207 of file qssgrendershadercache.cpp.

◆ initBakerForPersistentUse()

void initBakerForPersistentUse ( QShaderBaker * ,
QRhi *  )
static

Definition at line 211 of file qssgrendershadercache.cpp.

◆ isAutoDiskCacheEnabled()

bool isAutoDiskCacheEnabled ( )
static

Definition at line 218 of file qssgrendershadercache.cpp.

References s_autoDiskCacheEnabled.

Referenced by QtQuick3DEditorHelpers::ShaderCache::isAutomaticDiskCacheEnabled().

Here is the caller graph for this function:

◆ persistentQsbcDir()

QString persistentQsbcDir ( )
static

Definition at line 234 of file qssgrendershadercache.cpp.

◆ persistentQsbcFileName()

QString persistentQsbcFileName ( )
inlinestatic

Definition at line 255 of file qssgrendershadercache.cpp.

◆ Q_GLOBAL_STATIC()

Q_GLOBAL_STATIC ( QMutex ,
s_statusMutex  )

◆ qHash()

size_t qHash ( QSSGShaderFeatures features)
noexcept

Definition at line 40 of file qssgrendershadercache.cpp.

Variable Documentation

◆ DefineTable

constexpr DefineEntry DefineTable
staticconstexpr
Initial value:
{
{ "QSSG_ENABLE_LIGHT_PROBE", QSSGShaderFeatures::Feature::LightProbe },
{ "QSSG_ENABLE_IBL_ORIENTATION", QSSGShaderFeatures::Feature::IblOrientation },
{ "QSSG_ENABLE_SSM", QSSGShaderFeatures::Feature::Ssm },
{ "QSSG_ENABLE_SSAO", QSSGShaderFeatures::Feature::Ssao },
{ "QSSG_ENABLE_DEPTH_PASS", QSSGShaderFeatures::Feature::DepthPass },
{ "QSSG_ENABLE_ORTHO_SHADOW_PASS", QSSGShaderFeatures::Feature::OrthoShadowPass },
{ "QSSG_ENABLE_PERSPECTIVE_SHADOW_PASS", QSSGShaderFeatures::Feature::PerspectiveShadowPass },
{ "QSSG_ENABLE_LINEAR_TONEMAPPING", QSSGShaderFeatures::Feature::LinearTonemapping },
{ "QSSG_ENABLE_ACES_TONEMAPPING", QSSGShaderFeatures::Feature::AcesTonemapping },
{ "QSSG_ENABLE_HEJLDAWSON_TONEMAPPING", QSSGShaderFeatures::Feature::HejlDawsonTonemapping },
{ "QSSG_ENABLE_FILMIC_TONEMAPPING", QSSGShaderFeatures::Feature::FilmicTonemapping },
{ "QSSG_ENABLE_RGBE_LIGHT_PROBE", QSSGShaderFeatures::Feature::RGBELightProbe },
{ "QSSG_ENABLE_OPAQUE_DEPTH_PRE_PASS", QSSGShaderFeatures::Feature::OpaqueDepthPrePass },
{ "QSSG_ENABLE_REFLECTION_PROBE", QSSGShaderFeatures::Feature::ReflectionProbe },
{ "QSSG_REDUCE_MAX_NUM_LIGHTS", QSSGShaderFeatures::Feature::ReduceMaxNumLights },
{ "QSSG_ENABLE_LIGHTMAP", QSSGShaderFeatures::Feature::Lightmap },
{ "QSSG_DISABLE_MULTIVIEW", QSSGShaderFeatures::Feature::DisableMultiView },
{ "QSSG_FORCE_IBL_EXPOSURE", QSSGShaderFeatures::Feature::ForceIblExposure },
{ "QSSG_ENABLE_NORMAL_PASS", QSSGShaderFeatures::Feature::NormalPass }
}

Definition at line 62 of file qssgrendershadercache.cpp.

◆ s_autoDiskCacheEnabled

bool s_autoDiskCacheEnabled = true
static

◆ s_statusCallback

Definition at line 37 of file qssgrendershadercache.cpp.