D3D_SHADER_VARIABLE_TYPE enumeration (d3dcommon.h)
Values that identify various data, texture, and buffer types that can be assigned to a shader variable.
Note
For programming with Direct3D 10, this API has a type alias that begins D3D10_
instead of D3D_
. These Direct3D 10 type aliases are defined in d3d10.h
, d3d10misc.h
, and d3d10shader.h
.
Syntax
typedef enum _D3D_SHADER_VARIABLE_TYPE {
D3D_SVT_VOID = 0,
D3D_SVT_BOOL = 1,
D3D_SVT_INT = 2,
D3D_SVT_FLOAT = 3,
D3D_SVT_STRING = 4,
D3D_SVT_TEXTURE = 5,
D3D_SVT_TEXTURE1D = 6,
D3D_SVT_TEXTURE2D = 7,
D3D_SVT_TEXTURE3D = 8,
D3D_SVT_TEXTURECUBE = 9,
D3D_SVT_SAMPLER = 10,
D3D_SVT_SAMPLER1D = 11,
D3D_SVT_SAMPLER2D = 12,
D3D_SVT_SAMPLER3D = 13,
D3D_SVT_SAMPLERCUBE = 14,
D3D_SVT_PIXELSHADER = 15,
D3D_SVT_VERTEXSHADER = 16,
D3D_SVT_PIXELFRAGMENT = 17,
D3D_SVT_VERTEXFRAGMENT = 18,
D3D_SVT_UINT = 19,
D3D_SVT_UINT8 = 20,
D3D_SVT_GEOMETRYSHADER = 21,
D3D_SVT_RASTERIZER = 22,
D3D_SVT_DEPTHSTENCIL = 23,
D3D_SVT_BLEND = 24,
D3D_SVT_BUFFER = 25,
D3D_SVT_CBUFFER = 26,
D3D_SVT_TBUFFER = 27,
D3D_SVT_TEXTURE1DARRAY = 28,
D3D_SVT_TEXTURE2DARRAY = 29,
D3D_SVT_RENDERTARGETVIEW = 30,
D3D_SVT_DEPTHSTENCILVIEW = 31,
D3D_SVT_TEXTURE2DMS = 32,
D3D_SVT_TEXTURE2DMSARRAY = 33,
D3D_SVT_TEXTURECUBEARRAY = 34,
D3D_SVT_HULLSHADER = 35,
D3D_SVT_DOMAINSHADER = 36,
D3D_SVT_INTERFACE_POINTER = 37,
D3D_SVT_COMPUTESHADER = 38,
D3D_SVT_DOUBLE = 39,
D3D_SVT_RWTEXTURE1D = 40,
D3D_SVT_RWTEXTURE1DARRAY = 41,
D3D_SVT_RWTEXTURE2D = 42,
D3D_SVT_RWTEXTURE2DARRAY = 43,
D3D_SVT_RWTEXTURE3D = 44,
D3D_SVT_RWBUFFER = 45,
D3D_SVT_BYTEADDRESS_BUFFER = 46,
D3D_SVT_RWBYTEADDRESS_BUFFER = 47,
D3D_SVT_STRUCTURED_BUFFER = 48,
D3D_SVT_RWSTRUCTURED_BUFFER = 49,
D3D_SVT_APPEND_STRUCTURED_BUFFER = 50,
D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51,
D3D_SVT_MIN8FLOAT = 52,
D3D_SVT_MIN10FLOAT = 53,
D3D_SVT_MIN16FLOAT = 54,
D3D_SVT_MIN12INT = 55,
D3D_SVT_MIN16INT = 56,
D3D_SVT_MIN16UINT = 57,
D3D_SVT_INT16,
D3D_SVT_UINT16,
D3D_SVT_FLOAT16,
D3D_SVT_INT64,
D3D_SVT_UINT64,
D3D10_SVT_VOID,
D3D10_SVT_BOOL,
D3D10_SVT_INT,
D3D10_SVT_FLOAT,
D3D10_SVT_STRING,
D3D10_SVT_TEXTURE,
D3D10_SVT_TEXTURE1D,
D3D10_SVT_TEXTURE2D,
D3D10_SVT_TEXTURE3D,
D3D10_SVT_TEXTURECUBE,
D3D10_SVT_SAMPLER,
D3D10_SVT_SAMPLER1D,
D3D10_SVT_SAMPLER2D,
D3D10_SVT_SAMPLER3D,
D3D10_SVT_SAMPLERCUBE,
D3D10_SVT_PIXELSHADER,
D3D10_SVT_VERTEXSHADER,
D3D10_SVT_PIXELFRAGMENT,
D3D10_SVT_VERTEXFRAGMENT,
D3D10_SVT_UINT,
D3D10_SVT_UINT8,
D3D10_SVT_GEOMETRYSHADER,
D3D10_SVT_RASTERIZER,
D3D10_SVT_DEPTHSTENCIL,
D3D10_SVT_BLEND,
D3D10_SVT_BUFFER,
D3D10_SVT_CBUFFER,
D3D10_SVT_TBUFFER,
D3D10_SVT_TEXTURE1DARRAY,
D3D10_SVT_TEXTURE2DARRAY,
D3D10_SVT_RENDERTARGETVIEW,
D3D10_SVT_DEPTHSTENCILVIEW,
D3D10_SVT_TEXTURE2DMS,
D3D10_SVT_TEXTURE2DMSARRAY,
D3D10_SVT_TEXTURECUBEARRAY,
D3D11_SVT_HULLSHADER,
D3D11_SVT_DOMAINSHADER,
D3D11_SVT_INTERFACE_POINTER,
D3D11_SVT_COMPUTESHADER,
D3D11_SVT_DOUBLE,
D3D11_SVT_RWTEXTURE1D,
D3D11_SVT_RWTEXTURE1DARRAY,
D3D11_SVT_RWTEXTURE2D,
D3D11_SVT_RWTEXTURE2DARRAY,
D3D11_SVT_RWTEXTURE3D,
D3D11_SVT_RWBUFFER,
D3D11_SVT_BYTEADDRESS_BUFFER,
D3D11_SVT_RWBYTEADDRESS_BUFFER,
D3D11_SVT_STRUCTURED_BUFFER,
D3D11_SVT_RWSTRUCTURED_BUFFER,
D3D11_SVT_APPEND_STRUCTURED_BUFFER,
D3D11_SVT_CONSUME_STRUCTURED_BUFFER,
D3D_SVT_FORCE_DWORD = 0x7fffffff
} D3D_SHADER_VARIABLE_TYPE;
Constants
D3D_SVT_VOID Value: 0 The variable is a void pointer. |
D3D_SVT_BOOL Value: 1 The variable is a boolean. |
D3D_SVT_INT Value: 2 The variable is an integer. |
D3D_SVT_FLOAT Value: 3 The variable is a floating-point number. |
D3D_SVT_STRING Value: 4 The variable is a string. |
D3D_SVT_TEXTURE Value: 5 The variable is a texture. |
D3D_SVT_TEXTURE1D Value: 6 The variable is a 1D texture. |
D3D_SVT_TEXTURE2D Value: 7 The variable is a 2D texture. |
D3D_SVT_TEXTURE3D Value: 8 The variable is a 3D texture. |
D3D_SVT_TEXTURECUBE Value: 9 The variable is a texture cube. |
D3D_SVT_SAMPLER Value: 10 The variable is a sampler. |
D3D_SVT_SAMPLER1D Value: 11 The variable is a 1D sampler. |
D3D_SVT_SAMPLER2D Value: 12 The variable is a 2D sampler. |
D3D_SVT_SAMPLER3D Value: 13 The variable is a 3D sampler. |
D3D_SVT_SAMPLERCUBE Value: 14 The variable is a cube sampler. |
D3D_SVT_PIXELSHADER Value: 15 The variable is a pixel shader. |
D3D_SVT_VERTEXSHADER Value: 16 The variable is a vertex shader. |
D3D_SVT_PIXELFRAGMENT Value: 17 The variable is a pixel fragment. |
D3D_SVT_VERTEXFRAGMENT Value: 18 The variable is a vertex fragment. |
D3D_SVT_UINT Value: 19 The variable is an unsigned integer. |
D3D_SVT_UINT8 Value: 20 The variable is an 8-bit unsigned integer. |
D3D_SVT_GEOMETRYSHADER Value: 21 The variable is a geometry shader. |
D3D_SVT_RASTERIZER Value: 22 The variable is a rasterizer-state object. |
D3D_SVT_DEPTHSTENCIL Value: 23 The variable is a depth-stencil-state object. |
D3D_SVT_BLEND Value: 24 The variable is a blend-state object. |
D3D_SVT_BUFFER Value: 25 The variable is a buffer. |
D3D_SVT_CBUFFER Value: 26 The variable is a constant buffer. |
D3D_SVT_TBUFFER Value: 27 The variable is a texture buffer. |
D3D_SVT_TEXTURE1DARRAY Value: 28 The variable is a 1D-texture array. |
D3D_SVT_TEXTURE2DARRAY Value: 29 The variable is a 2D-texture array. |
D3D_SVT_RENDERTARGETVIEW Value: 30 The variable is a render-target view. |
D3D_SVT_DEPTHSTENCILVIEW Value: 31 The variable is a depth-stencil view. |
D3D_SVT_TEXTURE2DMS Value: 32 The variable is a 2D-multisampled texture. |
D3D_SVT_TEXTURE2DMSARRAY Value: 33 The variable is a 2D-multisampled-texture array. |
D3D_SVT_TEXTURECUBEARRAY Value: 34 The variable is a texture-cube array. |
D3D_SVT_HULLSHADER Value: 35 The variable holds a compiled hull-shader binary. |
D3D_SVT_DOMAINSHADER Value: 36 The variable holds a compiled domain-shader binary. |
D3D_SVT_INTERFACE_POINTER Value: 37 The variable is an interface. |
D3D_SVT_COMPUTESHADER Value: 38 The variable holds a compiled compute-shader binary. |
D3D_SVT_DOUBLE Value: 39 The variable is a double precision (64-bit) floating-point number. |
D3D_SVT_RWTEXTURE1D Value: 40 The variable is a 1D read-and-write texture. |
D3D_SVT_RWTEXTURE1DARRAY Value: 41 The variable is an array of 1D read-and-write textures. |
D3D_SVT_RWTEXTURE2D Value: 42 The variable is a 2D read-and-write texture. |
D3D_SVT_RWTEXTURE2DARRAY Value: 43 The variable is an array of 2D read-and-write textures. |
D3D_SVT_RWTEXTURE3D Value: 44 The variable is a 3D read-and-write texture. |
D3D_SVT_RWBUFFER Value: 45 The variable is a read-and-write buffer. |
D3D_SVT_BYTEADDRESS_BUFFER Value: 46 The variable is a byte-address buffer. |
D3D_SVT_RWBYTEADDRESS_BUFFER Value: 47 The variable is a read-and-write byte-address buffer. |
D3D_SVT_STRUCTURED_BUFFER Value: 48 The variable is a structured buffer. For more information about structured buffer, see the Remarks section. |
D3D_SVT_RWSTRUCTURED_BUFFER Value: 49 The variable is a read-and-write structured buffer. |
D3D_SVT_APPEND_STRUCTURED_BUFFER Value: 50 The variable is an append structured buffer. |
D3D_SVT_CONSUME_STRUCTURED_BUFFER Value: 51 The variable is a consume structured buffer. |
D3D_SVT_MIN8FLOAT Value: 52 The variable is an 8-byte FLOAT. |
D3D_SVT_MIN10FLOAT Value: 53 The variable is a 10-byte FLOAT. |
D3D_SVT_MIN16FLOAT Value: 54 The variable is a 16-byte FLOAT. |
D3D_SVT_MIN12INT Value: 55 The variable is a 12-byte INT. |
D3D_SVT_MIN16INT Value: 56 The variable is a 16-byte INT. |
D3D_SVT_MIN16UINT Value: 57 The variable is a 16-byte INT. |
D3D10_SVT_VOID The variable is a void pointer. |
D3D10_SVT_BOOL The variable is a boolean. |
D3D10_SVT_INT The variable is an integer. |
D3D10_SVT_FLOAT The variable is a floating-point number. |
D3D10_SVT_STRING The variable is a string. |
D3D10_SVT_TEXTURE The variable is a texture. |
D3D10_SVT_TEXTURE1D The variable is a 1D texture. |
D3D10_SVT_TEXTURE2D The variable is a 2D texture. |
D3D10_SVT_TEXTURE3D The variable is a 3D texture. |
D3D10_SVT_TEXTURECUBE The variable is a texture cube. |
D3D10_SVT_SAMPLER The variable is a sampler. |
D3D10_SVT_SAMPLER1D The variable is a 1D sampler. |
D3D10_SVT_SAMPLER2D The variable is a 2D sampler. |
D3D10_SVT_SAMPLER3D The variable is a 3D sampler. |
D3D10_SVT_SAMPLERCUBE The variable is a cube sampler. |
D3D10_SVT_PIXELSHADER The variable is a pixel shader. |
D3D10_SVT_VERTEXSHADER The variable is a vertex shader. |
D3D10_SVT_PIXELFRAGMENT The variable is a pixel fragment. |
D3D10_SVT_VERTEXFRAGMENT The variable is a vertex fragment. |
D3D10_SVT_UINT The variable is an unsigned integer. |
D3D10_SVT_UINT8 The variable is an 8-bit unsigned integer. |
D3D10_SVT_GEOMETRYSHADER The variable is a geometry shader. |
D3D10_SVT_RASTERIZER The variable is a rasterizer-state object. |
D3D10_SVT_DEPTHSTENCIL The variable is a depth-stencil-state object. |
D3D10_SVT_BLEND The variable is a blend-state object. |
D3D10_SVT_BUFFER The variable is a buffer. |
D3D10_SVT_CBUFFER The variable is a constant buffer. |
D3D10_SVT_TBUFFER The variable is a texture buffer. |
D3D10_SVT_TEXTURE1DARRAY The variable is a 1D-texture array. |
D3D10_SVT_TEXTURE2DARRAY The variable is a 2D-texture array. |
D3D10_SVT_RENDERTARGETVIEW The variable is a render-target view. |
D3D10_SVT_DEPTHSTENCILVIEW The variable is a depth-stencil view. |
D3D10_SVT_TEXTURE2DMS The variable is a 2D-multisampled texture. |
D3D10_SVT_TEXTURE2DMSARRAY The variable is a 2D-multisampled-texture array. |
D3D10_SVT_TEXTURECUBEARRAY The variable is a texture-cube array. |
D3D11_SVT_HULLSHADER The variable holds a compiled hull-shader binary. |
D3D11_SVT_DOMAINSHADER The variable holds a compiled domain-shader binary. |
D3D11_SVT_INTERFACE_POINTER The variable is an interface. |
D3D11_SVT_COMPUTESHADER The variable holds a compiled compute-shader binary. |
D3D11_SVT_DOUBLE The variable is a double precision (64-bit) floating-point number. |
D3D11_SVT_RWTEXTURE1D The variable is a 1D read-and-write texture. |
D3D11_SVT_RWTEXTURE1DARRAY The variable is an array of 1D read-and-write textures. |
D3D11_SVT_RWTEXTURE2D The variable is a 2D read-and-write texture. |
D3D11_SVT_RWTEXTURE2DARRAY The variable is an array of 2D read-and-write textures. |
D3D11_SVT_RWTEXTURE3D The variable is a 3D read-and-write texture. |
D3D11_SVT_RWBUFFER The variable is a read-and-write buffer. |
D3D11_SVT_BYTEADDRESS_BUFFER The variable is a byte-address buffer. |
D3D11_SVT_RWBYTEADDRESS_BUFFER The variable is a read and write byte-address buffer. |
D3D11_SVT_STRUCTURED_BUFFER The variable is a structured buffer. |
D3D11_SVT_RWSTRUCTURED_BUFFER The variable is a read-and-write structured buffer. |
D3D11_SVT_APPEND_STRUCTURED_BUFFER The variable is an append structured buffer. |
D3D11_SVT_CONSUME_STRUCTURED_BUFFER The variable is a consume structured buffer. |
D3D_SVT_FORCE_DWORD Value: 0x7fffffff This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits. |
Remarks
A call to the ID3D11ShaderReflectionType::GetDesc method returns a D3D_SHADER_VARIABLE_TYPE value in the Type member of a D3D11_SHADER_TYPE_DESC structure.
The types in a structured buffer describe the structure of the elements in the buffer. The layout of these types generally match their C++ struct counterparts. The following examples show structured buffers:
struct mystruct {float4 val; uint ind;}; RWStructuredBuffer<mystruct> rwbuf;
RWStructuredBuffer<float3> rwbuf2;
Requirements
Requirement | Value |
---|---|
Header | d3dcommon.h |