Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSGRhiShaderLinker Class Reference

#include <qsgrhishadereffectnode_p.h>

+ Collaboration diagram for QSGRhiShaderLinker:

Classes

struct  Constant
 

Public Member Functions

void reset (const QShader &vs, const QShader &fs)
 
void feedConstants (const QSGShaderEffectNode::ShaderData &shader, const QSet< int > *dirtyIndices=nullptr)
 
void feedSamplers (const QSGShaderEffectNode::ShaderData &shader, const QSet< int > *dirtyIndices=nullptr)
 
void linkTextureSubRects ()
 
void dump ()
 

Public Attributes

bool m_error
 
QShader m_vs
 
QShader m_fs
 
uint m_constantBufferSize
 
QHash< uint, Constantm_constants
 
QHash< int, QVariantm_samplers
 
QHash< QByteArray, int > m_samplerNameMap
 
QSet< int > m_subRectBindings
 

Detailed Description

Definition at line 29 of file qsgrhishadereffectnode_p.h.

Member Function Documentation

◆ dump()

void QSGRhiShaderLinker::dump ( )

◆ feedConstants()

void QSGRhiShaderLinker::feedConstants ( const QSGShaderEffectNode::ShaderData shader,
const QSet< int > *  dirtyIndices = nullptr 
)

Definition at line 37 of file qsgrhishadereffectnode.cpp.

References QSGGuiThreadShaderEffectManager::ShaderInfo::Constant, i, m_constantBufferSize, m_constants, QSGShaderEffectNode::VariableData::None, Q_ASSERT, QByteArrayLiteral, qDebug, qEnvironmentVariableIntValue(), qMax(), QSGShaderEffectNode::VariableData::specialType, QSGShaderEffectNode::VariableData::SubRect, QVariant::value(), QSGShaderEffectNode::VariableData::value, and var.

Referenced by QSGRhiShaderEffectNode::syncMaterial().

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

◆ feedSamplers()

void QSGRhiShaderLinker::feedSamplers ( const QSGShaderEffectNode::ShaderData shader,
const QSet< int > *  dirtyIndices = nullptr 
)

Definition at line 81 of file qsgrhishadereffectnode.cpp.

References i, QHash< Key, T >::insert(), m_samplerNameMap, m_samplers, Q_ASSERT, QSGGuiThreadShaderEffectManager::ShaderInfo::Sampler, QSGShaderEffectNode::VariableData::Source, QSGShaderEffectNode::VariableData::specialType, QHash< Key, T >::value(), QSGShaderEffectNode::VariableData::value, and var.

Referenced by QSGRhiShaderEffectNode::syncMaterial().

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

◆ linkTextureSubRects()

void QSGRhiShaderLinker::linkTextureSubRects ( )

Definition at line 115 of file qsgrhishadereffectnode.cpp.

References QHash< Key, T >::contains(), QSet< T >::insert(), m_constants, m_samplerNameMap, m_subRectBindings, qWarning, QSGShaderEffectNode::VariableData::SubRect, and QHash< Key, T >::value().

Referenced by QSGRhiShaderEffectNode::syncMaterial().

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

◆ reset()

QT_BEGIN_NAMESPACE void QSGRhiShaderLinker::reset ( const QShader vs,
const QShader fs 
)

Definition at line 18 of file qsgrhishadereffectnode.cpp.

References QSet< T >::clear(), QHash< Key, T >::clear(), QShader::isValid(), m_constantBufferSize, m_constants, m_error, m_fs, m_samplerNameMap, m_samplers, m_subRectBindings, m_vs, Q_ASSERT, and QHash< Key, T >::reserve().

Referenced by QSGRhiShaderEffectNode::syncMaterial().

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

Member Data Documentation

◆ m_constantBufferSize

uint QSGRhiShaderLinker::m_constantBufferSize

Definition at line 53 of file qsgrhishadereffectnode_p.h.

Referenced by dump(), feedConstants(), and reset().

◆ m_constants

◆ m_error

bool QSGRhiShaderLinker::m_error

Definition at line 50 of file qsgrhishadereffectnode_p.h.

Referenced by dump(), and reset().

◆ m_fs

QShader QSGRhiShaderLinker::m_fs

Definition at line 52 of file qsgrhishadereffectnode_p.h.

Referenced by dump(), and reset().

◆ m_samplerNameMap

QHash<QByteArray, int> QSGRhiShaderLinker::m_samplerNameMap

Definition at line 56 of file qsgrhishadereffectnode_p.h.

Referenced by feedSamplers(), linkTextureSubRects(), and reset().

◆ m_samplers

QHash<int, QVariant> QSGRhiShaderLinker::m_samplers

◆ m_subRectBindings

QSet<int> QSGRhiShaderLinker::m_subRectBindings

◆ m_vs

QShader QSGRhiShaderLinker::m_vs

Definition at line 51 of file qsgrhishadereffectnode_p.h.

Referenced by dump(), and reset().


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