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
QSSGStageGeneratorBase Struct Reference

#include <qssgrendershadercodegenerator_p.h>

Inheritance diagram for QSSGStageGeneratorBase:
Collaboration diagram for QSSGStageGeneratorBase:

Public Types

enum class  ShaderItemType { VertexInput , Input , Output , Uniform }
enum class  ShaderItemMapFlag { Flat = 0x01 }
typedef QMap< QByteArray, QByteArrayTStrTableStrMap
typedef QMap< QByteArray, QPair< quint32, QByteArray > > TStrTableSizedStrMap
typedef QPair< QByteArray, QByteArrayTParamPair
typedef QPair< QByteArray, TParamPairTConstantBufferParamPair
typedef QVector< TConstantBufferParamPairTConstantBufferParamArray

Public Member Functions

 QSSGStageGeneratorBase (QSSGShaderGeneratorStage inStage)
virtual ~QSSGStageGeneratorBase ()=default
virtual void begin (QSSGShaderGeneratorStageFlags inEnabledStages)
virtual void addIncoming (const QByteArray &name, const QByteArray &type)
virtual void addOutgoing (const QByteArray &name, const QByteArray &type)
virtual void addFlatIncoming (const QByteArray &name, const QByteArray &type)
virtual void addFlatOutgoing (const QByteArray &name, const QByteArray &type)
virtual void addUniform (const QByteArray &name, const QByteArray &type)
virtual void addUniformArray (const QByteArray &name, const QByteArray &type, quint32 size)
virtual void addConstantBuffer (const QByteArray &name, const QByteArray &layout)
virtual void addConstantBufferParam (const QByteArray &cbName, const QByteArray &paramName, const QByteArray &type)
virtual QSSGStageGeneratorBaseoperator<< (const QByteArray &data)
virtual void append (const QByteArray &data)
QSSGShaderGeneratorStage stage () const
void addShaderPass2Marker (ShaderItemType itemType)
void addShaderItemMap (ShaderItemType itemType, const TStrTableStrMap &itemMap, ShaderItemMapFlags flags={})
virtual void addShaderIncomingMap ()
virtual void addShaderUniformMap ()
virtual void addShaderOutgoingMap ()
virtual void addShaderConstantBufferItemMap (const QByteArray &itemType, const TStrTableStrMap &cbMap, TConstantBufferParamArray cbParamsArray)
virtual void appendShaderCode () final
virtual void addInclude (const QByteArray &name) final
void buildShaderSourcePass1 (QSSGShaderResourceMergeContext *mergeContext)
QByteArray buildShaderSourcePass2 (QSSGShaderResourceMergeContext *mergeContext)
virtual void addFunction (const QByteArray &functionName) final
virtual void addDefinition (const QByteArray &name, const QByteArray &value) final
virtual void addTypeDeclaration (const QByteArray &typeName, const QByteArray &snippet) final

Public Attributes

TStrTableStrMap m_incoming
TStrTableStrMapm_outgoing = nullptr
TStrTableStrMap m_flatIncoming
TStrTableStrMapm_flatOutgoing = nullptr
QSet< QByteArraym_includes
TStrTableStrMap m_uniforms
TStrTableSizedStrMap m_uniformArrays
TStrTableStrMap m_constantBuffers
TConstantBufferParamArray m_constantBufferParams
QByteArray m_codeBuilder
QByteArray m_finalBuilder
QSSGShaderGeneratorStage m_stage
QSSGShaderGeneratorStageFlags m_enabledStages
QList< QByteArraym_addedFunctions
TStrTableStrMap m_addedTypeDeclarations
TStrTableStrMap m_addedDefinitions
QSSGShaderResourceMergeContextm_mergeContext = nullptr

Detailed Description

Definition at line 43 of file qssgrendershadercodegenerator_p.h.

Member Typedef Documentation

◆ TConstantBufferParamArray

◆ TConstantBufferParamPair

◆ TParamPair

◆ TStrTableSizedStrMap

◆ TStrTableStrMap

Member Enumeration Documentation

◆ ShaderItemMapFlag

Enumerator
Flat 

Definition at line 52 of file qssgrendershadercodegenerator_p.h.

◆ ShaderItemType

Enumerator
VertexInput 
Input 
Output 
Uniform 

Definition at line 45 of file qssgrendershadercodegenerator_p.h.

Constructor & Destructor Documentation

◆ QSSGStageGeneratorBase()

QSSGStageGeneratorBase::QSSGStageGeneratorBase ( QSSGShaderGeneratorStage inStage)
explicit

Definition at line 46 of file qssgrendershadercodegenerator.cpp.

