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>.
Loading...
Searching...
No Matches
QSGMaterialShaderPrivate Class Reference

#include <qsgmaterialshader_p.h>

+ Collaboration diagram for QSGMaterialShaderPrivate:

Classes

struct  ShaderStageData
 

Public Member Functions

 QSGMaterialShaderPrivate (QSGMaterialShader *q)
 
void clearCachedRendererData ()
 
void prepare (QShader::Variant vertexShaderVariant)
 
QShader shader (QShader::Stage stage) const
 

Static Public Member Functions

static QSGMaterialShaderPrivateget (QSGMaterialShader *s)
 
static const QSGMaterialShaderPrivateget (const QSGMaterialShader *s)
 
static QShader loadShader (const QString &filename)
 

Public Attributes

QSGMaterialShaderq_ptr
 
QHash< QShader::Stage, QStringshaderFileNames
 
QSGMaterialShader::Flags flags
 
QHash< QShader::Stage, ShaderStageDatashaders
 
int ubufBinding = -1
 
int ubufSize = 0
 
QRhiShaderResourceBinding::StageFlags ubufStages
 
QRhiShaderResourceBinding::StageFlags combinedImageSamplerBindings [MAX_SHADER_RESOURCE_BINDINGS]
 
int combinedImageSamplerCount [MAX_SHADER_RESOURCE_BINDINGS]
 
ShaderStageDatavertexShader = nullptr
 
ShaderStageDatafragmentShader = nullptr
 
QByteArray masterUniformData
 
QVarLengthArray< QSGTexture *, 4 > textureBindingTable [MAX_SHADER_RESOURCE_BINDINGS]
 
QVarLengthArray< QRhiSampler *, 4 > samplerBindingTable [MAX_SHADER_RESOURCE_BINDINGS]
 

Static Public Attributes

static const int MAX_SHADER_RESOURCE_BINDINGS = 32
 

Detailed Description

Definition at line 28 of file qsgmaterialshader_p.h.

Constructor & Destructor Documentation

◆ QSGMaterialShaderPrivate()

QSGMaterialShaderPrivate::QSGMaterialShaderPrivate ( QSGMaterialShader * q)
inline

Definition at line 33 of file qsgmaterialshader_p.h.

Member Function Documentation

◆ clearCachedRendererData()

void QSGMaterialShaderPrivate::clearCachedRendererData ( )

Definition at line 176 of file qsgmaterialshader.cpp.

References clear(), i, MAX_SHADER_RESOURCE_BINDINGS, samplerBindingTable, and textureBindingTable.

Referenced by QSGBatchRenderer::ShaderManager::clearCachedRendererData(), and prepare().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [1/2]

static const QSGMaterialShaderPrivate * QSGMaterialShaderPrivate::get ( const QSGMaterialShader * s)
inlinestatic

Definition at line 35 of file qsgmaterialshader_p.h.

◆ get() [2/2]

static QSGMaterialShaderPrivate * QSGMaterialShaderPrivate::get ( QSGMaterialShader * s)
inlinestatic

Definition at line 34 of file qsgmaterialshader_p.h.

Referenced by QSGBatchRenderer::calculateVertexInputLayout(), QSGBatchRenderer::ShaderManager::clearCachedRendererData(), QSGDefaultRenderContext::initializeRhiShader(), QSGBatchRenderer::ShaderManager::prepareMaterial(), and QSGBatchRenderer::ShaderManager::prepareMaterialNoRewrite().

+ Here is the caller graph for this function:

◆ loadShader()

QShader QSGMaterialShaderPrivate::loadShader ( const QString & filename)
static

Definition at line 166 of file qsgmaterialshader.cpp.

References QShader::fromSerialized(), qWarning, and QIODeviceBase::ReadOnly.

Referenced by prepare(), and QSGBatchRenderer::RhiVisualizer::prepareVisualize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepare()

◆ shader()

QShader QSGMaterialShaderPrivate::shader ( QShader::Stage stage) const
inline

Definition at line 40 of file qsgmaterialshader_p.h.

References QShader::shader().

+ Here is the call graph for this function:

Member Data Documentation

◆ combinedImageSamplerBindings

QRhiShaderResourceBinding::StageFlags QSGMaterialShaderPrivate::combinedImageSamplerBindings[MAX_SHADER_RESOURCE_BINDINGS]

Definition at line 63 of file qsgmaterialshader_p.h.

Referenced by prepare().

◆ combinedImageSamplerCount

int QSGMaterialShaderPrivate::combinedImageSamplerCount[MAX_SHADER_RESOURCE_BINDINGS]

Definition at line 64 of file qsgmaterialshader_p.h.

Referenced by prepare().

◆ flags

QSGMaterialShader::Flags QSGMaterialShaderPrivate::flags

Definition at line 46 of file qsgmaterialshader_p.h.

◆ fragmentShader

ShaderStageData* QSGMaterialShaderPrivate::fragmentShader = nullptr

Definition at line 67 of file qsgmaterialshader_p.h.

Referenced by prepare().

◆ masterUniformData

QByteArray QSGMaterialShaderPrivate::masterUniformData

Definition at line 69 of file qsgmaterialshader_p.h.

Referenced by prepare().

◆ MAX_SHADER_RESOURCE_BINDINGS

const int QSGMaterialShaderPrivate::MAX_SHADER_RESOURCE_BINDINGS = 32
static

Definition at line 58 of file qsgmaterialshader_p.h.

Referenced by clearCachedRendererData(), and prepare().

◆ q_ptr

QSGMaterialShader* QSGMaterialShaderPrivate::q_ptr

Definition at line 44 of file qsgmaterialshader_p.h.

◆ samplerBindingTable

QVarLengthArray<QRhiSampler *, 4> QSGMaterialShaderPrivate::samplerBindingTable[MAX_SHADER_RESOURCE_BINDINGS]

Definition at line 72 of file qsgmaterialshader_p.h.

Referenced by clearCachedRendererData().

◆ shaderFileNames

QHash<QShader::Stage, QString> QSGMaterialShaderPrivate::shaderFileNames

Definition at line 45 of file qsgmaterialshader_p.h.

Referenced by prepare().

◆ shaders

QHash<QShader::Stage, ShaderStageData> QSGMaterialShaderPrivate::shaders

Definition at line 56 of file qsgmaterialshader_p.h.

◆ textureBindingTable

QVarLengthArray<QSGTexture *, 4> QSGMaterialShaderPrivate::textureBindingTable[MAX_SHADER_RESOURCE_BINDINGS]

Definition at line 71 of file qsgmaterialshader_p.h.

Referenced by clearCachedRendererData().

◆ ubufBinding

int QSGMaterialShaderPrivate::ubufBinding = -1

Definition at line 60 of file qsgmaterialshader_p.h.

Referenced by prepare().

◆ ubufSize

int QSGMaterialShaderPrivate::ubufSize = 0

Definition at line 61 of file qsgmaterialshader_p.h.

Referenced by prepare().

◆ ubufStages

QRhiShaderResourceBinding::StageFlags QSGMaterialShaderPrivate::ubufStages

Definition at line 62 of file qsgmaterialshader_p.h.

Referenced by prepare().

◆ vertexShader

ShaderStageData* QSGMaterialShaderPrivate::vertexShader = nullptr

Definition at line 66 of file qsgmaterialshader_p.h.

Referenced by QSGBatchRenderer::calculateVertexInputLayout(), and prepare().


The documentation for this class was generated from the following files: