Cogs.Core
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Cogs::EffectWebGPU Struct Reference
Inheritance diagram for Cogs::EffectWebGPU:
Cogs::Effect

Public Member Functions

void updateBindGroupDescHashes ()
 Refresh bindGroupDescHash. Call once bindGroupSetDescription is final.
 
size_t hash (size_t base) const
 
- Public Member Functions inherited from Cogs::Effect
Effectoperator= (const Effect &other)
 
Effectoperator= (Effect &&other) noexcept
 
void buildSignature ()
 

Public Attributes

WGPUShaderModule vs_module
 
WGPUShaderModule fs_module
 
WGPUShaderModule cs_module
 
std::string vs_entry
 
std::string fs_entry
 
std::string cs_entry
 
std::string name
 
size_t num_bindings
 
size_t num_attribs
 
WebGPUConstantBufferBinding constantBufferBindings [maxConstantBuffers]
 
SemanticSlotBinding semanticSlotBindings [maxVertexAttribs]
 
BindGroupSetDescription bindGroupSetDescription
 
size_t bindGroupDescHash [MaxBindGroups] = {}
 Hash of each entry in bindGroupSetDescription.groups, letting bind group compatibility be tested with a single integer compare per draw call.
 
- Public Attributes inherited from Cogs::Effect
EffectSignature signature
 
Shader shaders [ShaderType::NumShaderSlots]
 
std::unordered_map< size_t, EffectVariableeffectVariables
 
ShadervertexShader
 
ShaderhullShader
 
ShaderdomainShader
 
ShadergeometryShader
 
ShaderpixelShader
 
ShadercomputeShader
 

Static Public Attributes

static const size_t maxTexUnits = 128
 
static const size_t maxConstantBuffers = 128
 
static const size_t maxVertexAttribs = 32
 

Detailed Description

Definition at line 32 of file EffectsWebGPU.h.

Member Function Documentation

◆ hash()

size_t Cogs::EffectWebGPU::hash ( size_t  base) const
inline

Definition at line 63 of file EffectsWebGPU.h.

◆ updateBindGroupDescHashes()

void Cogs::EffectWebGPU::updateBindGroupDescHashes ( )
inline

Refresh bindGroupDescHash. Call once bindGroupSetDescription is final.

Definition at line 56 of file EffectsWebGPU.h.

References bindGroupDescHash.

Referenced by Cogs::EffectsWebGPU::loadComputeEffect().

Member Data Documentation

◆ bindGroupDescHash

size_t Cogs::EffectWebGPU::bindGroupDescHash[MaxBindGroups] = {}

Hash of each entry in bindGroupSetDescription.groups, letting bind group compatibility be tested with a single integer compare per draw call.

Definition at line 53 of file EffectsWebGPU.h.

Referenced by Cogs::EffectsWebGPU::getBindGroupDescHash(), and updateBindGroupDescHashes().

◆ bindGroupSetDescription

BindGroupSetDescription Cogs::EffectWebGPU::bindGroupSetDescription

Definition at line 48 of file EffectsWebGPU.h.

◆ constantBufferBindings

WebGPUConstantBufferBinding Cogs::EffectWebGPU::constantBufferBindings[maxConstantBuffers]

Definition at line 46 of file EffectsWebGPU.h.

◆ cs_entry

std::string Cogs::EffectWebGPU::cs_entry

Definition at line 42 of file EffectsWebGPU.h.

◆ cs_module

WGPUShaderModule Cogs::EffectWebGPU::cs_module

Definition at line 39 of file EffectsWebGPU.h.

◆ fs_entry

std::string Cogs::EffectWebGPU::fs_entry

Definition at line 41 of file EffectsWebGPU.h.

◆ fs_module

WGPUShaderModule Cogs::EffectWebGPU::fs_module

Definition at line 38 of file EffectsWebGPU.h.

◆ maxConstantBuffers

const size_t Cogs::EffectWebGPU::maxConstantBuffers = 128
static

Definition at line 35 of file EffectsWebGPU.h.

◆ maxTexUnits

const size_t Cogs::EffectWebGPU::maxTexUnits = 128
static

Definition at line 34 of file EffectsWebGPU.h.

◆ maxVertexAttribs

const size_t Cogs::EffectWebGPU::maxVertexAttribs = 32
static

Definition at line 36 of file EffectsWebGPU.h.

◆ name

std::string Cogs::EffectWebGPU::name

Definition at line 43 of file EffectsWebGPU.h.

◆ num_attribs

size_t Cogs::EffectWebGPU::num_attribs

Definition at line 45 of file EffectsWebGPU.h.

◆ num_bindings

size_t Cogs::EffectWebGPU::num_bindings

Definition at line 44 of file EffectsWebGPU.h.

◆ semanticSlotBindings

SemanticSlotBinding Cogs::EffectWebGPU::semanticSlotBindings[maxVertexAttribs]

Definition at line 47 of file EffectsWebGPU.h.

◆ vs_entry

std::string Cogs::EffectWebGPU::vs_entry

Definition at line 40 of file EffectsWebGPU.h.

◆ vs_module

WGPUShaderModule Cogs::EffectWebGPU::vs_module

Definition at line 37 of file EffectsWebGPU.h.


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