◆ ~QSSGStageGeneratorBase()

virtual QSSGStageGeneratorBase::~QSSGStageGeneratorBase ( )
virtualdefault

Member Function Documentation

◆ addConstantBuffer()

void QSSGStageGeneratorBase::addConstantBuffer ( const QByteArray & name,
const QByteArray & layout )
virtual

Definition at line 116 of file qssgrendershadercodegenerator.cpp.

◆ addConstantBufferParam()

void QSSGStageGeneratorBase::addConstantBufferParam ( const QByteArray & cbName,
const QByteArray & paramName,
const QByteArray & type )
virtual

Definition at line 121 of file qssgrendershadercodegenerator.cpp.

◆ addDefinition()

void QSSGStageGeneratorBase::addDefinition ( const QByteArray & name,
const QByteArray & value )
finalvirtual

Definition at line 379 of file qssgrendershadercodegenerator.cpp.

◆ addFlatIncoming()

void QSSGStageGeneratorBase::addFlatIncoming ( const QByteArray & name,
const QByteArray & type )
virtual

Definition at line 89 of file qssgrendershadercodegenerator.cpp.

◆ addFlatOutgoing()

void QSSGStageGeneratorBase::addFlatOutgoing ( const QByteArray & name,
const QByteArray & type )
virtual

Definition at line 95 of file qssgrendershadercodegenerator.cpp.

◆ addFunction()

void QSSGStageGeneratorBase::addFunction ( const QByteArray & functionName)
finalvirtual

Definition at line 369 of file qssgrendershadercodegenerator.cpp.

◆ addInclude()

void QSSGStageGeneratorBase::addInclude ( const QByteArray & name)
finalvirtual

Definition at line 237 of file qssgrendershadercodegenerator.cpp.

◆ addIncoming()

void QSSGStageGeneratorBase::addIncoming ( const QByteArray & name,
const QByteArray & type )
virtual

Definition at line 72 of file qssgrendershadercodegenerator.cpp.

◆ addOutgoing()

void QSSGStageGeneratorBase::addOutgoing ( const QByteArray & name,
const QByteArray & type )
virtual

Definition at line 78 of file qssgrendershadercodegenerator.cpp.

◆ addShaderConstantBufferItemMap()

void QSSGStageGeneratorBase::addShaderConstantBufferItemMap ( const QByteArray & itemType,
const TStrTableStrMap & cbMap,
TConstantBufferParamArray cbParamsArray )
virtual

Definition at line 208 of file qssgrendershadercodegenerator.cpp.

◆ addShaderIncomingMap()

void QSSGStageGeneratorBase::addShaderIncomingMap ( )
virtual

Reimplemented in QSSGFragmentShaderGenerator.

Definition at line 178 of file qssgrendershadercodegenerator.cpp.

◆ addShaderItemMap()

void QSSGStageGeneratorBase::addShaderItemMap ( QSSGStageGeneratorBase::ShaderItemType itemType,
const TStrTableStrMap & itemMap,
ShaderItemMapFlags flags = {} )

Definition at line 148 of file qssgrendershadercodegenerator.cpp.

◆ addShaderOutgoingMap()

void QSSGStageGeneratorBase::addShaderOutgoingMap ( )
virtual

Reimplemented in QSSGFragmentShaderGenerator.

Definition at line 198 of file qssgrendershadercodegenerator.cpp.

◆ addShaderPass2Marker()

void QSSGStageGeneratorBase::addShaderPass2Marker ( QSSGStageGeneratorBase::ShaderItemType itemType)

Definition at line 142 of file qssgrendershadercodegenerator.cpp.

◆ addShaderUniformMap()

void QSSGStageGeneratorBase::addShaderUniformMap ( )
virtual

Definition at line 184 of file qssgrendershadercodegenerator.cpp.

◆ addTypeDeclaration()

void QSSGStageGeneratorBase::addTypeDeclaration ( const QByteArray & typeName,
const QByteArray & snippet )
finalvirtual

Definition at line 384 of file qssgrendershadercodegenerator.cpp.

◆ addUniform()

void QSSGStageGeneratorBase::addUniform ( const QByteArray & name,
const QByteArray & type )
virtual

Definition at line 106 of file qssgrendershadercodegenerator.cpp.

◆ addUniformArray()

void QSSGStageGeneratorBase::addUniformArray ( const QByteArray & name,
const QByteArray & type,
quint32 size )
virtual

Definition at line 111 of file qssgrendershadercodegenerator.cpp.

◆ append()

void QSSGStageGeneratorBase::append ( const QByteArray & data)
virtual

