Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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_VOIDValue: 0 The variable is a void pointer. |
D3D_SVT_BOOLValue: 1 The variable is a boolean. |
D3D_SVT_INTValue: 2 The variable is an integer. |
D3D_SVT_FLOATValue: 3 The variable is a floating-point number. |
D3D_SVT_STRINGValue: 4 The variable is a string. |
D3D_SVT_TEXTUREValue: 5 The variable is a texture. |
D3D_SVT_TEXTURE1DValue: 6 The variable is a 1D texture. |
D3D_SVT_TEXTURE2DValue: 7 The variable is a 2D texture. |
D3D_SVT_TEXTURE3DValue: 8 The variable is a 3D texture. |
D3D_SVT_TEXTURECUBEValue: 9 The variable is a texture cube. |
D3D_SVT_SAMPLERValue: 10 The variable is a sampler. |
D3D_SVT_SAMPLER1DValue: 11 The variable is a 1D sampler. |
D3D_SVT_SAMPLER2DValue: 12 The variable is a 2D sampler. |
D3D_SVT_SAMPLER3DValue: 13 The variable is a 3D sampler. |
D3D_SVT_SAMPLERCUBEValue: 14 The variable is a cube sampler. |
D3D_SVT_PIXELSHADERValue: 15 The variable is a pixel shader. |
D3D_SVT_VERTEXSHADERValue: 16 The variable is a vertex shader. |
D3D_SVT_PIXELFRAGMENTValue: 17 The variable is a pixel fragment. |
D3D_SVT_VERTEXFRAGMENTValue: 18 The variable is a vertex fragment. |
D3D_SVT_UINTValue: 19 The variable is an unsigned integer. |
D3D_SVT_UINT8Value: 20 The variable is an 8-bit unsigned integer. |
D3D_SVT_GEOMETRYSHADERValue: 21 The variable is a geometry shader. |
D3D_SVT_RASTERIZERValue: 22 The variable is a rasterizer-state object. |
D3D_SVT_DEPTHSTENCILValue: 23 The variable is a depth-stencil-state object. |
D3D_SVT_BLENDValue: 24 The variable is a blend-state object. |
D3D_SVT_BUFFERValue: 25 The variable is a buffer. |
D3D_SVT_CBUFFERValue: 26 The variable is a constant buffer. |
D3D_SVT_TBUFFERValue: 27 The variable is a texture buffer. |
D3D_SVT_TEXTURE1DARRAYValue: 28 The variable is a 1D-texture array. |
D3D_SVT_TEXTURE2DARRAYValue: 29 The variable is a 2D-texture array. |
D3D_SVT_RENDERTARGETVIEWValue: 30 The variable is a render-target view. |
D3D_SVT_DEPTHSTENCILVIEWValue: 31 The variable is a depth-stencil view. |
D3D_SVT_TEXTURE2DMSValue: 32 The variable is a 2D-multisampled texture. |
D3D_SVT_TEXTURE2DMSARRAYValue: 33 The variable is a 2D-multisampled-texture array. |
D3D_SVT_TEXTURECUBEARRAYValue: 34 The variable is a texture-cube array. |
D3D_SVT_HULLSHADERValue: 35 The variable holds a compiled hull-shader binary. |
D3D_SVT_DOMAINSHADERValue: 36 The variable holds a compiled domain-shader binary. |
D3D_SVT_INTERFACE_POINTERValue: 37 The variable is an interface. |
D3D_SVT_COMPUTESHADERValue: 38 The variable holds a compiled compute-shader binary. |
D3D_SVT_DOUBLEValue: 39 The variable is a double precision (64-bit) floating-point number. |
D3D_SVT_RWTEXTURE1DValue: 40 The variable is a 1D read-and-write texture. |
D3D_SVT_RWTEXTURE1DARRAYValue: 41 The variable is an array of 1D read-and-write textures. |
D3D_SVT_RWTEXTURE2DValue: 42 The variable is a 2D read-and-write texture. |
D3D_SVT_RWTEXTURE2DARRAYValue: 43 The variable is an array of 2D read-and-write textures. |
D3D_SVT_RWTEXTURE3DValue: 44 The variable is a 3D read-and-write texture. |
D3D_SVT_RWBUFFERValue: 45 The variable is a read-and-write buffer. |
D3D_SVT_BYTEADDRESS_BUFFERValue: 46 The variable is a byte-address buffer. |
D3D_SVT_RWBYTEADDRESS_BUFFERValue: 47 The variable is a read-and-write byte-address buffer. |
D3D_SVT_STRUCTURED_BUFFERValue: 48 The variable is a structured buffer. For more information about structured buffer, see the Remarks section. |
D3D_SVT_RWSTRUCTURED_BUFFERValue: 49 The variable is a read-and-write structured buffer. |
D3D_SVT_APPEND_STRUCTURED_BUFFERValue: 50 The variable is an append structured buffer. |
D3D_SVT_CONSUME_STRUCTURED_BUFFERValue: 51 The variable is a consume structured buffer. |
D3D_SVT_MIN8FLOATValue: 52 The variable is an 8-byte FLOAT. |
D3D_SVT_MIN10FLOATValue: 53 The variable is a 10-byte FLOAT. |
D3D_SVT_MIN16FLOATValue: 54 The variable is a 16-byte FLOAT. |
D3D_SVT_MIN12INTValue: 55 The variable is a 12-byte INT. |
D3D_SVT_MIN16INTValue: 56 The variable is a 16-byte INT. |
D3D_SVT_MIN16UINTValue: 57 The variable is a 16-byte INT. |
D3D10_SVT_VOIDThe variable is a void pointer. |
D3D10_SVT_BOOLThe variable is a boolean. |
D3D10_SVT_INTThe variable is an integer. |
D3D10_SVT_FLOATThe variable is a floating-point number. |
D3D10_SVT_STRINGThe variable is a string. |
D3D10_SVT_TEXTUREThe variable is a texture. |
D3D10_SVT_TEXTURE1DThe variable is a 1D texture. |
D3D10_SVT_TEXTURE2DThe variable is a 2D texture. |
D3D10_SVT_TEXTURE3DThe variable is a 3D texture. |
D3D10_SVT_TEXTURECUBEThe variable is a texture cube. |
D3D10_SVT_SAMPLERThe variable is a sampler. |
D3D10_SVT_SAMPLER1DThe variable is a 1D sampler. |
D3D10_SVT_SAMPLER2DThe variable is a 2D sampler. |
D3D10_SVT_SAMPLER3DThe variable is a 3D sampler. |
D3D10_SVT_SAMPLERCUBEThe variable is a cube sampler. |
D3D10_SVT_PIXELSHADERThe variable is a pixel shader. |
D3D10_SVT_VERTEXSHADERThe variable is a vertex shader. |
D3D10_SVT_PIXELFRAGMENTThe variable is a pixel fragment. |
D3D10_SVT_VERTEXFRAGMENTThe variable is a vertex fragment. |
D3D10_SVT_UINTThe variable is an unsigned integer. |
D3D10_SVT_UINT8The variable is an 8-bit unsigned integer. |
D3D10_SVT_GEOMETRYSHADERThe variable is a geometry shader. |
D3D10_SVT_RASTERIZERThe variable is a rasterizer-state object. |
D3D10_SVT_DEPTHSTENCILThe variable is a depth-stencil-state object. |
D3D10_SVT_BLENDThe variable is a blend-state object. |
D3D10_SVT_BUFFERThe variable is a buffer. |
D3D10_SVT_CBUFFERThe variable is a constant buffer. |
D3D10_SVT_TBUFFERThe variable is a texture buffer. |
D3D10_SVT_TEXTURE1DARRAYThe variable is a 1D-texture array. |
D3D10_SVT_TEXTURE2DARRAYThe variable is a 2D-texture array. |
D3D10_SVT_RENDERTARGETVIEWThe variable is a render-target view. |
D3D10_SVT_DEPTHSTENCILVIEWThe variable is a depth-stencil view. |
D3D10_SVT_TEXTURE2DMSThe variable is a 2D-multisampled texture. |
D3D10_SVT_TEXTURE2DMSARRAYThe variable is a 2D-multisampled-texture array. |
D3D10_SVT_TEXTURECUBEARRAYThe variable is a texture-cube array. |
D3D11_SVT_HULLSHADERThe variable holds a compiled hull-shader binary. |
D3D11_SVT_DOMAINSHADERThe variable holds a compiled domain-shader binary. |
D3D11_SVT_INTERFACE_POINTERThe variable is an interface. |
D3D11_SVT_COMPUTESHADERThe variable holds a compiled compute-shader binary. |
D3D11_SVT_DOUBLEThe variable is a double precision (64-bit) floating-point number. |
D3D11_SVT_RWTEXTURE1DThe variable is a 1D read-and-write texture. |
D3D11_SVT_RWTEXTURE1DARRAYThe variable is an array of 1D read-and-write textures. |
D3D11_SVT_RWTEXTURE2DThe variable is a 2D read-and-write texture. |
D3D11_SVT_RWTEXTURE2DARRAYThe variable is an array of 2D read-and-write textures. |
D3D11_SVT_RWTEXTURE3DThe variable is a 3D read-and-write texture. |
D3D11_SVT_RWBUFFERThe variable is a read-and-write buffer. |
D3D11_SVT_BYTEADDRESS_BUFFERThe variable is a byte-address buffer. |
D3D11_SVT_RWBYTEADDRESS_BUFFERThe variable is a read and write byte-address buffer. |
D3D11_SVT_STRUCTURED_BUFFERThe variable is a structured buffer. |
D3D11_SVT_RWSTRUCTURED_BUFFERThe variable is a read-and-write structured buffer. |
D3D11_SVT_APPEND_STRUCTURED_BUFFERThe variable is an append structured buffer. |
D3D11_SVT_CONSUME_STRUCTURED_BUFFERThe variable is a consume structured buffer. |
D3D_SVT_FORCE_DWORDValue: 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 |