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

(a7de4fe6ee6b50ea53759169b9659ac184029df9)

#include "qssgcomputemanager_p.h"
#include "qssgrendercontextcore.h"
#include "extensionapi/qssgrenderextensions.h"
#include "qssgrendercommands_p.h"
#include "private/qssgrendercomputepass_p.h"
#include "qssgrendershadercodegenerator_p.h"
#include "qssgrendershadertokenizer_p.h"
#include "private/qssgrenderbuffer_p.h"
#include "private/qssgrenderer_p.h"
#include "private/qssglayerrenderdata_p.h"
Include dependency graph for qssgcomputemanager.cpp:

Go to the source code of this file.

Functions

static QSet< QByteArray > shaderIdentifiers (const QByteArray &shaderCode)
static bool containsAny (const QSet< QByteArray > &identifiers, const QByteArrayList &list)
static quint32 softShadowQualityToInt (QSSGRenderLight::SoftShadowQuality quality)
static QSSGRhiShaderPipelinePtr generateRhiShaderPipeline (const QByteArray &inKey, QSSGRenderContextInterface *cif, const QSSGRenderComputePass *pass, const QSSGComputeLightContext &lightContext, const bool multiview, int viewCount)
bool finalizeComputeShader (QSSGUserComputeShader &computeShader)
void prepareComputePass (QSSGRenderer &renderer, QSSGLayerRenderData &datadata, QSSGRenderComputePass *passNode, ComputeUserPassData &userData, QSSGPassKey keykey)

Variables

static QT_BEGIN_NAMESPACE constexpr int s_maxDirectionalLights = 16384u / sizeof(QSSGShaderDirectionalLightData)
static constexpr int s_maxPositionalLights = 16384u / sizeof(QSSGShaderLightData)
static const QByteArrayList cameraUniforms
static const QByteArrayList screenTextures
static const QByteArrayList rhiProperties
static const QByteArrayList lightUniforms
static const QByteArrayList positionalShadows

Function Documentation

◆ containsAny()

bool containsAny ( const QSet< QByteArray > & identifiers,
const QByteArrayList & list )
static

Definition at line 85 of file qssgcomputemanager.cpp.

◆ finalizeComputeShader()

bool finalizeComputeShader ( QSSGUserComputeShader & computeShader)

Definition at line 254 of file qssgcomputemanager.cpp.

◆ generateRhiShaderPipeline()

QSSGRhiShaderPipelinePtr generateRhiShaderPipeline ( const QByteArray & inKey,
QSSGRenderContextInterface * cif,
const QSSGRenderComputePass * pass,
const QSSGComputeLightContext & lightContext,
const bool multiview,
int viewCount )
static

Definition at line 117 of file qssgcomputemanager.cpp.

References cameraUniforms, and Compute.

◆ prepareComputePass()

void prepareComputePass ( QSSGRenderer & renderer,
QSSGLayerRenderData & data,
QSSGRenderComputePass * passNode,
ComputeUserPassData & userData,
QSSGPassKey key )

Definition at line 291 of file qssgcomputemanager.cpp.

◆ shaderIdentifiers()

QSet< QByteArray > shaderIdentifiers ( const QByteArray & shaderCode)
static

Definition at line 73 of file qssgcomputemanager.cpp.

◆ softShadowQualityToInt()

quint32 softShadowQualityToInt ( QSSGRenderLight::SoftShadowQuality quality)
static

Definition at line 94 of file qssgcomputemanager.cpp.

Variable Documentation

◆ cameraUniforms

