GFXD3D11Shader

Engine/source/gfx/D3D11/gfxD3D11Shader.h

More...

Public Types

Public Friends

Protected Attributes

The shader disassembly from DX when this shader is compiled.

ID3D11PixelShader *

Vector of sampler type descriptions consolidated from _compileShader.

Vector of descriptions (consolidated for the getShaderConstDesc call)

ID3D11VertexShader *

Public Functions

Allocate a constant buffer.

Returns a shader constant handle for the name constant, if the variable doesn't exist NULL is returned.

Returns the alignment value for constType.

bool

Device specific shaders can override this method to return the shader disassembly.

Returns our list of shader constants, the material can get this and just set the constants it knows about.

Returns a shader constant handle for name, if the variable doesn't exist NULL is returned.

When called the resource should restore all device sensitive information destroyed by zombify()

When called the resource should destroy all device sensitive information (e.g. D3D resources in D3DPOOL_DEFAULT.

Protected Functions

Used to build the instancing shader constants from the instancing vertex format.

bool
_compileShader(const Torque::Path & filePath, const String & target, const D3D_SHADER_MACRO * defines, GenericConstBufferLayout * bufferLayout, Vector< GFXShaderConstDesc > & samplerDescriptions)
bool
_convertShaderVariable(const D3D11_SHADER_TYPE_DESC & typeDesc, GFXShaderConstDesc & desc)
_getShaderConstants(ID3D11ShaderReflection * refTable, GenericConstBufferLayout * bufferLayout, Vector< GFXShaderConstDesc > & samplerDescriptions)
bool

Internal initialization function overloaded for each GFX device type.

bool
_loadCompiledOutput(const Torque::Path & filePath, const String & target, GenericConstBufferLayout * bufferLayoutF, Vector< GFXShaderConstDesc > & samplerDescriptions)
bool
_saveCompiledOutput(const Torque::Path & filePath, ID3DBlob * buffer, GenericConstBufferLayout * bufferLayout, Vector< GFXShaderConstDesc > & samplerDescriptions)

Detailed Description

Public Types

typedef Map< String, GFXD3D11ShaderConstHandle * > HandleMap 

Public Friends

Protected Static Attributes

const U32 smCompiledShaderTag 
gfxD3DIncludeRef smD3DInclude 

Protected Attributes

String mDissasembly 

The shader disassembly from DX when this shader is compiled.

We only store this data in non-release builds.

HandleMap mHandles 
GFXD3D11ConstBufferLayout * mPixelConstBufferLayout 
ID3D11PixelShader * mPixShader 
Vector< GFXShaderConstDesc > mSamplerDescriptions 

Vector of sampler type descriptions consolidated from _compileShader.

Vector< GFXShaderConstDesc > mShaderConsts 

Vector of descriptions (consolidated for the getShaderConstDesc call)

GFXD3D11ConstBufferLayout * mVertexConstBufferLayout 
ID3D11VertexShader * mVertShader 
ConstantTable table 

Public Functions

GFXD3D11Shader()

~GFXD3D11Shader()

allocConstBuffer()

Reimplemented from: GFXShader

findShaderConstHandle(const String & name)

Reimplemented from: GFXShader

getAlignmentValue(const GFXShaderConstType constType)

Reimplemented from: GFXShader

getDisassembly(String & outStr)

Reimplemented from: GFXShader

getShaderConstDesc()

Reimplemented from: GFXShader

getShaderConstHandle(const String & name)

Reimplemented from: GFXShader

resurrect()

Reimplemented from: GFXResource

zombify()

Reimplemented from: GFXResource

Protected Functions

_buildInstancingShaderConstantHandles()

Used to build the instancing shader constants from the instancing vertex format.

_buildSamplerShaderConstantHandles(Vector< GFXShaderConstDesc > & samplerDescriptions)

_buildShaderConstantHandles(GenericConstBufferLayout * layout, bool vertexConst)

_compileShader(const Torque::Path & filePath, const String & target, const D3D_SHADER_MACRO * defines, GenericConstBufferLayout * bufferLayout, Vector< GFXShaderConstDesc > & samplerDescriptions)

_convertShaderVariable(const D3D11_SHADER_TYPE_DESC & typeDesc, GFXShaderConstDesc & desc)

_getShaderConstants(ID3D11ShaderReflection * refTable, GenericConstBufferLayout * bufferLayout, Vector< GFXShaderConstDesc > & samplerDescriptions)

_init()

Reimplemented from: GFXShader

_loadCompiledOutput(const Torque::Path & filePath, const String & target, GenericConstBufferLayout * bufferLayoutF, Vector< GFXShaderConstDesc > & samplerDescriptions)

_saveCompiledOutput(const Torque::Path & filePath, ID3DBlob * buffer, GenericConstBufferLayout * bufferLayout, Vector< GFXShaderConstDesc > & samplerDescriptions)