Definition at line 134 of file qssgrendershadercodegenerator.cpp.

◆ appendShaderCode()

void QSSGStageGeneratorBase::appendShaderCode ( )
finalvirtual

Definition at line 235 of file qssgrendershadercodegenerator.cpp.

◆ begin()

void QSSGStageGeneratorBase::begin ( QSSGShaderGeneratorStageFlags inEnabledStages)
virtual

Definition at line 52 of file qssgrendershadercodegenerator.cpp.

◆ buildShaderSourcePass1()

void QSSGStageGeneratorBase::buildShaderSourcePass1 ( QSSGShaderResourceMergeContext * mergeContext)

Definition at line 239 of file qssgrendershadercodegenerator.cpp.

◆ buildShaderSourcePass2()

QByteArray QSSGStageGeneratorBase::buildShaderSourcePass2 ( QSSGShaderResourceMergeContext * mergeContext)

Definition at line 278 of file qssgrendershadercodegenerator.cpp.

◆ operator<<()

QSSGStageGeneratorBase & QSSGStageGeneratorBase::operator<< ( const QByteArray & data)
virtual

Definition at line 128 of file qssgrendershadercodegenerator.cpp.

◆ stage()

QSSGShaderGeneratorStage QSSGStageGeneratorBase::stage ( ) const

Definition at line 140 of file qssgrendershadercodegenerator.cpp.

Member Data Documentation

◆ m_addedDefinitions

TStrTableStrMap QSSGStageGeneratorBase::m_addedDefinitions

Definition at line 84 of file qssgrendershadercodegenerator_p.h.

◆ m_addedFunctions

QList<QByteArray> QSSGStageGeneratorBase::m_addedFunctions

Definition at line 82 of file qssgrendershadercodegenerator_p.h.

◆ m_addedTypeDeclarations

TStrTableStrMap QSSGStageGeneratorBase::m_addedTypeDeclarations

Definition at line 83 of file qssgrendershadercodegenerator_p.h.

◆ m_codeBuilder

QByteArray QSSGStageGeneratorBase::m_codeBuilder

Definition at line 78 of file qssgrendershadercodegenerator_p.h.

◆ m_constantBufferParams

TConstantBufferParamArray QSSGStageGeneratorBase::m_constantBufferParams

Definition at line 77 of file qssgrendershadercodegenerator_p.h.

◆ m_constantBuffers

TStrTableStrMap QSSGStageGeneratorBase::m_constantBuffers

Definition at line 76 of file qssgrendershadercodegenerator_p.h.

◆ m_enabledStages

QSSGShaderGeneratorStageFlags QSSGStageGeneratorBase::m_enabledStages

Definition at line 81 of file qssgrendershadercodegenerator_p.h.

◆ m_finalBuilder

QByteArray QSSGStageGeneratorBase::m_finalBuilder

Definition at line 79 of file qssgrendershadercodegenerator_p.h.

◆ m_flatIncoming

TStrTableStrMap QSSGStageGeneratorBase::m_flatIncoming

Definition at line 71 of file qssgrendershadercodegenerator_p.h.

◆ m_flatOutgoing

TStrTableStrMap* QSSGStageGeneratorBase::m_flatOutgoing = nullptr

Definition at line 72 of file qssgrendershadercodegenerator_p.h.

◆ m_includes

QSet<QByteArray> QSSGStageGeneratorBase::m_includes

Definition at line 73 of file qssgrendershadercodegenerator_p.h.

◆ m_incoming

TStrTableStrMap QSSGStageGeneratorBase::m_incoming

Definition at line 69 of file qssgrendershadercodegenerator_p.h.

◆ m_mergeContext

QSSGShaderResourceMergeContext* QSSGStageGeneratorBase::m_mergeContext = nullptr

Definition at line 85 of file qssgrendershadercodegenerator_p.h.

◆ m_outgoing

TStrTableStrMap* QSSGStageGeneratorBase::m_outgoing = nullptr

Definition at line 70 of file qssgrendershadercodegenerator_p.h.

◆ m_stage

QSSGShaderGeneratorStage QSSGStageGeneratorBase::m_stage

Definition at line 80 of file qssgrendershadercodegenerator_p.h.

◆ m_uniformArrays

TStrTableSizedStrMap QSSGStageGeneratorBase::m_uniformArrays

Definition at line 75 of file qssgrendershadercodegenerator_p.h.

◆ m_uniforms

TStrTableStrMap QSSGStageGeneratorBase::m_uniforms

Definition at line 74 of file qssgrendershadercodegenerator_p.h.


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