const QByteArrayList cameraUniforms
static
Initial value:
=
{
QByteArrayLiteral("PROJECTION_MATRIX"), QByteArrayLiteral("qt_projectionMatrix"),
QByteArrayLiteral("INVERSE_PROJECTION_MATRIX"), QByteArrayLiteral("qt_inverseProjectionMatrix"),
QByteArrayLiteral("CAMERA_DIRECTION"), QByteArrayLiteral("qt_cameraDirection"),
QByteArrayLiteral("CAMERA_PROPERTIES"), QByteArrayLiteral("qt_cameraProperties"),
QByteArrayLiteral("CAMERA_POSITION"), QByteArrayLiteral("qt_cameraPosition"),
QByteArrayLiteral("VIEW_MATRIX"), QByteArrayLiteral("qt_viewMatrix"),
QByteArrayLiteral("INVERSE_VIEW_MATRIX"), QByteArrayLiteral("qt_inverseViewMatrix"),
QByteArrayLiteral("VIEWPROJECTION_MATRIX"), QByteArrayLiteral("qt_viewProjectionMatrix"),
QByteArrayLiteral("INVERSE_VIEWPROJECTION_MATRIX"), QByteArrayLiteral("qt_inverseViewProjectionMatrix")
}
#define QByteArrayLiteral(str)
Definition qbytearray.h:53

Definition at line 21 of file qssgcomputemanager.cpp.

Referenced by generateRhiShaderPipeline().

◆ lightUniforms

const QByteArrayList lightUniforms
static
Initial value:
=
{
QByteArrayLiteral("DIRECTIONAL_LIGHT_COUNT"),
QByteArrayLiteral("DIRECTIONAL_LIGHT_DIFFUSE"),
QByteArrayLiteral("DIRECTIONAL_LIGHT_DIRECTION"),
QByteArrayLiteral("POINT_LIGHT_COUNT"),
QByteArrayLiteral("POINT_LIGHT_DIFFUSE"),
QByteArrayLiteral("POINT_LIGHT_POSITION"),
QByteArrayLiteral("POINT_LIGHT_ATTENUATION"),
QByteArrayLiteral("SPOT_LIGHT_COUNT"),
QByteArrayLiteral("SPOT_LIGHT_DIFFUSE"),
QByteArrayLiteral("SPOT_LIGHT_POSITION"),
QByteArrayLiteral("SPOT_LIGHT_ATTENUATION"),
QByteArrayLiteral("SPOT_LIGHT_DIRECTION"),
QByteArrayLiteral("SPOT_LIGHT_CONES")
}

Definition at line 49 of file qssgcomputemanager.cpp.

◆ positionalShadows

const QByteArrayList positionalShadows
static
Initial value:
=
{
QByteArrayLiteral("SPOT_LIGHT_SHADOW"),
QByteArrayLiteral("POINT_LIGHT_SHADOW"),
}

Definition at line 66 of file qssgcomputemanager.cpp.

◆ rhiProperties

const QByteArrayList rhiProperties
static
Initial value:
=
{
QByteArrayLiteral("FRAMEBUFFER_Y_UP"),
QByteArrayLiteral("NDC_Y_UP"),
QByteArrayLiteral("NEAR_CLIP_VALUE")
}

Definition at line 42 of file qssgcomputemanager.cpp.

◆ s_maxDirectionalLights

QT_BEGIN_NAMESPACE constexpr int s_maxDirectionalLights = 16384u / sizeof(QSSGShaderDirectionalLightData)
staticconstexpr

Definition at line 18 of file qssgcomputemanager.cpp.

◆ s_maxPositionalLights

constexpr int s_maxPositionalLights = 16384u / sizeof(QSSGShaderLightData)
staticconstexpr

Definition at line 19 of file qssgcomputemanager.cpp.

◆ screenTextures

const QByteArrayList screenTextures
static
Initial value:
=
{
QByteArrayLiteral("SCREEN_TEXTURE"),
QByteArrayLiteral("SCREEN_MIP_TEXTURE"),
QByteArrayLiteral("DEPTH_TEXTURE"),
QByteArrayLiteral("NORMAL_ROUGHNESS_TEXTURE"),
QByteArrayLiteral("AO_TEXTURE")
}

Definition at line 33 of file qssgcomputemanager.cpp.