[This documentation is preliminary and is subject to change.]
A function-linking-graph interface is used for constructing shaders that consist of a sequence of precompiled function calls that pass values to each other .
+To get a function-linking-graph interface, call
You can use the function-linking-graph (FLG) interface methods to construct shaders that consist of a sequence of precompiled function calls that pass values to each other. You don't need to write HLSL and then call the HLSL compiler. Instead, the shader structure is specified programmatically via a C++ API. FLG nodes represent input and output signatures and invocations of precompiled library functions. The order of registering the function-call nodes defines the sequence of invocations. You must specify the input signature node first and the output signature node last. FLG edges define how values are passed from one node to another. The data types of passed values must be the same; there is no implicit type conversion. Shape and swizzling rules follow the HLSL behavior. Values can only be passed forward in this sequence.
+[This documentation is preliminary and is subject to change.]
Sets the input signature of the function-linking-graph.
+An array of
A reference to the
[This documentation is preliminary and is subject to change.]
Sets the output signature of the function-linking-graph.
+An array of
A reference to the
[This documentation is preliminary and is subject to change.]
Initializes a shader module from the function-linking-graph object.
+A reference to an
[This documentation is preliminary and is subject to change.]
Creates a call-function linking node to use in the function-linking-graph.
+A reference to the
The name of the function.
A reference to a variable that receives a reference to the
[This documentation is preliminary and is subject to change.]
Passes the return value from a source linking node to a destination linking node.
+A reference to the
A reference to the
The zero-based index of the destination parameter.
Returns
Gets the error from the last function call of the function-linking-graph.
+Initializes a shader module from the function-linking-graph object.
+The address of a reference to an
An optional reference to a variable that receives a reference to the ID3DBlob interface that you can use to access compiler error messages, or
Returns
Sets the input signature of the function-linking-graph.
+An array of
The number of input parameters in the pInputParameters array.
A reference to a variable that receives a reference to the
Returns
Sets the output signature of the function-linking-graph.
+An array of
The number of output parameters in the pOutputParameters array.
A reference to a variable that receives a reference to the
Returns
Creates a call-function linking node to use in the function-linking-graph.
+ The optional namespace for the function, or
A reference to the
The name of the function.
A reference to a variable that receives a reference to the
Passes a value from a source linking node to a destination linking node.
+A reference to the
The zero-based index of the source parameter.
A reference to the
The zero-based index of the destination parameter.
Returns
Passes a value with swizzle from a source linking node to a destination linking node.
+A reference to the
The zero-based index of the source parameter.
The name of the source swizzle.
A reference to the
The zero-based index of the destination parameter.
The name of the destination swizzle.
Returns
Gets the error from the last function call of the function-linking-graph.
+An reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the error.
Returns
Generates Microsoft High Level Shader Language (HLSL) shader code that represents the function-linking-graph.
+Reserved
An reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the HLSL shader source code that represents the function-linking-graph. You can compile this HLSL code, but first you must add code or include statements for the functions called in the function-linking-graph.
Returns
Returns all constant buffers provided by this function
+All references to
Returns all function parameters
+All references to
Gets a description of how a resource is bound to a function.
+A zero-based resource index.
A reference to a
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDesc gets info about how one resource in the set is bound as an input to the shader. The ResourceIndex parameter specifies the index for the resource.
+Gets a description of how a resource is bound to a function.
+Resource name.
A reference to a
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDesc gets info about how one resource in the set is bound as an input to the shader. The ResourceIndex parameter specifies the index for the resource.
+Fills the function descriptor structure for the function.
+Fills the function descriptor structure for the function.
+A reference to a
Returns one of the Direct3D 11 Return Codes.
Gets a constant buffer by index for a function.
+Zero-based index.
A reference to a
A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.
+Gets a constant buffer by name for a function.
+The constant-buffer name.
A reference to a
A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.
+Gets a description of how a resource is bound to a function.
+A zero-based resource index.
A reference to a
Returns one of the Direct3D 11 Return Codes.
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDesc gets info about how one resource in the set is bound as an input to the shader. The ResourceIndex parameter specifies the index for the resource.
+Gets a variable by name.
+A reference to a string containing the variable name.
Returns a
Gets a description of how a resource is bound to a function.
+The constant-buffer name of the resource.
A reference to a
Returns one of the Direct3D 11 Return Codes.
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDescByName gets info about how one resource in the set is bound as an input to the shader. The Name parameter specifies the name of the resource.
+Gets the function parameter reflector.
+The zero-based index of the function parameter reflector to retrieve.
A reference to a
Returns all function reflectors provided by this library
+All references to
Fills the library descriptor structure for the library reflection.
+Fills the library descriptor structure for the library reflection.
+A reference to a
Returns one of the Direct3D 11 Return Codes.
Gets the function reflector.
+The zero-based index of the function reflector to retrieve.
A reference to a
[This documentation is preliminary and is subject to change.]
Links the shader and produces a shader blob that the Direct3D runtime can use.
+[This documentation is preliminary and is subject to change.]
Links the shader and produces a shader blob that the Direct3D runtime can use.
+A reference to the
The name of the shader module instance to link from.
The name for the shader blob that is produced.
Reserved
Returns the compiled
Links the shader and produces a shader blob that the Direct3D runtime can use.
+ A reference to the
The name of the shader module instance to link from.
The name for the shader blob that is produced.
Reserved.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the compiled shader code.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access compiler error messages.
Returns
Adds an instance of a library module to be used for linking.
+A reference to the
Returns
Adds a clip plane with the plane coefficients taken from a cbuffer entry for 10Level9 shaders.
+Returns
[This documentation is preliminary and is subject to change.]
Initializes an instance of a shader module that is used for resource rebinding.
+Initializes an instance of a shader module that is used for resource rebinding.
+The name of a shader module to initialize. This can be
The address of a reference to an
Returns
[This documentation is preliminary and is subject to change.]
Rebinds a resource by name as an unordered access view (UAV) to destination slots.
+The address of a reference to an
The name of a shader module to initialize. This can be
The address of a reference to an
Rebinds a constant buffer from a source slot to a destination slot.
+The source slot number for rebinding.
The destination slot number for rebinding.
The offset in bytes of the destination slot for rebinding. The offset must have 16-byte alignment.
Returns:
Rebinds a constant buffer by name to a destination slot.
+The name of the constant buffer for rebinding.
The destination slot number for rebinding.
The offset in bytes of the destination slot for rebinding. The offset must have 16-byte alignment.
Returns:
Rebinds a texture or buffer from source slot to destination slot.
+The first source slot number for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a texture or buffer by name to destination slots.
+The name of the texture or buffer for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a sampler from source slot to destination slot.
+The first source slot number for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a sampler by name to destination slots.
+The name of the sampler for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds an unordered access view (UAV) from source slot to destination slot.
+The first source slot number for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds an unordered access view (UAV) by name to destination slots.
+The name of the UAV for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a resource as an unordered access view (UAV) from source slot to destination slot.
+The first source slot number for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Rebinds a resource by name as an unordered access view (UAV) to destination slots.
+The name of the resource for rebinding.
The first destination slot number for rebinding.
The number of slots for rebinding.
Returns:
Get a shader description.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of Mov instructions.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of Movc instructions.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of conversion instructions.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of bitwise instructions.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the geometry-shader input-primitive description.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether a shader is a sample frequency shader.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of interface slots in a shader.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the minimum feature level.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets a group of flags that indicates the requirements of a shader.
+Here is how the D3D11Shader.h header defines the shader requirements flags:
#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001 + #define D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL 0x00000002 + #define D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE 0x00000004 + #define D3D_SHADER_REQUIRES_64_UAVS 0x00000008 + #define D3D_SHADER_REQUIRES_MINIMUM_PRECISION 0x00000010 + #define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020 + #define D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS 0x00000040 + #define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080 ++
Get a shader description.
+A reference to a shader description. See
Returns one of the following Direct3D 11 Return Codes.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a constant buffer by index.
+Zero-based index.
A reference to a constant buffer (see
A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a constant buffer by name.
+The constant-buffer name.
A reference to a constant buffer (see
A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a description of how a resource is bound to a shader.
+A zero-based resource index.
A reference to an input-binding description. See
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDesc gets information about how one resource in the set is bound as an input to the shader. The ResourceIndex parameter specifies the index for the resource.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get an input-parameter description for a shader.
+A zero-based parameter index.
A reference to a shader-input-signature description. See
An input-parameter description is also called a shader signature. The shader signature contains information about the input parameters such as the order or parameters, their data type, and a parameter semantic.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get an output-parameter description for a shader.
+A zero-based parameter index.
A reference to a shader-output-parameter description. See
An output-parameter description is also called a shader signature. The shader signature contains information about the output parameters such as the order or parameters, their data type, and a parameter semantic.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a patch-constant parameter description for a shader.
+A zero-based parameter index.
A reference to a shader-input-signature description. See
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets a variable by name.
+A reference to a string containing the variable name.
Returns a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a description of how a resource is bound to a shader.
+The constant-buffer name of the resource.
A reference to an input-binding description. See
A shader consists of executable code (the compiled HLSL functions) and a set of resources that supply the shader with input data. GetResourceBindingDescByName gets information about how one resource in the set is bound as an input to the shader. The Name parameter specifies the name of the resource.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of Mov instructions.
+Returns the number of Mov instructions.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of Movc instructions.
+Returns the number of Movc instructions.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of conversion instructions.
+Returns the number of conversion instructions.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of bitwise instructions.
+The number of bitwise instructions.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the geometry-shader input-primitive description.
+ The input-primitive description. See
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether a shader is a sample frequency shader.
+Returns true if the shader is a sample frequency shader; otherwise returns false.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of interface slots in a shader.
+The number of interface slots in the shader.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the minimum feature level.
+ A reference to one of the enumerated values in
Returns one of the following Direct3D 11 Return Codes.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Retrieves the sizes, in units of threads, of the X, Y, and Z dimensions of the shader's thread-group grid.
+A reference to the size, in threads, of the x-dimension of the thread-group grid. The maximum size is 1024.
A reference to the size, in threads, of the y-dimension of the thread-group grid. The maximum size is 1024.
A reference to the size, in threads, of the z-dimension of the thread-group grid. The maximum size is 64.
Returns the total size, in threads, of the thread-group grid by calculating the product of the size of each dimension.
*pSizeX * *pSizeY * *pSizeZ;This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
When a compute shader is written it defines the actions of a single thread group only. If multiple thread groups are required, it is the role of the ID3D11DeviceContext::Dispatch call to issue multiple thread groups.
+Gets a group of flags that indicates the requirements of a shader.
+A value that contains a combination of one or more shader requirements flags; each flag specifies a requirement of the shader. A default value of 0 means there are no requirements.
| Shader requirement flag | Description |
|---|---|
| D3D_SHADER_REQUIRES_DOUBLES | Shader requires that the graphics driver and hardware support double data type. For more info, see |
| D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL | Shader requires an early depth stencil. |
| D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE | Shader requires unordered access views (UAVs) at every pipeline stage. |
| D3D_SHADER_REQUIRES_64_UAVS | Shader requires 64 UAVs. |
| D3D_SHADER_REQUIRES_MINIMUM_PRECISION | Shader requires the graphics driver and hardware to support minimum precision. For more info, see Using HLSL minimum precision. |
| D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS | Shader requires that the graphics driver and hardware support extended doubles instructions. For more info, see the ExtendedDoublesShaderInstructions member of |
| D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS | Shader requires that the graphics driver and hardware support the msad4 intrinsic function in shaders. For more info, see the SAD4ShaderInstructions member of |
| D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING | Shader requires that the graphics driver and hardware support Direct3D 9 shadow support. For more info, see |
| D3D_SHADER_REQUIRES_TILED_RESOURCES | Shader requires that the graphics driver and hardware support tiled resources. For more info, see GetResourceTiling. |
?
Here is how the D3D11Shader.h header defines the shader requirements flags:
#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001 + #define D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL 0x00000002 + #define D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE 0x00000004 + #define D3D_SHADER_REQUIRES_64_UAVS 0x00000008 + #define D3D_SHADER_REQUIRES_MINIMUM_PRECISION 0x00000010 + #define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020 + #define D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS 0x00000040 + #define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080 ++
Get the description of a shader-reflection-variable type.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the base class of a class.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets an
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of interfaces.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get the description of a shader-reflection-variable type.
+A reference to a shader-type description (see
Returns one of the following Direct3D 11 Return Codes.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection-variable type by index.
+Zero-based index.
A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection-variable type by name.
+Member name.
A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection-variable type.
+Zero-based index.
The variable type.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether two
Returns
IsEqual indicates whether the sources of the
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the base class of a class.
+Returns a reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets an
Returns A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Gets the number of interfaces.
+Returns the number of interfaces.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get an interface by index.
+Zero-based index.
A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether a variable is of the specified type.
+A reference to a
Returns
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Indicates whether a class type implements an interface.
+A reference to a
Returns
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Bind the constant buffer to an input slot defined in HLSL code (instead of letting the compiler choose the input slot).
Values that identify the intended use of constant-buffer data.
+A buffer containing scalar constants.
A buffer containing texture data.
A buffer containing interface references.
A buffer containing binding information.
Values that indicate the location of a shader #include file.
+You pass a
The local directory.
The system directory.
Values that indicate how the pipeline interprets geometry or hull shader input primitives.
+ The ID3D11ShaderReflection::GetGSInputPrimitive method returns a
The shader has not been initialized with an input primitive type.
Interpret the input primitive as a point.
Interpret the input primitive as a line.
Interpret the input primitive as a triangle.
Interpret the input primitive as a line with adjacency data.
Interpret the input primitive as a triangle with adjacency data.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
Interpret the input primitive as a control point patch.
The parameter has no semantic flags.
Indicates an input parameter.
Indicates an output parameter.
Values that identify the data types that can be stored in a register.
+A register component type is specified in the ComponentType member of the
The data type is unknown.
32-bit unsigned integer.
32-bit signed integer.
32-bit floating-point number.
Values that identify the return type of a resource.
+A resource return type is specified in the ReturnType member of the
Return type is an unsigned integer value normalized to a value between 0 and 1.
Return type is a signed integer value normalized to a value between -1 and 1.
Return type is a signed integer.
Return type is an unsigned integer.
Return type is a floating-point number.
Return type is unknown.
Return type is a double-precision value.
Return type is a multiple-dword type, such as a double or uint64, and the component is continued from the previous component that was declared. The first component represents the lower bits.
Values that identify parts of the content of an arbitrary length data buffer.
+These values are passed to the D3DGetBlobPart or D3DSetBlobPart function.
+Assign a shader input to a register based on the register assignment in the HLSL code (instead of letting the compiler choose the register).
Use a comparison sampler, which uses the SampleCmp (DirectX HLSL Texture Object) and SampleCmpLevelZero (DirectX HLSL Texture Object) sampling functions.
A 2-bit value for encoding texture components.
A 2-bit value for encoding texture components.
A 2-bit value for encoding texture components.
This value is reserved.
Values that identify resource types that can be bound to a shader and that are reflected as part of the resource description for the shader.
+The shader resource is a constant buffer.
The shader resource is a texture buffer.
The shader resource is a texture.
The shader resource is a sampler.
The shader resource is a read-and-write buffer.
The shader resource is a structured buffer.
For more information about structured buffer, see the Remarks section.
The shader resource is a read-and-write structured buffer.
The shader resource is a byte-address buffer.
The shader resource is a read-and-write byte-address buffer.
The shader resource is an append-structured buffer.
The shader resource is a consume-structured buffer.
The shader resource is a read-and-write structured buffer that uses the built-in counter to append or consume.
Values that identify the class of a shader variable.
+The class of a shader variable is not a programming class; the class identifies the variable class such as scalar, vector, object, and so on.
The shader variable is a scalar.
The shader variable is a vector.
The shader variable is a row-major matrix.
The shader variable is a column-major matrix.
The shader variable is an object.
The shader variable is a structure.
The shader variable is a class.
The shader variable is an interface.
Indicates that the registers assigned to this shader variable were explicitly declared in shader code (instead of automatically assigned by the compiler).
Indicates that this variable is used by this shader. This value confirms that a particular shader variable (which can be common to many different shaders) is indeed used by a particular shader.
Indicates that this variable is an interface.
Indicates that this variable is a parameter of an interface.
Values that identify various data, texture, and buffer types that can be assigned to a shader variable.
+ A call to the ID3D11ShaderReflectionType::GetDesc method returns a
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;
+ The variable is a void reference.
The variable is a boolean.
The variable is an integer.
The variable is a floating-point number.
The variable is a string.
The variable is a texture.
The variable is a 1D texture.
The variable is a 2D texture.
The variable is a 3D texture.
The variable is a texture cube.
The variable is a sampler.
The variable is a 1D sampler.
The variable is a 2D sampler.
The variable is a 3D sampler.
The variable is a cube sampler.
The variable is a pixel shader.
The variable is a vertex shader.
The variable is a pixel fragment.
The variable is a vertex fragment.
The variable is an unsigned integer.
The variable is an 8-bit unsigned integer.
The variable is a geometry shader.
The variable is a rasterizer-state object.
The variable is a depth-stencil-state object.
The variable is a blend-state object.
The variable is a buffer.
The variable is a constant buffer.
The variable is a texture buffer.
The variable is a 1D-texture array.
The variable is a 2D-texture array.
The variable is a render-target view.
The variable is a depth-stencil view.
The variable is a 2D-multisampled texture.
The variable is a 2D-multisampled-texture array.
The variable is a texture-cube array.
The variable holds a compiled hull-shader binary.
The variable holds a compiled domain-shader binary.
The variable is an interface.
The variable holds a compiled compute-shader binary.
The variable is a double precision (64-bit) floating-point number.
The variable is a 1D read-and-write texture.
The variable is an array of 1D read-and-write textures.
The variable is a 2D read-and-write texture.
The variable is an array of 2D read-and-write textures.
The variable is a 3D read-and-write texture.
The variable is a read-and-write buffer.
The variable is a byte-address buffer.
The variable is a read-and-write byte-address buffer.
The variable is a structured buffer.
For more information about structured buffer, see the Remarks section.
The variable is a read-and-write structured buffer.
The variable is an append structured buffer.
The variable is a consume structured buffer.
The variable is an 8-byte FLOAT.
The variable is a 10-byte FLOAT.
The variable is a 16-byte FLOAT.
The variable is a 12-byte INT.
The variable is a 16-byte INT.
The variable is a 16-byte INT.
Indicates shader type.
+Pixel shader.
Vertex shader.
Geometry shader.
Hull shader.
Domain shader.
Compute shader.
Indicates the end of the enumeration constants.
Values that identify shader parameters that use system-value semantics.
+ The
This parameter does not use a predefined system-value semantic.
This parameter contains position data.
This parameter contains clip-distance data.
This parameter contains cull-distance data.
This parameter contains a render-target-array index.
This parameter contains a viewport-array index.
This parameter contains a vertex ID.
This parameter contains a primitive ID.
This parameter contains an instance ID.
This parameter contains data that identifies whether or not the primitive faces the camera.
This parameter contains a sampler-array index.
This parameter contains one of four tessellation factors that correspond to the amount of parts that a quad patch is broken into along the given edge. This flag is used to tessellate a quad patch.
This parameter contains one of two tessellation factors that correspond to the amount of parts that a quad patch is broken into vertically and horizontally within the patch. This flag is used to tessellate a quad patch.
This parameter contains one of three tessellation factors that correspond to the amount of parts that a tri patch is broken into along the given edge. This flag is used to tessellate a tri patch.
This parameter contains the tessellation factor that corresponds to the amount of parts that a tri patch is broken into within the patch. This flag is used to tessellate a tri patch.
This parameter contains the tessellation factor that corresponds to the number of lines broken into within the patch. This flag is used to tessellate an isolines patch.
This parameter contains the tessellation factor that corresponds to the number of lines that are created within the patch. This flag is used to tessellate an isolines patch.
This parameter contains render-target data.
This parameter contains render-target data.
This parameter contains depth data.
This parameter contains alpha-coverage data.
This parameter signifies that the value is greater than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader.
This parameter signifies that the value is less than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader.
This parameter contains a stencil reference. See Shader Specified Stencil Reference Value.
This parameter contains inner input coverage data. See Conservative Rasterization.
Values that identify domain options for tessellator data.
+The data domain defines the type of data. This enumeration is used by
The data type is undefined.
Isoline data.
Triangle data.
Quad data.
Values that identify output primitive types.
+The output primitive type determines how the tessellator output data is organized; this enumeration is used by
The output primitive type is undefined.
The output primitive type is a point.
The output primitive type is a line.
The output primitive type is a clockwise triangle.
The output primitive type is a counter clockwise triangle.
Values that identify partitioning options.
+During tessellation, the partition option helps to determine how the algorithm chooses the next partition value; this enumeration is used by
The partitioning type is undefined.
Partition with integers only.
Partition with a power-of-two number only.
Partition with an odd, fractional number.
Partition with an even, fractional number.
Reads a file that is on disk into memory.
+A reference to a constant null-terminated string that contains the name of the file to read into memory.
A reference to a variable that receives a reference to the ID3DBlob interface that contains information that D3DReadFileToBlob read from the pFileName file. You can use this ID3DBlob interface to access the file information and pass it to other compiler functions.
Returns one of the Direct3D 11 return codes.
Writes a memory blob to a file on disk.
+A reference to a ID3DBlob interface that contains the memory blob to write to the file that the pFileName parameter specifies.
A reference to a constant null-terminated string that contains the name of the file to which to write.
A Boolean value that specifies whether to overwrite information in the pFileName file. TRUE specifies to overwrite information and
Returns one of the Direct3D 11 return codes.
Compile HLSL code or an effect file into bytecode for a given target.
+A reference to uncompiled shader data; either ASCII HLSL code or a compiled effect.
Length of pSrcData.
You can use this parameter for strings that specify error messages. If not used, set to
An array of
Optional. A reference to an
#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((*)( )1)
The name of the shader entry point function where shader execution begins. When you compile using a fx profile (for example, fx_4_0, fx_5_0, and so on), D3DCompile ignores pEntrypoint. In this case, we recommend that you set pEntrypoint to
A string that specifies the shader target or set of shader features to compile against. The shader target can be shader model 2, shader model 3, shader model 4, or shader model 5. The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets.
Flags defined by D3D compile constants.
Flags defined by D3D compile effect constants. When you compile a shader and not an effect file, D3DCompile ignores Flags2; we recommend that you set Flags2 to zero because it is good programming practice to set a nonreference parameter to zero if the called function will not use it.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the compiled code.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access compiler error messages, or
Returns one of the Direct3D 11 return codes.
The difference between D3DCompile and D3DCompile2 is that the latter method takes some optional parameters that can be used to control some aspects of how bytecode is generated. If this extra flexibility is not required, there is no performance gain from using D3DCompile2.
+Compiles Microsoft High Level Shader Language (HLSL) code into bytecode for a given target.
+A reference to uncompiled shader data (ASCII HLSL code).
The size, in bytes, of the block of memory that pSrcData points to.
An optional reference to a constant null-terminated string containing the name that identifies the source data to use in error messages. If not used, set to
An optional array of
A reference to an
#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((*)( )1)
A reference to a constant null-terminated string that contains the name of the shader entry point function where shader execution begins. When you compile an effect, D3DCompile2 ignores pEntrypoint; we recommend that you set pEntrypoint to
A reference to a constant null-terminated string that specifies the shader target or set of shader features to compile against. The shader target can be a shader model (for example, shader model 2, shader model 3, shader model 4, or shader model 5). The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets.
A combination of shader D3D compile constants that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the HLSL code.
A combination of effect D3D compile effect constants that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the effect. When you compile a shader and not an effect file, D3DCompile2 ignores Flags2; we recommend that you set Flags2 to zero because it is good programming practice to set a nonreference parameter to zero if the called function will not use it.
A combination of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles the HLSL code.
| Flag | Description |
|---|---|
| D3DCOMPILE_SECDATA_MERGE_UAV_SLOTS (0x01) | Merge unordered access view (UAV) slots in the secondary data that the pSecondaryData parameter points to. |
| D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS (0x02) | Preserve template slots in the secondary data that the pSecondaryData parameter points to. |
| D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH (0x04) | Require that templates in the secondary data that the pSecondaryData parameter points to match when the compiler compiles the HLSL code. |
?
If pSecondaryData is
A reference to secondary data. If you don't pass secondary data, set to
The size, in bytes, of the block of memory that pSecondaryData points to. If pSecondaryData is
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the compiled code.
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access compiler error messages, or
Returns one of the Direct3D 11 return codes.
The difference between D3DCompile2 and D3DCompile is that D3DCompile2 takes some optional parameters (SecondaryDataFlags, pSecondaryData and SecondaryDataSize) that can be used to control some aspects of how bytecode is generated. Refer to the descriptions of these parameters for more details. There is no difference otherwise to the efficiency of the bytecode generated between D3DCompile2 and D3DCompile.
+Compiles Microsoft High Level Shader Language (HLSL) code into bytecode for a given target.
+Returns one of the Direct3D 11 return codes.
Preprocesses uncompiled HLSL code.
+A reference to uncompiled shader data; either ASCII HLSL code or a compiled effect.
Length of pSrcData.
The name of the file that contains the uncompiled HLSL code.
An array of
A reference to an
#define D3D_COMPILE_STANDARD_FILE_INCLUDE ((*)( )1)
The address of a ID3DBlob that contains the compiled code.
A reference to an ID3DBlob that contains compiler error messages, or
Returns one of the Direct3D 11 return codes.
D3DPreprocess outputs #line directives and preserves line numbering of source input so that output line numbering can be properly related to the input source.
+Gets shader debug information.
+A reference to source data; either uncompiled or compiled HLSL code.
Length of pSrcData.
A reference to a buffer that receives the ID3DBlob interface that contains debug information.
Returns one of the Direct3D 11 return codes.
Debug information is embedded in the body of the shader after calling D3DCompile.
+Gets a reference to a reflection interface.
+A reference to source data as compiled HLSL code.
Length of pSrcData.
The reference
A reference to a reflection interface.
Returns one of the Direct3D 11 return codes.
Shader code contains metadata that can be inspected using the reflection APIs.
The following code illustrates retrieving a
pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), g_pPSClassLinkage, &g_pPixelShader );+* pReflector = null ; + D3DReflect( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), IID_ID3D11ShaderReflection, (void**) &pReflector); +
Creates a library-reflection interface from source data that contains an HLSL library of functions.
Note??This function is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +A reference to source data as an HLSL library of functions.
The size, in bytes, of the block of memory that pSrcData points to.
The reference
A reference to a variable that receives a reference to a library-reflection interface,
Returns
Disassembles compiled HLSL code.
+A reference to source data as compiled HLSL code.
Length of pSrcData.
Flags affecting the behavior of D3DDisassemble. Flags can be a combination of zero or more of the following values.
| Flag | Description |
|---|---|
| D3D_DISASM_ENABLE_COLOR_CODE | Enable the output of color codes. |
| D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS | Enable the output of default values. |
| D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING | Enable instruction numbering. |
| D3D_DISASM_ENABLE_INSTRUCTION_CYCLE | No effect. |
| D3D_DISASM_DISABLE_DEBUG_INFO | Disable debug information. |
| D3D_DISASM_ENABLE_INSTRUCTION_OFFSET | Enable instruction offsets. |
| D3D_DISASM_INSTRUCTION_ONLY | Disassemble instructions only. |
| D3D_DISASM_PRINT_HEX_LITERALS | Use hex symbols in disassemblies. |
?
The comment string at the top of the shader that identifies the shader constants and variables.
A reference to a buffer that receives the ID3DBlob interface that accesses assembly text.
Returns one of the Direct3D 11 return codes.
Disassembles a specific region of compiled Microsoft High Level Shader Language (HLSL) code.
+A reference to compiled shader data.
The size, in bytes, of the block of memory that pSrcData points to.
A combination of zero or more of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how D3DDisassembleRegion disassembles the compiled shader data.
| Flag | Description |
|---|---|
| D3D_DISASM_ENABLE_COLOR_CODE (0x01) | Enable the output of color codes. |
| D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS (0x02) | Enable the output of default values. |
| D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING (0x04) | Enable instruction numbering. |
| D3D_DISASM_ENABLE_INSTRUCTION_CYCLE (0x08) | No effect. |
| D3D_DISASM_DISABLE_DEBUG_INFO (0x10) | Disable the output of debug information. |
| D3D_DISASM_ENABLE_INSTRUCTION_OFFSET (0x20) | Enable the output of instruction offsets. |
| D3D_DISASM_INSTRUCTION_ONLY (0x40) | This flag has no effect in D3DDisassembleRegion. Cycle information comes from the trace; therefore, cycle information is available only in D3DDisassemble11Trace's trace disassembly. |
?
A reference to a constant null-terminated string at the top of the shader that identifies the shader constants and variables.
The number of bytes offset into the compiled shader data where D3DDisassembleRegion starts the disassembly.
The number of instructions to disassemble.
A reference to a variable that receives the number of bytes offset into the compiled shader data where D3DDisassembleRegion finishes the disassembly.
A reference to a buffer that receives the ID3DBlob interface that accesses the disassembled HLSL code.
Returns one of the Direct3D 11 return codes.
Creates a linker interface.
Note??This function is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +A reference to a variable that receives a reference to the
Returns
Creates a shader module interface from source data for the shader module.
Note??This function is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +A reference to the source data for the shader module.
The size, in bytes, of the block of memory that pSrcData points to.
A reference to a variable that receives a reference to the
Returns
Creates a function-linking-graph interface.
Note??This function is part of the HLSL shader linking technology that you can use on all Direct3D?11 platforms to create precompiled HLSL functions, package them into libraries, and link them into full shaders at run time.? +Reserved
A reference to a variable that receives a reference to the
Returns
Retrieves the byte offsets for instructions within a section of shader code.
+A reference to the compiled shader data.
The size, in bytes, of the block of memory that pSrcData points to.
A combination of the following flags that are combined by using a bitwise OR operation. The resulting value specifies how D3DGetTraceInstructionOffsets retrieves the instruction offsets.
| Flag | Description |
|---|---|
| D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE (0x01) | Include non-executable code in the retrieved information. |
?
The index of the instruction in the compiled shader data for which D3DGetTraceInstructionOffsets starts to retrieve the byte offsets.
The number of instructions for which D3DGetTraceInstructionOffsets retrieves the byte offsets.
A reference to a variable that receives the total number of instructions in the section of shader code.
A reference to a variable that receives the actual number of offsets.
A new kind of Microsoft High Level Shader Language (HLSL) debugging information from a program database (PDB) file uses instruction-byte offsets within a shader blob (arbitrary-length data buffer). You use D3DGetTraceInstructionOffsets to translate to and from instruction indexes.
Note??The D3dcompiler_44.dll or later version of the file contains the D3DGetTraceInstructionOffsets compiler function.? +Gets the input signature from a compilation result.
+Returns one of the Direct3D 11 return codes.
Gets the output signature from a compilation result.
+Returns one of the Direct3D 11 return codes.
Gets the input and output signatures from a compilation result.
+Returns one of the Direct3D 11 return codes.
Removes unwanted blobs from a compilation result.
+A reference to source data as compiled HLSL code.
Length of pSrcData.
Strip flag options, represented by
A reference to a variable that receives a reference to the ID3DBlob interface that you can use to access the unwanted stripped out shader code.
Returns one of the Direct3D 11 return codes.
Retrieves a specific part from a compilation result.
+A reference to uncompiled shader data; either ASCII HLSL code or a compiled effect.
Length of uncompiled shader data that pSrcData points to.
A
Flags that indicate how to retrieve the blob part. Currently, no flags are defined.
The address of a reference to the ID3DBlob interface that is used to retrieve the specified part of the buffer.
Returns one of the Direct3D 11 return codes.
D3DGetBlobPart retrieves the part of a blob (arbitrary length data buffer) that contains the type of data that the Part parameter specifies.
+Sets information in a compilation result.
+A reference to compiled shader data.
The length of the compiled shader data that pSrcData points to.
A
Flags that indicate how to set the blob part. Currently, no flags are defined; therefore, set to zero.
A reference to data to set in the compilation result.
The length of the data that pPart points to.
A reference to a buffer that receives the ID3DBlob interface for the new shader in which the new part data is set.
Returns one of the Direct3D 11 return codes.
D3DSetBlobPart modifies data in a compiled shader. Currently, D3DSetBlobPart can update only the private data in a compiled shader. You can use D3DSetBlobPart to attach arbitrary uninterpreted data to a compiled shader.
Note??The D3dcompiler_44.dll or later version of the file contains the D3DSetBlobPart compiler function.? +Creates a buffer.
+Number of bytes in the blob.
The address of a reference to the ID3DBlob interface that is used to retrieve the buffer.
Returns one of the Direct3D 11 return codes.
The latest D3dcompiler_nn.dll contains the D3DCreateBlob compiler function. Therefore, you are no longer required to create and use an arbitrary length data buffer by using the D3D10CreateBlob function that is contained in D3d10.dll.
+Compresses a set of shaders into a more compact form.
+The number of shaders to compress.
An array of
Flags that indicate how to compress the shaders. Currently, only the D3D_COMPRESS_SHADER_KEEP_ALL_PARTS (0x00000001) flag is defined.
The address of a reference to the ID3DBlob interface that is used to retrieve the compressed shader data.
Returns one of the Direct3D 11 return codes.
Decompresses one or more shaders from a compressed set.
+A reference to uncompiled shader data; either ASCII HLSL code or a compiled effect.
Length of uncompiled shader data that pSrcData points to.
The number of shaders to decompress.
The index of the first shader to decompress.
An array of indexes that represent the shaders to decompress.
Flags that indicate how to decompress. Currently, no flags are defined.
The address of a reference to the ID3DBlob interface that is used to retrieve the decompressed shader data.
A reference to a variable that receives the total number of shaders that D3DDecompressShaders decompressed.
Returns one of the Direct3D 11 return codes.
Get a constant-buffer description.
+This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a constant-buffer description.
+A reference to a
Returns one of the following Direct3D 11 Return Codes.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection variable by index.
+Zero-based index.
A reference to a shader-reflection variable interface (see
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-reflection variable by name.
+Variable name.
Returns a sentinel object (end of list marker). To determine if GetVariableByName successfully completed, call ID3D11ShaderReflectionVariable::GetDesc and check the returned
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Fills the parameter descriptor structure for the function's parameter.
+Fills the parameter descriptor structure for the function's parameter.
+A reference to a
Returns one of the Direct3D 11 Return Codes.
Get a shader-variable description.
+This method can be used to determine if the
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+This method returns the buffer of the current
Get a shader-variable description.
+A reference to a shader-variable description (see
Returns one of the following Direct3D 11 Return Codes.
This method can be used to determine if the
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Get a shader-variable type.
+A reference to a
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+This method returns the buffer of the current
Returns a reference to the
Gets the corresponding interface slot for a variable that represents an interface reference.
+Index of the array element to get the slot number for. For a non-array variable this value will be zero.
Returns the index of the interface in the interface array.
GetInterfaceSlot gets the corresponding slot in an dynamic linkage array for an interface instance. The returned slot number is used to set an interface instance to a particular class instance. See the HLSL Interfaces and Classes overview for additional information.
This method's interface is hosted in the out-of-box DLL D3DCompiler_xx.dll.
+Describes a shader constant-buffer.
+Constants are supplied to shaders in a shader-constant buffer. Get the description of a shader-constant-buffer by calling ID3D11ShaderReflectionConstantBuffer::GetDesc.
+The name of the buffer.
A
The number of unique variables.
Buffer size (in bytes).
A combination of
Describes a function.
+The shader version.
The name of the originator of the function.
A combination of D3DCOMPILE Constants that are combined by using a bitwise OR operation. The resulting value specifies shader compilation and parsing.
The number of constant buffers for the function.
The number of bound resources for the function.
The number of emitted instructions for the function.
The number of temporary registers used by the function.
The number of temporary arrays used by the function.
The number of constant defines for the function.
The number of declarations (input + output) for the function.
The number of non-categorized texture instructions for the function.
The number of texture load instructions for the function.
The number of texture comparison instructions for the function.
The number of texture bias instructions for the function.
The number of texture gradient instructions for the function.
The number of floating point arithmetic instructions used by the function.
The number of signed integer arithmetic instructions used by the function.
The number of unsigned integer arithmetic instructions used by the function.
The number of static flow control instructions used by the function.
The number of dynamic flow control instructions used by the function.
The number of macro instructions used by the function.
The number of array instructions used by the function.
The number of mov instructions used by the function.
The number of movc instructions used by the function.
The number of type conversion instructions used by the function.
The number of bitwise arithmetic instructions used by the function.
A
A value that contains a combination of one or more shader requirements flags; each flag specifies a requirement of the shader. A default value of 0 means there are no requirements. For a list of values, see ID3D11ShaderReflection::GetRequiresFlags.
The name of the function.
The number of logical parameters in the function signature, not including the return value.
Indicates whether the function returns a value. TRUE indicates it returns a value; otherwise,
Indicates whether there is a Direct3D 10Level9 vertex shader blob. TRUE indicates there is a 10Level9 vertex shader blob; otherwise,
Indicates whether there is a Direct3D 10Level9 pixel shader blob. TRUE indicates there is a 10Level9 pixel shader blob; otherwise,
Describes how a shader resource is bound to a shader input.
+Get a shader-input-signature description by calling ID3D11ShaderReflection::GetResourceBindingDesc or ID3D11ShaderReflection::GetResourceBindingDescByName.
+Name of the shader resource.
A
Starting bind point.
Number of contiguous bind points for arrays.
A combination of
If the input is a texture, the
A
The number of samples for a multisampled texture; when a texture isn't multisampled, the value is set to -1 (0xFFFFFFFF).
Describes a library.
+The name of the originator of the library.
A combination of D3DCOMPILE Constants that are combined by using a bitwise OR operation. The resulting value specifies how the compiler compiles.
The number of functions exported from the library.
Describes a function parameter.
+Get a function-parameter description by calling ID3D11FunctionParameterReflection::GetDesc.
+The name of the function parameter.
The HLSL semantic that is associated with this function parameter. This name includes the index, for example, SV_Target[n].
A
A
The number of rows for a matrix parameter.
The number of columns for a matrix parameter.
A
A combination of
The first input register for this parameter.
The first input register component for this parameter.
The first output register for this parameter.
The first output register component for this parameter.
Describes shader data.
+An array of
A reference to shader data.
Length of shader data that pBytecode points to.
Describes a shader.
+A shader is written in HLSL and compiled into an intermediate language by the HLSL compiler. The shader description returns information about the compiled shader. Get a shader description by calling ID3D11ShaderReflection::GetDesc.
+Shader version.
The name of the originator of the shader.
Shader compilation/parse flags.
The number of shader-constant buffers.
The number of resource (textures and buffers) bound to a shader.
The number of parameters in the input signature.
The number of parameters in the output signature.
The number of intermediate-language instructions in the compiled shader.
The number of temporary registers in the compiled shader.
Number of temporary arrays used.
Number of constant defines.
Number of declarations (input + output).
Number of non-categorized texture instructions.
Number of texture load instructions
Number of texture comparison instructions
Number of texture bias instructions
Number of texture gradient instructions.
Number of floating point arithmetic instructions used.
Number of signed integer arithmetic instructions used.
Number of unsigned integer arithmetic instructions used.
Number of static flow control instructions used.
Number of dynamic flow control instructions used.
Number of macro instructions used.
Number of array instructions used.
Number of cut instructions used.
Number of emit instructions used.
The
Geometry shader maximum output vertex count.
The
Number of parameters in the patch-constant signature.
Number of geometry shader instances.
Number of control points in the hull shader and domain shader.
The
The
The
Number of barrier instructions in a compute shader.
Number of interlocked instructions in a compute shader.
Number of texture writes in a compute shader.
Describes a shader signature.
+A shader can take n inputs and can produce m outputs. The order of the input (or output) parameters, their associated types, and any attached semantics make up the shader signature. Each shader has an input and an output signature.
When compiling a shader or an effect, some API calls validate shader signatures That is, they compare the output signature of one shader (like a vertex shader) with the input signature of another shader (like a pixel shader). This ensures that a shader outputs data that is compatible with a downstream shader that is consuming that data. Compatible means that a shader signature is a exact-match subset of the preceding shader stage. Exact match means parameter types and semantics must exactly match. Subset means that a parameter that is not required by a downstream stage, does not need to include that parameter in its shader signature.
Get a shader-signature from a shader or an effect by calling APIs such as ID3D11ShaderReflection::GetInputParameterDesc.
+A per-parameter string that identifies how the data will be used. For more info, see Semantics.
Semantic index that modifies the semantic. Used to differentiate different parameters that use the same semantic.
The register that will contain this variable's data.
A
A
Mask which indicates which components of a register are used.
Mask which indicates whether a given component is never written (if the signature is an output signature) or always read (if the signature is an input signature).
Indicates which stream the geometry shader is using for the signature parameter.
A
Describes a shader-variable type.
+Get a shader-variable-type description by calling ID3D11ShaderReflectionType::GetDesc.
+A
A
Number of rows in a matrix. Otherwise a numeric type returns 1, any other type returns 0.
Number of columns in a matrix. Otherwise a numeric type returns 1, any other type returns 0.
Number of elements in an array; otherwise 0.
Number of members in the structure; otherwise 0.
Offset, in bytes, between the start of the parent structure and this variable. Can be 0 if not a structure member.
Name of the shader-variable type. This member can be
Describes a shader variable.
+Get a shader-variable description using reflection by calling ID3D11ShaderReflectionVariable::GetDesc.
As of the June 2010 update, DefaultValue emits default values for reflection.
+The variable name.
Offset from the start of the parent structure to the beginning of the variable.
Size of the variable (in bytes).
A combination of
The default value for initializing the variable.
Offset from the start of the variable to the beginning of the texture.
The size of the texture, in bytes.
Offset from the start of the variable to the beginning of the sampler.
The size of the sampler, in bytes.
Gets a DXGI 1.0 description of an adapter (or video card).
+Graphics apps can use the DXGI API to retrieve an accurate set of graphics memory values on systems that have Windows Display Driver Model (WDDM) drivers. The following are the critical steps involved.
HasWDDMDriver()
+ { LPDIRECT3DCREATE9EX pD3D9Create9Ex = null ; HMODULE hD3D9 = null ; hD3D9 = LoadLibrary( L"d3d9.dll" ); if ( null == hD3D9 ) { return false; } // /* Try to create IDirect3D9Ex interface (also known as a DX9L interface). This interface can only be created if the driver is a WDDM driver. */ // pD3D9Create9Ex = (LPDIRECT3DCREATE9EX) GetProcAddress( hD3D9, "Direct3DCreate9Ex" ); return pD3D9Create9Ex != null ;
+ } * pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); + * pDXGIAdapter; + pDXGIDevice->GetAdapter(&pDXGIAdapter); + adapterDesc; + pDXGIAdapter->GetDesc(&adapterDesc);
Enumerate adapter (video card) outputs.
+The index of the output.
The address of a reference to an
A code that indicates success or failure (see DXGI_ERROR).
If the adapter came from a device created using D3D_DRIVER_TYPE_WARP, then the adapter has no outputs, so
When the EnumOutputs method succeeds and fills the ppOutput parameter with the address of the reference to the output interface, EnumOutputs increments the output interface's reference count. To avoid a memory leak, when you finish using the output interface, call the Release method to decrement the reference count.
EnumOutputs first returns the output on which the desktop primary is displayed. This output corresponds with an index of zero. EnumOutputs then returns other outputs.
+Gets a DXGI 1.0 description of an adapter (or video card).
+A reference to a
Returns
Graphics apps can use the DXGI API to retrieve an accurate set of graphics memory values on systems that have Windows Display Driver Model (WDDM) drivers. The following are the critical steps involved.
HasWDDMDriver()
+ { LPDIRECT3DCREATE9EX pD3D9Create9Ex = null ; HMODULE hD3D9 = null ; hD3D9 = LoadLibrary( L"d3d9.dll" ); if ( null == hD3D9 ) { return false; } // /* Try to create IDirect3D9Ex interface (also known as a DX9L interface). This interface can only be created if the driver is a WDDM driver. */ // pD3D9Create9Ex = (LPDIRECT3DCREATE9EX) GetProcAddress( hD3D9, "Direct3DCreate9Ex" ); return pD3D9Create9Ex != null ;
+ } * pDXGIDevice; + hr = g_pd3dDevice->QueryInterface(__uuidof( ), (void **)&pDXGIDevice); + * pDXGIAdapter; + pDXGIDevice->GetAdapter(&pDXGIAdapter); + adapterDesc; + pDXGIAdapter->GetDesc(&adapterDesc);
Checks whether the system supports a device interface for a graphics component.
+The
The user mode driver version of InterfaceName. This is returned only if the interface is supported, otherwise this parameter will be
Returns the adapter for the specified device.
+If the GetAdapter method succeeds, the reference count on the adapter interface will be incremented. To avoid a memory leak, be sure to release the interface when you are finished using it.
+Gets or sets the GPU thread priority.
+Returns the adapter for the specified device.
+The address of an
Returns
If the GetAdapter method succeeds, the reference count on the adapter interface will be incremented. To avoid a memory leak, be sure to release the interface when you are finished using it.
+Returns a surface. This method is used internally and you should not call it directly in your application.
+A reference to a
The number of surfaces to create.
A DXGI_USAGE flag that specifies how the surface is expected to be used.
An optional reference to a
The address of an
Returns
The CreateSurface method creates a buffer to exchange data between one or more devices. It is used internally, and you should not directly call it.
The runtime automatically creates an
Gets the residency status of an array of resources.
+An array of
An array of
The number of resources in the ppResources argument array and pResidencyStatus argument array.
Returns
The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.
Note??The residency status will constantly change.?If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY flag.
Note??This method should not be called every frame as it incurs a non-trivial amount of overhead.? +Sets the GPU thread priority.
+A value that specifies the required GPU thread priority. This value must be between -7 and 7, inclusive, where 0 represents normal priority.
Return
The values for the Priority parameter function as follows:
To use the SetGPUThreadPriority method, you should have a comprehensive understanding of GPU scheduling. You should profile your application to ensure that it behaves as intended. If used inappropriately, the SetGPUThreadPriority method can impede rendering speed and result in a poor user experience.
+Gets the GPU thread priority.
+A reference to a variable that receives a value that indicates the current GPU thread priority. The value will be between -7 and 7, inclusive, where 0 represents normal priority.
Return
Retrieves the device.
+The reference id for the device.
The address of a reference to the device.
A code that indicates success or failure (see DXGI_ERROR).
The type of interface that is returned can be any interface published by the device. For example, it could be an
Reports info about the lifetime of an object or objects.
+The globally unique identifier (
A
Returns
Sets application-defined data to the object and associates that data with a
A
The size of the object's data.
A reference to the object's data.
Returns one of the DXGI_ERROR values.
SetPrivateData makes a copy of the specified data and stores it with the object.
Private data that SetPrivateData stores in the object occupies the same storage space as private data that is stored by associated Direct3D objects (for example, by a Microsoft Direct3D?11 device through ID3D11Device::SetPrivateData or by a Direct3D?11 child device through ID3D11DeviceChild::SetPrivateData).
The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "<unnamed>". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the SetPrivateData method and the well-known private data
static const char c_szName[] = "My name"; + hr = pContext->SetPrivateData(, sizeof( c_szName ) - 1, c_szName ); +
You can use
Set an interface in the object's private data.
+A
The interface to set.
Returns one of the following DXGI_ERROR.
This API associates an interface reference with the object.
When the interface is set its reference count is incremented. When the data are overwritten (by calling SPD or SPDI with the same
Get a reference to the object's data.
+A
The size of the data.
Pointer to the data.
Returns one of the following DXGI_ERROR.
If the data returned is a reference to an
You can pass GUID_DeviceType in the Name parameter of GetPrivateData to retrieve the device type from the display adapter object (
To get the type of device on which the display adapter was created
On Windows?7 or earlier, this type is either a value from D3D10_DRIVER_TYPE or
Gets the parent of the object.
+The ID of the requested interface.
The address of a reference to the parent object.
Returns one of the DXGI_ERROR values.
Enumerates the adapters (video cards).
+The index of the adapter to enumerate.
The address of a reference to an
Returns
When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the
When the EnumAdapters method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.
EnumAdapters first returns the adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters next returns other adapters with outputs. EnumAdapters finally returns adapters without outputs.
+Allows DXGI to monitor an application's message queue for the alt-enter key sequence (which causes the application to switch from windowed to full screen or vice versa).
+The handle of the window that is to be monitored. This parameter can be
One or more of the following values:
The combination of WindowHandle and Flags informs DXGI to stop monitoring window messages for the previously-associated window.
If the application switches to full-screen mode, DXGI will choose a full-screen resolution to be the smallest supported resolution that is larger or the same size as the current back buffer size.
Applications can make some changes to make the transition from windowed to full screen more efficient. For example, on a WM_SIZE message, the application should release any outstanding swap-chain back buffers, call IDXGISwapChain::ResizeBuffers, then re-acquire the back buffers from the swap chain(s). This gives the swap chain(s) an opportunity to resize the back buffers, and/or recreate them to enable full-screen flipping operation. If the application does not perform this sequence, DXGI will still make the full-screen/windowed transition, but may be forced to use a stretch operation (since the back buffers may not be the correct size), which may be less efficient. Even if a stretch is not required, presentation may not be optimal because the back buffers might not be directly interchangeable with the front buffer. Thus, a call to ResizeBuffers on WM_SIZE is always recommended, since WM_SIZE is always sent during a fullscreen transition.
While windowed, the application can, if it chooses, restrict the size of its window's client area to sizes to which it is comfortable rendering. A fully flexible application would make no such restriction, but UI elements or other design considerations can, of course, make this flexibility untenable. If the application further chooses to restrict its window's client area to just those that match supported full-screen resolutions, the application can field WM_SIZING, then check against IDXGIOutput::FindClosestMatchingMode. If a matching mode is found, allow the resize. (The
Applications that want to handle mode changes or Alt+Enter themselves should call MakeWindowAssociation with the DXGI_MWA_NO_WINDOW_CHANGES flag after swap chain creation. The WindowHandle argument, if non-
Get the window through which the user controls the transition to and from full screen.
+A reference to a window handle.
[Starting with Direct3D 11.1, we recommend not to use CreateSwapChain anymore to create a swap chain. Instead, use CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, or CreateSwapChainForComposition depending on how you want to create the swap chain.]
Creates a swap chain.
+
If you attempt to create a swap chain in full-screen mode, and full-screen mode is unavailable, the swap chain will be created in windowed mode and DXGI_STATUS_OCCLUDED will be returned.
If the buffer width or the buffer height is zero, the sizes will be inferred from the output window size in the swap-chain description.
Because the target output can't be chosen explicitly when the swap chain is created, we recommend not to create a full-screen swap chain. This can reduce presentation performance if the swap chain size and the output window size do not match. Here are two ways to ensure that the sizes match:
If the swap chain is in full-screen mode, before you release it you must use SetFullscreenState to switch it to windowed mode. For more information about releasing a swap chain, see the "Destroying a Swap Chain" section of DXGI Overview.
After the runtime renders the initial frame in full screen, the runtime might unexpectedly exit full screen during a call to IDXGISwapChain::Present. To work around this issue, we recommend that you execute the following code right after you call CreateSwapChain to create a full-screen swap chain (Windowed member of
// Detect if newly created full-screen swap chain isn't actually full screen. +* pTarget; bFullscreen; + if (SUCCEEDED(pSwapChain->GetFullscreenState(&bFullscreen, &pTarget))) + { pTarget->Release(); + } + else bFullscreen = ; + // If not full screen, enable full screen again. + if (!bFullscreen) + { ShowWindow(hWnd, SW_MINIMIZE); ShowWindow(hWnd, SW_RESTORE); pSwapChain->SetFullscreenState(TRUE, null ); + } +
You can specify
However, to use stereo presentation and to change resize behavior for the flip model, applications must use the IDXGIFactory2::CreateSwapChainForHwnd method. Otherwise, the back-buffer contents implicitly scale to fit the presentation target size; that is, you can't turn off scaling.
+Create an adapter interface that represents a software adapter.
+Handle to the software adapter's dll. HMODULE can be obtained with GetModuleHandle or LoadLibrary.
Address of a reference to an adapter (see
A software adapter is a DLL that implements the entirety of a device driver interface, plus emulation, if necessary, of kernel-mode graphics components for Windows. Details on implementing a software adapter can be found in the Windows Vista Driver Development Kit. This is a very complex development task, and is not recommended for general readers.
Calling this method will increment the module's reference count by one. The reference count can be decremented by calling FreeLibrary.
The typical calling scenario is to call LoadLibrary, pass the handle to CreateSoftwareAdapter, then immediately call FreeLibrary on the DLL and forget the DLL's HMODULE. Since the software adapter calls FreeLibrary when it is destroyed, the lifetime of the DLL will now be owned by the adapter, and the application is free of any further consideration of its lifetime.
+Informs an application of the possible need to re-enumerate adapters.
+This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
+Enumerates both adapters (video cards) with or without outputs.
+The index of the adapter to enumerate.
The address of a reference to an
Returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the
When the EnumAdapters1 method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters1 increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.
EnumAdapters1 first returns the adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters1 next returns other adapters with outputs. EnumAdapters1 finally returns adapters without outputs.
+Informs an application of the possible need to re-enumerate adapters.
+IsCurrent returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
+Determines whether to use stereo mode.
+We recommend that windowed applications call IsWindowedStereoEnabled before they attempt to use stereo. IsWindowedStereoEnabled returns TRUE if both of the following items are true:
The creation of a windowed stereo swap chain succeeds if the first requirement is met. However, if the adapter can't scan out stereo, the output on that adapter is reduced to mono.
The Direct3D 11.1 Simple Stereo 3D Sample shows how to add a stereoscopic 3D effect and how to respond to system stereo changes.
+Determines whether to use stereo mode.
+Indicates whether to use stereo mode. TRUE indicates that you can use stereo mode; otherwise,
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsWindowedStereoEnabled always returns
We recommend that windowed applications call IsWindowedStereoEnabled before they attempt to use stereo. IsWindowedStereoEnabled returns TRUE if both of the following items are true:
The creation of a windowed stereo swap chain succeeds if the first requirement is met. However, if the adapter can't scan out stereo, the output on that adapter is reduced to mono.
The Direct3D 11.1 Simple Stereo 3D Sample shows how to add a stereoscopic 3D effect and how to respond to system stereo changes.
+Creates a swap chain that is associated with an
CreateSwapChainForHwnd returns:
Platform Update for Windows?7:??DXGI_SCALING_NONE is not supported on Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed and causes CreateSwapChainForHwnd to return
If you specify the width, height, or both (Width and Height members of
Because you can associate only one flip presentation model swap chain at a time with an
For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.
+Creates a swap chain that is associated with the CoreWindow object for the output window for the swap chain.
+CreateSwapChainForCoreWindow returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, CreateSwapChainForCoreWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
If you specify the width, height, or both (Width and Height members of
Because you can associate only one flip presentation model swap chain (per layer) at a time with a CoreWindow, the Microsoft Direct3D?11 policy of deferring the destruction of objects can cause problems if you attempt to destroy a flip presentation model swap chain and replace it with another swap chain. For more info about this situation, see Deferred Destruction Issues with Flip Presentation Swap Chains.
For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.
+Identifies the adapter on which a shared resource object was created.
+A handle to a shared resource object. The IDXGIResource1::CreateSharedHandle method returns this handle.
A reference to a variable that receives a locally unique identifier (
GetSharedResourceAdapterLuid returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetSharedResourceAdapterLuid fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
You cannot share resources across adapters. Therefore, you cannot open a shared resource on an adapter other than the adapter on which the resource was created. Call GetSharedResourceAdapterLuid before you open a shared resource to ensure that the resource was created on the appropriate adapter. To open a shared resource, call the ID3D11Device1::OpenSharedResource1 or ID3D11Device1::OpenSharedResourceByName method.
+Registers an application window to receive notification messages of changes of stereo status.
+The handle of the window to send a notification message to when stereo status change occurs.
Identifies the notification message to send.
A reference to a key value that an application can pass to the IDXGIFactory2::UnregisterStereoStatus method to unregister the notification message that wMsg specifies.
RegisterStereoStatusWindow returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterStereoStatusWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
Registers to receive notification of changes in stereo status by using event signaling.
+A handle to the event object that the operating system sets when notification of stereo status change occurs. The CreateEvent or OpenEvent function returns this handle.
A reference to a key value that an application can pass to the IDXGIFactory2::UnregisterStereoStatus method to unregister the notification event that hEvent specifies.
RegisterStereoStatusEvent returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterStereoStatusEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
Unregisters a window or an event to stop it from receiving notification when stereo status changes.
+A key value for the window or event to unregister. The IDXGIFactory2::RegisterStereoStatusWindow or IDXGIFactory2::RegisterStereoStatusEvent method returns this value.
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, UnregisterStereoStatus has no effect. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Registers an application window to receive notification messages of changes of occlusion status.
+The handle of the window to send a notification message to when occlusion status change occurs.
Identifies the notification message to send.
A reference to a key value that an application can pass to the IDXGIFactory2::UnregisterOcclusionStatus method to unregister the notification message that wMsg specifies.
RegisterOcclusionStatusWindow returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterOcclusionStatusWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
Apps choose the Windows message that Windows sends when occlusion status changes.
+Registers to receive notification of changes in occlusion status by using event signaling.
+A handle to the event object that the operating system sets when notification of occlusion status change occurs. The CreateEvent or OpenEvent function returns this handle.
A reference to a key value that an application can pass to the IDXGIFactory2::UnregisterOcclusionStatus method to unregister the notification event that hEvent specifies.
RegisterOcclusionStatusEvent returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterOcclusionStatusEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
If you call RegisterOcclusionStatusEvent multiple times with the same event handle, RegisterOcclusionStatusEvent fails with
If you call RegisterOcclusionStatusEvent multiple times with the different event handles, RegisterOcclusionStatusEvent properly registers the events.
+Unregisters a window or an event to stop it from receiving notification when occlusion status changes.
+A key value for the window or event to unregister. The IDXGIFactory2::RegisterOcclusionStatusWindow or IDXGIFactory2::RegisterOcclusionStatusEvent method returns this value.
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, UnregisterOcclusionStatus has no effect. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Creates a swap chain that you can use to send Direct3D content into the DirectComposition API or the Windows.UI.Xaml framework to compose in a window.
+CreateSwapChainForComposition returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, CreateSwapChainForComposition fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
You can use composition swap chains with either DirectComposition?s
The IDXGISwapChain::SetFullscreenState, IDXGISwapChain::ResizeTarget, IDXGISwapChain::GetContainingOutput, IDXGISwapChain1::GetHwnd, and IDXGISwapChain::GetCoreWindow methods aren't valid on this type of swap chain. If you call any of these methods on this type of swap chain, they fail.
For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.
+ Outputs the
Returns
For Direct3D 12, it's no longer possible to backtrack from a device to the
Provides an adapter which can be provided to D3D12CreateDevice to use the WARP renderer.
+ The globally unique identifier (
The address of an
Returns
For more information, see DXGI 1.4 Improvements.
+Sets the maximum number of messages that can be added to the message queue.
+A DXGI_DEBUG_ID value that identifies the entity that sets the limit on the number of messages.
The maximum number of messages that can be added to the queue. ?1 means no limit.
Returns
Clears all messages from the message queue.
+A DXGI_DEBUG_ID value that identifies the entity that clears the messages.
Gets a message from the message queue.
+A DXGI_DEBUG_ID value that identifies the entity that gets the message.
An index into the message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter. Call IDXGIInfoQueue::GetNumStoredMessagesAllowedByRetrievalFilters to obtain this number. 0 is the message at the beginning of the message queue.
A reference to a
A reference to a variable that receives the size, in bytes, of the message description that pMessage points to. This size includes the size of the message string that pMessage points to.
Returns
This method doesn't remove any messages from the message queue.
This method gets a message from the message queue after an optional retrieval filter has been applied.
Call this method twice to retrieve a message, first to obtain the size of the message and second to get the message. Here is a typical example:
// Get the size of the message. +Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +messageLength = 0; + hr = pInfoQueue->GetMessage(DXGI_DEBUG_ALL, 0, null , &messageLength); // Allocate space and get the message. +* pMessage = ( *)malloc(messageLength); + hr = pInfoQueue->GetMessage(DXGI_DEBUG_ALL, 0, pMessage, &messageLength); +
Gets the number of messages that can pass through a retrieval filter.
+A DXGI_DEBUG_ID value that identifies the entity that gets the number.
Returns the number of messages that can pass through a retrieval filter.
Gets the number of messages currently stored in the message queue.
+A DXGI_DEBUG_ID value that identifies the entity that gets the number.
Returns the number of messages currently stored in the message queue.
Gets the number of messages that were discarded due to the message count limit.
+A DXGI_DEBUG_ID value that identifies the entity that gets the number.
Returns the number of messages that were discarded.
Get and set the message count limit with IDXGIInfoQueue::GetMessageCountLimit and IDXGIInfoQueue::SetMessageCountLimit, respectively.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +Gets the maximum number of messages that can be added to the message queue.
+A DXGI_DEBUG_ID value that identifies the entity that gets the number.
Returns the maximum number of messages that can be added to the queue. ?1 means no limit.
When the number of messages in the message queue reaches the maximum limit, new messages coming in push old messages out.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +Gets the number of messages that a storage filter allowed to pass through.
+A DXGI_DEBUG_ID value that identifies the entity that gets the number.
Returns the number of messages allowed by a storage filter.
Gets the number of messages that were denied passage through a storage filter.
+A DXGI_DEBUG_ID value that identifies the entity that gets the number.
Returns the number of messages denied by a storage filter.
Adds storage filters to the top of the storage-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that produced the filters.
An array of
Returns
Gets the storage filter at the top of the storage-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that gets the filter.
A reference to a
A reference to a variable that receives the size, in bytes, of the filter description to which pFilter points. If pFilter is
Returns
Removes a storage filter from the top of the storage-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that removes the filter.
Pushes an empty storage filter onto the storage-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pushes the empty storage filter.
Returns
An empty storage filter allows all messages to pass through.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +Pushes a deny-all storage filter onto the storage-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pushes the filter.
Returns
A deny-all storage filter prevents all messages from passing through.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +Pushes a copy of the storage filter that is currently on the top of the storage-filter stack onto the storage-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pushes the copy of the storage filter.
Returns
Pushes a storage filter onto the storage-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pushes the filter.
A reference to a
Returns
Pops a storage filter from the top of the storage-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pops the filter.
Gets the size of the storage-filter stack in bytes.
+A DXGI_DEBUG_ID value that identifies the entity that gets the size.
Returns the size of the storage-filter stack in bytes.
Adds retrieval filters to the top of the retrieval-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that produced the filters.
An array of
Returns
Gets the retrieval filter at the top of the retrieval-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that gets the filter.
A reference to a
A reference to a variable that receives the size, in bytes, of the filter description to which pFilter points. If pFilter is
Returns
Removes a retrieval filter from the top of the retrieval-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that removes the filter.
Pushes an empty retrieval filter onto the retrieval-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pushes the empty retrieval filter.
Returns
An empty retrieval filter allows all messages to pass through.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +Pushes a deny-all retrieval filter onto the retrieval-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pushes the deny-all retrieval filter.
Returns
A deny-all retrieval filter prevents all messages from passing through.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +Pushes a copy of the retrieval filter that is currently on the top of the retrieval-filter stack onto the retrieval-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pushes the copy of the retrieval filter.
Returns
Pushes a retrieval filter onto the retrieval-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pushes the filter.
A reference to a
Returns
Pops a retrieval filter from the top of the retrieval-filter stack.
+A DXGI_DEBUG_ID value that identifies the entity that pops the filter.
Gets the size of the retrieval-filter stack in bytes.
+A DXGI_DEBUG_ID value that identifies the entity that gets the size.
Returns the size of the retrieval-filter stack in bytes.
Adds a debug message to the message queue and sends that message to the debug output.
+A DXGI_DEBUG_ID value that identifies the entity that produced the message.
A
A
An integer that uniquely identifies the message.
The message string.
Returns
Adds a user-defined message to the message queue and sends that message to the debug output.
+A
The message string.
Returns
Sets a message category to break on when a message with that category passes through the storage filter.
+A DXGI_DEBUG_ID value that identifies the entity that sets the breaking condition.
A
A Boolean value that specifies whether SetBreakOnCategory turns on or off this breaking condition (TRUE for on,
Returns
Sets a message severity level to break on when a message with that severity level passes through the storage filter.
+A DXGI_DEBUG_ID value that identifies the entity that sets the breaking condition.
A
A Boolean value that specifies whether SetBreakOnSeverity turns on or off this breaking condition (TRUE for on,
Returns
Sets a message identifier to break on when a message with that identifier passes through the storage filter.
+A DXGI_DEBUG_ID value that identifies the entity that sets the breaking condition.
An integer value that specifies the identifier of the message.
A Boolean value that specifies whether SetBreakOnID turns on or off this breaking condition (TRUE for on,
Returns
Determines whether the break on a message category is turned on or off.
+A DXGI_DEBUG_ID value that identifies the entity that gets the breaking status.
A
Returns a Boolean value that specifies whether this category of breaking condition is turned on or off (TRUE for on,
Determines whether the break on a message severity level is turned on or off.
+A DXGI_DEBUG_ID value that identifies the entity that gets the breaking status.
A
Returns a Boolean value that specifies whether this severity of breaking condition is turned on or off (TRUE for on,
Determines whether the break on a message identifier is turned on or off.
+A DXGI_DEBUG_ID value that identifies the entity that gets the breaking status.
An integer value that specifies the identifier of the message.
Returns a Boolean value that specifies whether this break on a message identifier is turned on or off (TRUE for on,
Turns the debug output on or off.
+A DXGI_DEBUG_ID value that identifies the entity that gets the mute status.
A Boolean value that specifies whether to turn the debug output on or off (TRUE for on,
Determines whether the debug output is turned on or off.
+A DXGI_DEBUG_ID value that identifies the entity that gets the mute status.
Returns a Boolean value that specifies whether the debug output is turned on or off (TRUE for on,
Gets the boundaries of the visible region of the shared surface.
+Invalidates a specific region of the shared surface for drawing.
+The region of the surface to invalidate.
If this method succeeds, it returns
Gets the total number of regions of the surface that must be updated.
+Receives the number of regions to update.
Gets the set of regions that must be updated on the shared surface.
+The number of regions that must be updated. You obtain this by calling GetUpdateRectCount.
Receives a list of regions that must be updated.
If this method succeeds, it returns
Gets the boundaries of the visible region of the shared surface.
+Receives a rectangle that specifies the visible region of the shared surface.
If this method succeeds, it returns
Registers for the callback that will perform the drawing when an update to the shared surface is requested.
+Pointer to an implementation of
If this method succeeds, it returns
Resizes the surface.
+The updated width of the surface.
The updated height of the surface.
If this method succeeds, it returns
Performs the drawing behaviors when an update to VirtualSurfaceImageSource is requested.
+If this method succeeds, it returns
This method is implemented by the developer.
+Describes a display mode.
+This structure is used by the GetDisplayModeList and FindClosestMatchingMode methods.
The following format values are valid for display modes and when you create a bit-block transfer (bitblt) model swap chain. The valid values depend on the feature level that you are working with.
Feature level >= 9.1
Feature level >= 10.0
Feature level >= 11.0
You can pass one of these format values to ID3D11Device::CheckFormatSupport to determine if it is a valid format for displaying on screen. If ID3D11Device::CheckFormatSupport returns D3D11_FORMAT_SUPPORT_DISPLAY in the bit field to which the pFormatSupport parameter points, the format is valid for displaying on screen.
Starting with Windows?8 for a flip model swap chain (that is, a swap chain that has the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value set in the SwapEffect member of
Because of the relaxed render target creation rules that Direct3D 11 has for back buffers, applications can create a DXGI_FORMAT_B8G8R8A8_UNORM_SRGB render target view from a DXGI_FORMAT_B8G8R8A8_UNORM swap chain so they can use automatic color space conversion when they render the swap chain.
+A value that describes the resolution width. If you specify the width as zero when you call the IDXGIFactory::CreateSwapChain method to create a swap chain, the runtime obtains the width from the output window and assigns this width value to the swap-chain description. You can subsequently call the IDXGISwapChain::GetDesc method to retrieve the assigned width value.
A value describing the resolution height. If you specify the height as zero when you call the IDXGIFactory::CreateSwapChain method to create a swap chain, the runtime obtains the height from the output window and assigns this height value to the swap-chain description. You can subsequently call the IDXGISwapChain::GetDesc method to retrieve the assigned height value.
A
A
A member of the
A member of the
UINT num = 0;
+ DXGI_FORMAT format = DXGI_FORMAT_R32G32B32A32_FLOAT;
+ UINT flags = DXGI_ENUM_MODES_INTERLACED; pOutput->GetDisplayModeList( format, flags, &num, 0); ... DXGI_MODE_DESC * pDescs = new DXGI_MODE_DESC[num];
+ pOutput->GetDisplayModeList( format, flags, &num, pDescs);
+
+
+ Get a description of the output.
+On a high DPI desktop, GetDesc returns the visualized screen size unless the app is marked high DPI aware. For info about writing DPI-aware Win32 apps, see High DPI.
+Gets a description of the gamma-control capabilities.
+Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Gets or sets the gamma control settings.
+Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Gets statistics about recently rendered frames.
+This API is similar to IDXGISwapChain::GetFrameStatistics.
Note??Calling this method is only supported while in full-screen mode.? +
Get a description of the output.
+A reference to the output description (see
Returns a code that indicates success or failure.
On a high DPI desktop, GetDesc returns the visualized screen size unless the app is marked high DPI aware. For info about writing DPI-aware Win32 apps, see High DPI.
+[Starting with Direct3D 11.1, we recommend not to use GetDisplayModeList anymore to retrieve the matching display mode. Instead, use IDXGIOutput1::GetDisplayModeList1, which supports stereo display mode.]
Gets the display modes that match the requested format and other input options.
+Returns one of the following DXGI_ERROR. It is rare, but possible, that the display modes available can change immediately after calling this method, in which case
In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this API to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).
As shown, this API is designed to be called twice. First to get the number of modes available, and second to return a description of the modes.
UINT num = 0; ++format = DXGI_FORMAT_R32G32B32A32_FLOAT; + UINT flags = DXGI_ENUM_MODES_INTERLACED; pOutput->GetDisplayModeList( format, flags, &num, 0); ... * pDescs = new [num]; + pOutput->GetDisplayModeList( format, flags, &num, pDescs);
[Starting with Direct3D 11.1, we recommend not to use FindClosestMatchingMode anymore to find the display mode that most closely matches the requested display mode. Instead, use IDXGIOutput1::FindClosestMatchingMode1, which supports stereo display mode.]
Finds the display mode that most closely matches the requested display mode.
+Returns one of the following DXGI_ERROR.
FindClosestMatchingMode behaves similarly to the IDXGIOutput1::FindClosestMatchingMode1 except FindClosestMatchingMode considers only the mono display modes. IDXGIOutput1::FindClosestMatchingMode1 considers only stereo modes if you set the Stereo member in the
IDXGIOutput1::FindClosestMatchingMode1 returns a matched display-mode set with only stereo modes or only mono modes. + FindClosestMatchingMode behaves as though you specified the input mode as mono.
+Halt a thread until the next vertical blank occurs.
+Returns one of the following DXGI_ERROR.
A vertical blank occurs when the raster moves from the lower right corner to the upper left corner to begin drawing the next frame.
+Takes ownership of an output.
+A reference to the
Set to TRUE to enable other threads or applications to take ownership of the device; otherwise, set to
Returns one of the DXGI_ERROR values.
When you are finished with the output, call IDXGIOutput::ReleaseOwnership.
TakeOwnership should not be called directly by applications, since results will be unpredictable. It is called implicitly by the DXGI swap chain object during full-screen transitions, and should not be used as a substitute for swap-chain methods.
+Releases ownership of the output.
+If you are not using a swap chain, get access to an output by calling IDXGIOutput::TakeOwnership and release it when you are finished by calling IDXGIOutput::ReleaseOwnership. An application that uses a swap chain will typically not call either of these methods.
+Gets a description of the gamma-control capabilities.
+A reference to a description of the gamma-control capabilities (see
Returns one of the DXGI_ERROR values.
Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Sets the gamma controls.
+A reference to a
Returns one of the DXGI_ERROR values.
Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Gets the gamma control settings.
+An array of gamma control settings (see
Returns one of the DXGI_ERROR values.
Note??Calling this method is only supported while in full-screen mode.?
For info about using gamma correction, see Using gamma correction.
+Changes the display mode.
+A reference to a surface (see
Returns one of the DXGI_ERROR values.
IDXGIOutput::SetDisplaySurface should not be called directly by applications, since results will be unpredictable. It is called implicitly by the DXGI swap chain object during full-screen transitions, and should not be used as a substitute for swap-chain methods.
This method should only be called between IDXGIOutput::TakeOwnership and IDXGIOutput::ReleaseOwnership calls.
+[Starting with Direct3D 11.1, we recommend not to use GetDisplaySurfaceData anymore to retrieve the current display surface. Instead, use IDXGIOutput1::GetDisplaySurfaceData1, which supports stereo display mode.]
Gets a copy of the current display surface.
+Returns one of the DXGI_ERROR values.
IDXGIOutput::GetDisplaySurfaceData can only be called when an output is in full-screen mode. If the method succeeds, DXGI fills the destination surface.
Use IDXGIOutput::GetDesc to determine the size (width and height) of the output when you want to allocate space for the destination surface. This is true regardless of target monitor rotation. A destination surface created by a graphics component (such as Direct3D 10) must be created with CPU-write permission (see D3D10_CPU_ACCESS_WRITE). Other surfaces should be created with CPU read-write permission (see D3D10_CPU_ACCESS_READ_WRITE). This method will modify the surface data to fit the destination surface (stretch, shrink, convert format, rotate). The stretch and shrink is performed with point-sampling.
+Gets statistics about recently rendered frames.
+A reference to frame statistics (see
If this function succeeds, it returns
This API is similar to IDXGISwapChain::GetFrameStatistics.
Note??Calling this method is only supported while in full-screen mode.? +
[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
Gets the display modes that match the requested format and other input options.
+A
A combination of DXGI_ENUM_MODES-typed values that are combined by using a bitwise OR operation. The resulting value specifies options for display modes to include. You must specify
GetDisplayModeList1 is updated from GetDisplayModeList to return a list of
The GetDisplayModeList1 method does not enumerate stereo modes unless you specify the
In general, when you switch from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth, and refresh rate of the swap chain. To exercise more control over the display mode, use GetDisplayModeList1 to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).
The following example code shows that you need to call GetDisplayModeList1 twice. First call GetDisplayModeList1 to get the number of modes available, and second call GetDisplayModeList1 to return a description of the modes.
UINT num = 0;
+ format = ;
+ UINT flags = ; pOutput->GetDisplayModeList1( format, flags, &num, 0); ... * pDescs = new [num];
+ pOutput->GetDisplayModeList1( format, flags, &num, pDescs);
+ [Starting with Direct3D 11.1, we recommend not to use GetDisplayModeList anymore to retrieve the matching display mode. Instead, use IDXGIOutput1::GetDisplayModeList1, which supports stereo display mode.]
Gets the display modes that match the requested format and other input options.
+Returns one of the following DXGI_ERROR. It is rare, but possible, that the display modes available can change immediately after calling this method, in which case
In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this API to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).
As shown, this API is designed to be called twice. First to get the number of modes available, and second to return a description of the modes.
UINT num = 0; ++format = DXGI_FORMAT_R32G32B32A32_FLOAT; + UINT flags = DXGI_ENUM_MODES_INTERLACED; pOutput->GetDisplayModeList( format, flags, &num, 0); ... * pDescs = new [num]; + pOutput->GetDisplayModeList( format, flags, &num, pDescs);
Finds the display mode that most closely matches the requested display mode.
+A reference to the
A reference to the
A reference to the Direct3D device interface. If this parameter is
Returns one of the error codes described in the DXGI_ERROR topic.
Direct3D devices require UNORM formats.
FindClosestMatchingMode1 finds the closest matching available display mode to the mode that you specify in pModeToMatch.
If you set the Stereo member in the
FindClosestMatchingMode1 resolves similarly ranked members of display modes (that is, all specified, or all unspecified, and so on) in the following order:
When FindClosestMatchingMode1 determines the closest value for a particular member, it uses previously matched members to filter the display mode list choices, and ignores other members. For example, when FindClosestMatchingMode1 matches Resolution, it already filtered the display mode list by a certain ScanlineOrdering, Scaling, and Format, while it ignores RefreshRate. This ordering doesn't define the absolute ordering for every usage scenario of FindClosestMatchingMode1, because the application can choose some values initially, which effectively changes the order of resolving members.
FindClosestMatchingMode1 matches members of the display mode one at a time, generally in a specified order.
If a member is unspecified, FindClosestMatchingMode1 gravitates toward the values for the desktop related to this output. If this output is not part of the desktop, FindClosestMatchingMode1 uses the default desktop output to find values. If an application uses a fully unspecified display mode, FindClosestMatchingMode1 typically returns a display mode that matches the desktop settings for this output. Because unspecified members are lower priority than specified members, FindClosestMatchingMode1 resolves unspecified members later than specified members.
+Copies the display surface (front buffer) to a user-provided resource.
+A reference to a resource interface that represents the resource to which GetDisplaySurfaceData1 copies the display surface.
Returns one of the error codes described in the DXGI_ERROR topic.
GetDisplaySurfaceData1 is similar to IDXGIOutput::GetDisplaySurfaceData except GetDisplaySurfaceData1 takes an
GetDisplaySurfaceData1 returns an error if the input resource is not a 2D texture (represented by the
The original IDXGIOutput::GetDisplaySurfaceData and the updated GetDisplaySurfaceData1 behave exactly the same. GetDisplaySurfaceData1 was required because textures with an array size equal to 2 (ArraySize = 2) do not implement
You can call GetDisplaySurfaceData1 only when an output is in full-screen mode. If GetDisplaySurfaceData1 succeeds, it fills the destination resource.
Use IDXGIOutput::GetDesc to determine the size (width and height) of the output when you want to allocate space for the destination resource. This is true regardless of target monitor rotation. A destination resource created by a graphics component (such as Direct3D 11) must be created with CPU write permission (see D3D11_CPU_ACCESS_WRITE). Other surfaces can be created with CPU read-write permission (D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE). GetDisplaySurfaceData1 modifies the surface data to fit the destination resource (stretch, shrink, convert format, rotate). GetDisplaySurfaceData1 performs the stretch and shrink with point sampling.
+Creates a desktop duplication interface from the
If an application wants to duplicate the entire desktop, it must create a desktop duplication interface on each active output on the desktop. This interface does not provide an explicit way to synchronize the timing of each output image. Instead, the application must use the time stamp of each output, and then determine how to combine the images.
For DuplicateOutput to succeed, you must create pDevice from
If the current mode is a stereo mode, the desktop duplication interface provides the image for the left stereo image only.
By default, only four processes can use a
For improved performance, consider using DuplicateOutput1.
+[This documentation is preliminary and is subject to change.]
Queries an adapter output for multiplane overlay support.
+TRUE if the output adapter is the primary adapter and it supports multiplane overlays, otherwise returns
Queries an adapter output for multiplane overlay support. If this API returns ?TRUE?, multiple swap chain composition takes place in a performant manner using overlay hardware. If this API returns false, apps should avoid using foreground swap chains (that is, avoid using swap chains created with the DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER flag).
+TRUE if the output adapter is the primary adapter and it supports multiplane overlays, otherwise returns
See CreateSwapChainForCoreWindow for info on creating a foreground swap chain.
+Indicates that the application is ready to process the next desktop image.
+The time-out interval, in milliseconds. This interval specifies the amount of time that this method waits for a new frame before it returns to the caller. This method returns if the interval elapses, and a new desktop image is not available.
For more information about the time-out interval, see Remarks.
A reference to a memory location that receives the
A reference to a variable that receives the
When AcquireNextFrame returns successfully, the calling application can access the desktop image that AcquireNextFrame returns in the variable at ppDesktopResource. + If the caller specifies a zero time-out interval in the TimeoutInMilliseconds parameter, AcquireNextFrame verifies whether there is a new desktop image available, returns immediately, and indicates its outcome with the return value. If the caller specifies an INFINITE time-out interval in the TimeoutInMilliseconds parameter, the time-out interval never elapses.
Note??You cannot cancel the wait that you specified in the TimeoutInMilliseconds parameter. Therefore, if you must periodically check for other conditions (for example, a terminate signal), you should specify a non-INFINITE time-out interval. After the time-out interval elapses, you can check for these other conditions and then call AcquireNextFrame again to wait for the next frame.?AcquireNextFrame acquires a new desktop frame when the operating system either updates the desktop bitmap image or changes the shape or position of a hardware reference. The new frame that AcquireNextFrame acquires might have only the desktop image updated, only the reference shape or position updated, or both.
+Retrieves a description of a duplicated output. This description specifies the dimensions of the surface that contains the desktop image.
+After an application creates an
Retrieves a description of a duplicated output. This description specifies the dimensions of the surface that contains the desktop image.
+A reference to a
After an application creates an
Indicates that the application is ready to process the next desktop image.
+The time-out interval, in milliseconds. This interval specifies the amount of time that this method waits for a new frame before it returns to the caller. This method returns if the interval elapses, and a new desktop image is not available.
For more information about the time-out interval, see Remarks.
A reference to a memory location that receives the
A reference to a variable that receives the
AcquireNextFrame returns:
When AcquireNextFrame returns successfully, the calling application can access the desktop image that AcquireNextFrame returns in the variable at ppDesktopResource. + If the caller specifies a zero time-out interval in the TimeoutInMilliseconds parameter, AcquireNextFrame verifies whether there is a new desktop image available, returns immediately, and indicates its outcome with the return value. If the caller specifies an INFINITE time-out interval in the TimeoutInMilliseconds parameter, the time-out interval never elapses.
Note??You cannot cancel the wait that you specified in the TimeoutInMilliseconds parameter. Therefore, if you must periodically check for other conditions (for example, a terminate signal), you should specify a non-INFINITE time-out interval. After the time-out interval elapses, you can check for these other conditions and then call AcquireNextFrame again to wait for the next frame.?AcquireNextFrame acquires a new desktop frame when the operating system either updates the desktop bitmap image or changes the shape or position of a hardware reference. The new frame that AcquireNextFrame acquires might have only the desktop image updated, only the reference shape or position updated, or both.
+Gets information about dirty rectangles for the current desktop frame.
+The size in bytes of the buffer that the caller passed to the pDirtyRectsBuffer parameter.
A reference to an array of
Pointer to a variable that receives the number of bytes that GetFrameDirtyRects needs to store information about dirty regions in the buffer at pDirtyRectsBuffer.
For more information about returning the required buffer size, see Remarks.
GetFrameDirtyRects returns:
GetFrameDirtyRects stores a size value in the variable at pDirtyRectsBufferSizeRequired. This value specifies the number of bytes that GetFrameDirtyRects needs to store information about dirty regions. You can use this value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pDirtyRectsBuffer:
The caller can also use the value returned at pDirtyRectsBufferSizeRequired to determine the number of
The buffer contains the list of dirty
Gets information about the moved rectangles for the current desktop frame.
+The size in bytes of the buffer that the caller passed to the pMoveRectBuffer parameter.
A reference to an array of
Pointer to a variable that receives the number of bytes that GetFrameMoveRects needs to store information about moved regions in the buffer at pMoveRectBuffer.
For more information about returning the required buffer size, see Remarks.
GetFrameMoveRects returns:
GetFrameMoveRects stores a size value in the variable at pMoveRectsBufferSizeRequired. This value specifies the number of bytes that GetFrameMoveRects needs to store information about moved regions. You can use this value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pMoveRectBuffer:
The caller can also use the value returned at pMoveRectsBufferSizeRequired to determine the number of
The buffer contains the list of move RECTs for the current frame.
Note??To produce a visually accurate copy of the desktop, an application must first process all move RECTs before it processes dirty RECTs.? +Gets information about the new reference shape for the current desktop frame.
+The size in bytes of the buffer that the caller passed to the pPointerShapeBuffer parameter.
A reference to a buffer to which GetFramePointerShape copies and returns pixel data for the new reference shape.
Pointer to a variable that receives the number of bytes that GetFramePointerShape needs to store the new reference shape pixel data in the buffer at pPointerShapeBuffer.
For more information about returning the required buffer size, see Remarks.
Pointer to a
GetFramePointerShape returns:
GetFramePointerShape stores a size value in the variable at pPointerShapeBufferSizeRequired. This value specifies the number of bytes that pPointerShapeBufferSizeRequired needs to store the new reference shape pixel data. You can use the value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pPointerShapeBuffer:
The pPointerShapeInfo parameter describes the new reference shape.
+Provides the CPU with efficient access to a desktop image if that desktop image is already in system memory.
+A reference to a
MapDesktopSurface returns:
You can successfully call MapDesktopSurface if the DesktopImageInSystemMemory member of the
Invalidates the reference to the desktop image that was retrieved by using IDXGIOutputDuplication::MapDesktopSurface.
+UnMapDesktopSurface returns:
Indicates that the application finished processing the frame.
+ReleaseFrame returns:
The application must release the frame before it acquires the next frame. After the frame is released, the surface that contains the desktop bitmap becomes invalid; you will not be able to use the surface in a DirectX graphics operation.
For performance reasons, we recommend that you release the frame just before you call the IDXGIOutputDuplication::AcquireNextFrame method to acquire the next frame. When the client does not own the frame, the operating system copies all desktop updates to the surface. This can result in wasted GPU cycles if the operating system updates the same region for each frame that occurs. When the client acquires the frame, the client is aware of only the final update to this region; therefore, any overlapping updates during previous frames are wasted. When the client acquires a frame, the client owns the surface; therefore, the operating system can track only the updated regions and cannot copy desktop updates to the surface. Because of this behavior, we recommend that you minimize the time between the call to release the current frame and the call to acquire the next frame.
+Describes information about present that helps the operating system optimize presentation.
+This structure is used by the Present1 method.
The scroll rectangle and the list of dirty rectangles could overlap. In this situation, the dirty rectangles take priority. Applications can then have pieces of dynamic content on top of a scrolled area. For example, an application could scroll a page and play video at the same time.
The following diagram and coordinates illustrate this example.
DirtyRectsCount = 2
+ pDirtyRects[ 0 ] = { 10, 30, 40, 50 } // Video
+ pDirtyRects[ 1 ] = { 0, 70, 50, 80 } // New line
+ *pScrollRect = { 0, 0, 50, 70 }
+ *pScrollOffset = { 0, -10 }
+ Parts of the previous frame and content that the application renders are combined to produce the final frame that the operating system presents on the display screen. Most of the window is scrolled from the previous frame. The application must update the video frame with the new chunk of content that appears due to scrolling.
The dashed rectangle shows the scroll rectangle in the current frame. The scroll rectangle is specified by the pScrollRect member. + The arrow shows the scroll offset. The scroll offset is specified by the pScrollOffset member. + Filled rectangles show dirty rectangles that the application updated with new content. The filled rectangles are specified by the DirtyRectsCount and pDirtyRects members.
The scroll rectangle and offset are not supported for the DXGI_SWAP_EFFECT_DISCARD or DXGI_SWAP_EFFECT_SEQUENTIAL present option. Dirty rectangles and scroll rectangle are not supported for multisampled swap chains.
The actual implementation of composition and necessary bitblts is different for the bitblt model and the flip model. For more info about these models, see DXGI Flip Model.
For more info about the flip-model swap chain and optimizing presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas.
+The number of updated rectangles that you update in the back buffer for the presented frame. The operating system uses this information to optimize presentation. You can set this member to 0 to indicate that you update the whole frame.
A list of updated rectangles that you update in the back buffer for the presented frame. An application must update every single pixel in each rectangle that it reports to the runtime; the application cannot assume that the pixels are saved from the previous frame. For more information about updating dirty rectangles, see Remarks. You can set this member to
A reference to the scrolled rectangle. The scrolled rectangle is the rectangle of the previous frame from which the runtime bit-block transfers (bitblts) content. The runtime also uses the scrolled rectangle to optimize presentation in terminal server and indirect display scenarios.
The scrolled rectangle also describes the destination rectangle, that is, the region on the current frame that is filled with scrolled content. You can set this member to
A reference to the offset of the scrolled area that goes from the source rectangle (of previous frame) to the destination rectangle (of current frame). You can set this member to
Represents a rational number.
+This structure is a member of the
The
An unsigned integer value representing the top of the rational number.
An unsigned integer value representing the bottom of the rational number.
Creates a subresource surface object.
+The index of the subresource surface object to enumerate.
The address of a reference to a
Returns
A subresource is a valid surface if the original resource would have been a valid surface had its array size been equal to 1.
Subresource surface objects implement the
CreateSubresourceSurface creates a subresource surface that is based on the resource interface on which CreateSubresourceSurface is called. For example, if the original resource interface object is a 2D texture, the created subresource surface is also a 2D texture.
You can use CreateSubresourceSurface to create parts of a stereo resource so you can use Direct2D on either the left or right part of the stereo resource.
+Creates a handle to a shared resource. You can then use the returned handle with multiple Direct3D devices.
+A reference to a
Set this parameter to
The lpSecurityDescriptor member of the structure specifies a SECURITY_DESCRIPTOR for the resource. Set this member to
The requested access rights to the resource. In addition to the generic access rights, DXGI defines the following values:
You can combine these values by using a bitwise OR operation.
The name of the resource to share. The name is limited to MAX_PATH characters. Name comparison is case sensitive. You will need the resource name if you call the ID3D11Device1::OpenSharedResourceByName method to access the shared resource by name. If you instead call the ID3D11Device1::OpenSharedResource1 method to access the shared resource by handle, set this parameter to
If lpName matches the name of an existing resource, CreateSharedHandle fails with
The name can have a "Global\" or "Local\" prefix to explicitly create the object in the global or session namespace. The remainder of the name can contain any character except the backslash character (\). For more information, see Kernel Object Namespaces. Fast user switching is implemented using Terminal Services sessions. Kernel object names must follow the guidelines outlined for Terminal Services so that applications can support multiple users.
The object can be created in a private namespace. For more information, see Object Namespaces.
A reference to a variable that receives the NT HANDLE value to the resource to share. You can use this handle in calls to access the resource.
CreateSharedHandle only returns the NT handle when you created the resource as shared and specified that it uses NT handles (that is, you set the D3D11_RESOURCE_MISC_SHARED_NTHANDLE and D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flags). If you created the resource as shared and specified that it uses NT handles, you must use CreateSharedHandle to get a handle for sharing. In this situation, you can't use the IDXGIResource::GetSharedHandle method because it will fail.
You can pass the handle that CreateSharedHandle returns in a call to the ID3D11Device1::OpenSharedResource1 method to give a device access to a shared resource that you created on a different device.
Because the handle that CreateSharedHandle returns is an NT handle, you can use the handle with CloseHandle, DuplicateHandle, and so on. You can call CreateSharedHandle only once for a shared resource; later calls fail. If you need more handles to the same shared resource, call DuplicateHandle. When you no longer need the shared resource handle, call CloseHandle to close the handle, in order to avoid memory leaks.
If you pass a name for the resource to lpName when you call CreateSharedHandle to share the resource, you can subsequently pass this name in a call to the ID3D11Device1::OpenSharedResourceByName method to give another device access to the shared resource. If you use a named resource, a malicious user can use this named resource before you do and prevent your app from starting. To prevent this situation, create a randomly named resource and store the name so that it can only be obtained by an authorized user. Alternatively, you can use a file for this purpose. To limit your app to one instance per user, create a locked file in the user's profile directory.
If you created the resource as shared and did not specify that it uses NT handles, you cannot use CreateSharedHandle to get a handle for sharing because CreateSharedHandle will fail.
+Describes multi-sampling parameters for a resource.
+This structure is a member of the
The default sampler mode, with no anti-aliasing, has a count of 1 and a quality level of 0.
If multi-sample antialiasing is being used, all bound render targets and depth buffers must have the same sample counts and quality levels.
| Differences between Direct3D 10.0 and Direct3D 10.1 and between Direct3D 10.0 and Direct3D 11: Direct3D 10.1 has defined two standard quality levels: D3D10_STANDARD_MULTISAMPLE_PATTERN and D3D10_CENTER_MULTISAMPLE_PATTERN in the D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS enumeration in D3D10_1.h. Direct3D 11 has defined two standard quality levels: D3D11_STANDARD_MULTISAMPLE_PATTERN and D3D11_CENTER_MULTISAMPLE_PATTERN in the |
?
+The number of multisamples per pixel.
The image quality level. The higher the quality, the lower the performance. The valid range is between zero and one less than the level returned by ID3D10Device::CheckMultisampleQualityLevels for Direct3D 10 or ID3D11Device::CheckMultisampleQualityLevels for Direct3D 11.
For Direct3D 10.1 and Direct3D 11, you can use two special quality level values. For more information about these quality level values, see Remarks.
Get a description of the surface.
+Get a description of the surface.
+A reference to the surface description (see
Returns
Get a reference to the data contained in the surface, and deny GPU access to the surface.
+A reference to the surface data (see
CPU read-write flags. These flags can be combined with a logical OR.
Returns
Use IDXGISurface::Map to access a surface from the CPU. To release a mapped surface (and allow GPU access) call IDXGISurface::Unmap.
+Get a reference to the data contained in the surface, and deny GPU access to the surface.
+Returns
Use IDXGISurface::Map to access a surface from the CPU. To release a mapped surface (and allow GPU access) call IDXGISurface::Unmap.
+Returns a device context (DC) that allows you to render to a Microsoft DirectX Graphics Infrastructure (DXGI) surface using Windows Graphics Device Interface (GDI).
+A Boolean value that specifies whether to preserve Direct3D contents in the GDI DC. TRUE directs the runtime not to preserve Direct3D contents in the GDI DC; that is, the runtime discards the Direct3D contents.
A reference to an
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
After you use the GetDC method to retrieve a DC, you can render to the DXGI surface by using GDI. The GetDC method readies the surface for GDI rendering and allows inter-operation between DXGI and GDI technologies.
Keep the following in mind when using this method:
You can also call GetDC on the back buffer at index 0 of a swap chain by obtaining an
+* g_pSwapChain = null ; +* g_pSurface1 = null ; + ... + //Setup the device and and swapchain + g_pSwapChain->GetBuffer(0, __uuidof(), (void**) &g_pSurface1); + g_pSurface1->GetDC( , &g_hDC ); + ... + //Draw on the DC using GDI + ... + //When finish drawing release the DC + g_pSurface1->ReleaseDC( null );
Releases the GDI device context (DC) that is associated with the current surface and allows you to use Direct3D to render.
+A reference to a
You can pass a reference to an empty
If this method succeeds, it returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Use the ReleaseDC method to release the DC and indicate that your application finished all GDI rendering to this surface. You must call the ReleaseDC method before you can use Direct3D to perform additional rendering.
Prior to resizing buffers you must release all outstanding DCs.
+Gets the parent resource and subresource index that support a subresource surface.
+The globally unique identifier (
A reference to a buffer that receives a reference to the parent resource object for the subresource surface.
A reference to a variable that receives the index of the subresource surface.
Returns
For subresource surface objects that the IDXGIResource1::CreateSubresourceSurface method creates, GetResource simply returns the values that were used to create the subresource surface.
Current objects that implement
Gets performance statistics about the last render frame.
+You cannot use GetFrameStatistics for swap chains that both use the bit-block transfer (bitblt) presentation model and draw in windowed mode.
You can only use GetFrameStatistics for swap chains that either use the flip presentation model or draw in full-screen mode. You set the
[Starting with Direct3D 11.1, we recommend not to use Present anymore to present a rendered image. Instead, use
Presents a rendered image to the user.
+Possible return values include:
Note??The Present method can return either
Starting with Direct3D 11.1, we recommend to instead use
For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.
Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.
| Differences between Direct3D 9 and Direct3D 10: Specifying |
?
For flip presentation model swap chains that you create with the
For info about how data values change when you present content to the screen, see Converting data for the color space.
+[Starting with Direct3D 11.1, we recommend not to use GetDesc anymore to get a description of the swap chain. Instead, use IDXGISwapChain1::GetDesc1.]
Get a description of the swap chain.
+Get the output (the display monitor) that contains the majority of the client area of the target window.
+If the method succeeds, the output interface will be filled and its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
You cannot call GetContainingOutput on a swap chain that you created with IDXGIFactory2::CreateSwapChainForComposition.
+Gets the number of times that IDXGISwapChain::Present or IDXGISwapChain1::Present1 has been called.
+For info about presentation statistics for a frame, see
Presents a rendered image to the user.
+An integer that specifies how to synchronize presentation of a frame with the vertical blank.
For the bit-block transfer (bitblt) model (DXGI_SWAP_EFFECT_DISCARD or DXGI_SWAP_EFFECT_SEQUENTIAL), values are:
For the flip model (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL), values are:
For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.
If the update region straddles more than one output (each represented by
An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.
Possible return values include:
Starting with Direct3D 11.1, consider using IDXGISwapChain1::Present1 because you can then use dirty rectangles and the scroll rectangle in the swap chain presentation and as such use less memory bandwidth and as a result less system power. For more info about using dirty rectangles and the scroll rectangle in swap chain presentation, see Using dirty rectangles and the scroll rectangle in swap chain presentation.
For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.
Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.
| Differences between Direct3D 9 and Direct3D 10: Specifying DXGI_PRESENT_TEST in the Flags parameter is analogous to IDirect3DDevice9::TestCooperativeLevel in Direct3D 9. |
?
For flip presentation model swap chains that you create with the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value set, a successful presentation unbinds back buffer 0 from the graphics pipeline, except for when you pass the DXGI_PRESENT_DO_NOT_SEQUENCE flag in the Flags parameter.
For info about how data values change when you present content to the screen, see Converting data for the color space.
+Accesses one of the swap-chain's back buffers.
+A zero-based buffer index.
If the swap chain's swap effect is DXGI_SWAP_EFFECT_DISCARD, this method can only access the first buffer; for this situation, set the index to zero.
If the swap chain's swap effect is either DXGI_SWAP_EFFECT_SEQUENTIAL or DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, only the swap chain's zero-index buffer can be read from and written to. The swap chain's buffers with indexes greater than zero can only be read from; so if you call the IDXGIResource::GetUsage method for such buffers, they have the DXGI_USAGE_READ_ONLY flag set.
The type of interface used to manipulate the buffer.
A reference to a back-buffer interface.
Returns one of the following DXGI_ERROR.
Sets the display state to windowed or full screen.
+A Boolean value that specifies whether to set the display state to windowed or full screen. TRUE for full screen, and
If you pass TRUE to the Fullscreen parameter to set the display state to full screen, you can optionally set this parameter to a reference to an
This methods returns:
When this error is returned, an application can continue to run in windowed mode and try to switch to full-screen mode later.
DXGI may change the display state of a swap chain in response to end user or system requests.
We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through SetFullscreenState; that is, do not set the Windowed member of
Get the state associated with full-screen mode.
+A reference to a boolean whose value is either:
A reference to the output target (see
Returns one of the following DXGI_ERROR.
When the swap chain is in full-screen mode, a reference to the target output will be returned and its reference count will be incremented.
+[Starting with Direct3D 11.1, we recommend not to use GetDesc anymore to get a description of the swap chain. Instead, use IDXGISwapChain1::GetDesc1.]
Get a description of the swap chain.
+Returns one of the following DXGI_ERROR.
Changes the swap chain's back buffer size, format, and number of buffers. This should be called when the application window is resized.
+The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.
The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the IDXGIFactory2::CreateSwapChainForComposition method to create the swap chain for a composition surface.
The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the IDXGIFactory2::CreateSwapChainForComposition method to create the swap chain for a composition surface.
A
A combination of
Returns
You can't resize a swap chain unless you release all outstanding references to its back buffers. You must release all of its direct and indirect references on the back buffers in order for ResizeBuffers to succeed.
Direct references are held by the application after it calls AddRef on a resource.
Indirect references are held by views to a resource, binding a view of the resource to a device context, a command list that used the resource, a command list that used a view to that resource, a command list that executed another command list that used the resource, and so on.
Before you call ResizeBuffers, ensure that the application releases all references (by calling the appropriate number of Release invocations) on the resources, any views to the resource, and any command lists that use either the resources or views, and ensure that neither the resource nor a view is still bound to a device context. You can use ID3D11DeviceContext::ClearState to ensure that all references are released. If a view is bound to a deferred context, you must discard the partially built command list as well (by calling ID3D11DeviceContext::ClearState, then ID3D11DeviceContext::FinishCommandList, then Release on the command list). After you call ResizeBuffers, you can re-query interfaces via IDXGISwapChain::GetBuffer.
For swap chains that you created with DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE, before you call ResizeBuffers, also call IDXGISurface1::ReleaseDC on the swap chain's back-buffer surface to ensure that you have no outstanding GDI device contexts (DCs) open.
We recommend that you call ResizeBuffers when a client window is resized (that is, when an application receives a WM_SIZE message).
The only difference between IDXGISwapChain::ResizeBuffers in Windows?8 versus Windows?7 is with flip presentation model swap chains that you create with the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL or DXGI_SWAP_EFFECT_FLIP_DISCARD value set. In Windows?8, you must call ResizeBuffers to realize a transition between full-screen mode and windowed mode; otherwise, your next call to the IDXGISwapChain::Present method fails.
+Resizes the output target.
+A reference to a
Returns a code that indicates success or failure. DXGI_STATUS_MODE_CHANGE_IN_PROGRESS is returned if a full-screen/windowed mode transition is occurring when this API is called. See DXGI_ERROR for additional DXGI error codes.
ResizeTarget resizes the target window when the swap chain is in windowed mode, and changes the display mode on the target output when the swap chain is in full-screen mode. Therefore, apps can call ResizeTarget to resize the target window (rather than a Microsoft Win32API such as SetWindowPos) without knowledge of the swap chain display mode.
If a Windows Store app calls ResizeTarget, it fails with
You cannot call ResizeTarget on a swap chain that you created with IDXGIFactory2::CreateSwapChainForComposition.
Apps must still call IDXGISwapChain::ResizeBuffers after they call ResizeTarget because only ResizeBuffers can change the back buffers. But, if those apps have implemented window resize processing to call ResizeBuffers, they don't need to explicitly call ResizeBuffers after they call ResizeTarget because the window resize processing will achieve what the app requires.
+Get the output (the display monitor) that contains the majority of the client area of the target window.
+A reference to the output interface (see
Returns one of the following DXGI_ERROR.
If the method succeeds, the output interface will be filled and its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
You cannot call GetContainingOutput on a swap chain that you created with IDXGIFactory2::CreateSwapChainForComposition.
+Gets performance statistics about the last render frame.
+A reference to a
Returns one of the DXGI_ERROR values.
You cannot use GetFrameStatistics for swap chains that both use the bit-block transfer (bitblt) presentation model and draw in windowed mode.
You can only use GetFrameStatistics for swap chains that either use the flip presentation model or draw in full-screen mode. You set the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value in the SwapEffect member of the
Gets the number of times that IDXGISwapChain::Present or IDXGISwapChain1::Present1 has been called.
+Returns one of the DXGI_ERROR values.
For info about presentation statistics for a frame, see
Gets a description of the swap chain.
+Gets a description of a full-screen swap chain.
+The semantics of GetFullscreenDesc are identical to that of the IDXGISwapchain::GetDesc method for
Retrieves the underlying
Applications call the IDXGIFactory2::CreateSwapChainForHwnd method to create a swap chain that is associated with an
Determines whether a swap chain supports ?temporary mono.?
+Temporary mono is a feature where a stereo swap chain can be presented using only the content in the left buffer. To present using the left buffer as a mono buffer, an application calls the IDXGISwapChain1::Present1 method with the DXGI_PRESENT_STEREO_TEMPORARY_MONO flag. All windowed swap chains support temporary mono. However, full-screen swap chains optionally support temporary mono because not all hardware supports temporary mono on full-screen swap chains efficiently.
+Gets the output (the display monitor) to which you can restrict the contents of a present operation.
+If the method succeeds, the runtime fills the buffer at ppRestrictToOutput with a reference to the restrict-to output interface. This restrict-to output interface has its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
+Retrieves or sets the background color of the swap chain.
+Gets or sets the rotation of the back buffers for the swap chain.
+Gets a description of the swap chain.
+A reference to a
Returns
Gets a description of a full-screen swap chain.
+A reference to a
GetFullscreenDesc returns:
The semantics of GetFullscreenDesc are identical to that of the IDXGISwapchain::GetDesc method for
Retrieves the underlying
Returns
If pHwnd receives
Applications call the IDXGIFactory2::CreateSwapChainForHwnd method to create a swap chain that is associated with an
Retrieves the underlying CoreWindow object for this swap-chain object.
+GetCoreWindow returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetCoreWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
Applications call the IDXGIFactory2::CreateSwapChainForCoreWindow method to create a swap chain that is associated with an CoreWindow object.
+Presents a frame on the display screen.
+An integer that specifies how to synchronize presentation of a frame with the vertical blank.
For the bit-block transfer (bitblt) model (DXGI_SWAP_EFFECT_DISCARD or DXGI_SWAP_EFFECT_SEQUENTIAL), values are:
For the flip model (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL), values are:
For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.
If the update region straddles more than one output (each represented by
An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.
A reference to a
Possible return values include:
An app can use Present1 to optimize presentation by specifying scroll and dirty rectangles. When the runtime has information about these rectangles, the runtime can then perform necessary bitblts during presentation more efficiently and pass this metadata to the Desktop Window Manager (DWM). The DWM can then use the metadata to optimize presentation and pass the metadata to indirect displays and terminal servers to optimize traffic over the wire. An app must confine its modifications to only the dirty regions that it passes to Present1, as well as modify the entire dirty region to avoid undefined resource contents from being exposed.
For flip presentation model swap chains that you create with the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value set, a successful presentation results in an unbind of back buffer 0 from the graphics pipeline, except for when you pass the DXGI_PRESENT_DO_NOT_SEQUENCE flag in the Flags parameter.
For info about how data values change when you present content to the screen, see Converting data for the color space.
For info about calling Present1 when your app uses multiple threads, see Multithread Considerations and Multithreading and DXGI.
+Determines whether a swap chain supports ?temporary mono.?
+Indicates whether to use the swap chain in temporary mono mode. TRUE indicates that you can use temporary-mono mode; otherwise,
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsTemporaryMonoSupported always returns
Temporary mono is a feature where a stereo swap chain can be presented using only the content in the left buffer. To present using the left buffer as a mono buffer, an application calls the IDXGISwapChain1::Present1 method with the DXGI_PRESENT_STEREO_TEMPORARY_MONO flag. All windowed swap chains support temporary mono. However, full-screen swap chains optionally support temporary mono because not all hardware supports temporary mono on full-screen swap chains efficiently.
+Gets the output (the display monitor) to which you can restrict the contents of a present operation.
+ A reference to a buffer that receives a reference to the
Returns
If the method succeeds, the runtime fills the buffer at ppRestrictToOutput with a reference to the restrict-to output interface. This restrict-to output interface has its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
+Changes the background color of the swap chain.
+A reference to a DXGI_RGBA structure that specifies the background color to set.
SetBackgroundColor returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetBackgroundColor fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
The background color affects only swap chains that you create with DXGI_SCALING_NONE in windowed mode. You pass this value in a call to IDXGIFactory2::CreateSwapChainForHwnd, IDXGIFactory2::CreateSwapChainForCoreWindow, or IDXGIFactory2::CreateSwapChainForComposition. Typically, the background color is not visible unless the swap-chain contents are smaller than the destination window.
When you set the background color, it is not immediately realized. It takes effect in conjunction with your next call to the IDXGISwapChain1::Present1 method. The DXGI_PRESENT flags that you pass to IDXGISwapChain1::Present1 can help achieve the effect that you require. For example, if you call SetBackgroundColor and then call IDXGISwapChain1::Present1 with the Flags parameter set to DXGI_PRESENT_DO_NOT_SEQUENCE, you change only the background color without changing the displayed contents of the swap chain.
When you call the IDXGISwapChain1::Present1 method to display contents of the swap chain, IDXGISwapChain1::Present1 uses the
Retrieves the background color of the swap chain.
+A reference to a DXGI_RGBA structure that receives the background color of the swap chain.
GetBackgroundColor returns:
Sets the rotation of the back buffers for the swap chain.
+A
SetRotation returns:
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetRotation fails with
You can only use SetRotation to rotate the back buffers for flip-model swap chains that you present in windowed mode.
SetRotation isn't supported for rotating the back buffers for flip-model swap chains that you present in full-screen mode. In this situation, SetRotation doesn't fail, but you must ensure that you specify no rotation (DXGI_MODE_ROTATION_IDENTITY) for the swap chain. Otherwise, when you call IDXGISwapChain1::Present1 or IDXGISwapChain::Present to present a frame, the presentation fails.
+Gets the rotation of the back buffers for the swap chain.
+A reference to a variable that receives a
Returns
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetRotation fails with
[This documentation is preliminary and is subject to change.]
Gets the source region used for the swap chain.
Use GetSourceSize to get the portion of the swap chain from which the operating system presents. The source rectangle is always defined by the region [0, 0, Width, Height]. Use SetSourceSize to set this portion of the swap chain.
+This method can return error codes that are described in the DXGI_ERROR topic.
Gets or sets the number of frames that the swap chain is allowed to queue for rendering.
+Returns a waitable handle that signals when the DXGI adapter has finished presenting a new frame.
Windows?8.1 introduces new APIs that allow lower-latency rendering by waiting until the previous frame is presented to the display before drawing the next frame. To use this method, first create the DXGI swap chain with the DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT flag set, then call GetFrameLatencyWaitableObject to retrieve the waitable handle. Use the waitable handle with WaitForSingleObjectEx to synchronize rendering of each new frame with the end of the previous frame. For every frame it renders, the app should wait on this handle before starting any rendering operations. Note that this requirement includes the first frame the app renders with the swap chain. See the DirectXLatency sample.
+Gets or sets the transform matrix that will be applied to a composition swap chain upon the next present.
Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.
+Sets the source region to be used for the swap chain.
Use SetSourceSize to specify the portion of the swap chain from which the operating system presents. This allows an effective resize without calling the more-expensive IDXGISwapChain::ResizeBuffers method. Prior to Windows?8.1, calling IDXGISwapChain::ResizeBuffers was the only way to resize the swap chain. The source rectangle is always defined by the region [0, 0, Width, Height].
+This method can return:
Gets the source region used for the swap chain.
Use GetSourceSize to get the portion of the swap chain from which the operating system presents. The source rectangle is always defined by the region [0, 0, Width, Height]. Use SetSourceSize to set this portion of the swap chain.
+This method can return error codes that are described in the DXGI_ERROR topic.
Sets the number of frames that the swap chain is allowed to queue for rendering.
+The maximum number of back buffer frames that will be queued for the swap chain. This value is 3 by default.
Returns
This method is only valid for use on swap chains created with DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT. Otherwise, the result will be
Gets the number of frames that the swap chain is allowed to queue for rendering.
+The maximum number of back buffer frames that will be queued for the swap chain. This value is 1 by default, but should be set to 2 if the scene takes longer than it takes for one vertical refresh (typically about 16ms) to draw.
Returns
Returns a waitable handle that signals when the DXGI adapter has finished presenting a new frame.
Windows?8.1 introduces new APIs that allow lower-latency rendering by waiting until the previous frame is presented to the display before drawing the next frame. To use this method, first create the DXGI swap chain with the DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT flag set, then call GetFrameLatencyWaitableObject to retrieve the waitable handle. Use the waitable handle with WaitForSingleObjectEx to synchronize rendering of each new frame with the end of the previous frame. For every frame it renders, the app should wait on this handle before starting any rendering operations. Note that this requirement includes the first frame the app renders with the swap chain. See the DirectXLatency sample.
+A handle to the waitable object, or
Sets the transform matrix that will be applied to a composition swap chain upon the next present.
Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.
+SetMatrixTransform returns:
Gets the transform matrix that will be applied to a composition swap chain upon the next present.
Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.
+GetMatrixTransform returns:
Specifies no flags.
Value always set to 0. This flag is reserved.
Specifies a software adapter. For more info about this flag, see new info in Windows?8 about enumerating adapters.
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Identifies the type of DXGI adapter.
+The
Specifies no flags.
Value always set to 0. This flag is reserved.
Specifies a software adapter. For more info about this flag, see new info in Windows?8 about enumerating adapters.
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.
Identifies the alpha value, transparency behavior, of a surface.
+For more information about alpha mode, see
Indicates that the transparency behavior is not specified.
Indicates that the transparency behavior is premultiplied. Each color is first scaled by the alpha value. The alpha value itself is the same in both straight and premultiplied alpha. Typically, no color channel value is greater than the alpha channel value. If a color channel value in a premultiplied format is greater than the alpha channel, the standard source-over blending math results in an additive blend.
Indicates that the transparency behavior is not premultiplied. The alpha channel indicates the transparency of the color.
Indicates to ignore the transparency behavior.
Specifies color space types.
+This enum is used within DXGI in the CheckColorSpaceSupport, SetColorSpace1 and CheckOverlayColorSpaceSupport methods. It is also referenced in D3D11 video methods such as ID3D11VideoContext1::VideoProcessorSetOutputColorSpace1, and D2D methods such as ID2D1DeviceContext2::CreateImageSourceFromDxgi.
The following color parameters are defined:
+| Property | Value |
| Colorspace | RGB |
| Range | 0-255 |
| Gamma | 2.2 |
| Siting | Image |
| Primaries | BT.709 |
?
This is the standard definition for sRGB. Note that this is often implemented with a linear segment, but in that case the exponent is corrected to stay aligned with a gamma 2.2 curve. This is usually used with 8 bit and 10 bit color channels. +
| Property | Value |
| Colorspace | RGB |
| Range | 0-255 |
| Gamma | 1.0 |
| Siting | Image |
| Primaries | BT.709 |
?
This is the standard definition for scRGB, and is usually used with 16 bit integer, 16 bit floating point, and 32 bit floating point channels. +
| Property | Value |
| Colorspace | RGB |
| Range | 16-235 |
| Gamma | 2.2 |
| Siting | Image |
| Primaries | BT.709 |
?
This is the standard definition for ITU-R Recommendation BT.709. Note that due to the inclusion of a linear segment, the transfer curve looks similar to a pure exponential gamma of 1.9. This is usually used with 8 bit and 10 bit color channels. +
| Property | Value |
| Colorspace | RGB |
| Range | 16-235 |
| Gamma | 2.2 |
| Siting | Image |
| Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels. +
Reserved.
| Property | Value |
| Colorspace | YCbCr |
| Range | 0-255 |
| Gamma | 2.2 |
| Siting | Image |
| Primaries | BT.709 |
| Transfer | BT.601 |
?
This definition is commonly used for JPG, and is usually used with 8, 10, 12, or 16 bit color channels. +
| Property | Value |
| Colorspace | YCbCr |
| Range | 16-235 |
| Gamma | 2.2 |
| Siting | Video |
| Primaries | BT.601 |
?
This definition is commonly used for MPEG2, and is usually used with 8, 10, 12, or 16 bit color channels. +
| Property | Value |
| Colorspace | YCbCr |
| Range | 0-255 |
| Gamma | 2.2 |
| Siting | Video |
| Primaries | BT.601 |
?
This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels. +
| Property | Value |
| Colorspace | YCbCr |
| Range | 16-235 |
| Gamma | 2.2 |
| Siting | Video |
| Primaries | BT.709 |
?
This definition is commonly used for H.264 and HEVC, and is usually used with 8, 10, 12, or 16 bit color channels. +
| Property | Value |
| Colorspace | YCbCr |
| Range | 0-255 |
| Gamma | 2.2 |
| Siting | Video |
| Primaries | BT.709 |
?
This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels. +
| Property | Value |
| Colorspace | YCbCr |
| Range | 16-235 |
| Gamma | 2.2 |
| Siting | Video |
| Primaries | BT.2020 |
?
This definition may be used by HEVC, and is usually used with 10, 12, or 16 bit color channels. +
| Property | Value |
| Colorspace | YCbCr |
| Range | 0-255 |
| Gamma | 2.2 |
| Siting | Video |
| Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
| Property | Value |
| Colorspace | RGB |
| Range | 0-255 |
| Gamma | 2084 |
| Siting | Image |
| Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
| Property | Value |
| Colorspace | YCbCr |
| Range | 16-235 |
| Gamma | 2084 |
| Siting | Video |
| Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
| Property | Value |
| Colorspace | RGB |
| Range | 16-235 |
| Gamma | 2084 |
| Siting | Image |
| Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
| Property | Value |
| Colorspace | YCbCr |
| Range | 16-235 |
| Gamma | 2.2 |
| Siting | Video |
| Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
| Property | Value |
| Colorspace | YCbCr |
| Range | 16-235 |
| Gamma | 2084 |
| Siting | Video |
| Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
| Property | Value |
| Colorspace | RGB |
| Range | 0-255 |
| Gamma | 2.2 |
| Siting | Image |
| Primaries | BT.2020 |
?
This is usually used with 10, 12, or 16 bit color channels.
A custom color definition is used.
A custom color definition is used.
Identifies the granularity at which the graphics processing unit (GPU) can be preempted from performing its current compute task.
+You call the IDXGIAdapter2::GetDesc2 method to retrieve the granularity level at which the GPU can be preempted from performing its current compute task. The operating system specifies the compute granularity level in the ComputePreemptionGranularity member of the
Indicates the preemption granularity as a compute packet.
Indicates the preemption granularity as a dispatch (for example, a call to the ID3D11DeviceContext::Dispatch method). A dispatch is a part of a compute packet.
Indicates the preemption granularity as a thread group. A thread group is a part of a dispatch.
Indicates the preemption granularity as a thread in a thread group. A thread is a part of a thread group.
Indicates the preemption granularity as a compute instruction in a thread.
Flags that indicate how the back buffers should be rotated to fit the physical rotation of a monitor.
+Unspecified rotation.
Specifies no rotation.
Specifies 90 degrees of rotation.
Specifies 180 degrees of rotation.
Specifies 270 degrees of rotation.
Flags indicating how an image is stretched to fit a given monitor's resolution.
+Selecting the CENTERED or STRETCHED modes can result in a mode change even if you specify the native resolution of the display in the
This enum is used by the
Unspecified scaling.
Specifies no scaling. The image is centered on the display. This flag is typically used for a fixed-dot-pitch display (such as an LED display).
Specifies stretched scaling.
Flags indicating the method the raster uses to create an image on a surface.
+This enum is used by the
Scanline order is unspecified.
The image is created from the first scanline to the last without skipping any.
The image is created beginning with the upper field.
The image is created beginning with the lower field.
Status codes that can be returned by DXGI functions.
+The
#define _FACDXGI 0x87a + #define MAKE_DXGI_STATUS(code) MAKE_HRESULT(0, _FACDXGI, code) +
For example, DXGI_STATUS_OCCLUDED is defined as 0x087A0001:
#define DXGI_STATUS_OCCLUDED MAKE_DXGI_STATUS(1) ++
Specifies a range of hardware features, to be used when checking for feature support.
+This enum is used by the CheckFeatureSupport method.
+The display supports tearing, a requirement of variable refresh rate displays.
Resource data formats, including fully-typed and typeless formats. A list of modifiers at the bottom of the page more fully describes each format type.
+The format is not known.
A four-component, 128-bit typeless format that supports 32 bits per channel including alpha. ?
A four-component, 128-bit floating-point format that supports 32 bits per channel including alpha. 1,5,8
A four-component, 128-bit unsigned-integer format that supports 32 bits per channel including alpha. ?
A four-component, 128-bit signed-integer format that supports 32 bits per channel including alpha. ?
A three-component, 96-bit typeless format that supports 32 bits per color channel.
A three-component, 96-bit floating-point format that supports 32 bits per color channel.5,8
A three-component, 96-bit unsigned-integer format that supports 32 bits per color channel.
A three-component, 96-bit signed-integer format that supports 32 bits per color channel.
A four-component, 64-bit typeless format that supports 16 bits per channel including alpha.
A four-component, 64-bit floating-point format that supports 16 bits per channel including alpha.5,7
A four-component, 64-bit unsigned-normalized-integer format that supports 16 bits per channel including alpha.
A four-component, 64-bit unsigned-integer format that supports 16 bits per channel including alpha.
A four-component, 64-bit signed-normalized-integer format that supports 16 bits per channel including alpha.
A four-component, 64-bit signed-integer format that supports 16 bits per channel including alpha.
A two-component, 64-bit typeless format that supports 32 bits for the red channel and 32 bits for the green channel.
A two-component, 64-bit floating-point format that supports 32 bits for the red channel and 32 bits for the green channel.5,8
A two-component, 64-bit unsigned-integer format that supports 32 bits for the red channel and 32 bits for the green channel.
A two-component, 64-bit signed-integer format that supports 32 bits for the red channel and 32 bits for the green channel.
A two-component, 64-bit typeless format that supports 32 bits for the red channel, 8 bits for the green channel, and 24 bits are unused.
A 32-bit floating-point component, and two unsigned-integer components (with an additional 32 bits). This format supports 32-bit depth, 8-bit stencil, and 24 bits are unused.?
A 32-bit floating-point component, and two typeless components (with an additional 32 bits). This format supports 32-bit red channel, 8 bits are unused, and 24 bits are unused.?
A 32-bit typeless component, and two unsigned-integer components (with an additional 32 bits). This format has 32 bits unused, 8 bits for green channel, and 24 bits are unused.
A four-component, 32-bit typeless format that supports 10 bits for each color and 2 bits for alpha.
A four-component, 32-bit unsigned-normalized-integer format that supports 10 bits for each color and 2 bits for alpha.
A four-component, 32-bit unsigned-integer format that supports 10 bits for each color and 2 bits for alpha.
Three partial-precision floating-point numbers encoded into a single 32-bit value (a variant of s10e5, which is sign bit, 10-bit mantissa, and 5-bit biased (15) exponent). There are no sign bits, and there is a 5-bit biased (15) exponent for each channel, 6-bit mantissa for R and G, and a 5-bit mantissa for B, as shown in the following illustration.5,7
A four-component, 32-bit typeless format that supports 8 bits per channel including alpha.
A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits per channel including alpha.
A four-component, 32-bit unsigned-normalized integer sRGB format that supports 8 bits per channel including alpha.
A four-component, 32-bit unsigned-integer format that supports 8 bits per channel including alpha.
A four-component, 32-bit signed-normalized-integer format that supports 8 bits per channel including alpha.
A four-component, 32-bit signed-integer format that supports 8 bits per channel including alpha.
A two-component, 32-bit typeless format that supports 16 bits for the red channel and 16 bits for the green channel.
A two-component, 32-bit floating-point format that supports 16 bits for the red channel and 16 bits for the green channel.5,7
A two-component, 32-bit unsigned-normalized-integer format that supports 16 bits each for the green and red channels.
A two-component, 32-bit unsigned-integer format that supports 16 bits for the red channel and 16 bits for the green channel.
A two-component, 32-bit signed-normalized-integer format that supports 16 bits for the red channel and 16 bits for the green channel.
A two-component, 32-bit signed-integer format that supports 16 bits for the red channel and 16 bits for the green channel.
A single-component, 32-bit typeless format that supports 32 bits for the red channel.
A single-component, 32-bit floating-point format that supports 32 bits for depth.5,8
A single-component, 32-bit floating-point format that supports 32 bits for the red channel.5,8
A single-component, 32-bit unsigned-integer format that supports 32 bits for the red channel.
A single-component, 32-bit signed-integer format that supports 32 bits for the red channel.
A two-component, 32-bit typeless format that supports 24 bits for the red channel and 8 bits for the green channel.
A 32-bit z-buffer format that supports 24 bits for depth and 8 bits for stencil.
A 32-bit format, that contains a 24 bit, single-component, unsigned-normalized integer, with an additional typeless 8 bits. This format has 24 bits red channel and 8 bits unused.
A 32-bit format, that contains a 24 bit, single-component, typeless format, with an additional 8 bit unsigned integer component. This format has 24 bits unused and 8 bits green channel.
A two-component, 16-bit typeless format that supports 8 bits for the red channel and 8 bits for the green channel.
A two-component, 16-bit unsigned-normalized-integer format that supports 8 bits for the red channel and 8 bits for the green channel.
A two-component, 16-bit unsigned-integer format that supports 8 bits for the red channel and 8 bits for the green channel.
A two-component, 16-bit signed-normalized-integer format that supports 8 bits for the red channel and 8 bits for the green channel.
A two-component, 16-bit signed-integer format that supports 8 bits for the red channel and 8 bits for the green channel.
A single-component, 16-bit typeless format that supports 16 bits for the red channel.
A single-component, 16-bit floating-point format that supports 16 bits for the red channel.5,7
A single-component, 16-bit unsigned-normalized-integer format that supports 16 bits for depth.
A single-component, 16-bit unsigned-normalized-integer format that supports 16 bits for the red channel.
A single-component, 16-bit unsigned-integer format that supports 16 bits for the red channel.
A single-component, 16-bit signed-normalized-integer format that supports 16 bits for the red channel.
A single-component, 16-bit signed-integer format that supports 16 bits for the red channel.
A single-component, 8-bit typeless format that supports 8 bits for the red channel.
A single-component, 8-bit unsigned-normalized-integer format that supports 8 bits for the red channel.
A single-component, 8-bit unsigned-integer format that supports 8 bits for the red channel.
A single-component, 8-bit signed-normalized-integer format that supports 8 bits for the red channel.
A single-component, 8-bit signed-integer format that supports 8 bits for the red channel.
A single-component, 8-bit unsigned-normalized-integer format for alpha only.
A single-component, 1-bit unsigned-normalized integer format that supports 1 bit for the red channel. ?.
Three partial-precision floating-point numbers encoded into a single 32-bit value all sharing the same 5-bit exponent (variant of s10e5, which is sign bit, 10-bit mantissa, and 5-bit biased (15) exponent). There is no sign bit, and there is a shared 5-bit biased (15) exponent and a 9-bit mantissa for each channel, as shown in the following illustration. 2,6,7.
A four-component, 32-bit unsigned-normalized-integer format. This packed RGB format is analogous to the UYVY format. Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values are repeated, and the G8 values are unique to each pixel. ?
Width must be even.
A four-component, 32-bit unsigned-normalized-integer format. This packed RGB format is analogous to the YUY2 format. Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values are repeated, and the G8 values are unique to each pixel. ?
Width must be even.
Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
One-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
One-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
One-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Two-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Two-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Two-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.
A three-component, 16-bit unsigned-normalized-integer format that supports 5 bits for blue, 6 bits for green, and 5 bits for red.
Direct3D 10 through Direct3D 11:??This value is defined for DXGI. However, Direct3D 10, 10.1, or 11 devices do not support this format.
Direct3D 11.1:??This value is not supported until Windows?8.
A four-component, 16-bit unsigned-normalized-integer format that supports 5 bits for each color channel and 1-bit alpha.
Direct3D 10 through Direct3D 11:??This value is defined for DXGI. However, Direct3D 10, 10.1, or 11 devices do not support this format.
Direct3D 11.1:??This value is not supported until Windows?8.
A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8-bit alpha.
A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8 bits unused.
A four-component, 32-bit 2.8-biased fixed-point format that supports 10 bits for each color channel and 2-bit alpha.
A four-component, 32-bit typeless format that supports 8 bits for each channel including alpha. ?
A four-component, 32-bit unsigned-normalized standard RGB format that supports 8 bits for each channel including alpha. ?
A four-component, 32-bit typeless format that supports 8 bits for each color channel, and 8 bits are unused. ?
A four-component, 32-bit unsigned-normalized standard RGB format that supports 8 bits for each color channel, and 8 bits are unused. ?
A typeless block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.
A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.?
A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.?
A typeless block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.
A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.
A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.
Most common YUV 4:4:4 video resource format. Valid view formats for this video resource format are DXGI_FORMAT_R8G8B8A8_UNORM and DXGI_FORMAT_R8G8B8A8_UINT. For UAVs, an additional valid view format is DXGI_FORMAT_R32_UINT. By using DXGI_FORMAT_R32_UINT for UAVs, you can both read and write as opposed to just write for DXGI_FORMAT_R8G8B8A8_UNORM and DXGI_FORMAT_R8G8B8A8_UINT. Supported view types are SRV, RTV, and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is V->R8, + U->G8, + Y->B8, + and A->A8.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
10-bit per channel packed YUV 4:4:4 video resource format. Valid view formats for this video resource format are DXGI_FORMAT_R10G10B10A2_UNORM and DXGI_FORMAT_R10G10B10A2_UINT. For UAVs, an additional valid view format is DXGI_FORMAT_R32_UINT. By using DXGI_FORMAT_R32_UINT for UAVs, you can both read and write as opposed to just write for DXGI_FORMAT_R10G10B10A2_UNORM and DXGI_FORMAT_R10G10B10A2_UINT. Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is U->R10, + Y->G10, + V->B10, + and A->A2.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
16-bit per channel packed YUV 4:4:4 video resource format. Valid view formats for this video resource format are DXGI_FORMAT_R16G16B16A16_UNORM and DXGI_FORMAT_R16G16B16A16_UINT. Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is U->R16, + Y->G16, + V->B16, + and A->A16.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
Most common YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are DXGI_FORMAT_R8_UNORM and DXGI_FORMAT_R8_UINT. Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are DXGI_FORMAT_R8G8_UNORM and DXGI_FORMAT_R8G8_UINT. Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R8. For chrominance data view, the mapping to the view channel is U->R8 and + V->G8.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.
An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling ID3D12Device::CreateShaderResourceView twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.
Direct3D 11.1:??This value is not supported until Windows?8.
10-bit per channel planar YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are DXGI_FORMAT_R16_UNORM and DXGI_FORMAT_R16_UINT. The runtime does not enforce whether the lowest 6 bits are 0 (given that this video resource format is a 10-bit format that uses 16 bits). If required, application shader code would have to enforce this manually. From the runtime's point of view, DXGI_FORMAT_P010 is no different than DXGI_FORMAT_P016. Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are DXGI_FORMAT_R16G16_UNORM and DXGI_FORMAT_R16G16_UINT. For UAVs, an additional valid chrominance data view format is DXGI_FORMAT_R32_UINT. By using DXGI_FORMAT_R32_UINT for UAVs, you can both read and write as opposed to just write for DXGI_FORMAT_R16G16_UNORM and DXGI_FORMAT_R16G16_UINT. Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R16. For chrominance data view, the mapping to the view channel is U->R16 and + V->G16.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.
An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling ID3D12Device::CreateShaderResourceView twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.
Direct3D 11.1:??This value is not supported until Windows?8.
16-bit per channel planar YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are DXGI_FORMAT_R16_UNORM and DXGI_FORMAT_R16_UINT. Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are DXGI_FORMAT_R16G16_UNORM and DXGI_FORMAT_R16G16_UINT. For UAVs, an additional valid chrominance data view format is DXGI_FORMAT_R32_UINT. By using DXGI_FORMAT_R32_UINT for UAVs, you can both read and write as opposed to just write for DXGI_FORMAT_R16G16_UNORM and DXGI_FORMAT_R16G16_UINT. Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R16. For chrominance data view, the mapping to the view channel is U->R16 and + V->G16.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.
An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling ID3D12Device::CreateShaderResourceView twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.
Direct3D 11.1:??This value is not supported until Windows?8.
8-bit per channel planar YUV 4:2:0 video resource format. This format is subsampled where each pixel has its own Y value, but each 2x2 pixel block shares a single U and V value. The runtime requires that the width and height of all resources that are created with this format are multiples of 2. The runtime also requires that the left, right, top, and bottom members of any
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes.
An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling ID3D12Device::CreateShaderResourceView twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.
Direct3D 11.1:??This value is not supported until Windows?8.
Most common YUV 4:2:2 video resource format. Valid view formats for this video resource format are DXGI_FORMAT_R8G8B8A8_UNORM and DXGI_FORMAT_R8G8B8A8_UINT. For UAVs, an additional valid view format is DXGI_FORMAT_R32_UINT. By using DXGI_FORMAT_R32_UINT for UAVs, you can both read and write as opposed to just write for DXGI_FORMAT_R8G8B8A8_UNORM and DXGI_FORMAT_R8G8B8A8_UINT. Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is Y0->R8, + U0->G8, + Y1->B8, + and V0->A8.
A unique valid view format for this video resource format is DXGI_FORMAT_R8G8_B8G8_UNORM. With this view format, the width of the view appears to be twice what the DXGI_FORMAT_R8G8B8A8_UNORM or DXGI_FORMAT_R8G8B8A8_UINT view would be when hardware reconstructs RGBA automatically on read and before filtering. This Direct3D hardware behavior is legacy and is likely not useful any more. With this view format, the mapping to the view channel is Y0->R8, + U0-> + G8[0], + Y1->B8, + and V0-> + G8[1].
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width must be even.
Direct3D 11.1:??This value is not supported until Windows?8.
10-bit per channel packed YUV 4:2:2 video resource format. Valid view formats for this video resource format are DXGI_FORMAT_R16G16B16A16_UNORM and DXGI_FORMAT_R16G16B16A16_UINT. The runtime does not enforce whether the lowest 6 bits are 0 (given that this video resource format is a 10-bit format that uses 16 bits). If required, application shader code would have to enforce this manually. From the runtime's point of view, DXGI_FORMAT_Y210 is no different than DXGI_FORMAT_Y216. Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is Y0->R16, + U->G16, + Y1->B16, + and V->A16.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width must be even.
Direct3D 11.1:??This value is not supported until Windows?8.
16-bit per channel packed YUV 4:2:2 video resource format. Valid view formats for this video resource format are DXGI_FORMAT_R16G16B16A16_UNORM and DXGI_FORMAT_R16G16B16A16_UINT. Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is Y0->R16, + U->G16, + Y1->B16, + and V->A16.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width must be even.
Direct3D 11.1:??This value is not supported until Windows?8.
Most common planar YUV 4:1:1 video resource format. Valid luminance data view formats for this video resource format are DXGI_FORMAT_R8_UNORM and DXGI_FORMAT_R8_UINT. Valid chrominance data view formats (width and height are each 1/4 of luminance view) for this video resource format are DXGI_FORMAT_R8G8_UNORM and DXGI_FORMAT_R8G8_UINT. Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R8. For chrominance data view, the mapping to the view channel is U->R8 and + V->G8.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Width must be a multiple of 4. Direct3D11 staging resources and initData parameters for this format use (rowPitch * height * 2) bytes. The first (SysMemPitch * height) bytes are the Y plane, the next ((SysMemPitch / 2) * height) bytes are the UV plane, and the remainder is padding.
Direct3D 11.1:??This value is not supported until Windows?8.
4-bit palletized YUV format that is commonly used for DVD subpicture.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
4-bit palletized YUV format that is commonly used for DVD subpicture.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
8-bit palletized format that is used for palletized RGB data when the processor processes ISDB-T data and for palletized YUV data when the processor processes BluRay data.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
8-bit palletized format with 8 bits of alpha that is used for palletized YUV data when the processor processes BluRay data.
For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.
Direct3D 11.1:??This value is not supported until Windows?8.
A four-component, 16-bit unsigned-normalized integer format that supports 4 bits for each channel including alpha.
Direct3D 11.1:??This value is not supported until Windows?8.
A video format; an 8-bit version of a hybrid planar 4:2:2 format.
An 8 bit YCbCrA 4:4 rendering format.
An 8 bit YCbCrA 4:4:4:4 rendering format.
Indicates options for presenting frames to the swap chain.
+This enum is used by the
Specifies that the presentation mode is a composition surface, meaning that the conversion from YUV to RGB is happening once per output refresh (for example, 60 Hz). When this value is returned, the media app should discontinue use of the decode swap chain and perform YUV to RGB conversion itself, reducing the frequency of YUV to RGB conversion to once per video frame.
Specifies that the presentation mode is an overlay surface, meaning that the YUV to RGB conversion is happening efficiently in hardware (once per video frame). When this value is returned, the media app can continue to use the decode swap chain. See
No presentation is specified.
An issue occurred that caused content protection to be invalidated in a swap-chain with hardware content protection, and is usually because the system ran out of hardware protected memory. The app will need to do one of the following:
Note that simply re-creating the swap chain or the device will usually have no impact as the DWM will continue to run out of memory and will return the same failure.
Identifies the granularity at which the graphics processing unit (GPU) can be preempted from performing its current graphics rendering task.
+You call the IDXGIAdapter2::GetDesc2 method to retrieve the granularity level at which the GPU can be preempted from performing its current graphics rendering task. The operating system specifies the graphics granularity level in the GraphicsPreemptionGranularity member of the
The following figure shows granularity of graphics rendering tasks.
+Indicates the preemption granularity as a DMA buffer.
Indicates the preemption granularity as a graphics primitive. A primitive is a section in a DMA buffer and can be a group of triangles.
Indicates the preemption granularity as a triangle. A triangle is a part of a primitive.
Indicates the preemption granularity as a pixel. A pixel is a part of a triangle.
Indicates the preemption granularity as a graphics instruction. A graphics instruction operates on a pixel.
Specifies the header metadata type.
+This enum is used by the SetHDRMetaData method.
+Indicates there is no header metadata.
Indicates the header metadata is held by a
Values that specify categories of debug messages.
+Use this enumeration when you call IDXGIInfoQueue::GetMessage to retrieve a message and when you call IDXGIInfoQueue::AddMessage to add a message. When you create an info queue filter, you can use these values to allow or deny any categories of messages to pass through the storage and retrieval filters.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +Unknown category.
Miscellaneous category.
Initialization category.
Cleanup category.
Compilation category.
State creation category.
State setting category.
State getting category.
Resource manipulation category.
Execution category.
Shader category.
Values that specify debug message severity levels for an information queue.
+Use this enumeration when you call IDXGIInfoQueue::GetMessage to retrieve a message and when you call IDXGIInfoQueue::AddMessage to add a message. Also, use this enumeration with IDXGIInfoQueue::AddApplicationMessage.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +Defines some type of corruption that has occurred.
Defines an error message.
Defines a warning message.
Defines an information message.
Defines a message other than corruption, error, warning, or information.
A reference to the surface data (see
CPU read-write flags. These flags can be combined with a logical OR.
Specifies the memory segment group to use.
+This enum is used by QueryVideoMemoryInfo and SetVideoMemoryReservation.
Refer to the remarks for
The grouping of segments which is considered local to the video adapter, and represents the fastest available memory to the GPU. Applications should target the local segment group as the target size for their working set.
The grouping of segments which is considered non-local to the video adapter, and may have slower performance than the local segment group.
Specifies nominal range YCbCr, which isn't an absolute color space, but a way of encoding RGB info.
Specifies BT.709, which standardizes the format of high-definition television and has 16:9 (widescreen) aspect ratio.
Specifies xvYCC or extended-gamut YCC (also x.v.Color) color space that can be used in the video electronics of television sets to support a gamut 1.8 times as large as that of the sRGB color space.
Identifies the importance of a resource?s content when you call the IDXGIDevice2::OfferResources method to offer the resource.
+Priority determines how likely the operating system is to discard an offered resource. Resources offered with lower priority are discarded first.
+Identifies the type of reference shape.
+The reference type is a monochrome mouse reference, which is a monochrome bitmap. The bitmap's size is specified by width and height in a 1 bits per pixel (bpp) device independent bitmap (DIB) format AND mask that is followed by another 1 bpp DIB format XOR mask of the same size.
The reference type is a color mouse reference, which is a color bitmap. The bitmap's size is specified by width and height in a 32 bpp ARGB DIB format.
The reference type is a masked color mouse reference. A masked color mouse reference is a 32 bpp ARGB format bitmap with the mask value in the alpha bits. The only allowed mask values are 0 and 0xFF. When the mask value is 0, the RGB value should replace the screen pixel. When the mask value is 0xFF, an XOR operation is performed on the RGB value and the screen pixel; the result replaces the screen pixel.
Overlay color space support is present.
An integer that specifies how to synchronize presentation of a frame with the vertical blank. +
For the bit-block transfer (bitblt) model (DXGI_SWAP_EFFECT_DISCARD or DXGI_SWAP_EFFECT_SEQUENTIAL), values are:
For the flip model (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL), values are:
For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.
If the update region straddles more than one output (each represented by
An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.
Specifies result flags for the ReclaimResources1 method.
+Flags indicating the memory location of a resource.
+This enum is used by QueryResourceResidency.
+The resource is located in video memory.
At least some of the resource is located in CPU memory.
At least some of the resource has been paged out to the hard drive.
Set the priority for evicting the resource from memory.
+The eviction priority is a memory-management variable that is used by DXGI for determining how to populate overcommitted memory.
You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.
+The priority is one of the following values:
| Value | Meaning |
|---|---|
| The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies. |
| The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory. |
| The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. |
| The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource. |
| The resource is evicted from memory only if there is no other way of resolving the memory requirement. |
?
Identifies resize behavior when the back-buffer size does not match the size of the target output.
+The DXGI_SCALING_NONE value is supported only for flip presentation model swap chains that you create with the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value. You pass these values in a call to IDXGIFactory2::CreateSwapChainForHwnd, IDXGIFactory2::CreateSwapChainForCoreWindow, or IDXGIFactory2::CreateSwapChainForComposition.
DXGI_SCALING_ASPECT_RATIO_STRETCH will prefer to use a horizontal fill, otherwise it will use a vertical fill, using the following logic.
float aspectRatio = backBufferWidth / float(backBufferHeight); // Horizontal fill float scaledWidth = outputWidth; float scaledHeight = outputWidth / aspectRatio; if (scaledHeight >= outputHeight) { // Do vertical fill scaledWidth = outputHeight * aspectRatio; scaledHeight = outputHeight; } float offsetX = (outputWidth - scaledWidth) * 0.5f; float offsetY = (outputHeight - scaledHeight) * 0.5f; rect.left = static_cast< >(offsetX); rect.top = static_cast< >(offsetY); rect.right = static_cast< >(offsetX + scaledWidth); rect.bottom = static_cast< >(offsetY + scaledHeight); rect.left = std::max< >(0, rect.left); rect.top = std::max< >(0, rect.top); rect.right = std::min< >(static_cast< >(outputWidth), rect.right); rect.bottom = std::min< >(static_cast< >(outputHeight), rect.bottom);
+ Note that outputWidth and outputHeight are the pixel sizes of the presentation target size. In the case of CoreWindow, this requires converting the logicalWidth and logicalHeight values from DIPS to pixels using the window's DPI property.
+Directs DXGI to make the back-buffer contents scale to fit the presentation target size. This is the implicit behavior of DXGI when you call the IDXGIFactory::CreateSwapChain method.
Directs DXGI to make the back-buffer contents appear without any scaling when the presentation target size is not equal to the back-buffer size. The top edges of the back buffer and presentation target are aligned together. If the WS_EX_LAYOUTRTL style is associated with the
This value specifies that all target areas outside the back buffer of a swap chain are filled with the background color that you specify in a call to IDXGISwapChain1::SetBackgroundColor.
Directs DXGI to make the back-buffer contents scale to fit the presentation target size, while preserving the aspect ratio of the back-buffer. If the scaled back-buffer does not fill the presentation area, it will be centered with black borders.
This constant is supported on Windows Phone 8 and Windows 10.
Note that with legacy Win32 window swapchains, this works the same as DXGI_SCALING_STRETCH. +
Color space support is present.
Overlay color space support is present.
Set this flag to turn off automatic image rotation; that is, do not perform a rotation when transferring the contents of the front buffer to the monitor. Use this flag to avoid a bandwidth penalty when an application expects to handle rotation. This option is valid only during full-screen mode.
Set this flag to enable an application to switch modes by calling IDXGISwapChain::ResizeTarget. When switching from windowed to full-screen mode, the display mode (or monitor resolution) will be changed to match the dimensions of the application window.
Set this flag to enable an application to render using GDI on a swap chain or a surface. This will allow the application to call IDXGISurface1::GetDC on the 0th back buffer or a surface.
Set this flag to indicate that the swap chain might contain protected content; therefore, the operating system supports the creation of the swap chain only when driver and hardware protection is used. If the driver and hardware do not support content protection, the call to create a resource for the swap chain fails.
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Set this flag to indicate that shared resources that are created within the swap chain must be protected by using the driver?s mechanism for restricting access to shared surfaces.
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Set this flag to restrict presented content to the local displays. Therefore, the presented content is not accessible via remote accessing or through the desktop duplication APIs.
This flag supports the window content protection features of Windows. Applications can use this flag to protect their own onscreen window content from being captured or copied through a specific set of public operating system features and APIs.
If you use this flag with windowed (
Direct3D 11:??This enumeration value is supported starting with Windows?8.
Set this flag to create a waitable object you can use to ensure rendering does not begin while a frame is still being presented. When this flag is used, the swapchain's latency must be set with the IDXGISwapChain2::SetMaximumFrameLatency API instead of IDXGIDevice1::SetMaximumFrameLatency.
Note??This enumeration value is supported starting with Windows?8.1.
Set this flag to create a swap chain in the foreground layer for multi-plane rendering. This flag can only be used with CoreWindow swap chains, which are created with CreateSwapChainForCoreWindow. Apps should not create foreground swap chains if IDXGIOutput2::SupportsOverlays indicates that hardware support for overlays is not available.
Note that IDXGISwapChain::ResizeBuffers cannot be used to add or remove this flag.
Note??This enumeration value is supported starting with Windows?8.1.
Set this flag to create a swap chain for full-screen video.
Note??This enumeration value is supported starting with Windows?8.1.
Set this flag to create a swap chain for YUV video.
Note??This enumeration value is supported starting with Windows?8.1.
Indicates that the swap chain should be created such that all underlying resources can be protected by the hardware. Resource creation will fail if hardware content protection is not supported.
This flag has the following restrictions:
Note??This enumeration value is supported starting with Windows?10.
Tearing support is a requirement to enable displays that support variable refresh rates to function properly when the application presents a swap chain tied to a full screen borderless window. Win32 apps can already achieve tearing in fullscreen exclusive mode by calling SetFullscreenState(TRUE), but the recommended approach for Win32 developers is to use this tearing flag instead.
To check for hardware support of this feature, refer to IDXGIFactory5::CheckFeatureSupport. For usage information refer to IDXGISwapChain::Present and the DXGI_PRESENT flags.
Options for handling pixels in a display surface after calling IDXGISwapChain1::Present1.
+ This enumeration is used by the
To use multisampling with DXGI_SWAP_EFFECT_SEQUENTIAL or DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, you must perform the multisampling in a separate render target. For example, create a multisampled texture by calling ID3D11Device::CreateTexture2D with a filled
The primary difference between presentation models is how back-buffer contents get to the Desktop Window Manager (DWM) for composition. In the bitblt model, which is used with the DXGI_SWAP_EFFECT_DISCARD and DXGI_SWAP_EFFECT_SEQUENTIAL values, contents of the back buffer get copied into the redirection surface on each call to IDXGISwapChain1::Present1. In the flip model, which is used with the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value, all back buffers are shared with the DWM. Therefore, the DWM can compose straight from those back buffers without any additional copy operations. In general, the flip model is the more efficient model. The flip model also provides more features, such as enhanced present statistics.
When you call IDXGISwapChain1::Present1 on a flip model swap chain (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) with 0 specified in the SyncInterval parameter, IDXGISwapChain1::Present1's behavior is the same as the behavior of Direct3D 9Ex's IDirect3DDevice9Ex::PresentEx with D3DSWAPEFFECT_FLIPEX and D3DPRESENT_FORCEIMMEDIATE. That is, the runtime not only presents the next frame instead of any previously queued frames, it also terminates any remaining time left on the previously queued frames.
Regardless of whether the flip model is more efficient, an application still might choose the bitblt model because the bitblt model is the only way to mix GDI and DirectX presentation. In the flip model, the application must create the swap chain with DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE, and then must use GetDC on the back buffer explicitly. After the first successful call to IDXGISwapChain1::Present1 on a flip-model swap chain, GDI no longer works with the
For more info about the flip-model swap chain and optimizing presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas.
+Creates a DXGI 1.1 factory that you can use to generate other DXGI objects.
+The globally unique identifier (
Address of a reference to an
Returns
Use a DXGI 1.1 factory to generate objects that enumerate adapters, create swap chains, and associate a window with the alt+enter key sequence for toggling to and from the full-screen display mode.
If the CreateDXGIFactory1 function succeeds, the reference count on the
This entry point is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Note??Do not mix the use of DXGI 1.0 (Creates a DXGI 1.3 factory that you can use to generate other DXGI objects.
In Windows?8, any DXGI factory created while DXGIDebug.dll was present on the system would load and use it. Starting in Windows?8.1, apps explicitly request that DXGIDebug.dll be loaded instead. Use CreateDXGIFactory2 and specify the
Valid values include the
The globally unique identifier (
Address of a reference to an
Returns
This function accepts a flag indicating whether DXGIDebug.dll is loaded. The function otherwise behaves identically to CreateDXGIFactory1.
+Gets a DXGI 1.1 description of an adapter (or video card).
+This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Use the GetDesc1 method to get a DXGI 1.1 description of an adapter. To get a DXGI 1.0 description, use the
Gets a DXGI 1.1 description of an adapter (or video card).
+A reference to a
Returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Use the GetDesc1 method to get a DXGI 1.1 description of an adapter. To get a DXGI 1.0 description, use the
Gets a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 description of an adapter or video card. This description includes information about the granularity at which the graphics processing unit (GPU) can be preempted from performing its current task.
+Use the GetDesc2 method to get a DXGI 1.2 description of an adapter. To get a DXGI 1.1 description, use the IDXGIAdapter1::GetDesc1 method. To get a DXGI 1.0 description, use the IDXGIAdapter::GetDesc method.
The Windows Display Driver Model (WDDM) scheduler can preempt the GPU's execution of application tasks. The granularity at which the GPU can be preempted from performing its current task in the WDDM 1.1 or earlier driver model is a direct memory access (DMA) buffer for graphics tasks or a compute packet for compute tasks. The GPU can switch between tasks only after it completes the currently executing unit of work, a DMA buffer or a compute packet.
A DMA buffer is the largest independent unit of graphics work that the WDDM scheduler can submit to the GPU. This buffer contains a set of GPU instructions that the WDDM driver and GPU use. A compute packet is the largest independent unit of compute work that the WDDM scheduler can submit to the GPU. A compute packet contains dispatches (for example, calls to the ID3D11DeviceContext::Dispatch method), which contain thread groups. The WDDM 1.2 or later driver model allows the GPU to be preempted at finer granularity levels than a DMA buffer or compute packet. You can use the GetDesc2 method to retrieve the granularity levels for graphics and compute tasks.
+Gets a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 description of an adapter or video card. This description includes information about the granularity at which the graphics processing unit (GPU) can be preempted from performing its current task.
+A reference to a
Returns
Use the GetDesc2 method to get a DXGI 1.2 description of an adapter. To get a DXGI 1.1 description, use the IDXGIAdapter1::GetDesc1 method. To get a DXGI 1.0 description, use the IDXGIAdapter::GetDesc method.
The Windows Display Driver Model (WDDM) scheduler can preempt the GPU's execution of application tasks. The granularity at which the GPU can be preempted from performing its current task in the WDDM 1.1 or earlier driver model is a direct memory access (DMA) buffer for graphics tasks or a compute packet for compute tasks. The GPU can switch between tasks only after it completes the currently executing unit of work, a DMA buffer or a compute packet.
A DMA buffer is the largest independent unit of graphics work that the WDDM scheduler can submit to the GPU. This buffer contains a set of GPU instructions that the WDDM driver and GPU use. A compute packet is the largest independent unit of compute work that the WDDM scheduler can submit to the GPU. A compute packet contains dispatches (for example, calls to the ID3D11DeviceContext::Dispatch method), which contain thread groups. The WDDM 1.2 or later driver model allows the GPU to be preempted at finer granularity levels than a DMA buffer or compute packet. You can use the GetDesc2 method to retrieve the granularity levels for graphics and compute tasks.
+Registers to receive notification of hardware content protection teardown events.
+A handle to the event object that the operating system sets when hardware content protection teardown occurs. The CreateEvent or OpenEvent function returns this handle.
A reference to a key value that an application can pass to the IDXGIAdapter3::UnregisterHardwareContentProtectionTeardownStatus method to unregister the notification event that hEvent specifies.
Call ID3D11VideoDevice::GetContentProtectionCaps() to check for the presence of the D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_TEARDOWN capability to know whether the hardware contains an automatic teardown mechanism. After the event is signaled, the application can call ID3D11VideoContext1::CheckCryptoSessionStatus to determine the impact of the hardware teardown for a specific
Unregisters an event to stop it from receiving notification of hardware content protection teardown events.
+A key value for the window or event to unregister. The IDXGIAdapter3::RegisterHardwareContentProtectionTeardownStatusEvent method returns this value.
This method informs the process of the current budget and process usage.
+Specifies the device's physical adapter for which the video memory information is queried. For single-GPU operation, set this to zero. If there are multiple GPU nodes, set this to the index of the node (the device's physical adapter) for which the video memory information is queried. See Multi-Adapter.
Specifies a
Fills in a
Applications must explicitly manage their usage of physical memory explicitly and keep usage within the budget assigned to the application process. Processes that cannot kept their usage within their assigned budgets will likely experience stuttering, as they are intermittently frozen and paged-out to allow other processes to run.
+This method sends the minimum required physical memory for an application, to the OS.
+Specifies the device's physical adapter for which the video memory information is being set. For single-GPU operation, set this to zero. If there are multiple GPU nodes, set this to the index of the node (the device's physical adapter) for which the video memory information is being set. See Multi-Adapter.
Specifies a
Specifies a UINT64 that sets the minimum required physical memory, in bytes.
Returns
Applications are encouraged to set a video reservation to denote the amount of physical memory they cannot go without. This value helps the OS quickly minimize the impact of large memory pressure situations.
+This method establishes a correlation between a CPU synchronization object and the budget change event.
+Specifies a HANDLE for the event.
A key value for the window or event to unregister. The IDXGIAdapter3::RegisterHardwareContentProtectionTeardownStatusEvent method returns this value.
Instead of calling QueryVideoMemoryInfo regularly, applications can use CPU synchronization objects to efficiently wake threads when budget changes occur.
+This method stops notifying a CPU synchronization object whenever a budget change occurs. An application may switch back to polling the information regularly.
+A key value for the window or event to unregister. The IDXGIAdapter3::RegisterHardwareContentProtectionTeardownStatusEvent method returns this value.
An application may switch back to polling for the information regularly.
+Gets or sets the source region that is used for the swap chain.
+Gets or sets the rectangle that defines the target region for the video processing blit operation.
+Gets or sets the color space used by the swap chain.
+Presents a frame on the output adapter. The frame is a subresource of the
This method returns
Sets the rectangle that defines the source region for the video processing blit operation.
The source rectangle is the portion of the input surface that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface.
+A reference to a
This method returns
Sets the rectangle that defines the target region for the video processing blit operation.
The target rectangle is the area within the destination surface where the output will be drawn. The target rectangle is given in pixel coordinates, relative to the destination surface.
+A reference to a
This method returns
Sets the size of the destination surface to use for the video processing blit operation.
The destination rectangle is the portion of the output surface that receives the blit for this stream. The destination rectangle is given in pixel coordinates, relative to the output surface.
+The width of the destination size, in pixels.
The height of the destination size, in pixels.
This method returns
Gets the source region that is used for the swap chain.
+A reference to a
This method returns
Gets the rectangle that defines the target region for the video processing blit operation.
+A reference to a
This method returns
Gets the size of the destination surface to use for the video processing blit operation.
+A reference to a variable that receives the width in pixels.
A reference to a variable that receives the height in pixels.
This method returns
Sets the color space used by the swap chain.
+A reference to a combination of
This method returns
Gets the color space used by the swap chain.
+A combination of
Gets or sets the number of frames that the system is allowed to queue for rendering.
+This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+Sets the number of frames that the system is allowed to queue for rendering.
+The maximum number of back buffer frames that a driver can queue. The value defaults to 3, but can range from 1 to 16. A value of 0 will reset latency to the default. For multi-head devices, this value is specified per-head.
Returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+Gets the number of frames that the system is allowed to queue for rendering.
+This value is set to the number of frames that can be queued for render. This value defaults to 3, but can range from 1 to 16.
Returns
This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).
Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.
+Allows the operating system to free the video memory of resources by discarding their content.
+The number of resources in the ppResources argument array.
An array of references to
A
OfferResources returns:
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.
To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Restores access to resources that were previously offered by calling IDXGIDevice2::OfferResources.
+ReclaimResources returns:
After you call IDXGIDevice2::OfferResources to offer one or more resources, you must call ReclaimResources before you can use those resources again. You must check the values in the array at pDiscarded to determine whether each resource?s content was discarded. If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource.
To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Flushes any outstanding rendering commands and sets the specified event object to the signaled state after all previously submitted rendering commands complete.
+A handle to the event object. The CreateEvent or OpenEvent function returns this handle. All types of event objects (manual-reset, auto-reset, and so on) are supported.
The handle must have the EVENT_MODIFY_STATE access right. For more information about access rights, see Synchronization Object Security and Access Rights.
Returns
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, EnqueueSetEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
EnqueueSetEvent calls the SetEvent function on the event object after all previously submitted rendering commands complete or the device is removed.
After an application calls EnqueueSetEvent, it can immediately call the WaitForSingleObject function to put itself to sleep until rendering commands complete.
You cannot use EnqueueSetEvent to determine work completion that is associated with presentation (IDXGISwapChain::Present); instead, we recommend that you use IDXGISwapChain::GetFrameStatistics.
+Allows the operating system to free the video memory of resources by discarding their content.
+The number of resources in the ppResources argument array.
An array of references to
A
OfferResources returns:
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.
To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Allows the operating system to free the video memory of resources by discarding their content.
+The number of resources in the ppResources argument array.
An array of references to
A
OfferResources returns:
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.
To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Restores access to resources that were previously offered by calling IDXGIDevice2::OfferResources.
+ReclaimResources returns:
After you call IDXGIDevice2::OfferResources to offer one or more resources, you must call ReclaimResources before you can use those resources again. You must check the values in the array at pDiscarded to determine whether each resource?s content was discarded. If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource.
To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Restores access to resources that were previously offered by calling IDXGIDevice2::OfferResources.
+ReclaimResources returns:
After you call IDXGIDevice2::OfferResources to offer one or more resources, you must call ReclaimResources before you can use those resources again. You must check the values in the array at pDiscarded to determine whether each resource?s content was discarded. If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource.
To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Trims the graphics memory allocated by the
For apps that render with DirectX, graphics drivers periodically allocate internal memory buffers in order to speed up subsequent rendering requests. These memory allocations count against the app's memory usage for PLM and in general lead to increased memory usage by the overall system.
Starting in Windows?8.1, apps that render with Direct2D and/or Direct3D (including CoreWindow and XAML interop) must call Trim in response to the PLM suspend callback. The Direct3D runtime and the graphics driver will discard internal memory buffers allocated for the app, reducing its memory footprint.
Calling this method does not change the rendering state of the graphics device and it has no effect on rendering operations. There is a brief performance hit when internal buffers are reallocated during the first rendering operations after the Trim call, therefore apps should only call Trim when going idle for a period of time (in response to PLM suspend, for example).
Apps should ensure that they call Trim as one of the last D3D operations done before going idle. Direct3D will normally defer the destruction of D3D objects. Calling Trim, however, forces Direct3D to destroy objects immediately. For this reason, it is not guaranteed that releasing the final reference on Direct3D objects after calling Trim will cause the object to be destroyed and memory to be deallocated before the app suspends.
Similar to ID3D11DeviceContext::Flush, apps should call ID3D11DeviceContext::ClearState before calling Trim. ClearState clears the Direct3D pipeline bindings, ensuring that Direct3D does not hold any references to the Direct3D objects you are trying to release.
It is also prudent to release references on middleware before calling Trim, as that middleware may also need to release references + to Direct3D objects.
+Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.
+The number of resources in the ppResources argument array.
An array of references to
A
Specifies the
This method returns an
OfferResources1 (an extension of the original IDXGIDevice2::OfferResources API) enables D3D based applications to allow de-committing of an allocation?s backing store to reduce system commit under low memory conditions.
+ A de-committed allocation cannot be reused, so opting in to the new DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT flag means the new reclaim results must be properly handled. Refer to the flag descriptions in
OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources. +
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.
To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to IDXGISwapChain::Present, IDXGISwapChain1::Present1, or ID3D11DeviceContext::Flush.
+Restores access to resources that were previously offered by calling IDXGIDevice4::OfferResources1.
+This method returns an
After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.
To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.
+The number of resources in the ppResources argument array.
An array of references to
A
Specifies the
This method returns an
OfferResources1 (an extension of the original IDXGIDevice2::OfferResources API) enables D3D based applications to allow de-committing of an allocation?s backing store to reduce system commit under low memory conditions.
+ A de-committed allocation cannot be reused, so opting in to the new DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT flag means the new reclaim results must be properly handled. Refer to the flag descriptions in
OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources. +
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.
To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to IDXGISwapChain::Present, IDXGISwapChain1::Present1, or ID3D11DeviceContext::Flush.
+Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.
+The number of resources in the ppResources argument array.
An array of references to
A
Specifies the
This method returns an
OfferResources1 (an extension of the original IDXGIDevice2::OfferResources API) enables D3D based applications to allow de-committing of an allocation?s backing store to reduce system commit under low memory conditions.
+ A de-committed allocation cannot be reused, so opting in to the new DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT flag means the new reclaim results must be properly handled. Refer to the flag descriptions in
OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources. +
The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.
If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.
To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an
The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to IDXGISwapChain::Present, IDXGISwapChain1::Present1, or ID3D11DeviceContext::Flush.
+Restores access to resources that were previously offered by calling IDXGIDevice4::OfferResources1.
+This method returns an
After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.
To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Restores access to resources that were previously offered by calling IDXGIDevice4::OfferResources1.
+This method returns an
After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.
To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an
Retrieves a Boolean value that indicates whether the operating system's stereoscopic 3D display behavior is enabled.
+You pass a Boolean value to the IDXGIDisplayControl::SetStereoEnabled method to either enable or disable the operating system's stereoscopic 3D display behavior. TRUE enables the operating system's stereoscopic 3D display behavior and
Set a Boolean value to either enable or disable the operating system's stereoscopic 3D display behavior.
+Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetStereoEnabled doesn't change stereoscopic 3D display behavior because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Retrieves a Boolean value that indicates whether the operating system's stereoscopic 3D display behavior is enabled.
+IsStereoEnabled returns TRUE when the operating system's stereoscopic 3D display behavior is enabled and
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsStereoEnabled always returns
You pass a Boolean value to the IDXGIDisplayControl::SetStereoEnabled method to either enable or disable the operating system's stereoscopic 3D display behavior. TRUE enables the operating system's stereoscopic 3D display behavior and
Set a Boolean value to either enable or disable the operating system's stereoscopic 3D display behavior.
+A Boolean value that either enables or disables the operating system's stereoscopic 3D display behavior. TRUE enables the operating system's stereoscopic 3D display behavior and
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetStereoEnabled doesn't change stereoscopic 3D display behavior because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
+Gets the flags that were used when a Microsoft DirectX Graphics Infrastructure (DXGI) object was created.
+The GetCreationFlags method returns flags that were passed to the CreateDXGIFactory2 function, or were implicitly constructed by CreateDXGIFactory, CreateDXGIFactory1, D3D11CreateDevice, or D3D11CreateDeviceAndSwapChain.
+Gets the flags that were used when a Microsoft DirectX Graphics Infrastructure (DXGI) object was created.
+The creation flags.
The GetCreationFlags method returns flags that were passed to the CreateDXGIFactory2 function, or were implicitly constructed by CreateDXGIFactory, CreateDXGIFactory1, D3D11CreateDevice, or D3D11CreateDeviceAndSwapChain.
+Used to check for hardware feature support.
+Specifies one member of
Specifies a reference to a buffer that will be filled with data that describes the feature support.
The size, in bytes, of pFeatureSupportData.
This method returns an
Refer to the description of DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING.
+Creates a YUV swap chain for an existing DirectComposition surface handle.
+CreateSwapChainForCompositionSurfaceHandle returns:
Creates a YUV swap chain for an existing DirectComposition surface handle. The swap chain is created with pre-existing buffers and very few descriptive elements are required. Instead, this method requires a DirectComposition surface handle and an
CreateDecodeSwapChainForCompositionSurfaceHandle returns:
The
Flushes all current GPU work for all SurfaceImageSource or VirtualSurfaceImageSource objects associated with the given device.
+If this method succeeds, it returns
The FlushAllSurfacesWithDevice method flushes current GPU work for all SurfaceImageSource objects that were created with device. This GPU work includes Direct2D rendering work and internal GPU work done by the framework associated with rendering. This is useful if an application has created multiple SurfaceImageSource objects and needs to flush the GPU work for all of these surfaces from the background rendering thread. By flushing this work from the background thread the work can be better parallelized, with work being done on the UI thread to improve performance.
You can call the FlushAllSurfacesWithDevice method from a non-UI thread.
+Sets the DXGI device, created with D3D11_CREATE_DEVICE_BGRA_SUPPORT, that will draw the surface. This method must be called from the UI thread.
+Sets the DXGI device, created with D3D11_CREATE_DEVICE_BGRA_SUPPORT, that will draw the surface. This method must be called from the UI thread.
+Pointer to the DXGI device interface.
If this method succeeds, it returns
Opens the supplied DXGI surface for drawing.
+The region of the surface that will be drawn into.
Receives the point (x,y) offset of the surface that will be drawn into.
Receives a reference to the surface for drawing.
If the app window that contains the SurfaceImageSource isn't active, like when it's suspended, calling the BeginDraw method returns an error.
+Closes the surface draw operation.
+If this method succeeds, it returns
Sets the Microsoft DirectX Graphics Infrastructure (DXGI) or Direct2D device, created with D3D11_CREATE_DEVICE_BGRA_SUPPORT, that will draw the surface.
+Sets the Microsoft DirectX Graphics Infrastructure (DXGI) or Direct2D device, created with D3D11_CREATE_DEVICE_BGRA_SUPPORT, that will draw the surface.
+Pointer to the DXGI device interface. You can pass an
This method fails when the SurfaceImageSource is larger than the maximum texture size supported by the Direct3D device. Apps should use VirtualSurfaceImageSource for surfaces larger than the maximum texture size supported by the Direct3D device.
Initiates an update to the associated SurfaceImageSource or VirtualSurfaceImageSource.
+If this method succeeds, it returns
Closes the surface draw operation.
+If this method succeeds, it returns
Always call the EndDraw method on the UI thread in order to synchronize updating the Microsoft DirectX content with the current XAML UI thread frame.
+Suspends the drawing operation.
+If this method succeeds, it returns
Resume the drawing operation.
+If this method succeeds, it returns
Sets the DirectX swap chain for SwapChainBackgroundPanel.
+Sets the DirectX swap chain for SwapChainBackgroundPanel.
+If this method succeeds, it returns
Sets the DirectX swap chain for SwapChainPanel.
+Sets the DirectX swap chain for SwapChainPanel.
+If this method succeeds, it returns
Sets the DirectX swap chain for SwapChainPanel using a handle to the swap chain.
+SetSwapChain(HANDLE swapChainHandle) allows a swap chain to be rendered by referencing a shared handle to the swap chain. This enables scenarios where a swap chain is created in one process and needs to be passed to another process.
XAML supports setting a DXGI swap chain as the content of a SwapChainPanel element. Apps accomplish this by querying for the
This process works for references to in process swap chains. However, this doesn?t work for VoIP apps, which use a two-process model to enable continuing calls on a background process when a foreground process is suspended or shut down. This two-process implementation requires the ability to pass a shared handle to a swap chain, rather than a reference, created on the background process to the foreground process to be rendered in a XAML SwapChainPanel in the foreground app.
<!-- XAML markup --> + <Page> <SwapChainPanel x:Name=?captureStreamDisplayPanel? /> + </Page> // Definitions + ComPtr<+> m_swapChain; + HANDLE m_swapChainHandle; + ComPtr< > m_d3dDevice; + ComPtr< > dxgiAdapter; + ComPtr< > dxgiFactory; + ComPtr< > dxgiFactoryMedia; + ComPtr< > dxgiDevice; + swapChainDesc = {0}; // Get DXGI factory (assume standard boilerplate has created D3D11Device) + m_d3dDevice.As(&dxgiDevice); + dxgiDevice->GetAdapter(&dxgiAdapter); + dxgiAdapter->GetParent(__uuidof( ), &dxgiFactory); // Create swap chain and get handle + DCompositionCreateSurfaceHandle(GENERIC_ALL, nullptr, &m_swapChainHandle); + dxgiFactory.As(&dxgiFactoryMedia); + dxgiFactoryMedia->CreateSwapChainForCompositionSurfaceHandle( m_d3dDevice.Get(), m_swapChainHandle, &swapChainDesc, nullptr, &m_swapChain + ); // Set swap chain to display in a SwapChainPanel + ComPtr< > panelNative; + reinterpret_cast< *>(captureStreamDisplayPanel)->QueryInterface(IID_PPV_ARGS(&panelNative))); + panelNative->SetSwapChainHandle(m_swapChainHandle);
Sets the DirectX swap chain for SwapChainPanel using a handle to the swap chain.
+If this method succeeds, it returns
SetSwapChain(HANDLE swapChainHandle) allows a swap chain to be rendered by referencing a shared handle to the swap chain. This enables scenarios where a swap chain is created in one process and needs to be passed to another process.
XAML supports setting a DXGI swap chain as the content of a SwapChainPanel element. Apps accomplish this by querying for the
This process works for references to in process swap chains. However, this doesn?t work for VoIP apps, which use a two-process model to enable continuing calls on a background process when a foreground process is suspended or shut down. This two-process implementation requires the ability to pass a shared handle to a swap chain, rather than a reference, created on the background process to the foreground process to be rendered in a XAML SwapChainPanel in the foreground app.
<!-- XAML markup --> + <Page> <SwapChainPanel x:Name=?captureStreamDisplayPanel? /> + </Page> // Definitions + ComPtr<+> m_swapChain; + HANDLE m_swapChainHandle; + ComPtr< > m_d3dDevice; + ComPtr< > dxgiAdapter; + ComPtr< > dxgiFactory; + ComPtr< > dxgiFactoryMedia; + ComPtr< > dxgiDevice; + swapChainDesc = {0}; // Get DXGI factory (assume standard boilerplate has created D3D11Device) + m_d3dDevice.As(&dxgiDevice); + dxgiDevice->GetAdapter(&dxgiAdapter); + dxgiAdapter->GetParent(__uuidof( ), &dxgiFactory); // Create swap chain and get handle + DCompositionCreateSurfaceHandle(GENERIC_ALL, nullptr, &m_swapChainHandle); + dxgiFactory.As(&dxgiFactoryMedia); + dxgiFactoryMedia->CreateSwapChainForCompositionSurfaceHandle( m_d3dDevice.Get(), m_swapChainHandle, &swapChainDesc, nullptr, &m_swapChain + ); // Set swap chain to display in a SwapChainPanel + ComPtr< > panelNative; + reinterpret_cast< *>(captureStreamDisplayPanel)->QueryInterface(IID_PPV_ARGS(&panelNative))); + panelNative->SetSwapChainHandle(m_swapChainHandle);
Using a key, acquires exclusive rendering access to a shared resource.
+A value that indicates which device to give access to. This method will succeed when the device that currently owns the surface calls the IDXGIKeyedMutex::ReleaseSync method using the same value. This value can be any UINT64 value.
The time-out interval, in milliseconds. This method will return if the interval elapses, and the keyed mutex has not been released using the specified Key. If this value is set to zero, the AcquireSync method will test to see if the keyed mutex has been released and returns immediately. If this value is set to INFINITE, the time-out interval will never elapse.
Return
If the owning device attempted to create another keyed mutex on the same shared resource, AcquireSync returns E_FAIL.
AcquireSync can also return the following
The AcquireSync method creates a lock to a surface that is shared between multiple devices, allowing only one device to render to a surface at a time. This method uses a key to determine which device currently has exclusive access to the surface.
When a surface is created using the D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX value of the D3D10_RESOURCE_MISC_FLAG enumeration, you must call the AcquireSync method before rendering to the surface. You must call the ReleaseSync method when you are done rendering to a surface.
To acquire a reference to the keyed mutex object of a shared resource, call the QueryInterface method of the resource and pass in the UUID of the
The AcquireSync method uses the key as follows, depending on the state of the surface:
Using a key, releases exclusive rendering access to a shared resource.
+A value that indicates which device to give access to. This method succeeds when the device that currently owns the surface calls the ReleaseSync method using the same value. This value can be any UINT64 value.
Returns
If the device attempted to release a keyed mutex that is not valid or owned by the device, ReleaseSync returns E_FAIL.
The ReleaseSync method releases a lock to a surface that is shared between multiple devices. This method uses a key to determine which device currently has exclusive access to the surface.
When a surface is created using the D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX value of the D3D10_RESOURCE_MISC_FLAG enumeration, you must call the IDXGIKeyedMutex::AcquireSync method before rendering to the surface. You must call the ReleaseSync method when you are done rendering to a surface.
After you call the ReleaseSync method, the shared resource is unset from the rendering pipeline.
To acquire a reference to the keyed mutex object of a shared resource, call the QueryInterface method of the resource and pass in the UUID of the
Checks for overlay support.
+A
A reference to the Direct3D device interface. CheckOverlaySupport returns only support info about this scan-out device.
A reference to a variable that receives a combination of
Checks for overlay color space support.
+A
A
A reference to the Direct3D device interface. CheckOverlayColorSpaceSupport returns only support info about this scan-out device.
A reference to a variable that receives a combination of
Allows specifying a list of supported formats for fullscreen surfaces that can be returned by the
This method allows directly receiving the original back buffer format used by a running fullscreen application. For comparison, using the original DuplicateOutput function always converts the fullscreen surface to a 32-bit BGRA format. In cases where the current fullscreen application is using a different buffer format, a conversion to 32-bit BGRA incurs a performance penalty. Besides the performance benefit of being able to skip format conversion, using DuplicateOutput1 also allows receiving the full gamut of colors in cases where a high-color format (such as R10G10B10A2) is being presented.
The pSupportedFormats array should only contain display scan-out formats. See Format Support for Direct3D Feature Level 11.0 Hardware for required scan-out formats at each feature level. If the current fullscreen buffer format is not contained in the pSupportedFormats array, DXGI will pick one of the supplied formats and convert the fullscreen buffer to that format before returning from IDXGIOutputDuplication::AcquireNextFrame. The list of supported formats should always contain DXGI_FORMAT_B8G8R8A8_UNORM, as this is the most common format for the desktop. +
+[Starting with Direct3D 11.1, we recommend not to use GetSharedHandle anymore to retrieve the handle to a shared resource. Instead, use IDXGIResource1::CreateSharedHandle to get a handle for sharing. To use IDXGIResource1::CreateSharedHandle, you must create the resource as shared and specify that it uses NT handles (that is, you set the D3D11_RESOURCE_MISC_SHARED_NTHANDLE flag). We also recommend that you create shared resources that use NT handles so you can use CloseHandle, DuplicateHandle, and so on on those shared resources.]
Gets the handle to a shared resource.
+GetSharedHandle returns a handle for the resource that you created as shared (that is, you set the D3D11_RESOURCE_MISC_SHARED with or without the D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag). You can pass this handle to the ID3D11Device::OpenSharedResource method to give another device access to the shared resource. You can also marshal this handle to another process to share a resource with a device in another process. However, this handle is not an NT handle. Therefore, don't use the handle with CloseHandle, DuplicateHandle, and so on.
The creator of a shared resource must not destroy the resource until all intended entities have opened the resource. The validity of the handle is tied to the lifetime of the underlying video memory. If no resource objects exist on any devices that refer to this resource, the handle is no longer valid. To extend the lifetime of the handle and video memory, you must open the shared resource on a device.
GetSharedHandle can also return handles for resources that were passed into ID3D11Device::OpenSharedResource to open those resources.
GetSharedHandle fails if the resource to which it wants to get a handle is not shared.
+Get or sets the eviction priority.
+The eviction priority is a memory-management variable that is used by DXGI to determine how to manage overcommitted memory.
Priority levels other than the defined values are used when appropriate. For example, a resource with a priority level of 0x78000001 indicates that the resource is slightly above normal.
+[Starting with Direct3D 11.1, we recommend not to use GetSharedHandle anymore to retrieve the handle to a shared resource. Instead, use IDXGIResource1::CreateSharedHandle to get a handle for sharing. To use IDXGIResource1::CreateSharedHandle, you must create the resource as shared and specify that it uses NT handles (that is, you set the D3D11_RESOURCE_MISC_SHARED_NTHANDLE flag). We also recommend that you create shared resources that use NT handles so you can use CloseHandle, DuplicateHandle, and so on on those shared resources.]
Gets the handle to a shared resource.
+Returns one of the DXGI_ERROR values.
GetSharedHandle returns a handle for the resource that you created as shared (that is, you set the D3D11_RESOURCE_MISC_SHARED with or without the D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag). You can pass this handle to the ID3D11Device::OpenSharedResource method to give another device access to the shared resource. You can also marshal this handle to another process to share a resource with a device in another process. However, this handle is not an NT handle. Therefore, don't use the handle with CloseHandle, DuplicateHandle, and so on.
The creator of a shared resource must not destroy the resource until all intended entities have opened the resource. The validity of the handle is tied to the lifetime of the underlying video memory. If no resource objects exist on any devices that refer to this resource, the handle is no longer valid. To extend the lifetime of the handle and video memory, you must open the shared resource on a device.
GetSharedHandle can also return handles for resources that were passed into ID3D11Device::OpenSharedResource to open those resources.
GetSharedHandle fails if the resource to which it wants to get a handle is not shared.
+Get the expected resource usage.
+A reference to a usage flag (see DXGI_USAGE). For Direct3D 10, a surface can be used as a shader input or a render-target output.
Returns one of the following DXGI_ERROR.
Set the priority for evicting the resource from memory.
+The priority is one of the following values:
| Value | Meaning |
|---|---|
| The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies. |
| The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory. |
| The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. |
| The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource. |
| The resource is evicted from memory only if there is no other way of resolving the memory requirement. |
?
Returns one of the following DXGI_ERROR.
The eviction priority is a memory-management variable that is used by DXGI for determining how to populate overcommitted memory.
You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.
+Get the eviction priority.
+A reference to the eviction priority, which determines when a resource can be evicted from memory.
The following defined values are possible.
| Value | Meaning |
|---|---|
| The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies. |
| The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory. |
| The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. |
| The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource. |
| The resource is evicted from memory only if there is no other way of resolving the memory requirement. |
?
Returns one of the following DXGI_ERROR.
The eviction priority is a memory-management variable that is used by DXGI to determine how to manage overcommitted memory.
Priority levels other than the defined values are used when appropriate. For example, a resource with a priority level of 0x78000001 indicates that the resource is slightly above normal.
+Gets the index of the swap chain's current back buffer.
+Sets the color space used by the swap chain.
+Gets the index of the swap chain's current back buffer.
+Returns the index of the current back buffer.
Checks the swap chain's support for color space.
+A
A reference to a variable that receives a combination of
Sets the color space used by the swap chain.
+A
This method returns
Changes the swap chain's back buffer size, format, and number of buffers, where the swap chain was created using a D3D12 command queue as an input device. This should be called when the application window is resized.
+The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.
The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the IDXGIFactory2::CreateSwapChainForComposition method to create the swap chain for a composition surface.
The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the IDXGIFactory2::CreateSwapChainForComposition method to create the swap chain for a composition surface.
A
A combination of
An array of UINTs, of total size BufferCount, where the value indicates which node the back buffer should be created on. Buffers created using ResizeBuffers1 with a non-null pCreationNodeMask array are visible to all nodes.
An array of command queues (
Returns
This method is only valid to call when the swapchain was created using a D3D12 command queue (
When a swapchain is created on a multi-GPU adapter, the backbuffers are all created on node 1 and only a single command queue is supported. ResizeBuffers1 enables applications to create backbuffers on different nodes, allowing a different command queue to be used with each node. These capabilities enable Alternate Frame Rendering (AFR) techniques to be used with the swapchain. See Direct3D 12 Multi-Adapters.
The only difference between IDXGISwapChain::ResizeBuffers in Windows?8 versus Windows?7 is with flip presentation model swap chains that you create with the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL or DXGI_SWAP_EFFECT_FLIP_DISCARD value set. In Windows?8, you must call ResizeBuffers to realize a transition between full-screen mode and windowed mode; otherwise, your next call to the IDXGISwapChain::Present method fails.
Also see the Remarks section in IDXGISwapChain::ResizeBuffers, all of which is relevant to ResizeBuffers1.
+This method sets High Dynamic Range (HDR) and Wide Color Gamut (WCG) header metadata.
+Specifies one member of the
Specifies the size of pMetaData, in bytes.
Specifies a void reference that references the metadata, if it exists. Refer to the
This method returns an
This method sets metadata to enable a monitor's output to be adjusted depending on its capabilities.
+Queries the system for a
Requests a custom presentation duration (custom refresh rate).
+Queries the system for a
This method returns
Requests a custom presentation duration (custom refresh rate).
+The custom presentation duration, specified in hundreds of nanoseconds.
This method returns
Queries the graphics driver for a supported frame present duration corresponding to a custom refresh rate.
+Indicates the frame duration to check. This value is the duration of one frame at the desired refresh rate, specified in hundreds of nanoseconds. For example, set this field to 167777 to check for 60 Hz refresh rate support.
A variable that will be set to the closest supported frame present duration that's smaller than the requested value, or zero if the device does not support any lower duration.
A variable that will be set to the closest supported frame present duration that's larger than the requested value, or zero if the device does not support any higher duration.
This method returns
If the DXGI output adapter does not support custom refresh rates (for example, an external display) then the display driver will set upper and lower bounds to (0, 0).
+Describes an adapter (or video card) by using DXGI 1.0.
+The
A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc returns ?Software Adapter? for the description string.
The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware vendor.
The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware device.
The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the sub system.
The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the revision number of the adapter.
The number of bytes of dedicated video memory that are not shared with the CPU.
The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.
The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.
A unique value that identifies the adapter. See
Describes an adapter (or video card) using DXGI 1.1.
+The
A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc1 returns ?Software Adapter? for the description string.
The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the hardware vendor.
The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the hardware device.
The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the sub system.
The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the revision number of the adapter.
The number of bytes of dedicated video memory that are not shared with the CPU.
The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.
The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.
A unique value that identifies the adapter. See
A value of the
Describes an adapter (or video card) that uses Microsoft DirectX Graphics Infrastructure (DXGI) 1.2.
+The
A string that contains the adapter description.
The PCI ID of the hardware vendor.
The PCI ID of the hardware device.
The PCI ID of the sub system.
The PCI ID of the revision number of the adapter.
The number of bytes of dedicated video memory that are not shared with the CPU.
The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.
The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.
A unique value that identifies the adapter. See
A value of the
A value of the
A value of the
Describes an adapter (or video card) by using DXGI 1.0.
+The
A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc returns ?Software Adapter? for the description string.
The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware vendor.
The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware device.
The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the sub system.
The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the revision number of the adapter.
The number of bytes of dedicated video memory that are not shared with the CPU.
The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.
The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.
A unique value that identifies the adapter. See
Used with
Describes timing and presentation statistics for a frame.
+You initialize the
You can only use IDXGISwapChain::GetFrameStatistics for swap chains that either use the flip presentation model or draw in full-screen mode. You set the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value in the SwapEffect member of the
The values in the PresentCount and PresentRefreshCount members indicate information about when a frame was presented on the display screen. You can use these values to determine whether a glitch occurred. The values in the SyncRefreshCount and SyncQPCTime members indicate timing information that you can use for audio and video synchronization or very precise animation. If the swap chain draws in full-screen mode, these values are based on when the computer booted. + If the swap chain draws in windowed mode, these values are based on when the swap chain is created.
+A value that represents the running total count of times that an image was presented to the monitor since the computer booted.
Note??The number of times that an image was presented to the monitor is not necessarily the same as the number of times that you called IDXGISwapChain::Present or IDXGISwapChain1::Present1. ?A value that represents the running total count of v-blanks at which the last image was presented to the monitor and that have happened since the computer booted (for windowed mode, since the swap chain was created).
A value that represents the running total count of v-blanks when the scheduler last sampled the machine time by calling QueryPerformanceCounter and that have happened since the computer booted (for windowed mode, since the swap chain was created).
A value that represents the high-resolution performance counter timer. This value is the same as the value returned by the QueryPerformanceCounter function.
Reserved. Always returns 0.
Used to verify system approval for the app's custom present duration (custom refresh rate). Approval should be continuously verified on a frame-by-frame basis.
+This structure is used with the GetFrameStatisticsMedia method.
+A value that represents the running total count of times that an image was presented to the monitor since the computer booted.
Note??The number of times that an image was presented to the monitor is not necessarily the same as the number of times that you called IDXGISwapChain::Present or IDXGISwapChain1::Present1. ?A value that represents the running total count of v-blanks at which the last image was presented to the monitor and that have happened since the computer booted (for windowed mode, since the swap chain was created).
A value that represents the running total count of v-blanks when the scheduler last sampled the machine time by calling QueryPerformanceCounter and that have happened since the computer booted (for windowed mode, since the swap chain was created).
A value that represents the high-resolution performance counter timer. This value is the same as the value returned by the QueryPerformanceCounter function.
Reserved. Always returns 0.
A value indicating the composition presentation mode. This value is used to determine whether the app should continue to use the decode swap chain. See
If the system approves an app's custom present duration request, this field is set to the approved custom present duration.
If the app's custom present duration request is not approved, this field is set to zero.
Controls the settings of a gamma curve.
+The
For info about using gamma correction, see Using gamma correction.
+A
A
An array of
Controls the gamma capabilities of an adapter.
+To get a list of the capabilities for controlling gamma correction, call IDXGIOutput::GetGammaControlCapabilities.
For info about using gamma correction, see Using gamma correction.
+True if scaling and offset operations are supported during gamma correction; otherwise, false.
A value describing the maximum range of the control-point positions.
A value describing the minimum range of the control-point positions.
A value describing the number of control points in the array.
An array of values describing control points; the maximum length of control points is 1025.
Describes the 10 bit display metadata, and is usually used for video. This is used to adjust the output to best match a display's capabilities.
+The X and Y coordinates of the parameters mean the xy chromacity coordinate in the CIE1931 color space. The values are normalized to 50000, so to get a value between 0.0 and 1.0, divide by 50000.
This structure is used in conjunction with the SetHDRMetaData method.
+The chromaticity coordinates of the 1.0 red value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.
The chromaticity coordinates of the 1.0 green value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.
The chromaticity coordinates of the 1.0 blue value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.
The chromaticity coordinates of the white point. Index 0 contains the X coordinate and index 1 contains the Y coordinate.
The maximum number of nits of the display used to master the content. Units are 0.0001 nit, so if the value is 1 nit, the value should be 10,000.
The minimum number of nits (in units of 0.00001 nit) of the display used to master the content.
The maximum nit value (in units of 0.00001 nit) used anywhere in the content.
The per-frame average of the maximum nit values (in units of 0.00001 nit).
Describes a debug message filter, which contains lists of message types to allow and deny.
+Use with an
A
A
Describes the types of messages to allow or deny to pass through a filter.
+This structure is a member of the
This API requires the Windows Software Development Kit (SDK) for Windows?8.
+The number of message categories to allow or deny.
An array of
The number of message severity levels to allow or deny.
An array of
The number of message IDs to allow or deny.
An array of integers that represent the message IDs to allow or deny. The array must have at least NumIDs number of elements.
Describes a debug message in the information queue.
+IDXGIInfoQueue::GetMessage returns a reference to this structure.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +A DXGI_DEBUG_ID value that identifies the entity that produced the message.
A
A
An integer that uniquely identifies the message.
The message string.
The length of the message string at pDescription, in bytes.
Describes a JPEG AC huffman table.
+The number of codes for each code length.
The Huffman code values, in order of increasing code length.
Describes a JPEG DC huffman table.
+The number of codes for each code length.
The Huffman code values, in order of increasing code length.
Describes a JPEG quantization table.
+An array of bytes containing the elements of the quantization table.
Describes a mapped rectangle that is used to access a surface.
+The
A value that describes the width, in bytes, of the surface.
A reference to the image buffer of the surface.
Describes a display mode and whether the display mode supports stereo.
+This structure is used by the GetDisplayModeList1 and FindClosestMatchingMode1 methods.
+A value that describes the resolution width.
A value that describes the resolution height.
A
A
A
A
Specifies whether the full-screen display mode is stereo. TRUE if stereo; otherwise,
Describes an output or physical connection between the adapter (video card) and a device.
+The
A string that contains the name of the output device.
A
True if the output is attached to the desktop; otherwise, false.
A member of the
An
Describes an output or physical connection between the adapter (video card) and a device.
+The
A string that contains the name of the output device.
A
True if the output is attached to the desktop; otherwise, false.
A member of the
An
The
This structure is used by GetDesc.
+The
A non-zero LastMouseUpdateTime indicates an update to either a mouse reference position or a mouse reference position and shape. That is, the mouse reference position is always valid for a non-zero LastMouseUpdateTime; however, the application must check the value of the PointerShapeBufferSize member to determine whether the shape was updated too.
If only the reference was updated (that is, the desktop image was not updated), the AccumulatedFrames, TotalMetadataBufferSize, and LastPresentTime members are set to zero.
An AccumulatedFrames value of one indicates that the application completed processing the last frame before a new desktop image was presented. If the AccumulatedFrames value is greater than one, more desktop image updates have occurred while the application processed the last desktop update. In this situation, the operating system accumulated the update regions. For more information about desktop updates, see Desktop Update Data.
A non-zero TotalMetadataBufferSize indicates the total size of the buffers that are required to store all the desktop update metadata. An application cannot determine the size of each type of metadata. The application must call the IDXGIOutputDuplication::GetFrameDirtyRects, IDXGIOutputDuplication::GetFrameMoveRects, or IDXGIOutputDuplication::GetFramePointerShape method to obtain information about each type of metadata.
Note??To correct visual effects, an application must process the move region data before it processes the dirty rectangles.? +The time stamp of the last update of the desktop image. The operating system calls the QueryPerformanceCounter function to obtain the value. A zero value indicates that the desktop image was not updated since an application last called the IDXGIOutputDuplication::AcquireNextFrame method to acquire the next frame of the desktop image.
The time stamp of the last update to the mouse. The operating system calls the QueryPerformanceCounter function to obtain the value. A zero value indicates that the position or shape of the mouse was not updated since an application last called the IDXGIOutputDuplication::AcquireNextFrame method to acquire the next frame of the desktop image. The mouse position is always supplied for a mouse update. A new reference shape is indicated by a non-zero value in the PointerShapeBufferSize member.
The number of frames that the operating system accumulated in the desktop image surface since the calling application processed the last desktop image. For more information about this number, see Remarks.
Specifies whether the operating system accumulated updates by coalescing dirty regions. Therefore, the dirty regions might contain unmodified pixels. TRUE if dirty regions were accumulated; otherwise,
Specifies whether the desktop image might contain protected content that was already blacked out in the desktop image. TRUE if protected content was already blacked; otherwise,
A
Size in bytes of the buffers to store all the desktop update metadata for this frame. For more information about this size, see Remarks.
Size in bytes of the buffer to hold the new pixel data for the mouse shape. For more information about this size, see Remarks.
The
This structure is used by GetFrameMoveRects.
+The starting position of a rectangle.
The target region to which to move a rectangle.
The
The Position member is valid only if the Visible member?s value is set to TRUE.
+The position of the hardware cursor relative to the top-left of the adapter output.
Specifies whether the hardware cursor is visible. TRUE if visible; otherwise,
The
An application draws the cursor shape with the top-left-hand corner drawn at the position that the Position member of the
An application calls the IDXGIOutputDuplication::GetFramePointerShape method to retrieve cursor shape information in a
A
The width in pixels of the mouse cursor.
The height in scan lines of the mouse cursor.
The width in bytes of the mouse cursor.
The position of the cursor's hot spot relative to its upper-left pixel. An application does not use the hot spot when it determines where to draw the cursor shape.
Describes the current video memory budgeting parameters.
+Use this structure with QueryVideoMemoryInfo.
Refer to the remarks for
Specifies the OS-provided video memory budget, in bytes, that the application should target. If CurrentUsage is greater than Budget, the application may incur stuttering or performance penalties due to background activity by the OS to provide other applications with a fair usage of video memory.
Specifies the application?s current video memory usage, in bytes.
The amount of video memory, in bytes, that the application has available for reservation. To reserve this video memory, the application should call IDXGIAdapter3::SetVideoMemoryReservation.
The amount of video memory, in bytes, that is reserved by the application. The OS uses the reservation as a hint to determine the application?s minimum working set. Applications should attempt to ensure that their video memory usage can be trimmed to meet this requirement.
Represents a handle to a shared resource.
+To create a shared surface, pass a shared-resource handle into the IDXGIDevice::CreateSurface method.
+A handle to a shared resource.
Describes a surface.
+This structure is used by the GetDesc and CreateSurface methods.
+A value describing the surface width.
A value describing the surface height.
A member of the
A member of the
Describes a swap chain.
+This structure is used by the GetDesc and CreateSwapChain methods.
In full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.
If you create a swap chain with one buffer, specifying DXGI_SWAP_EFFECT_SEQUENTIAL does not cause the contents of the single buffer to be swapped with the front buffer.
For performance information about flipping swap-chain buffers in full-screen application, see Full-Screen Application Performance Hints.
+A
A
A member of the DXGI_USAGE enumerated type that describes the surface usage and CPU access options for the back buffer. The back buffer can be used for shader input or render-target output.
A value that describes the number of buffers in the swap chain. When you call IDXGIFactory::CreateSwapChain to create a full-screen swap chain, you typically include the front buffer in this value. For more information about swap-chain buffers, see Remarks.
An
A Boolean value that specifies whether the output is in windowed mode. TRUE if the output is in windowed mode; otherwise,
We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through IDXGISwapChain::SetFullscreenState; that is, do not set this member to
For more information about choosing windowed verses full screen, see IDXGIFactory::CreateSwapChain.
A member of the
A member of the
Describes a swap chain.
+This structure is used by the CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, CreateSwapChainForComposition, CreateSwapChainForCompositionSurfaceHandle, and GetDesc1 methods.
Note??You cannot cast aIn full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.
For a flip-model swap chain (that is, a swap chain that has the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value set in the SwapEffect member), you must set the Format member to DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_B8G8R8A8_UNORM, or DXGI_FORMAT_R8G8B8A8_UNORM; you must set the Count member of the
A value that describes the resolution width. If you specify the width as zero when you call the IDXGIFactory2::CreateSwapChainForHwnd method to create a swap chain, the runtime obtains the width from the output window and assigns this width value to the swap-chain description. You can subsequently call the IDXGISwapChain1::GetDesc1 method to retrieve the assigned width value. You cannot specify the width as zero when you call the IDXGIFactory2::CreateSwapChainForComposition method.
A value that describes the resolution height. If you specify the height as zero when you call the IDXGIFactory2::CreateSwapChainForHwnd method to create a swap chain, the runtime obtains the height from the output window and assigns this height value to the swap-chain description. You can subsequently call the IDXGISwapChain1::GetDesc1 method to retrieve the assigned height value. You cannot specify the height as zero when you call the IDXGIFactory2::CreateSwapChainForComposition method.
A
Specifies whether the full-screen display mode or the swap-chain back buffer is stereo. TRUE if stereo; otherwise,
A
A DXGI_USAGE-typed value that describes the surface usage and CPU access options for the back buffer. The back buffer can be used for shader input or render-target output.
A value that describes the number of buffers in the swap chain. When you create a full-screen swap chain, you typically include the front buffer in this value.
A
A
A
A combination of
Describes full-screen mode for a swap chain.
+This structure is used by the CreateSwapChainForHwnd and GetFullscreenDesc methods.
+A
A member of the
A member of the
A Boolean value that specifies whether the swap chain is in windowed mode. TRUE if the swap chain is in windowed mode; otherwise,
Gets the description for blending state that you used to create the blend-state object.
+You use the description for blending state in a call to the ID3D11Device::CreateBlendState method to create the blend-state object.
+Gets the description for blending state that you used to create the blend-state object.
+A reference to a
You use the description for blending state in a call to the ID3D11Device::CreateBlendState method to create the blend-state object.
+Gets the description for blending state that you used to create the blend-state object.
+You use the description for blending state in a call to the ID3D11Device1::CreateBlendState1 method to create the blend-state object.
+Gets the description for blending state that you used to create the blend-state object.
+A reference to a
You use the description for blending state in a call to the ID3D11Device1::CreateBlendState1 method to create the blend-state object.
+Describes the blend state that you use in a call to ID3D11Device::CreateBlendState to create a blend-state object.
+Here are the default values for blend state.
| State | Default Value |
|---|---|
| AlphaToCoverageEnable | |
| IndependentBlendEnable | |
| RenderTarget[0].BlendEnable | |
| RenderTarget[0].SrcBlend | D3D11_BLEND_ONE |
| RenderTarget[0].DestBlend | D3D11_BLEND_ZERO |
| RenderTarget[0].BlendOp | D3D11_BLEND_OP_ADD |
| RenderTarget[0].SrcBlendAlpha | D3D11_BLEND_ONE |
| RenderTarget[0].DestBlendAlpha | D3D11_BLEND_ZERO |
| RenderTarget[0].BlendOpAlpha | D3D11_BLEND_OP_ADD |
| RenderTarget[0].RenderTargetWriteMask | D3D11_COLOR_WRITE_ENABLE_ALL |
?
Note??If the driver type is set to D3D_DRIVER_TYPE_HARDWARE, the feature level is set to less than or equal to D3D_FEATURE_LEVEL_9_3, and the pixel format of the render target is set to DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, or DXGI_FORMAT_B8G8R8X8_UNORM_SRGB, the display device performs the blend in standard RGB (sRGB) space and not in linear space. However, if the feature level is set to greater than D3D_FEATURE_LEVEL_9_3, the display device performs the blend in linear space, which is ideal.
+Describes the blend state that you use in a call to ID3D11Device1::CreateBlendState1 to create a blend-state object.
+Here are the default values for blend state.
| State | Default Value |
|---|---|
| AlphaToCoverageEnable | |
| IndependentBlendEnable | |
| RenderTarget[0].BlendEnable | |
| RenderTarget[0].LogicOpEnable | |
| RenderTarget[0].SrcBlend | D3D11_BLEND_ONE |
| RenderTarget[0].DestBlend | D3D11_BLEND_ZERO |
| RenderTarget[0].BlendOp | D3D11_BLEND_OP_ADD |
| RenderTarget[0].SrcBlendAlpha | D3D11_BLEND_ONE |
| RenderTarget[0].DestBlendAlpha | D3D11_BLEND_ZERO |
| RenderTarget[0].BlendOpAlpha | D3D11_BLEND_OP_ADD |
| RenderTarget[0].LogicOp | D3D11_LOGIC_OP_NOOP |
| RenderTarget[0].RenderTargetWriteMask | D3D11_COLOR_WRITE_ENABLE_ALL |
?
If the driver type is set to D3D_DRIVER_TYPE_HARDWARE, the feature level is set to less than or equal to D3D_FEATURE_LEVEL_9_3, and the pixel format of the render target is set to DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, or DXGI_FORMAT_B8G8R8X8_UNORM_SRGB, the display device performs the blend in standard RGB (sRGB) space and not in linear space. However, if the feature level is set to greater than D3D_FEATURE_LEVEL_9_3, the display device performs the blend in linear space, which is ideal.
When you set the LogicOpEnable member of the first element of the RenderTarget array (RenderTarget[0]) to TRUE, you must also set the BlendEnable member of RenderTarget[0] to
Get the properties of a buffer resource.
+Get the properties of a buffer resource.
+Pointer to a resource description (see
Describes a buffer resource.
+This structure is used by ID3D11Device::CreateBuffer to create buffer resources.
In addition to this structure, you can also use the CD3D11_BUFFER_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, to help create a buffer description.
If the bind flag is D3D11_BIND_CONSTANT_BUFFER, you must set the ByteWidth value in multiples of 16, and less than or equal to D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT.
+Size of the buffer in bytes.
Identify how the buffer is expected to be read from and written to. Frequency of update is a key factor. The most common value is typically D3D11_USAGE_DEFAULT; see
Identify how the buffer will be bound to the pipeline. Flags (see
CPU access flags (see
Miscellaneous flags (see
The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer. For more info about structured buffers, see Structured Buffer.
The size value in StructureByteStride must match the size of the format that you use for views of the buffer. For example, if you use a shader resource view (SRV) to read a buffer in a pixel shader, the SRV format size must match the size value in StructureByteStride.
Gets the
For more information about using the
Windows?Phone?8: This API is supported.
+Gets a description of the current HLSL class.
+ For more information about using the
An instance is not restricted to being used for a single type in a single shader. An instance is flexible and can be used for any shader that used the same type name or instance name when the instance was generated.
An instance does not replace the importance of reflection for a particular shader since a gotten instance will not know its slot location and a created instance only specifies a type name.
Windows?Phone?8: This API is supported.
+ Gets the
For more information about using the
Windows?Phone?8: This API is supported.
+Gets a description of the current HLSL class.
+ A reference to a
For more information about using the
An instance is not restricted to being used for a single type in a single shader. An instance is flexible and can be used for any shader that used the same type name or instance name when the instance was generated.
An instance does not replace the importance of reflection for a particular shader since a gotten instance will not know its slot location and a created instance only specifies a type name.
Windows?Phone?8: This API is supported.
+Gets the instance name of the current HLSL class.
+The instance name of the current HLSL class.
The length of the pInstanceName parameter.
GetInstanceName will return a valid name only for instances acquired using ID3D11ClassLinkage::GetClassInstance.
For more information about using the
Windows?Phone?8: This API is supported.
+Gets the type of the current HLSL class.
+Type of the current HLSL class.
The length of the pTypeName parameter.
GetTypeName will return a valid name only for instances acquired using ID3D11ClassLinkage::GetClassInstance.
For more information about using the
Windows?Phone?8: This API is supported.
+Gets the class-instance object that represents the specified HLSL class.
+The name of a class for which to get the class instance.
The index of the class instance.
The address of a reference to an
For more information about using the
A class instance must have at least 1 data member in order to be available for the runtime to use with ID3D11ClassLinkage::GetClassInstance. Any instance with no members will be optimized out of a compiled shader blob as a zero-sized object. If you have a class with no data members, use ID3D11ClassLinkage::CreateClassInstance instead.
Windows?Phone?8: This API is supported.
+Initializes a class-instance object that represents an HLSL class instance.
+The type name of a class to initialize.
Identifies the constant buffer that contains the class data.
The four-component vector offset from the start of the constant buffer where the class data will begin. Consequently, this is not a byte offset.
The texture slot for the first texture; there may be multiple textures following the offset.
The sampler slot for the first sampler; there may be multiple samplers following the offset.
The address of a reference to an
Returns
Instances can be created (or gotten) before or after a shader is created. Use the same shader linkage object to acquire a class instance and create the shader the instance is going to be used in.
For more information about using the
Windows?Phone?8: This API is supported.
+Get a counter description.
+Get a counter description.
+Pointer to a counter description (see
Gets the description for depth-stencil state that you used to create the depth-stencil-state object.
+You use the description for depth-stencil state in a call to the ID3D11Device::CreateDepthStencilState method to create the depth-stencil-state object.
+Gets the description for depth-stencil state that you used to create the depth-stencil-state object.
+A reference to a
You use the description for depth-stencil state in a call to the ID3D11Device::CreateDepthStencilState method to create the depth-stencil-state object.
+Describes depth-stencil state.
+Pass a reference to
Depth-stencil state controls how depth-stencil testing is performed by the output-merger stage.
The following table shows the default values of depth-stencil states.
| State | Default Value |
|---|---|
| DepthEnable | TRUE |
| DepthWriteMask | D3D11_DEPTH_WRITE_MASK_ALL |
| DepthFunc | D3D11_COMPARISON_LESS |
| StencilEnable | |
| StencilReadMask | D3D11_DEFAULT_STENCIL_READ_MASK |
| StencilWriteMask | D3D11_DEFAULT_STENCIL_WRITE_MASK |
| FrontFace.StencilFunc and BackFace.StencilFunc | D3D11_COMPARISON_ALWAYS |
| FrontFace.StencilDepthFailOp and BackFace.StencilDepthFailOp | D3D11_STENCIL_OP_KEEP |
| FrontFace.StencilPassOp and BackFace.StencilPassOp | D3D11_STENCIL_OP_KEEP |
| FrontFace.StencilFailOp and BackFace.StencilFailOp | D3D11_STENCIL_OP_KEEP |
?
The formats that support stenciling are DXGI_FORMAT_D24_UNORM_S8_UINT and DXGI_FORMAT_D32_FLOAT_S8X24_UINT.
+Enable depth testing.
Identify a portion of the depth-stencil buffer that can be modified by depth data (see
A function that compares depth data against existing depth data. The function options are listed in
Enable stencil testing.
Identify a portion of the depth-stencil buffer for reading stencil data.
Identify a portion of the depth-stencil buffer for writing stencil data.
Identify how to use the results of the depth test and the stencil test for pixels whose surface normal is facing towards the camera (see
Identify how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera (see
A depth-stencil-view interface accesses a texture resource during depth-stencil testing.
+To create a depth-stencil view, call ID3D11Device::CreateDepthStencilView.
To bind a depth-stencil view to the pipeline, call ID3D11DeviceContext::OMSetRenderTargets.
+A depth-stencil-view interface accesses a texture resource during depth-stencil testing.
+To create a depth-stencil view, call ID3D11Device::CreateDepthStencilView.
To bind a depth-stencil view to the pipeline, call ID3D11DeviceContext::OMSetRenderTargets.
+ IDXGIResource* pOtherResource(NULL);
+ hr = pOtherDeviceResource->QueryInterface( __uuidof(IDXGIResource), (void**)&pOtherResource );
+ HANDLE sharedHandle;
+ pOtherResource->GetSharedHandle(&sharedHandle);
+ The only resources that can be shared are 2D non-mipmapped textures. To share a resource between a Direct3D 9 device and a Direct3D 10 device the texture must have been created using the pSharedHandle argument of {{CreateTexture}}. The shared Direct3D 9 handle is then passed to OpenSharedResource in the hResource argument. The following code illustrates the method calls involved.
+ sharedHandle = NULL; // must be set to NULL to create, can use a valid handle here to open in D3D9
+ pDevice9->CreateTexture(..., pTex2D_9, &sharedHandle);
+ ...
+ pDevice10->OpenSharedResource(sharedHandle, __uuidof(ID3D10Resource), (void**)(&tempResource10));
+ tempResource10->QueryInterface(__uuidof(ID3D10Texture2D), (void**)(&pTex2D_10));
+ tempResource10->Release();
+ // now use pTex2D_10 with pDevice10
+ Textures being shared from D3D9 to D3D10 have the following restrictions. Textures must be 2D Only 1 mip level is allowed Texture must have default usage Texture must be write only MSAA textures are not allowed Bind flags must have SHADER_RESOURCE and RENDER_TARGET set Only R10G10B10A2_UNORM, R16G16B16A16_FLOAT and R8G8B8A8_UNORM formats are allowed If a shared texture is updated on one device Gets information about the features
Gets information about the features
Gets information about whether the driver supports the nonpowers-of-2-unconditionally feature. TRUE for hardware at Direct3D 10 and higher feature levels.
+Gets information about whether a rendering device batches rendering commands and performs multipass rendering into tiles or bins over a render area. Certain API usage patterns that are fine TileBasedDefferredRenderers (TBDRs) can perform worse on non-TBDRs and vice versa. Applications that are careful about rendering can be friendly to both TBDR and non-TBDR architectures.
+Creates a device that uses Direct3D 11 functionality in Direct3D 12, specifying a pre-existing D3D12 device to use for D3D11 interop.
+ Specifies a pre-existing D3D12 device to use for D3D11 interop. May not be
Any of those documented for D3D11CreateDeviceAndSwapChain. Specifies which runtime layers to enable (see the
An array of any of the following:
The first feature level which is less than or equal to the D3D12 device's feature level will be used to perform D3D11 validation. Creation will fail if no acceptable feature levels are provided. Providing
An array of unique queues for D3D11On12 to use. Valid queue types: 3D command queue.
The function signature PFN_D3D11ON12_CREATE_DEVICE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.
+Gets the feature level of the hardware device.
+Feature levels determine the capabilities of your device.
+Get the flags used during the call to create the device with D3D11CreateDevice.
+Get the reason why the device was removed.
+Gets an immediate context, which can play back command lists.
+The GetImmediateContext method returns an
The GetImmediateContext method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Get or sets the exception-mode flags.
+An exception-mode flag is used to elevate an error condition to a non-continuable exception.
+Creates a buffer (vertex buffer, index buffer, or shader-constant buffer).
+ A reference to a
A reference to a
If you don't pass anything to pInitialData, the initial content of the memory for the buffer is undefined. In this case, you need to write the buffer content some other way before the resource is read.
Address of a reference to the
This method returns E_OUTOFMEMORY if there is insufficient memory to create the buffer. See Direct3D 11 Return Codes for other possible return values.
For example code, see How to: Create a Vertex Buffer, How to: Create an Index Buffer or How to: Create a Constant Buffer.
For a constant buffer (BindFlags of
The Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems, provides the following new functionality for CreateBuffer:
You can create a constant buffer that is larger than the maximum constant buffer size that a shader can access (4096 32-bit*4-component constants ? 64KB). When you bind the constant buffer to the pipeline (for example, via PSSetConstantBuffers or PSSetConstantBuffers1), you can define a range of the buffer that the shader can access that fits within the 4096 constant limit.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher. On existing drivers that are implemented to feature level 10 and higher, a call to CreateBuffer to request a constant buffer that is larger than 4096 fails.
+Creates an array of 1D textures.
+If the method succeeds, the return code is
CreateTexture1D creates a 1D texture resource, which can contain a number of 1D subresources. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.
All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of
For a 32 width texture with a full mipmap chain, the pInitialData array has the following 6 elements: +
Create an array of 2D textures.
+If the method succeeds, the return code is
CreateTexture2D creates a 2D texture resource, which can contain a number of 2D subresources. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.
All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of
For a 32 x 32 texture with a full mipmap chain, the pInitialData array has the following 6 elements: +
Create a single 3D texture.
+If the method succeeds, the return code is
CreateTexture3D creates a 3D texture resource, which can contain a number of 3D subresources. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.
All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of
Each element of pInitialData provides all of the slices that are defined for a given miplevel. For example, for a 32 x 32 x 4 volume texture with a full mipmap chain, the array has the following 6 elements:
Create a shader-resource view for accessing data in a resource.
+Pointer to the resource that will serve as input to a shader. This resource must have been created with the D3D11_BIND_SHADER_RESOURCE flag.
Pointer to a shader-resource view description (see
Address of a reference to an
This method returns one of the following Direct3D 11 Return Codes.
A resource is made up of one or more subresources; a view identifies which subresources to allow the pipeline to access. In addition, each resource is bound to the pipeline using a view. A shader-resource view is designed to bind any buffer or texture resource to the shader stages using the following API methods: ID3D11DeviceContext::VSSetShaderResources, ID3D11DeviceContext::GSSetShaderResources and ID3D11DeviceContext::PSSetShaderResources.
Because a view is fully typed, this means that typeless resources become fully typed when bound to the pipeline.
Note?? To successfully create a shader-resource view from a typeless buffer (for example, DXGI_FORMAT_R32G32B32A32_TYPELESS), you must set the D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS flag when you create the buffer.?The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use CreateShaderResourceView for the following new purpose.
You can create shader-resource views of video resources so that Direct3D shaders can process those shader-resource views. These video resources are either Texture2D or Texture2DArray. The value in the ViewDimension member of the
The runtime read+write conflict prevention logic (which stops a resource from being bound as an SRV and RTV or UAV at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.
Windows?Phone?8: This API is supported.
+Creates a view for accessing an unordered access resource.
+This method returns one of the Direct3D 11 Return Codes.
The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use CreateUnorderedAccessView for the following new purpose.
You can create unordered-access views of video resources so that Direct3D shaders can process those unordered-access views. These video resources are either Texture2D or Texture2DArray. The value in the ViewDimension member of the
The runtime read+write conflict prevention logic (which stops a resource from being bound as an SRV and RTV or UAV at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.
+Creates a render-target view for accessing resource data.
+Pointer to a
Pointer to a
Address of a reference to an
This method returns one of the Direct3D 11 Return Codes.
A render-target view can be bound to the output-merger stage by calling ID3D11DeviceContext::OMSetRenderTargets.
The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use CreateRenderTargetView for the following new purpose.
You can create render-target views of video resources so that Direct3D shaders can process those render-target views. These video resources are either Texture2D or Texture2DArray. The value in the ViewDimension member of the
The runtime read+write conflict prevention logic (which stops a resource from being bound as an SRV and RTV or UAV at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.
+Create a depth-stencil view for accessing resource data.
+Pointer to the resource that will serve as the depth-stencil surface. This resource must have been created with the D3D11_BIND_DEPTH_STENCIL flag.
Pointer to a depth-stencil-view description (see
Address of a reference to an
This method returns one of the following Direct3D 11 Return Codes.
A depth-stencil view can be bound to the output-merger stage by calling ID3D11DeviceContext::OMSetRenderTargets.
+Create an input-layout object to describe the input-buffer data for the input-assembler stage.
+ An array of the input-assembler stage input data types; each type is described by an element description (see
The number of input-data types in the array of input-elements.
A reference to the compiled shader. The compiled shader code contains a input signature which is validated against the array of elements. See remarks.
Size of the compiled shader.
A reference to the input-layout object created (see
If the method succeeds, the return code is
After creating an input layout object, it must be bound to the input-assembler stage before calling a draw API.
Once an input-layout object is created from a shader signature, the input-layout object can be reused with any other shader that has an identical input signature (semantics included). This can simplify the creation of input-layout objects when you are working with many shaders with identical inputs.
If a data type in the input-layout declaration does not match the data type in a shader-input signature, CreateInputLayout will generate a warning during compilation. The warning is simply to call attention to the fact that the data may be reinterpreted when read from a register. You may either disregard this warning (if reinterpretation is intentional) or make the data types match in both declarations to eliminate the warning.
Windows?Phone?8: This API is supported.
+Create a vertex-shader object from a compiled shader.
+A reference to the compiled shader.
Size of the compiled vertex shader.
A reference to a class linkage interface (see
Address of a reference to a
This method returns one of the Direct3D 11 Return Codes.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateVertexShader.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a vertex shader, you can successfully pass the compiled vertex shader to pShaderBytecode. That is, the call to CreateVertexShader succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateVertexShader fails. CreateVertexShader also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Create a geometry shader.
+A reference to the compiled shader.
Size of the compiled geometry shader.
A reference to a class linkage interface (see
Address of a reference to a
This method returns one of the following Direct3D 11 Return Codes.
After it is created, the shader can be set to the device by calling ID3D11DeviceContext::GSSetShader.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateGeometryShader.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a geometry shader, you can successfully pass the compiled geometry shader to pShaderBytecode. That is, the call to CreateGeometryShader succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateGeometryShader fails. CreateGeometryShader also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Creates a geometry shader that can write to streaming output buffers.
+A reference to the compiled geometry shader for a standard geometry shader plus stream output. For info on how to get this reference, see Getting a Pointer to a Compiled Shader.
To create the stream output without using a geometry shader, pass a reference to the output signature for the prior stage. To obtain this output signature, call the D3DGetOutputSignatureBlob compiler function. You can also pass a reference to the compiled shader for the prior stage (for example, the vertex-shader stage or domain-shader stage). This compiled shader provides the output signature for the data.
Size of the compiled geometry shader.
Pointer to a
The number of entries in the stream output declaration ( ranges from 0 to
An array of buffer strides; each stride is the size of an element for that buffer.
The number of strides (or buffers) in pBufferStrides (ranges from 0 to
The index number of the stream to be sent to the rasterizer stage (ranges from 0 to
A reference to a class linkage interface (see
Address of a reference to an
This method returns one of the Direct3D 11 Return Codes.
For more info about using CreateGeometryShaderWithStreamOutput, see Create a Geometry-Shader Object with Stream Output.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateGeometryShaderWithStreamOutput.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a geometry shader, you can successfully pass the compiled geometry shader to pShaderBytecode. That is, the call to CreateGeometryShaderWithStreamOutput succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateGeometryShaderWithStreamOutput fails. CreateGeometryShaderWithStreamOutput also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Windows?Phone?8: This API is supported.
+Create a pixel shader.
+A reference to the compiled shader.
Size of the compiled pixel shader.
A reference to a class linkage interface (see
Address of a reference to a
This method returns one of the following Direct3D 11 Return Codes.
After creating the pixel shader, you can set it to the device using ID3D11DeviceContext::PSSetShader.
+Create a hull shader.
+This method returns one of the Direct3D 11 Return Codes.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateHullShader.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a hull shader, you can successfully pass the compiled hull shader to pShaderBytecode. That is, the call to CreateHullShader succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateHullShader fails. CreateHullShader also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Create a domain shader .
+This method returns one of the following Direct3D 11 Return Codes.
The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for CreateDomainShader.
The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views (UAV) are available at all shader stages, you can use these instructions in all shader stages.
Therefore, if you use the following shader model 5.0 instructions in a domain shader, you can successfully pass the compiled domain shader to pShaderBytecode. That is, the call to CreateDomainShader succeeds.
If you pass a compiled shader to pShaderBytecode that uses any of the following instructions on a device that doesn?t support UAVs at every shader stage (including existing drivers that are not implemented to support UAVs at every shader stage), CreateDomainShader fails. CreateDomainShader also fails if the shader tries to use a UAV slot beyond the set of UAV slots that the hardware supports.
Create a compute shader.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the compute shader. See Direct3D 11 Return Codes for other possible return values.
For an example, see How To: Create a Compute Shader and HDRToneMappingCS11 Sample.
+Creates class linkage libraries to enable dynamic shader linkage.
+A reference to a class-linkage interface reference (see
This method returns one of the following Direct3D 11 Return Codes.
The
Create a blend-state object that encapsules blend state for the output-merger stage.
+ Pointer to a blend-state description (see
Address of a reference to the blend-state object created (see
This method returns E_OUTOFMEMORY if there is insufficient memory to create the blend-state object. See Direct3D 11 Return Codes for other possible return values.
An application can create up to 4096 unique blend-state objects. For each object created, the runtime checks to see if a previous object has the same state. If such a previous object exists, the runtime will return a reference to previous instance instead of creating a duplicate object.
Windows?Phone?8: This API is supported.
+Create a depth-stencil state object that encapsulates depth-stencil test information for the output-merger stage.
+Pointer to a depth-stencil state description (see
Address of a reference to the depth-stencil state object created (see
This method returns one of the following Direct3D 11 Return Codes.
4096 unique depth-stencil state objects can be created on a device at a time.
If an application attempts to create a depth-stencil-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique depth-stencil state objects will stay the same.
+Create a rasterizer state object that tells the rasterizer stage how to behave.
+Pointer to a rasterizer state description (see
Address of a reference to the rasterizer state object created (see
This method returns E_OUTOFMEMORY if there is insufficient memory to create the compute shader. See Direct3D 11 Return Codes for other possible return values.
4096 unique rasterizer state objects can be created on a device at a time.
If an application attempts to create a rasterizer-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique rasterizer state objects will stay the same.
+Create a sampler-state object that encapsulates sampling information for a texture.
+Pointer to a sampler state description (see
Address of a reference to the sampler state object created (see
This method returns one of the following Direct3D 11 Return Codes.
4096 unique sampler state objects can be created on a device at a time.
If an application attempts to create a sampler-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique sampler state objects will stay the same.
+This interface encapsulates methods for querying information from the GPU.
+Pointer to a query description (see
Address of a reference to the query object created (see
This method returns E_OUTOFMEMORY if there is insufficient memory to create the query object. See Direct3D 11 Return Codes for other possible return values.
Creates a predicate.
+Pointer to a query description where the type of query must be a D3D11_QUERY_SO_OVERFLOW_PREDICATE or D3D11_QUERY_OCCLUSION_PREDICATE (see
Address of a reference to a predicate (see
This method returns one of the following Direct3D 11 Return Codes.
Create a counter object for measuring GPU performance.
+Pointer to a counter description (see
Address of a reference to a counter (see
If this function succeeds, it will return
E_INVALIDARG is returned whenever an out-of-range well-known or device-dependent counter is requested, or when the simulataneously active counters have been exhausted.
Creates a deferred context, which can record command lists.
+Reserved for future use. Pass 0.
Upon completion of the method, the passed reference to an
Returns
A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. Using a deferred context, you can record graphics commands into a command list that is encapsulated by the
You can create multiple deferred contexts.
Note?? If you use the D3D11_CREATE_DEVICE_SINGLETHREADED value to create the device that is represented byFor more information about deferred contexts, see Immediate and Deferred Rendering.
Windows?Phone?8: This API is supported.
+Give a device access to a shared resource created on a different device.
+A resource handle. See remarks.
The globally unique identifier (
Address of a reference to the resource we are gaining access to.
This method returns one of the following Direct3D 11 Return Codes.
The REFIID, or
The unique handle of the resource is obtained differently depending on the type of device that originally created the resource.
To share a resource between two Direct3D 11 devices the resource must have been created with the D3D11_RESOURCE_MISC_SHARED flag, if it was created using the
The REFIID, or
When sharing a resource between two Direct3D 10/11 devices the unique handle of the resource can be obtained by querying the resource for the
* pOtherResource( null ); + hr = pOtherDeviceResource->QueryInterface( __uuidof(), (void**)&pOtherResource ); + HANDLE sharedHandle; + pOtherResource->GetSharedHandle(&sharedHandle);
The only resources that can be shared are 2D non-mipmapped textures.
To share a resource between a Direct3D 9 device and a Direct3D 11 device the texture must have been created using the pSharedHandle argument of CreateTexture. The shared Direct3D 9 handle is then passed to OpenSharedResource in the hResource argument.
The following code illustrates the method calls involved.
sharedHandle =null ; // must be set tonull to create, can use a valid handle here to open in D3D9 + pDevice9->CreateTexture(..., pTex2D_9, &sharedHandle); + ... + pDevice11->OpenSharedResource(sharedHandle, __uuidof(), (void**)(&tempResource11)); + tempResource11->QueryInterface(__uuidof( ), (void**)(&pTex2D_11)); + tempResource11->Release(); + // now use pTex2D_11 with pDevice11
Textures being shared from D3D9 to D3D11 have the following restrictions.
If a shared texture is updated on one device ID3D11DeviceContext::Flush must be called on that device.
+Get the support of a given format on the installed video device.
+A
A bitfield of
Get the number of quality levels available during multisampling.
+The texture format. See
The number of samples during multisampling.
Number of quality levels supported by the adapter. See remarks.
When multisampling a texture, the number of quality levels available for an adapter is dependent on the texture format used and the number of samples requested. The maximum number of quality levels is defined by
Furthermore, the definition of a quality level is up to each hardware vendor to define, however no facility is provided by Direct3D to help discover this information.
Note that FEATURE_LEVEL_10_1 devices are required to support 4x MSAA for all render targets except R32G32B32A32 and R32G32B32. FEATURE_LEVEL_11_0 devices are required to support 4x MSAA for all render target formats, and 8x MSAA for all render target formats except R32G32B32A32 formats.
+Get a counter's information.
+Get the type, name, units of measure, and a description of an existing counter.
+ Pointer to a counter description (see
Pointer to the data type of a counter (see
Pointer to the number of hardware counters that are needed for this counter type to be created. All instances of the same counter type use the same hardware counters.
String to be filled with a brief name for the counter. May be
Length of the string returned to szName. Can be
Name of the units a counter measures, provided the memory the reference points to has enough room to hold the string. Can be
Length of the string returned to szUnits. Can be
A description of the counter, provided the memory the reference points to has enough room to hold the string. Can be
Length of the string returned to szDescription. Can be
This method returns one of the following Direct3D 11 Return Codes.
Length parameters can be
Windows?Phone?8: This API is supported.
+Gets information about the features that are supported by the current graphics driver.
+A member of the
Upon completion of the method, the passed structure is filled with data that describes the feature support.
The size of the structure passed to the pFeatureSupportData parameter.
Returns
To query for multi-threading support, pass the D3D11_FEATURE_THREADING value to the Feature parameter, pass the
Calling CheckFeatureSupport with Feature set to D3D11_FEATURE_FORMAT_SUPPORT causes the method to return the same information that would be returned by ID3D11Device::CheckFormatSupport.
+Get application-defined data from a device.
+Guid associated with the data.
A reference to a variable that on input contains the size, in bytes, of the buffer that pData points to, and on output contains the size, in bytes, of the amount of data that GetPrivateData retrieved.
A reference to a buffer that GetPrivateData fills with data from the device if pDataSize points to a value that specifies a buffer large enough to hold the data.
This method returns one of the codes described in the topic Direct3D 11 Return Codes.
Set data to a device and associate that data with a guid.
+Guid associated with the data.
Size of the data.
Pointer to the data to be stored with this device. If pData is
This method returns one of the following Direct3D 11 Return Codes.
The data stored in the device with this method can be retrieved with ID3D11Device::GetPrivateData.
The data and guid set with this method will typically be application-defined.
The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "<unnamed>". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the SetPrivateData method and the
static const char c_szName[] = "My name"; + hr = pContext->SetPrivateData(+, sizeof( c_szName ) - 1, c_szName ); +
Associate an
Guid associated with the interface.
Pointer to an
This method returns one of the following Direct3D 11 Return Codes.
Gets the feature level of the hardware device.
+A member of the
Feature levels determine the capabilities of your device.
+Get the flags used during the call to create the device with D3D11CreateDevice.
+A bitfield containing the flags used to create the device. See
Get the reason why the device was removed.
+Possible return values include:
For more detail on these return codes, see DXGI_ERROR.
Gets an immediate context, which can play back command lists.
+Upon completion of the method, the passed reference to an
The GetImmediateContext method returns an
The GetImmediateContext method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Get the exception-mode flags.
+A value that contains one or more exception flags; each flag specifies a condition which will cause an exception to be raised. The flags are listed in D3D11_RAISE_FLAG. A default value of 0 means there are no flags.
This method returns one of the following Direct3D 11 Return Codes.
Set an exception-mode flag to elevate an error condition to a non-continuable exception.
Whenever an error occurs, a Direct3D device enters the DEVICEREMOVED state and if the appropriate exception flag has been set, an exception is raised. A raised exception is designed to terminate an application. Before termination, the last chance an application has to persist data is by using an UnhandledExceptionFilter (see Structured Exception Handling). In general, UnhandledExceptionFilters are leveraged to try to persist data when an application is crashing (to disk, for example). Any code that executes during an UnhandledExceptionFilter is not guaranteed to reliably execute (due to possible process corruption). Any data that the UnhandledExceptionFilter manages to persist, before the UnhandledExceptionFilter crashes again, should be treated as suspect, and therefore inspected by a new, non-corrupted process to see if it is usable.
+Get the exception-mode flags.
+A value that contains one or more exception flags; each flag specifies a condition which will cause an exception to be raised. The flags are listed in D3D11_RAISE_FLAG. A default value of 0 means there are no flags.
An exception-mode flag is used to elevate an error condition to a non-continuable exception.
+ { , , , , , , ,};
+ Gets an immediate context, which can play back command lists.
+GetImmediateContext1 returns an
GetImmediateContext1 increments the reference count of the immediate context by one. So, call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Gets an immediate context, which can play back command lists.
+Upon completion of the method, the passed reference to an
GetImmediateContext1 returns an
GetImmediateContext1 increments the reference count of the immediate context by one. So, call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Creates a deferred context, which can record command lists.
+Reserved for future use. Pass 0.
Upon completion of the method, the passed reference to an
Returns
A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. By using a deferred context, you can record graphics commands into a command list that is encapsulated by the
You can create multiple deferred contexts.
Note?? If you use the D3D11_CREATE_DEVICE_SINGLETHREADED value to create the device that is represented byFor more information about deferred contexts, see Immediate and Deferred Rendering.
Windows?Phone?8: This API is supported.
+Creates a blend-state object that encapsulates blend state for the output-merger stage and allows the configuration of logic operations.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the blend-state object. See Direct3D 11 Return Codes for other possible return values.
The logical operations (those that enable bitwise logical operations between pixel shader output and render target contents, refer to
An app can create up to 4096 unique blend-state objects. For each object created, the runtime checks to see if a previous object has the same state. If such a previous object exists, the runtime will return a reference to previous instance instead of creating a duplicate object.
+Creates a rasterizer state object that informs the rasterizer stage how to behave and forces the sample count while UAV rendering or rasterizing.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the rasterizer state object. See Direct3D 11 Return Codes for other possible return values.
An app can create up to 4096 unique rasterizer state objects. For each object created, the runtime checks to see if a previous object has the same state. If such a previous object exists, the runtime will return a reference to previous instance instead of creating a duplicate object.
+Creates a context state object that holds all Microsoft Direct3D state and some Direct3D behavior.
+ A combination of
If you set the single-threaded flag for both the context state object and the device, you guarantee that you will call the whole set of context methods and device methods only from one thread. You therefore do not need to use critical sections to synchronize access to the device context, and the runtime can avoid working with those processor-intensive critical sections.
A reference to an array of
{ D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1,}; The number of elements in pFeatureLevels. Unlike D3D11CreateDevice, you must set FeatureLevels to greater than 0 because you can't set pFeatureLevels to
The SDK version. You must set this parameter to
The globally unique identifier (
A reference to a variable that receives a
The address of a reference to an
This method returns one of the Direct3D 11 Return Codes.
The REFIID value of the emulated interface is a __uuidof( gets the
Call the ID3D11DeviceContext1::SwapDeviceContextState method to activate the context state object. When the context state object is active, the device behaviors that are associated with both the context state object's feature level and its compatible interface are activated on the Direct3D device until the next call to SwapDeviceContextState.
When a context state object is active, the runtime disables certain methods on the device and context interfaces. For example, a context state object that is created with __uuidof( will cause the runtime to turn off most of the Microsoft Direct3D?10 device interfaces, and a context state object that is created with __uuidof(ID3D10Device1) or __uuidof(ID3D10Device) will cause the runtime to turn off most of the
For example, suppose the tessellation stage is made active through the
The following table shows the methods that are active and inactive for each emulated interface.
| Emulated interface | Active device or immediate context interfaces | Inactive device or immediate context interfaces |
|---|---|---|
| | | ID3D10Device |
| ID3D10Device1 or ID3D10Device | ID3D10Device ID3D10Device1 | |
?
The following table shows the immediate context methods that the runtime disables when the indicated context state objects are active.
Methods of __uuidof(ID3D10Device1) or __uuidof(ID3D10Device) is active | Methods of ID3D10Device when __uuidof( is active |
|---|---|
| ClearDepthStencilView | ClearDepthStencilView |
| ClearRenderTargetView | ClearRenderTargetView |
| ClearState | ClearState |
| ClearUnorderedAccessViewUint | |
| ClearUnorderedAccessViewFloat | |
| CopyResource | CopyResource |
| CopyStructureCount | |
| CopySubresourceRegion | CopySubresourceRegion |
| CSGetConstantBuffers | |
| CSGetSamplers | |
| CSGetShader | |
| CSGetShaderResources | |
| CSGetUnorderedAccessViews | |
| CSSetConstantBuffers | |
| CSSetSamplers | |
| CSSetShader | |
| CSSetShaderResources | |
| CSSetUnorderedAccessViews | |
| Dispatch | |
| DispatchIndirect | |
| CreateBlendState | |
| Draw | Draw |
| DrawAuto | DrawAuto |
| DrawIndexed | DrawIndexed |
| DrawIndexedInstanced | DrawIndexedInstanced |
| DrawIndexedInstancedIndirect | |
| DrawInstanced | DrawInstanced |
| DrawInstancedIndirect | |
| DSGetConstantBuffers | |
| DSGetSamplers | |
| DSGetShader | |
| DSGetShaderResources | |
| DSSetConstantBuffers | |
| DSSetSamplers | |
| DSSetShader | |
| DSSetShaderResources | |
| ExecuteCommandList | |
| FinishCommandList | |
| Flush | Flush |
| GenerateMips | GenerateMips |
| GetPredication | GetPredication |
| GetResourceMinLOD | |
| GetType | |
| GetTextFilterSize | |
| GSGetConstantBuffers | GSGetConstantBuffers |
| GSGetSamplers | GSGetSamplers |
| GSGetShader | GSGetShader |
| GSGetShaderResources | GSGetShaderResources |
| GSSetConstantBuffers | GSSetConstantBuffers |
| GSSetSamplers | GSSetSamplers |
| GSSetShader | GSSetShader |
| GSSetShaderResources | GSSetShaderResources |
| HSGetConstantBuffers | |
| HSGetSamplers | |
| HSGetShader | |
| HSGetShaderResources | |
| HSSetConstantBuffers | |
| HSSetSamplers | |
| HSSetShader | |
| HSSetShaderResources | |
| IAGetIndexBuffer | IAGetIndexBuffer |
| IAGetInputLayout | IAGetInputLayout |
| IAGetPrimitiveTopology | IAGetPrimitiveTopology |
| IAGetVertexBuffers | IAGetVertexBuffers |
| IASetIndexBuffer | IASetIndexBuffer |
| IASetInputLayout | IASetInputLayout |
| IASetPrimitiveTopology | IASetPrimitiveTopology |
| IASetVertexBuffers | IASetVertexBuffers |
| OMGetBlendState | OMGetBlendState |
| OMGetDepthStencilState | OMGetDepthStencilState |
| OMGetRenderTargets | OMGetRenderTargets |
| OMGetRenderTargetsAndUnorderedAccessViews | |
| OMSetBlendState | OMSetBlendState |
| OMSetDepthStencilState | OMSetDepthStencilState |
| OMSetRenderTargets | OMSetRenderTargets |
| OMSetRenderTargetsAndUnorderedAccessViews | |
| PSGetConstantBuffers | PSGetConstantBuffers |
| PSGetSamplers | PSGetSamplers |
| PSGetShader | PSGetShader |
| PSGetShaderResources | PSGetShaderResources |
| PSSetConstantBuffers | PSSetConstantBuffers |
| PSSetSamplers | PSSetSamplers |
| PSSetShader | PSSetShader |
| PSSetShaderResources | PSSetShaderResources |
| ResolveSubresource | ResolveSubresource |
| RSGetScissorRects | RSGetScissorRects |
| RSGetState | RSGetState |
| RSGetViewports | RSGetViewports |
| RSSetScissorRects | RSSetScissorRects |
| RSSetState | RSSetState |
| RSSetViewports | RSSetViewports |
| SetPredication | SetPredication |
| SetResourceMinLOD | |
| SetTextFilterSize | |
| SOGetTargets | SOGetTargets |
| SOSetTargets | SOSetTargets |
| UpdateSubresource | UpdateSubresource |
| VSGetConstantBuffers | VSGetConstantBuffers |
| VSGetSamplers | VSGetSamplers |
| VSGetShader | VSGetShader |
| VSGetShaderResources | VSGetShaderResources |
| VSSetConstantBuffers | VSSetConstantBuffers |
| VSSetSamplers | VSSetSamplers |
| VSSetShader | VSSetShader |
| VSSetShaderResources | VSSetShaderResources |
?
The following table shows the immediate context methods that the runtime does not disable when the indicated context state objects are active.
Methods of __uuidof(ID3D10Device1) or __uuidof(ID3D10Device) is active | Methods of ID3D10Device when __uuidof( is active |
|---|---|
| Begin | |
| End | |
| GetCreationFlags | |
| GetPrivateData | |
| GetContextFlags | |
| GetData | |
| Map | |
| Unmap |
?
The following table shows the ID3D10Device interface methods that the runtime does not disable because they are not immediate context methods.
| Methods of ID3D10Device |
|---|
| CheckCounter |
| CheckCounterInfo |
| Create*, like CreateQuery |
| GetDeviceRemovedReason |
| GetExceptionMode |
| OpenSharedResource |
| SetExceptionMode |
| SetPrivateData |
| SetPrivateDataInterface |
?
Windows?Phone?8: This API is supported.
+Give a device access to a shared resource created on a different device.
+A resource handle. See remarks.
The globally unique identifier (
Address of a reference to the resource we are gaining access to.
This method returns one of the following Direct3D 11 Return Codes.
The REFIID, or
The unique handle of the resource is obtained differently depending on the type of device that originally created the resource.
To share a resource between two Direct3D 11 devices the resource must have been created with the D3D11_RESOURCE_MISC_SHARED flag, if it was created using the
The REFIID, or
When sharing a resource between two Direct3D 10/11 devices the unique handle of the resource can be obtained by querying the resource for the
* pOtherResource( null ); + hr = pOtherDeviceResource->QueryInterface( __uuidof(), (void**)&pOtherResource ); + HANDLE sharedHandle; + pOtherResource->GetSharedHandle(&sharedHandle);
The only resources that can be shared are 2D non-mipmapped textures.
To share a resource between a Direct3D 9 device and a Direct3D 11 device the texture must have been created using the pSharedHandle argument of CreateTexture. The shared Direct3D 9 handle is then passed to OpenSharedResource in the hResource argument.
The following code illustrates the method calls involved.
sharedHandle =null ; // must be set tonull to create, can use a valid handle here to open in D3D9 + pDevice9->CreateTexture(..., pTex2D_9, &sharedHandle); + ... + pDevice11->OpenSharedResource(sharedHandle, __uuidof(), (void**)(&tempResource11)); + tempResource11->QueryInterface(__uuidof( ), (void**)(&pTex2D_11)); + tempResource11->Release(); + // now use pTex2D_11 with pDevice11
Textures being shared from D3D9 to D3D11 have the following restrictions.
If a shared texture is updated on one device ID3D11DeviceContext::Flush must be called on that device.
+Gives a device access to a shared resource that is referenced by name and that was created on a different device. You must have previously created the resource as shared and specified that it uses NT handles (that is, you set the D3D11_RESOURCE_MISC_SHARED_NTHANDLE flag).
+This method returns one of the Direct3D 11 return codes. This method also returns E_ACCESSDENIED if the permissions to access the resource aren't valid.
Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, OpenSharedResourceByName fails with E_NOTIMPL because NTHANDLES are used. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.
The behavior of OpenSharedResourceByName is similar to the behavior of the ID3D11Device1::OpenSharedResource1 method; each call to OpenSharedResourceByName to access a resource creates a new resource object. In other words, if you call OpenSharedResourceByName twice and pass the same resource name to lpName, you receive two resource objects with different
To share a resource between two devices
Gets an immediate context, which can play back command lists.
+The GetImmediateContext2 method returns an
The GetImmediateContext2 method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Gets an immediate context, which can play back command lists.
+The GetImmediateContext2 method returns an
The GetImmediateContext2 method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Creates a deferred context, which can record command lists.
+ Returns
A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. By using a deferred context, you can record graphics commands into a command list that is encapsulated by the
You can create multiple deferred contexts.
Note?? If you use the D3D11_CREATE_DEVICE_SINGLETHREADED value to create the device, CreateDeferredContext2 fails withFor more information about deferred contexts, see Immediate and Deferred Rendering.
+Gets info about how a tiled resource is broken into tiles.
+A reference to the tiled resource to get info about.
A reference to a variable that receives the number of tiles needed to store the entire tiled resource.
A reference to a
A reference to a
A reference to a variable that contains the number of tiles in the subresource. On input, this is the number of subresources to query tilings for; on output, this is the number that was actually retrieved at pSubresourceTilingsForNonPackedMips (clamped to what's available).
The number of the first subresource tile to get. GetResourceTiling ignores this parameter if the number that pNumSubresourceTilings points to is 0.
A reference to a
If subresource tiles are part of packed mipmaps, GetResourceTiling sets the members of
For more info about tiled resources, see Tiled resources.
+Get the number of quality levels available during multisampling.
+The texture format during multisampling.
The number of samples during multisampling.
A combination of D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAGS values that are combined by using a bitwise OR operation. Currently, only D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE is supported.
A reference to a variable the receives the number of quality levels supported by the adapter. See Remarks.
When you multisample a texture, the number of quality levels available for an adapter is dependent on the texture format that you use and the number of samples that you request. The maximum number of quality levels is defined by
Furthermore, the definition of a quality level is up to each hardware vendor to define, however no facility is provided by Direct3D to help discover this information.
Note that FEATURE_LEVEL_10_1 devices are required to support 4x MSAA for all render targets except R32G32B32A32 and R32G32B32. FEATURE_LEVEL_11_0 devices are required to support 4x MSAA for all render target formats, and 8x MSAA for all render target formats except R32G32B32A32 formats.
+Gets an immediate context, which can play back command lists.
+ The GetImmediateContext3 method outputs an
The GetImmediateContext3 method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Creates a 2D texture.
+If the method succeeds, the return code is
CreateTexture2D1 creates a 2D texture resource, which can contain a number of 2D subresources. The number of subresources is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.
All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of
For a 32 x 32 texture with a full mipmap chain, the pInitialData array has the following 6 elements: +
Creates a 3D texture.
+If the method succeeds, the return code is
CreateTexture3D1 creates a 3D texture resource, which can contain a number of 3D subresources. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.
All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of
Each element of pInitialData provides all of the slices that are defined for a given miplevel. For example, for a 32 x 32 x 4 volume texture with a full mipmap chain, the array has the following 6 elements:
Creates a rasterizer state object that informs the rasterizer stage how to behave and forces the sample count while UAV rendering or rasterizing.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the rasterizer state object. See Direct3D 11 Return Codes for other possible return values.
Creates a shader-resource view for accessing data in a resource.
+Pointer to the resource that will serve as input to a shader. This resource must have been created with the D3D11_BIND_SHADER_RESOURCE flag.
A reference to a
A reference to a memory block that receives a reference to a
This method returns E_OUTOFMEMORY if there is insufficient memory to create the shader-resource view. See Direct3D 11 Return Codes for other possible return values.
Creates a view for accessing an unordered access resource.
+This method returns E_OUTOFMEMORY if there is insufficient memory to create the unordered-access view. See Direct3D 11 Return Codes for other possible return values.
Creates a render-target view for accessing resource data.
+Pointer to a
Pointer to a
A reference to a memory block that receives a reference to a
This method returns one of the Direct3D 11 Return Codes.
A render-target view can be bound to the output-merger stage by calling ID3D11DeviceContext::OMSetRenderTargets.
+Creates a query object for querying information from the graphics processing unit (GPU).
+Pointer to a
A reference to a memory block that receives a reference to a
This method returns E_OUTOFMEMORY if there is insufficient memory to create the query object. See Direct3D 11 Return Codes for other possible return values.
Gets an immediate context, which can play back command lists.
+ The GetImmediateContext3 method outputs an
The GetImmediateContext3 method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface reference when you are done with it to avoid a memory leak.
+Creates a deferred context, which can record command lists.
+ Returns
Copies data into a D3D11_USAGE_DEFAULT texture which was mapped using ID3D11DeviceContext3::Map while providing a
The provided resource must be a D3D11_USAGE_DEFAULT texture which was mapped for writing by a previous call to ID3D11DeviceContext3::Map while providing a
This API is intended for calling at high frequency. Callers can reduce memory by making iterative calls that update progressive regions of the texture, while provide a small buffer during each call. It is most efficient to specify large enough regions, though, because this enables D3D to fill whole cache lines in the texture before returning.
For efficiency, ensure the bounds and alignment of the extents within the box are ( 64 / [bytes per pixel] ) pixels horizontally. Vertical bounds and alignment should be 2 rows, except when 1-byte-per-pixel formats are used, in which case 4 rows are recommended. Single depth slices per call are handled efficiently. It is recommended but not necessary to provide references and strides which are 128-byte aligned.
When writing to sub mipmap levels, it is recommended to use larger width and heights than described above. This is because small mipmap levels may actually be stored within a larger block of memory, with an opaque amount of offsetting which can interfere with alignment to cache lines.
+ Copies data from a D3D11_USAGE_DEFAULT texture which was mapped using ID3D11DeviceContext3::Map while providing a
The provided resource must be a D3D11_USAGE_DEFAULT texture which was mapped for writing by a previous call to ID3D11DeviceContext3::Map while providing a
This API is intended for calling at high frequency. Callers can reduce memory by making iterative calls that update progressive regions of the texture, while provide a small buffer during each call. It is most efficient to specify large enough regions, though, because this enables D3D to fill whole cache lines in the texture before returning.
For efficiency, ensure the bounds and alignment of the extents within the box are ( 64 / [Bytes per pixel] ) pixels horizontally. Vertical bounds and alignment should be 2 rows, except when 1-byte-per-pixel formats are used, in which case 4 rows are recommended. Single depth slices per call are handled efficiently. It is recommended but not necessary to provide references and strides which are 128-byte aligned.
When reading from sub mipmap levels, it is recommended to use larger width and heights than described above. This is because small mipmap levels may actually be stored within a larger block of memory, with an opaque amount of offseting which can interfere with alignment to cache lines.
+The device interface represents a virtual adapter; it is used to create resources.
Get a reference to the device that created this interface.
+Any returned interfaces will have their reference count incremented by one, so be sure to call ::release() on the returned reference(s) before they are freed or else you will have a memory leak.
+Get a reference to the device that created this interface.
+Address of a reference to a device (see
Any returned interfaces will have their reference count incremented by one, so be sure to call ::release() on the returned reference(s) before they are freed or else you will have a memory leak.
+Get application-defined data from a device child.
+Guid associated with the data.
A reference to a variable that on input contains the size, in bytes, of the buffer that pData points to, and on output contains the size, in bytes, of the amount of data that GetPrivateData retrieved.
A reference to a buffer that GetPrivateData fills with data from the device child if pDataSize points to a value that specifies a buffer large enough to hold the data.
This method returns one of the Direct3D 11 Return Codes.
The data stored in the device child is set by calling ID3D11DeviceChild::SetPrivateData.
Windows?Phone?8: This API is supported.
+Set application-defined data to a device child and associate that data with an application-defined guid.
+Guid associated with the data.
Size of the data.
Pointer to the data to be stored with this device child. If pData is
This method returns one of the following Direct3D 11 Return Codes.
The data stored in the device child with this method can be retrieved with ID3D11DeviceChild::GetPrivateData.
The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "<unnamed>". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the SetPrivateData method and the
static const char c_szName[] = "My name"; + hr = pContext->SetPrivateData(+, sizeof( c_szName ) - 1, c_szName ); +
Associate an
Guid associated with the interface.
Pointer to an
This method returns one of the following Direct3D 11 Return Codes.
When this method is called ::addref() will be called on the
Bind an array of shader resources to the compute-shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with
For information about creating shader-resource views, see ID3D11Device::CreateShaderResourceView.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. +
+Sets an array of views for an unordered resource.
+Index of the first element in the zero-based array to begin setting (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - 1). D3D11_1_UAV_SLOT_COUNT is defined as 64.
Number of views to set (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - StartSlot).
A reference to an array of
An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable UAV. pUAVInitialCounts is only relevant for UAVs that were created with either D3D11_BUFFER_UAV_FLAG_APPEND or D3D11_BUFFER_UAV_FLAG_COUNTER specified when the UAV was created; otherwise, the argument is ignored.
Windows?Phone?8: This API is supported.
+Set a compute shader to the device.
+Pointer to a compute shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set an array of sampler states to the compute-shader stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
//Default sampler state: +SamplerDesc; + SamplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; + SamplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.MipLODBias = 0; + SamplerDesc.MaxAnisotropy = 1; + SamplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER; + SamplerDesc.BorderColor[0] = 1.0f; + SamplerDesc.BorderColor[1] = 1.0f; + SamplerDesc.BorderColor[2] = 1.0f; + SamplerDesc.BorderColor[3] = 1.0f; + SamplerDesc.MinLOD = -FLT_MAX; + SamplerDesc.MaxLOD = FLT_MAX;
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets the constant buffers used by the compute-shader stage.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the CSSetConstantBuffers1 method instead.
+Get the compute-shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to be returned by the device.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Gets an array of views for an unordered resource.
+Index of the first element in the zero-based array to return (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - 1).
Number of views to get (ranges from 0 to D3D11_1_UAV_SLOT_COUNT - StartSlot).
A reference to an array of interface references (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the compute shader currently set on the device.
+Address of a reference to a Compute shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get an array of sampler state interfaces from the compute-shader stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the constant buffers used by the compute-shader stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Set a compute shader to the device.
+Pointer to a compute shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a compute shader to the device.
+Pointer to a compute shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+ D3D11_BOX sourceRegion;
+ sourceRegion.left = 120;
+ sourceRegion.right = 200;
+ sourceRegion.top = 100;
+ sourceRegion.bottom = 220;
+ sourceRegion.front = 0;
+ sourceRegion.back = 1; pd3dDeviceContext->CopySubresourceRegion( pDestTexture, 0, 10, 20, 0, pSourceTexture, 0, &sourceRegion );
+
+ Notice, that for a 2D texture, front and back are set to 0 and 1 respectively.
+ Gets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
+A reference to a
Index number of the subresource.
Specifies the CPU's read and write permissions for a resource. For possible values, see
Flag that specifies what the CPU should do when the GPU is busy. This flag is optional.
A reference to the mapped subresource (see
This method also throws an exception with the code
For more information about these error codes, see DXGI_ERROR.
If you call Map on a deferred context, you can only pass
The Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, can map shader resource views (SRVs) of dynamic buffers with
Gets the type of device context.
+Gets the initialization flags associated with the current deferred context.
+The GetContextFlags method gets the flags that were supplied to the ContextFlags parameter of ID3D11Device::CreateDeferredContext; however, the context flag is reserved for future use.
+Draw indexed, non-instanced primitives.
+Number of indices to draw.
The location of the first index read by the GPU from the index buffer.
A value added to each index before reading a vertex from the vertex buffer.
A draw API submits work to the rendering pipeline.
If the sum of both indices is negative, the result of the function call is undefined.
+Draw non-indexed, non-instanced primitives.
+Number of vertices to draw.
Index of the first vertex, which is usually an offset in a vertex buffer.
Draw submits work to the rendering pipeline.
The vertex data for a draw call normally comes from a vertex buffer that is bound to the pipeline.
Even without any vertex buffer bound to the pipeline, you can generate your own vertex data in your vertex shader by using the SV_VertexID system-value semantic to determine the current vertex that the runtime is processing.
+Gets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
+This method returns one of the Direct3D 11 Return Codes.
This method also returns
This method also returns
For more information about these error codes, see DXGI_ERROR.
If you call Map on a deferred context, you can only pass D3D11_MAP_WRITE_DISCARD, D3D11_MAP_WRITE_NO_OVERWRITE, or both to the MapType parameter. Other
For info about how to use Map, see How to: Use dynamic resources.
+Invalidate the reference to a resource and reenable the GPU's access to that resource.
+ A reference to a
A subresource to be unmapped.
For info about how to use Unmap, see How to: Use dynamic resources.
Windows?Phone?8: This API is supported.
+Draw indexed, instanced primitives.
+Number of indices read from the index buffer for each instance.
Number of instances to draw.
The location of the first index read by the GPU from the index buffer.
A value added to each index before reading a vertex from the vertex buffer.
A value added to each index before reading per-instance data from a vertex buffer.
A draw API submits work to the rendering pipeline.
Instancing may extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors. Instancing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data.
+Draw non-indexed, instanced primitives.
+Number of vertices to draw.
Number of instances to draw.
Index of the first vertex.
A value added to each index before reading per-instance data from a vertex buffer.
A draw API submits work to the rendering pipeline.
Instancing may extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors.
The vertex data for an instanced draw call normally comes from a vertex buffer that is bound to the pipeline. However, you could also provide the vertex data from a shader that has instanced data identified with a system-value semantic (SV_InstanceID).
+Mark the beginning of a series of commands.
+A reference to an
Use ID3D11DeviceContext::End to mark the ending of the series of commands.
+Mark the end of a series of commands.
+A reference to an
Use ID3D11DeviceContext::Begin to mark the beginning of the series of commands.
+Get data from the graphics processing unit (GPU) asynchronously.
+A reference to an
Address of memory that will receive the data. If
Size of the data to retrieve or 0. Must be 0 when pData is
Optional flags. Can be 0 or any combination of the flags enumerated by
This method returns one of the Direct3D 11 Return Codes. A return value of
Queries in a deferred context are limited to predicated drawing. That is, you cannot call ID3D11DeviceContext::GetData on a deferred context to get data about a query; you can only call GetData on the immediate context to get data about a query. For predicated drawing, the results of a predication-type query are used by the GPU and not returned to an application. For more information about predication and predicated drawing, see D3D11DeviceContext::SetPredication.
GetData retrieves the data that the runtime collected between calls to ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. Certain queries only require a call to ID3D11DeviceContext::End in which case the data returned by GetData is accurate up to the last call to ID3D11DeviceContext::End. For information about the queries that only require a call to ID3D11DeviceContext::End and about the type of data that GetData retrieves for each query, see
If DataSize is 0, GetData is only used to check status.
An application gathers counter data by calling ID3D11DeviceContext::Begin, issuing some graphics commands, calling ID3D11DeviceContext::End, and then calling ID3D11DeviceContext::GetData to get data about what happened in between the Begin and End calls. For information about performance counter types, see
Set a rendering predicate.
+A reference to the
If TRUE, rendering will be affected by when the predicate's conditions are met. If
The predicate must be in the "issued" or "signaled" state to be used for predication. While the predicate is set for predication, calls to ID3D11DeviceContext::Begin and ID3D11DeviceContext::End are invalid.
Use this method to denote that subsequent rendering and resource manipulation commands are not actually performed if the resulting predicate data of the predicate is equal to the PredicateValue. However, some predicates are only hints, so they may not actually prevent operations from being performed.
The primary usefulness of predication is to allow an application to issue rendering and resource manipulation commands without taking the performance hit of spinning, waiting for ID3D11DeviceContext::GetData to return. So, predication can occur while ID3D11DeviceContext::GetData returns S_FALSE. Another way to think of it: an application can also use predication as a fallback, if it is possible that ID3D11DeviceContext::GetData returns S_FALSE. If ID3D11DeviceContext::GetData returns
Rendering and resource manipulation commands for Direct3D?11 include these Draw, Dispatch, Copy, Update, Clear, Generate, and Resolve operations.
You can set a rendering predicate on an immediate or a deferred context. For info about immediate and deferred contexts, see Immediate and Deferred Rendering.
+Draw geometry of an unknown size.
+A draw API submits work to the rendering pipeline. This API submits work of an unknown size that was processed by the input assembler, vertex shader, and stream-output stages; the work may or may not have gone through the geometry-shader stage.
After data has been streamed out to stream-output stage buffers, those buffers can be again bound to the Input Assembler stage at input slot 0 and DrawAuto will draw them without the application needing to know the amount of data that was written to the buffers. A measurement of the amount of data written to the SO stage buffers is maintained internally when the data is streamed out. This means that the CPU does not need to fetch the measurement before re-binding the data that was streamed as input data. Although this amount is tracked internally, it is still the responsibility of applications to use input layouts to describe the format of the data in the SO stage buffers so that the layouts are available when the buffers are again bound to the input assembler.
The following diagram shows the DrawAuto process.
Calling DrawAuto does not change the state of the streaming-output buffers that were bound again as inputs.
DrawAuto only works when drawing with one input buffer bound as an input to the IA stage at slot 0. Applications must create the SO buffer resource with both binding flags, D3D11_BIND_VERTEX_BUFFER and D3D11_BIND_STREAM_OUTPUT.
This API does not support indexing or instancing.
If an application needs to retrieve the size of the streaming-output buffer, it can query for statistics on streaming output by using D3D11_QUERY_SO_STATISTICS.
+Draw indexed, instanced, GPU-generated primitives.
+ A reference to an
Offset in pBufferForArgs to the start of the GPU generated primitives.
When an application creates a buffer that is associated with the
Windows?Phone?8: This API is supported.
+Draw instanced, GPU-generated primitives.
+A reference to an
Offset in pBufferForArgs to the start of the GPU generated primitives.
When an application creates a buffer that is associated with the
Execute a command list from a thread group.
+The number of groups dispatched in the x direction. ThreadGroupCountX must be less than or equal to
The number of groups dispatched in the y direction. ThreadGroupCountY must be less than or equal to
The number of groups dispatched in the z direction. ThreadGroupCountZ must be less than or equal to
You call the Dispatch method to execute commands in a compute shader. A compute shader can be run on many threads in parallel, within a thread group. Index a particular thread, within a thread group using a 3D vector given by (x,y,z).
In the following illustration, assume a thread group with 50 threads where the size of the group is given by (5,5,2). A single thread is identified from a thread group with 50 threads in it, using the vector (4,1,1).
The following illustration shows the relationship between the parameters passed to ID3D11DeviceContext::Dispatch, Dispatch(5,3,2), the values specified in the numthreads attribute, numthreads(10,8,3), and values that will passed to the compute shader for the thread-related system values + (SV_GroupIndex,SV_DispatchThreadID,SV_GroupThreadID,SV_GroupID).
+Execute a command list over one or more thread groups.
+A reference to an
A byte-aligned offset between the start of the buffer and the arguments.
You call the DispatchIndirect method to execute commands in a compute shader.
When an application creates a buffer that is associated with the
Copy a region from a source resource to a destination resource.
+A reference to the destination resource (see
Destination subresource index.
The x-coordinate of the upper left corner of the destination region.
The y-coordinate of the upper left corner of the destination region. For a 1D subresource, this must be zero.
The z-coordinate of the upper left corner of the destination region. For a 1D or 2D subresource, this must be zero.
A reference to the source resource (see
Source subresource index.
A reference to a 3D box (see
An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, CopySubresourceRegion doesn't perform a copy operation.
The source box must be within the size of the source resource. The destination offsets, (x, y, and z), allow the source box to be offset when writing into the destination resource; however, the dimensions of the source box and the offsets must be within the size of the resource. If you try and copy outside the destination resource or specify a source box that is larger than the source resource, the behavior of CopySubresourceRegion is undefined. If you created a device that supports the debug layer, the debug output reports an error on this invalid CopySubresourceRegion call. Invalid parameters to CopySubresourceRegion cause undefined behavior and might result in incorrect rendering, clipping, no copy, or even the removal of the rendering device.
If the resources are buffers, all coordinates are in bytes; if the resources are textures, all coordinates are in texels. D3D11CalcSubresource is a helper function for calculating subresource indexes.
CopySubresourceRegion performs the copy on the GPU (similar to a memcpy by the CPU). As a consequence, the source and destination resources:
CopySubresourceRegion only supports copy; it does not support any stretch, color key, or blend. CopySubresourceRegion can reinterpret the resource data between a few format types. For more info, see Format Conversion using Direct3D 10.1.
If your app needs to copy an entire resource, we recommend to use ID3D11DeviceContext::CopyResource instead.
CopySubresourceRegion is an asynchronous call, which may be added to the command-buffer queue, this attempts to remove pipeline stalls that may occur when copying data. For more information about pipeline stalls, see performance considerations.
Note??Applies only to feature level 9_x hardware If you use ID3D11DeviceContext::UpdateSubresource or CopySubresourceRegion to copy from a staging resource to a default resource, you can corrupt the destination contents. This occurs if you pass aCopy the entire contents of the source resource to the destination resource using the GPU.
+A reference to the
A reference to the
This method is unusual in that it causes the GPU to perform the copy operation (similar to a memcpy by the CPU). As a result, it has a few restrictions designed for improving performance. For instance, the source and destination resources:
CopyResource only supports copy; it doesn't support any stretch, color key, or blend. CopyResource can reinterpret the resource data between a few format types. For more info, see Format Conversion using Direct3D 10.1.
You can't use an Immutable resource as a destination. You can use a depth-stencil resource as either a source or a destination provided that the feature level is D3D_FEATURE_LEVEL_10_1 or greater. For feature levels 9_x, resources created with the D3D11_BIND_DEPTH_STENCIL flag can only be used as a source for CopyResource. Resources created with multisampling capability (see
The method is an asynchronous call, which may be added to the command-buffer queue. This attempts to remove pipeline stalls that may occur when copying data. For more info, see performance considerations.
We recommend to use ID3D11DeviceContext::CopySubresourceRegion instead if you only need to copy a portion of the data in a resource.
+The CPU copies data from memory to a subresource created in non-mappable memory.
+A reference to the destination resource (see
A zero-based index, that identifies the destination subresource. See D3D11CalcSubresource for more details.
A reference to a box that defines the portion of the destination subresource to copy the resource data into. Coordinates are in bytes for buffers and in texels for textures. If
An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, UpdateSubresource doesn't perform an update operation.
A reference to the source data in memory.
The size of one row of the source data.
The size of one depth slice of source data.
For a shader-constant buffer; set pDstBox to
A resource cannot be used as a destination if:
When UpdateSubresource returns, the application is free to change or even free the data pointed to by pSrcData because the method has already copied/snapped away the original contents.
The performance of UpdateSubresource depends on whether or not there is contention for the destination resource. For example, contention for a vertex buffer resource occurs when the application executes a Draw call and later calls UpdateSubresource on the same vertex buffer before the Draw call is actually executed by the GPU.
To better understand the source row pitch and source depth pitch parameters, the following illustration shows a 3D volume texture.
Each block in this visual represents an element of data, and the size of each element is dependent on the resource's format. For example, if the resource format is DXGI_FORMAT_R32G32B32A32_FLOAT, the size of each element would be 128 bits, or 16 bytes. This 3D volume texture has a width of two, a height of three, and a depth of four.
To calculate the source row pitch and source depth pitch for a given resource, use the following formulas:
In the case of this example 3D volume texture where the size of each element is 16 bytes, the formulas are as follows:
The following illustration shows the resource as it is laid out in memory.
For example, the following code snippet shows how to specify a destination region in a 2D texture. Assume the destination texture is 512x512 and the operation will copy the data pointed to by pData to [(120,100)..(200,220)] in the destination texture. Also assume that rowPitch has been initialized with the proper value (as explained above). front and back are set to 0 and 1 respectively, because by having front equal to back, the box is technically empty.
destRegion; + destRegion.left = 120; + destRegion.right = 200; + destRegion.top = 100; + destRegion.bottom = 220; + destRegion.front = 0; + destRegion.back = 1; pd3dDeviceContext->UpdateSubresource( pDestTexture, 0, &destRegion, pData, rowPitch, 0 ); +
The 1D case is similar. The following snippet shows how to specify a destination region in a 1D texture. Use the same assumptions as above, except that the texture is 512 in length.
destRegion; + destRegion.left = 120; + destRegion.right = 200; + destRegion.top = 0; + destRegion.bottom = 1; + destRegion.front = 0; + destRegion.back = 1; pd3dDeviceContext->UpdateSubresource( pDestTexture, 0, &destRegion, pData, rowPitch, 0 ); +
For info about various resource types and how UpdateSubresource might work with each resource type, see Introduction to a Resource in Direct3D 11.
+Copies data from a buffer holding variable length data.
+Pointer to
Offset from the start of pDstBuffer to write 32-bit UINT structure (vertex) count from pSrcView.
Pointer to an
Set all the elements in a render target to one value.
+Pointer to the render target.
A 4-component array that represents the color to fill the render target with.
Applications that wish to clear a render target to a specific integer value bit pattern should render a screen-aligned quad instead of using this method. The reason for this is because this method accepts as input a floating point value, which may not have the same bit pattern as the original integer.
| Differences between Direct3D 9 and Direct3D 11/10: Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied. |
?
When using D3D_FEATURE_LEVEL_9_x, ClearRenderTargetView only clears the first array slice in the render target view. This can impact (for example) cube map rendering scenarios. Applications should create a render target view for each face or array slice, then clear each view individually.
+Clears an unordered access resource with bit-precise values.
+This API copies the lower ni bits from each array element i to the corresponding channel, where ni is the number of bits in the ith channel of the resource format (for example, R8G8B8_FLOAT has 8 bits for the first 3 channels). This works on any UAV with no format conversion. For a raw or structured buffer view, only the first array element value is used.
+Clears an unordered access resource with a float value.
+This API works on FLOAT, UNORM, and SNORM unordered access views (UAVs), with format conversion from FLOAT to *NORM where appropriate. On other UAVs, the operation is invalid and the call will not reach the driver.
+Clears the depth-stencil resource.
+Pointer to the depth stencil to be cleared.
Identify the type of data to clear (see
Clear the depth buffer with this value. This value will be clamped between 0 and 1.
Clear the stencil buffer with this value.
| Differences between Direct3D 9 and Direct3D 11/10: Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied. |
?
+Generates mipmaps for the given shader resource.
+A reference to an
You can call GenerateMips on any shader-resource view to generate the lower mipmap levels for the shader resource. GenerateMips uses the largest mipmap level of the view to recursively generate the lower levels of the mip and stops with the smallest level that is specified by the view. If the base resource wasn't created with D3D11_BIND_RENDER_TARGET, D3D11_BIND_SHADER_RESOURCE, and D3D11_RESOURCE_MISC_GENERATE_MIPS, the call to GenerateMips has no effect.
Feature levels 9.1, 9.2, and 9.3 can't support automatic generation of mipmaps for 3D (volume) textures.
Video adapters that support feature level 9.1 and higher support generating mipmaps if you use any of these formats:
DXGI_FORMAT_R8G8B8A8_UNORM + DXGI_FORMAT_R8G8B8A8_UNORM_SRGB + DXGI_FORMAT_B5G6R5_UNORM + DXGI_FORMAT_B8G8R8A8_UNORM + DXGI_FORMAT_B8G8R8A8_UNORM_SRGB + DXGI_FORMAT_B8G8R8X8_UNORM + DXGI_FORMAT_B8G8R8X8_UNORM_SRGB +
Video adapters that support feature level 9.2 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature level 9.1:
DXGI_FORMAT_R16G16B16A16_FLOAT + DXGI_FORMAT_R16G16B16A16_UNORM + DXGI_FORMAT_R16G16_FLOAT + DXGI_FORMAT_R16G16_UNORM + DXGI_FORMAT_R32_FLOAT +
Video adapters that support feature level 9.3 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature levels 9.1 and 9.2:
DXGI_FORMAT_R32G32B32A32_FLOAT + DXGI_FORMAT_B4G4R4A4 (optional) +
Video adapters that support feature level 10 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature levels 9.1, 9.2, and 9.3:
DXGI_FORMAT_R32G32B32_FLOAT (optional) + DXGI_FORMAT_R16G16B16A16_SNORM + DXGI_FORMAT_R32G32_FLOAT + DXGI_FORMAT_R10G10B10A2_UNORM + DXGI_FORMAT_R11G11B10_FLOAT + DXGI_FORMAT_R8G8B8A8_SNORM + DXGI_FORMAT_R16G16_SNORM + DXGI_FORMAT_R8G8_UNORM + DXGI_FORMAT_R8G8_SNORM + DXGI_FORMAT_R16_FLOAT + DXGI_FORMAT_R16_UNORM + DXGI_FORMAT_R16_SNORM + DXGI_FORMAT_R8_UNORM + DXGI_FORMAT_R8_SNORM + DXGI_FORMAT_A8_UNORM + DXGI_FORMAT_B5G5R5A1_UNORM (optional) +
For all other unsupported formats, GenerateMips will silently fail.
+Sets the minimum level-of-detail (LOD) for a resource.
+A reference to an
The level-of-detail, which ranges between 0 and the maximum number of mipmap levels of the resource. For example, the maximum number of mipmap levels of a 1D texture is specified in the MipLevels member of the
To use a resource with SetResourceMinLOD, you must set the D3D11_RESOURCE_MISC_RESOURCE_CLAMP flag when you create that resource.
For Direct3D 10 and Direct3D 10.1, when sampling from a texture resource in a shader, the sampler can define a minimum LOD clamp to force sampling from less detailed mip levels. For Direct3D 11, this functionality is extended from the sampler to the entire resource. Therefore, the application can specify the highest-resolution mip level of a resource that is available for access. This restricts the set of mip levels that are required to be resident in GPU memory, thereby saving memory.
The set of mip levels resident per-resource in GPU memory can be specified by the user.
Minimum LOD affects all of the resident mip levels. Therefore, only the resident mip levels can be updated and read from.
All methods that access texture resources must adhere to minimum LOD clamps.
Empty-set accesses are handled as out-of-bounds cases.
+Gets the minimum level-of-detail (LOD).
+A reference to an
Returns the minimum LOD.
Copy a multisampled resource into a non-multisampled resource.
+Destination resource. Must be a created with the D3D11_USAGE_DEFAULT flag and be single-sampled. See
A zero-based index, that identifies the destination subresource. Use D3D11CalcSubresource to calculate the index.
Source resource. Must be multisampled.
The source subresource of the source resource.
A
This API is most useful when re-using the resulting rendertarget of one render pass as an input to a second render pass.
The source and destination resources must be the same resource type and have the same dimensions. In addition, they must have compatible formats. There are three scenarios for this:
| Scenario | Requirements |
|---|---|
| Source and destination are prestructured and typed | Both the source and destination must have identical formats and that format must be specified in the Format parameter. |
| One resource is prestructured and typed and the other is prestructured and typeless | The typed resource must have a format that is compatible with the typeless resource (i.e. the typed resource is DXGI_FORMAT_R32_FLOAT and the typeless resource is DXGI_FORMAT_R32_TYPELESS). The format of the typed resource must be specified in the Format parameter. |
| Source and destination are prestructured and typeless | Both the source and desintation must have the same typeless format (i.e. both must have DXGI_FORMAT_R32_TYPELESS), and the Format parameter must specify a format that is compatible with the source and destination (i.e. if both are DXGI_FORMAT_R32_TYPELESS then DXGI_FORMAT_R32_FLOAT could be specified in the Format parameter). For example, given the DXGI_FORMAT_R16G16B16A16_TYPELESS format:
|
?
+Queues commands from a command list onto a device.
+ A reference to an
A Boolean flag that determines whether the target context state is saved prior to and restored after the execution of a command list. Use TRUE to indicate that the runtime needs to save and restore the state. Use
Use this method to play back a command list that was recorded by a deferred context on any thread.
A call to ExecuteCommandList of a command list from a deferred context onto the immediate context is required for the recorded commands to be executed on the graphics processing unit (GPU). A call to ExecuteCommandList of a command list from a deferred context onto another deferred context can be used to merge recorded lists. But to run the commands from the merged deferred command list on the GPU, you need to execute them on the immediate context.
This method performs some runtime validation related to queries. Queries that are begun in a device context cannot be manipulated indirectly by executing a command list (that is, Begin or End was invoked against the same query by the deferred context which generated the command list). If such a condition occurs, the ExecuteCommandList method does not execute the command list. However, the state of the device context is still maintained, as would be expected (ID3D11DeviceContext::ClearState is performed, unless the application indicates to preserve the device context state).
Windows?Phone?8: This API is supported.
+Get the rendering predicate state.
+Address of a boolean to fill with the predicate comparison value.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Restore all default settings.
+This method resets any device context to the default settings. This sets all input/output resource slots, shaders, input layouts, predications, scissor rectangles, depth-stencil state, rasterizer state, blend state, sampler state, and viewports to
For a scenario where you would like to clear a list of commands recorded so far, call ID3D11DeviceContext::FinishCommandList and throw away the resulting
Sends queued-up commands in the command buffer to the graphics processing unit (GPU).
+Most applications don't need to call this method. If an application calls this method when not necessary, it incurs a performance penalty. Each call to Flush incurs a significant amount of overhead.
When Microsoft Direct3D state-setting, present, or draw commands are called by an application, those commands are queued into an internal command buffer. Flush sends those commands to the GPU for processing. Typically, the Direct3D runtime sends these commands to the GPU automatically whenever the runtime determines that they need to be sent, such as when the command buffer is full or when an application maps a resource. Flush sends the commands manually.
We recommend that you use Flush when the CPU waits for an arbitrary amount of time (such as when you call the Sleep function).
Because Flush operates asynchronously, it can return either before or after the GPU finishes executing the queued graphics commands. However, the graphics commands eventually always complete. You can call the ID3D11Device::CreateQuery method with the D3D11_QUERY_EVENT value to create an event query; you can then use that event query in a call to the ID3D11DeviceContext::GetData method to determine when the GPU is finished processing the graphics commands. +
Microsoft Direct3D?11 defers the destruction of objects. Therefore, an application can't rely upon objects immediately being destroyed. By calling Flush, you destroy any objects whose destruction was deferred. If an application requires synchronous destruction of an object, we recommend that the application release all its references, call ID3D11DeviceContext::ClearState, and then call Flush.
+Gets the type of device context.
+A member of
Gets the initialization flags associated with the current deferred context.
+The GetContextFlags method gets the flags that were supplied to the ContextFlags parameter of ID3D11Device::CreateDeferredContext; however, the context flag is reserved for future use.
+Create a command list and record graphics commands into it.
+ A Boolean flag that determines whether the runtime saves deferred context state before it executes FinishCommandList and restores it afterwards. Use TRUE to indicate that the runtime needs to save and restore the state. Use
Upon completion of the method, the passed reference to an
Returns
Create a command list from a deferred context and record commands into it by calling FinishCommandList. Play back a command list with an immediate context by calling ID3D11DeviceContext::ExecuteCommandList.
Immediate context state is cleared before and after a command list is executed. A command list has no concept of inheritance. Each call to FinishCommandList will record only the state set since any previous call to FinishCommandList.
For example, the state of a device context is its render state or pipeline state. To retrieve device context state, an application can call ID3D11DeviceContext::GetData or ID3D11DeviceContext::GetPredication.
For more information about how to use FinishCommandList, see How to: Record a Command List.
Windows?Phone?8: This API is supported.
+Bind a single vertex buffer to the input-assembler stage.
+The first input slot for binding. The first vertex buffer is explicitly bound to the start slot; this causes each additional vertex buffer in the array to be implicitly bound to each subsequent input slot. The maximum of 16 or 32 input slots (ranges from 0 to
A
For information about creating vertex buffers, see Create a Vertex Buffer.
Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind
The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Bind an array of vertex buffers to the input-assembler stage.
+The first input slot for binding. The first vertex buffer is explicitly bound to the start slot; this causes each additional vertex buffer in the array to be implicitly bound to each subsequent input slot. The maximum of 16 or 32 input slots (ranges from 0 to
A reference to an array of
For information about creating vertex buffers, see Create a Vertex Buffer.
Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind
The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Bind an array of vertex buffers to the input-assembler stage.
+The first input slot for binding. The first vertex buffer is explicitly bound to the start slot; this causes each additional vertex buffer in the array to be implicitly bound to each subsequent input slot. The maximum of 16 or 32 input slots (ranges from 0 to
A reference to an array of vertex buffers (see
Pointer to an array of stride values; one stride value for each buffer in the vertex-buffer array. Each stride is the size (in bytes) of the elements that are to be used from that vertex buffer.
Pointer to an array of offset values; one offset value for each buffer in the vertex-buffer array. Each offset is the number of bytes between the first element of a vertex buffer and the first element that will be used.
For information about creating vertex buffers, see Create a Vertex Buffer.
Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind
The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Get or sets a reference to the input-layout object that is bound to the input-assembler stage.
+For information about creating an input-layout object, see Creating the Input-Layout Object.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get or sets information about the primitive type, and data order that describes input data for the input assembler stage.
+Bind an input-layout object to the input-assembler stage.
+A reference to the input-layout object (see
Input-layout objects describe how vertex buffer data is streamed into the IA pipeline stage. To create an input-layout object, call ID3D11Device::CreateInputLayout.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Bind an array of vertex buffers to the input-assembler stage.
+For info about creating vertex buffers, see How to: Create a Vertex Buffer.
Calling this method using a buffer that is currently bound for writing (that is, bound to the stream output pipeline stage) will effectively bind
The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
Windows?Phone?8: This API is supported.
+Bind an index buffer to the input-assembler stage.
+ A reference to an
A
Offset (in bytes) from the start of the index buffer to the first index to use.
For information about creating index buffers, see How to: Create an Index Buffer.
Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind
The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
Windows?Phone?8: This API is supported.
+Bind information about the primitive type, and data order that describes input data for the input assembler stage.
+The type of primitive and ordering of the primitive data (see D3D11_PRIMITIVE_TOPOLOGY).
Windows?Phone?8: This API is supported.
+Get a reference to the input-layout object that is bound to the input-assembler stage.
+A reference to the input-layout object (see
For information about creating an input-layout object, see Creating the Input-Layout Object.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the vertex buffers bound to the input-assembler stage.
+The input slot of the first vertex buffer to get. The first vertex buffer is explicitly bound to the start slot; this causes each additional vertex buffer in the array to be implicitly bound to each subsequent input slot. The maximum of 16 or 32 input slots (ranges from 0 to
The number of vertex buffers to get starting at the offset. The number of buffers (plus the starting slot) cannot exceed the total number of IA-stage input slots.
A reference to an array of vertex buffers returned by the method (see
Pointer to an array of stride values returned by the method; one stride value for each buffer in the vertex-buffer array. Each stride value is the size (in bytes) of the elements that are to be used from that vertex buffer.
Pointer to an array of offset values returned by the method; one offset value for each buffer in the vertex-buffer array. Each offset is the number of bytes between the first element of a vertex buffer and the first element that will be used.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get a reference to the index buffer that is bound to the input-assembler stage.
+A reference to an index buffer returned by the method (see
Specifies format of the data in the index buffer (see
Offset (in bytes) from the start of the index buffer, to the first index to use.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get information about the primitive type, and data order that describes input data for the input assembler stage.
+A reference to the type of primitive, and ordering of the primitive data (see D3D11_PRIMITIVE_TOPOLOGY).
Bind one or more render targets atomically and the depth-stencil buffer to the output-merger stage.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.
Any combination of the eight slots for render targets can have a render target set or not set.
The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.
Any combination of the eight slots for render targets can have a render target set or not set.
The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.
Any combination of the eight slots for render targets can have a render target set or not set.
The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.
Any combination of the eight slots for render targets can have a render target set or not set.
The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.
The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.
Any combination of the eight slots for render targets can have a render target set or not set.
The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.
Any combination of the eight slots for render targets can have a render target set or not set.
The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, then all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.
Any combination of the eight slots for render targets can have a render target set or not set.
The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.
+Binds resources to the output-merger stage.
+Number of render-target views (ppRenderTargetViews) and depth-stencil view (ppDepthStencilView) to bind. If you set NumViews to D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL (0xffffffff), this method does not modify the currently bound render-target views (RTVs) and also does not modify depth-stencil view (DSV).
Pointer to an array of
Pointer to a
Index into a zero-based array to begin setting unordered-access views (ranges from 0 to
For the Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - 1. D3D11_1_UAV_SLOT_COUNT is defined as 64.
For pixel shaders, UAVStartSlot should be equal to the number of render-target views being bound.
Number of unordered-access views (UAVs) in ppUnorderedAccessView. If you set NumUAVs to D3D11_KEEP_UNORDERED_ACCESS_VIEWS (0xffffffff), this method does not modify the currently bound unordered-access views.
For the Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - UAVStartSlot.
Pointer to an array of
An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable UAV. pUAVInitialCounts is relevant only for UAVs that were created with either
For pixel shaders, the render targets and unordered-access views share the same resource slots when being written out. This means that UAVs must be given an offset so that they are placed in the slots after the render target views that are being bound.
Note??RTVs, DSV, and UAVs cannot be set independently; they all need to be set at the same time.
Two RTVs conflict if they share a subresource (and therefore share the same resource).
Two UAVs conflict if they share a subresource (and therefore share the same resource).
An RTV conflicts with a UAV if they share a subresource or share a bind point.
OMSetRenderTargetsAndUnorderedAccessViews operates properly in the following situations:
NumViews != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL and NumUAVs != D3D11_KEEP_UNORDERED_ACCESS_VIEWS
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews performs the following tasks:
NumViews == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only UAVs.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppUnorderedAccessView.
OMSetRenderTargetsAndUnorderedAccessViews ignores ppDepthStencilView, and the current depth-stencil view remains bound.
NumUAVs == D3D11_KEEP_UNORDERED_ACCESS_VIEWS
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only RTVs and DSV.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppRenderTargetViews and ppDepthStencilView.
OMSetRenderTargetsAndUnorderedAccessViews ignores UAVStartSlot.
Binds resources to the output-merger stage.
+Number of render-target views (ppRenderTargetViews) and depth-stencil view (ppDepthStencilView) to bind. If you set NumViews to D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL (0xffffffff), this method does not modify the currently bound render-target views (RTVs) and also does not modify depth-stencil view (DSV).
Pointer to an array of
Pointer to a
Index into a zero-based array to begin setting unordered-access views (ranges from 0 to
For the Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - 1. D3D11_1_UAV_SLOT_COUNT is defined as 64.
For pixel shaders, UAVStartSlot should be equal to the number of render-target views being bound.
Number of unordered-access views (UAVs) in ppUnorderedAccessView. If you set NumUAVs to D3D11_KEEP_UNORDERED_ACCESS_VIEWS (0xffffffff), this method does not modify the currently bound unordered-access views.
For the Direct3D 11.1 runtime, which is available starting with Windows Developer Preview, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - UAVStartSlot.
Pointer to an array of
An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable UAV. pUAVInitialCounts is relevant only for UAVs that were created with either
For pixel shaders, the render targets and unordered-access views share the same resource slots when being written out. This means that UAVs must be given an offset so that they are placed in the slots after the render target views that are being bound.
Note??RTVs, DSV, and UAVs cannot be set independently; they all need to be set at the same time.
Two RTVs conflict if they share a subresource (and therefore share the same resource).
Two UAVs conflict if they share a subresource (and therefore share the same resource).
An RTV conflicts with a UAV if they share a subresource or share a bind point.
OMSetRenderTargetsAndUnorderedAccessViews operates properly in the following situations:
NumViews != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL and NumUAVs != D3D11_KEEP_UNORDERED_ACCESS_VIEWS
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews performs the following tasks:
NumViews == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only UAVs.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppUnorderedAccessView.
OMSetRenderTargetsAndUnorderedAccessViews ignores ppDepthStencilView, and the current depth-stencil view remains bound.
NumUAVs == D3D11_KEEP_UNORDERED_ACCESS_VIEWS
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only RTVs and DSV.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppRenderTargetViews and ppDepthStencilView.
OMSetRenderTargetsAndUnorderedAccessViews ignores UAVStartSlot.
Bind one or more render targets atomically and the depth-stencil buffer to the output-merger stage.
+The maximum number of active render targets a device can have active at any given time is set by a #define in D3D11.h called
If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
If the render-target views were created from an array resource type, all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.
Any combination of the eight slots for render targets can have a render target set or not set.
The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.
+Binds resources to the output-merger stage.
+ Number of render targets to bind (ranges between 0 and
Pointer to an array of
Pointer to a
Index into a zero-based array to begin setting unordered-access views (ranges from 0 to
For the Direct3D 11.1 runtime, which is available starting with Windows?8, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - 1. D3D11_1_UAV_SLOT_COUNT is defined as 64.
For pixel shaders, UAVStartSlot should be equal to the number of render-target views being bound.
Number of unordered-access views (UAVs) in ppUnorderedAccessViews. If you set NumUAVs to D3D11_KEEP_UNORDERED_ACCESS_VIEWS (0xffffffff), this method does not modify the currently bound unordered-access views.
For the Direct3D 11.1 runtime, which is available starting with Windows?8, this value can range from 0 to D3D11_1_UAV_SLOT_COUNT - UAVStartSlot.
Pointer to an array of
An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable UAV. pUAVInitialCounts is relevant only for UAVs that were created with either D3D11_BUFFER_UAV_FLAG_APPEND or D3D11_BUFFER_UAV_FLAG_COUNTER specified when the UAV was created; otherwise, the argument is ignored.
For pixel shaders, the render targets and unordered-access views share the same resource slots when being written out. This means that UAVs must be given an offset so that they are placed in the slots after the render target views that are being bound.
Note??RTVs, DSV, and UAVs cannot be set independently; they all need to be set at the same time.?Two RTVs conflict if they share a subresource (and therefore share the same resource).
Two UAVs conflict if they share a subresource (and therefore share the same resource).
An RTV conflicts with a UAV if they share a subresource or share a bind point.
OMSetRenderTargetsAndUnorderedAccessViews operates properly in the following situations:
NumRTVs != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL and NumUAVs != D3D11_KEEP_UNORDERED_ACCESS_VIEWS
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews performs the following tasks:
NumRTVs == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only UAVs.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppUnorderedAccessViews.
OMSetRenderTargetsAndUnorderedAccessViews ignores ppDepthStencilView, and the current depth-stencil view remains bound.
NumUAVs == D3D11_KEEP_UNORDERED_ACCESS_VIEWS
In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only RTVs and DSV.
The following conditions must be true for OMSetRenderTargetsAndUnorderedAccessViews to succeed and for the runtime to pass the bind information to the driver:
OMSetRenderTargetsAndUnorderedAccessViews unbinds the following items:
OMSetRenderTargetsAndUnorderedAccessViews binds ppRenderTargetViews and ppDepthStencilView.
OMSetRenderTargetsAndUnorderedAccessViews ignores UAVStartSlot.
Windows?Phone?8: This API is supported.
+Set the blend state of the output-merger stage.
+Pointer to a blend-state interface (see
Array of blend factors, one for each RGBA component. The blend factors modulate values for the pixel shader, render target, or both. If you created the blend-state object with D3D11_BLEND_BLEND_FACTOR or D3D11_BLEND_INV_BLEND_FACTOR, the blending stage uses the non-
32-bit sample coverage. The default value is 0xffffffff. See remarks.
Blend state is used by the output-merger stage to determine how to blend together two RGB pixel values and two alpha values. The two RGB pixel values and two alpha values are the RGB pixel value and alpha value that the pixel shader outputs and the RGB pixel value and alpha value already in the output render target. The blend option controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The blend operation controls how the blending stage mathematically combines these modulated values.
To create a blend-state interface, call ID3D11Device::CreateBlendState.
Passing in
| State | Default Value |
|---|---|
| AlphaToCoverageEnable | |
| IndependentBlendEnable | |
| RenderTarget[0].BlendEnable | |
| RenderTarget[0].SrcBlend | D3D11_BLEND_ONE |
| RenderTarget[0].DestBlend | D3D11_BLEND_ZERO |
| RenderTarget[0].BlendOp | D3D11_BLEND_OP_ADD |
| RenderTarget[0].SrcBlendAlpha | D3D11_BLEND_ONE |
| RenderTarget[0].DestBlendAlpha | D3D11_BLEND_ZERO |
| RenderTarget[0].BlendOpAlpha | D3D11_BLEND_OP_ADD |
| RenderTarget[0].RenderTargetWriteMask | D3D11_COLOR_WRITE_ENABLE_ALL |
?
A sample mask determines which samples get updated in all the active render targets. The mapping of bits in a sample mask to samples in a multisample render target is the responsibility of an individual application. A sample mask is always applied; it is independent of whether multisampling is enabled, and does not depend on whether an application uses multisample render targets.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets the depth-stencil state of the output-merger stage.
+Pointer to a depth-stencil state interface (see
Reference value to perform against when doing a depth-stencil test. See remarks.
To create a depth-stencil state interface, call ID3D11Device::CreateDepthStencilState.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Get references to the resources bound to the output-merger stage.
+Number of render targets to retrieve.
Pointer to an array of
Pointer to a
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get references to the resources bound to the output-merger stage.
+The number of render-target views to retrieve.
Pointer to an array of
Pointer to a
Index into a zero-based array to begin retrieving unordered-access views (ranges from 0 to
Number of unordered-access views to return in ppUnorderedAccessViews. This number ranges from 0 to
Pointer to an array of
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
Windows?Phone?8: This API is supported.
+Set the blend state of the output-merger stage.
+Pointer to a blend-state interface (see
Array of blend factors, one for each RGBA component. The blend factors modulate values for the pixel shader, render target, or both. If you created the blend-state object with D3D11_BLEND_BLEND_FACTOR or D3D11_BLEND_INV_BLEND_FACTOR, the blending stage uses the non-
32-bit sample coverage. The default value is 0xffffffff. See remarks.
Blend state is used by the output-merger stage to determine how to blend together two RGB pixel values and two alpha values. The two RGB pixel values and two alpha values are the RGB pixel value and alpha value that the pixel shader outputs and the RGB pixel value and alpha value already in the output render target. The blend option controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The blend operation controls how the blending stage mathematically combines these modulated values.
To create a blend-state interface, call ID3D11Device::CreateBlendState.
Passing in
| State | Default Value |
|---|---|
| AlphaToCoverageEnable | |
| IndependentBlendEnable | |
| RenderTarget[0].BlendEnable | |
| RenderTarget[0].SrcBlend | D3D11_BLEND_ONE |
| RenderTarget[0].DestBlend | D3D11_BLEND_ZERO |
| RenderTarget[0].BlendOp | D3D11_BLEND_OP_ADD |
| RenderTarget[0].SrcBlendAlpha | D3D11_BLEND_ONE |
| RenderTarget[0].DestBlendAlpha | D3D11_BLEND_ZERO |
| RenderTarget[0].BlendOpAlpha | D3D11_BLEND_OP_ADD |
| RenderTarget[0].RenderTargetWriteMask | D3D11_COLOR_WRITE_ENABLE_ALL |
?
A sample mask determines which samples get updated in all the active render targets. The mapping of bits in a sample mask to samples in a multisample render target is the responsibility of an individual application. A sample mask is always applied; it is independent of whether multisampling is enabled, and does not depend on whether an application uses multisample render targets.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Gets the depth-stencil state of the output-merger stage.
+ Address of a reference to a depth-stencil state interface (see
Pointer to the stencil reference value used in the depth-stencil test.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
Windows?Phone?8: This API is supported.
+All scissor rects must be set atomically as one operation. Any scissor rects not defined by the call are disabled.
The scissor rectangles will only be used if ScissorEnable is set to true in the rasterizer state (see
Which scissor rectangle to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader (see shader semantic syntax). If a geometry shader does not make use of the SV_ViewportArrayIndex semantic then Direct3D will use the first scissor rectangle in the array.
Each scissor rectangle in the array corresponds to a viewport in an array of viewports (see
All scissor rects must be set atomically as one operation. Any scissor rects not defined by the call are disabled.
The scissor rectangles will only be used if ScissorEnable is set to true in the rasterizer state (see
Which scissor rectangle to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader (see shader semantic syntax). If a geometry shader does not make use of the SV_ViewportArrayIndex semantic then Direct3D will use the first scissor rectangle in the array.
Each scissor rectangle in the array corresponds to a viewport in an array of viewports (see
All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.
Which viewport to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
+All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.
Which viewport to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
+All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.
Which viewport to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.
Which viewport to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
Gets or sets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
+ If you call Map on a deferred context, you can only pass D3D11_MAP_WRITE_DISCARD, D3D11_MAP_WRITE_NO_OVERWRITE, or both to the MapType parameter. Other
For info about how to use Map, see How to: Use dynamic resources.
+Set the rasterizer state for the rasterizer stage of the pipeline.
+To create a rasterizer state interface, call ID3D11Device::CreateRasterizerState.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Bind an array of viewports to the rasterizer stage of the pipeline.
+Number of viewports to bind.
An array of
All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.
Which viewport to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.
Note??Even though you specify float values to the members of theBind an array of scissor rectangles to the rasterizer stage.
+Number of scissor rectangles to bind.
An array of scissor rectangles (see D3D11_RECT).
All scissor rects must be set atomically as one operation. Any scissor rects not defined by the call are disabled.
The scissor rectangles will only be used if ScissorEnable is set to true in the rasterizer state (see
Which scissor rectangle to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader (see shader semantic syntax). If a geometry shader does not make use of the SV_ViewportArrayIndex semantic then Direct3D will use the first scissor rectangle in the array.
Each scissor rectangle in the array corresponds to a viewport in an array of viewports (see ID3D11DeviceContext::RSSetViewports).
Windows?Phone?8: This API is supported.
+Gets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
+ If you call Map on a deferred context, you can only pass D3D11_MAP_WRITE_DISCARD, D3D11_MAP_WRITE_NO_OVERWRITE, or both to the MapType parameter. Other
For info about how to use Map, see How to: Use dynamic resources.
+Gets the array of viewports bound to the rasterizer stage.
+ A reference to a variable that, on input, specifies the number of viewports (ranges from 0 to D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) in the pViewports array; on output, the variable contains the actual number of viewports that are bound to the rasterizer stage. If pViewports is
An array of
Windows?Phone?8: This API is supported.
+Get the array of scissor rectangles bound to the rasterizer stage.
+The number of scissor rectangles (ranges between 0 and D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) bound; set pRects to
An array of scissor rectangles (see D3D11_RECT). If NumRects is greater than the number of scissor rects currently bound, then unused members of the array will contain 0.
Set the target output buffers for the stream-output stage of the pipeline.
+The number of buffer to bind to the device. A maximum of four output buffers can be set. If less than four are defined by the call, the remaining buffer slots are set to
The array of output buffers (see
Array of offsets to the output buffers from ppSOTargets, one offset for each buffer. The offset values must be in bytes.
An offset of -1 will cause the stream output buffer to be appended, continuing after the last location written to the buffer in a previous stream output pass.
Calling this method using a buffer that is currently bound for writing will effectively bind
The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Set the target output buffers for the stream-output stage of the pipeline.
+ The number of buffer to bind to the device. A maximum of four output buffers can be set. If less than four are defined by the call, the remaining buffer slots are set to
The array of output buffers (see
Array of offsets to the output buffers from ppSOTargets, one offset for each buffer. The offset values must be in bytes.
An offset of -1 will cause the stream output buffer to be appended, continuing after the last location written to the buffer in a previous stream output pass.
Calling this method using a buffer that is currently bound for writing will effectively bind
The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
Windows?Phone?8: This API is supported.
+Get the target output buffers for the stream-output stage of the pipeline.
+Number of buffers to get.
An array of output buffers (see
A maximum of four output buffers can be retrieved.
The offsets to the output buffers pointed to in the returned ppSOTargets array may be assumed to be -1 (append), as defined for use in ID3D11DeviceContext::SOSetTargets.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
Windows?Phone?8: This API is supported.
+Copies a region from a source resource to a destination resource.
+A reference to the destination resource.
Destination subresource index.
The x-coordinate of the upper-left corner of the destination region.
The y-coordinate of the upper-left corner of the destination region. For a 1D subresource, this must be zero.
The z-coordinate of the upper-left corner of the destination region. For a 1D or 2D subresource, this must be zero.
A reference to the source resource.
Source subresource index.
A reference to a 3D box that defines the region of the source subresource that CopySubresourceRegion1 can copy. If
An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, CopySubresourceRegion1 doesn't perform a copy operation.
A
If the display driver supports overlapping, the source and destination subresources can be identical, and the source and destination regions can overlap each other. For existing display drivers that don?t support overlapping, the runtime drops calls with identical source and destination subresources, regardless of whether the regions overlap. To determine whether the display driver supports overlapping, check the CopyWithOverlap member of
The CPU copies data from memory to a subresource created in non-mappable memory.
+A reference to the destination resource.
A zero-based index that identifies the destination subresource. See D3D11CalcSubresource for more details.
A reference to a box that defines the portion of the destination subresource to copy the resource data into. Coordinates are in bytes for buffers and in texels for textures. If
An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, UpdateSubresource1 doesn't perform an update operation.
A reference to the source data in memory.
The size of one row of the source data.
The size of one depth slice of source data.
A
If you call UpdateSubresource1 to update a constant buffer, pass any region, and the driver has not been implemented to Windows?8, the runtime drops the call (except feature level 9.1, 9.2, and 9.3 where the runtime emulates support). The runtime also drops the call if you update a constant buffer with a partial region whose extent is not aligned to 16-byte granularity (16 bytes being a full constant). When the runtime drops the call, the runtime doesn't call the corresponding device driver interface (DDI).
When you record a call to UpdateSubresource with an offset pDstBox in a software command list, the offset in pDstBox is incorrectly applied to pSrcData when you play back the command list. The new-for-Windows?8UpdateSubresource1 fixes this issue. In a call to UpdateSubresource1, pDstBox does not affect pSrcData.
For info about various resource types and how UpdateSubresource1 might work with each resource type, see Introduction to a Resource in Direct3D 11.
Note??Applies only to feature level 9_x hardware If you use UpdateSubresource1 or ID3D11DeviceContext1::CopySubresourceRegion1 to copy from a staging resource to a default resource, you can corrupt the destination contents. This occurs if you pass aDiscards a resource from the device context.
+A reference to the
DiscardResource informs the graphics processing unit (GPU) that the existing content in the resource that pResource points to is no longer needed.
+Discards a resource view from the device context.
+A reference to the
DiscardView informs the graphics processing unit (GPU) that the existing content in the resource view that pResourceView points to is no longer needed. The view can be an SRV, RTV, UAV, or DSV. DiscardView is a variation on the DiscardResource method. DiscardView allows you to discard a subset of a resource that is in a view (such as a single miplevel). More importantly, DiscardView provides a convenience because often views are what are being bound and unbound at the pipeline. Some pipeline bindings do not have views, such as stream output. In that situation, DiscardResource can do the job for any resource.
+Sets the constant buffers that the vertex shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to VSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to VSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the hull-shader stage of the pipeline uses.
+The runtime drops the call to HSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to HSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If the pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the domain-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to DSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to DSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the geometry shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to GSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to GSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the pixel shader pipeline stage uses, and enables the shader to access other parts of the buffer.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
To enable the shader to access other parts of the buffer, call PSSetConstantBuffers1 instead of PSSetConstantBuffers. PSSetConstantBuffers1 has additional parameters pFirstConstant and pNumConstants.
The runtime drops the call to PSSetConstantBuffers1 if the numbers of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders. The maximum constant buffer size that is supported by shaders holds 4096 constants, where each constant has four 32-bit components.
The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the following window (range):
[value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]
That is, the window is the range is from (value in an element of pFirstConstant) to (value in an element of pFirstConstant + value in an element of pNumConstants).
The runtime also drops the call to PSSetConstantBuffers1 on existing drivers that do not support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the compute-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to CSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to CSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Gets the constant buffers that the vertex shader pipeline stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the hull-shader stage uses.
+If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the domain-shader stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the geometry shader pipeline stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the pixel shader pipeline stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Gets the constant buffers that the compute-shader stage uses.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references to be returned by the method.
A reference to an array that receives the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets pFirstConstant to
A reference to an array that receives the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. The runtime sets pNumConstants to
If no buffer is bound at a slot, pFirstConstant and pNumConstants are
Activates the given context state object and changes the current device behavior to Direct3D?11, Direct3D?10.1, or Direct3D?10.
+A reference to the
A reference to a variable that receives a reference to the
SwapDeviceContextState changes device behavior. This device behavior depends on the emulated interface that you passed to the EmulatedInterface parameter of the ID3D11Device1::CreateDeviceContextState method when you created the context state object.
SwapDeviceContextState is not supported on a deferred context.
SwapDeviceContextState disables the incompatible device interfaces ID3D10Device, ID3D10Device1, __uuidof( or __uuidof( turns off most of the Direct3D?10 device interfaces. A context state object that is created with __uuidof(ID3D10Device1) or __uuidof(ID3D10Device) turns off most of the
SwapDeviceContextState activates the context state object specified by pState. This means that the device behaviors that are associated with the context state object's feature level and compatible interface are activated on the Direct3D device until the next call to SwapDeviceContextState. In addition, any state that was saved when this context state object was last active is now reactivated, so that the previous state is replaced.
SwapDeviceContextState sets ppPreviousState to the most recently activated context state object. The object allows the caller to save and then later restore the previous device state. This behavior is useful in a plug-in architecture such as Direct2D that shares a Direct3D device with its plug-ins. A Direct2D interface can use context state objects to save and restore the application's state.
If the caller did not previously call the ID3D11Device1::CreateDeviceContextState method to create a previous context state object, SwapDeviceContextState sets ppPreviousState to the default context state object. In either case, usage of SwapDeviceContextState is the same.
The feature level that is specified by the application, and that is chosen by the context state object from the acceptable list that the application supplies to ID3D11Device1::CreateDeviceContextState, controls the feature level of the immediate context whenever the context state object is active. Because the Direct3D?11 device is free-threaded, the device methods cannot query the current immediate context feature level. Instead, the device runs at a feature level that is the maximum of all previously created context state objects' feature levels. This means that the device's feature level can increase dynamically.
The feature level of the context state object controls the functionality available from the immediate context. However, to maintain the free-threaded contract of the Direct3D?11 device methods?the resource-creation methods in particular?the upper-bound feature level of all created context state objects controls the set of resources that the device creates.
Because the context state object interface is published by the immediate context, the interface requires the same threading model as the immediate context. Specifically, SwapDeviceContextState is single-threaded with respect to the other immediate context methods and with respect to the equivalent methods of ID3D10Device.
Crucially, because only one of the Direct3D?10 or Direct3D?11 ref-count behaviors can be available at a time, one of the Direct3D?10 and Direct3D?11 interfaces must break its ref-count contract. To avoid this situation, the activation of a context state object turns off the incompatible version interface. Also, if you call a method of an incompatible version interface, the call silently fails if the method has return type void, returns an
When you switch from Direct3D?11 mode to either Direct3D?10 mode or Direct3D?10.1 mode, the binding behavior of the device changes. Specifically, the final release of a resource induces unbind in Direct3D?10 mode or Direct3D?10.1 mode. During final release an application releases all of the resource's references, including indirect references such as the linkage from view to resource, and the linkage from context state object to any of the context state object's bound resources. Any bound resource to which the application has no reference is unbound and destroyed, in order to maintain the Direct3D?10 behavior.
SwapDeviceContextState does not affect any state that
Command lists that are generated by deferred contexts do not hold a reference to context state objects and are not affected by future updates to context state objects.
No asynchronous objects are affected by SwapDeviceContextState. For example, if a query is active before a call to SwapDeviceContextState, it is still active after the call.
+Sets all the elements in a resource view to one value.
+A reference to the
A 4-component array that represents the color to use to clear the resource view.
An array of D3D11_RECT structures for the rectangles in the resource view to clear. If
Number of rectangles in the array that the pRect parameter specifies.
ClearView works only on render-target views (RTVs), depth/stencil views (DSVs) on depth-only resources (resources with no stencil component), unordered-access views (UAVs), or any video view of a Texture2D surface. The runtime drops invalid calls. Empty rectangles in the pRect array are a no-op. A rectangle is empty if the top value equals the bottom value or the left value equals the right value.
ClearView doesn?t support 3D textures.
ClearView applies the same color value to all array slices in a view; all rectangles in the pRect array correspond to each array slice. The pRect array of rectangles is a set of areas to clear on a single surface. If the view is an array, ClearView clears all the rectangles on each array slice individually.
When you apply rectangles to buffers, set the top value to 0 and the bottom value to 1 and set the left value and right value to describe the extent within the buffer. When the top value equals the bottom value or the left value equals the right value, the rectangle is empty and a no-op is achieved.
The driver converts and clamps color values to the destination format as appropriate per Direct3D conversion rules. For example, if the format of the view is DXGI_FORMAT_R8G8B8A8_UNORM, the driver clamps inputs to 0.0f to 1.0f (+INF -> 1.0f (0XFF)/NaN -> 0.0f).
If the format is integer, such as DXGI_FORMAT_R8G8B8A8_UINT, the runtime interprets inputs as integral floats. Therefore, 235.0f maps to 235 (rounds to zero, out of range/INF values clamp to target range, and NaN to 0).
Here are the color mappings:
For video views with YUV or YCbBr formats, ClearView doesn't convert color values. In situations where the format name doesn?t indicate _UNORM, _UINT, and so on, ClearView assumes _UINT. Therefore, 235.0f maps to 235 (rounds to zero, out of range/INF values clamp to target range, and NaN to 0).
+Discards the specified elements in a resource view from the device context.
+ A reference to the
An array of D3D11_RECT structures for the rectangles in the resource view to discard. If
Number of rectangles in the array that the pRects parameter specifies.
DiscardView1 informs the graphics processing unit (GPU) that the existing content in the specified elements in the resource view that pResourceView points to is no longer needed. The view can be an SRV, RTV, UAV, or DSV. DiscardView1 is a variation on the DiscardResource method. DiscardView1 allows you to discard elements of a subset of a resource that is in a view (such as elements of a single miplevel). More importantly, DiscardView1 provides a convenience because often views are what are being bound and unbound at the pipeline. Some pipeline bindings do not have views, such as stream output. In that situation, DiscardResource can do the job for any resource.
+Sets the constant buffers that the vertex shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to VSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to VSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the vertex shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to VSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to VSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the hull-shader stage of the pipeline uses.
+The runtime drops the call to HSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to HSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If the pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the hull-shader stage of the pipeline uses.
+The runtime drops the call to HSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to HSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If the pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the domain-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to DSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to DSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the domain-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to DSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to DSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the geometry shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to GSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to GSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the geometry shader pipeline stage uses.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to GSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to GSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the pixel shader pipeline stage uses, and enables the shader to access other parts of the buffer.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
To enable the shader to access other parts of the buffer, call PSSetConstantBuffers1 instead of PSSetConstantBuffers. PSSetConstantBuffers1 has additional parameters pFirstConstant and pNumConstants.
The runtime drops the call to PSSetConstantBuffers1 if the numbers of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders. The maximum constant buffer size that is supported by shaders holds 4096 constants, where each constant has four 32-bit components.
The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the following window (range):
[value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]
That is, the window is the range is from (value in an element of pFirstConstant) to (value in an element of pFirstConstant + value in an element of pNumConstants).
The runtime also drops the call to PSSetConstantBuffers1 on existing drivers that do not support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the pixel shader pipeline stage uses, and enables the shader to access other parts of the buffer.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers being given to the device.
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
To enable the shader to access other parts of the buffer, call PSSetConstantBuffers1 instead of PSSetConstantBuffers. PSSetConstantBuffers1 has additional parameters pFirstConstant and pNumConstants.
The runtime drops the call to PSSetConstantBuffers1 if the numbers of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders. The maximum constant buffer size that is supported by shaders holds 4096 constants, where each constant has four 32-bit components.
The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the following window (range):
[value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]
That is, the window is the range is from (value in an element of pFirstConstant) to (value in an element of pFirstConstant + value in an element of pNumConstants).
The runtime also drops the call to PSSetConstantBuffers1 on existing drivers that do not support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the compute-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to CSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to CSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Sets the constant buffers that the compute-shader stage uses.
+Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
An array that holds the offsets into the buffers that ppConstantBuffers specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.
An array that holds the numbers of constants in the buffers that ppConstantBuffers specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the pFirstConstant array. Each number of constants must be a multiple of 16 constants, in the range [0..4096].
The runtime drops the call to CSSetConstantBuffers1 if the number of constants to which pNumConstants points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the pFirstConstant and pFirstConstant + pNumConstants arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of pFirstConstant, value in an element of pFirstConstant + value in an element of pNumConstants]. The runtime also drops the call to CSSetConstantBuffers1 on existing drivers that don't support this offsetting.
The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.
From the shader?s point of view, element [0] in the constant buffers array is the constant at pFirstConstant.
Out of bounds access to the constant buffers from the shader to the range that is defined by pFirstConstant and pNumConstants returns 0.
If pFirstConstant and pNumConstants arrays are
If either pFirstConstant or pNumConstants is
Allows apps to determine when either a capture or profiling request is enabled.
+Returns TRUE if the capture tool is present and capturing or the app is being profiled such that SetMarkerInt or BeginEventInt will be logged to ETW. Otherwise, it returns
If apps detect that capture is being performed, they can prevent the Direct3D debugging tools, such as Microsoft Visual Studio?2013, from capturing them. The purpose of the D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY flag prior to Windows?8.1 was to allow the Direct3D runtime to prevent debugging tools from capturing apps.
+Updates mappings of tile locations in tiled resources to memory locations in a tile pool.
+A reference to the tiled resource.
The number of tiled resource regions.
An array of
An array of
A reference to the tile pool.
The number of tile-pool ranges.
An array of
An array of offsets into the tile pool. These are 0-based tile offsets, counting in tiles (not bytes).
An array of tiles.
An array of values that specify the number of tiles in each tile-pool range. The NumRanges parameter specifies the number of values in the array.
A combination of D3D11_TILE_MAPPING_FLAGS values that are combined by using a bitwise OR operation.
Returns
The debug layer will emit an error.
If out of memory occurs when this is called in a commandlist and the commandlist is being executed, the device will be removed. Apps can avoid this situation by only doing update calls that change existing mappings from tiled resources within commandlists (so drivers will not have to allocate page table memory, only change the mapping).
In a single call to UpdateTileMappings, you can map one or more ranges of resource tiles to one or more ranges of tile-pool tiles.
You can organize the parameters of UpdateTileMappings in these ways to perform an update:
If pTiledResourceRegionStartCoordinates isn't
The updates are applied from first region to last; so, if regions overlap in a single call, the updates later in the list overwrite the areas that overlap with previous updates.
NumRanges specifies the number of tile ranges, where the total tiles identified across all ranges must match the total number of tiles in the tile regions from the previously described tiled resource. Mappings are defined by iterating through the tiles in the tile regions in sequential order - x then y then z order for box regions - while walking through the set of tile ranges in sequential order. The breakdown of tile regions doesn't have to line up with the breakdown of tile ranges, but the total number of tiles on both sides must be equal so that each tiled resource tile specified has a mapping specified.
pRangeFlags, pTilePoolStartOffsets, and pRangeTileCounts are all arrays, of size NumRanges, that describe the tile ranges. If pRangeFlags is
If tile mappings have changed on a tiled resource that the app will render via RenderTargetView or DepthStencilView, the app must clear, by using the fixed function Clear APIs, the tiles that have changed within the area being rendered (mapped or not). If an app doesn't clear in these situations, the app receives undefined values when it reads from the tiled resource. +
Note??In Direct3D 11.2, hardware can now support ClearView on depth-only formats. For more info, seeIf an app needs to preserve existing memory contents of areas in a tiled resource where mappings have changed, the app can first save the contents where tile mappings have changed, by copying them to a temporary surface, for example using CopyTiles, issuing the required Clear, and then copying the contents back. +
Suppose a tile is mapped into multiple tiled resources at the same time and tile contents are manipulated by any means (render, copy, and so on) via one of the tiled resources. Then, if the same tile is to be rendered via any other tiled resource, the tile must be cleared first as previously described. +
For more info about tiled resources, see Tiled resources.
Here are some examples of common UpdateTileMappings cases:
+Copies mappings from a source tiled resource to a destination tiled resource.
+A reference to the destination tiled resource.
A reference to a
A reference to the source tiled resource.
A reference to a
A reference to a
A combination of D3D11_TILE_MAPPING_FLAGS values that are combined by using a bitwise OR operation. The only valid value is D3D11_TILE_MAPPING_NO_OVERWRITE, which indicates that previously submitted commands to the device that may still be executing do not reference any of the tile region being updated. The device can then avoid having to flush previously submitted work to perform the tile mapping update. If the app violates this promise by updating tile mappings for locations in tiled resources that are still being referenced by outstanding commands, undefined rendering behavior results, including the potential for significant slowdowns on some architectures. This is like the "no overwrite" concept that exists elsewhere in the Direct3D API, except applied to the tile mapping data structure itself (which in hardware is a page table). The absence of the D3D11_TILE_MAPPING_NO_OVERWRITE value requires that tile mapping updates that CopyTileMappings specifies must be completed before any subsequent Direct3D command can proceed.
Returns
The dest and the source regions must each entirely fit in their resource or behavior is undefined (debug layer will emit an error).
If out of memory occurs when this is called in a commandlist and the commandlist is being executed, the device will be removed. Applications can avoid this situation by only doing update calls that change existing mappings from Tiled Resources within commandlists (so drivers will not have to allocate page table memory, only change the mapping).
CopyTileMappings helps with tasks such as shifting mappings around within and across tiled resources, for example, scrolling tiles. The source and destination regions can overlap; the result of the copy in this situation is as if the source was saved to a temp location and then from there written to the destination.
For more info about tiled resources, see Tiled resources.
+Copies tiles from buffer to tiled resource or vice versa.
+A reference to a tiled resource.
A reference to a
A reference to a
A reference to an
The offset in bytes into the buffer at pBuffer to start the operation.
A combination of
CopyTiles drops write operations to unmapped areas and handles read operations from unmapped areas (except on Tier_1 tiled resources, where reading and writing unmapped areas is invalid).
If a copy operation involves writing to the same memory location multiple times because multiple locations in the destination resource are mapped to the same tile memory, the resulting write operations to multi-mapped tiles are non-deterministic and non-repeatable; that is, accesses to the tile memory happen in whatever order the hardware happens to execute the copy operation.
The tiles involved in the copy operation can't include tiles that contain packed mipmaps or results of the copy operation are undefined. To transfer data to and from mipmaps that the hardware packs into one tile, you must use the standard (that is, non-tile specific) copy and update APIs (like ID3D11DeviceContext1::CopySubresourceRegion1 and ID3D11DeviceContext1::UpdateSubresource1) or ID3D11DeviceContext::GenerateMips for the whole mipmap chain.
The memory layout of the tiles in the non-tiled buffer resource side of the copy operation is linear in memory within 64 KB tiles, which the hardware and driver swizzle and deswizzle per tile as appropriate when they transfer to and from a tiled resource. For multisample antialiasing (MSAA) surfaces, the hardware and driver traverse each pixel's samples in sample-index order before they move to the next pixel. For tiles that are partially filled on the right side (for a surface that has a width not a multiple of tile width in pixels), the pitch and stride to move down a row is the full size in bytes of the number pixels that would fit across the tile if the tile was full. So, there can be a gap between each row of pixels in memory. Mipmaps that are smaller than a tile are not packed together in the linear layout, which might seem to be a waste of memory space, but as mentioned you can't use CopyTiles or ID3D11DeviceContext2::UpdateTiles to copy to mipmaps that the hardware packs together. You can just use generic copy and update APIs (like ID3D11DeviceContext1::CopySubresourceRegion1 and ID3D11DeviceContext1::UpdateSubresource1) to copy small mipmaps individually. Although in the case of a generic copy API (like ID3D11DeviceContext1::CopySubresourceRegion1), the linear memory must be the same dimension as the tiled resource; ID3D11DeviceContext1::CopySubresourceRegion1 can't copy from a buffer resource to a Texture2D for instance.
For more info about tiled resources, see Tiled resources.
+Updates tiles by copying from app memory to the tiled resource.
+A reference to a tiled resource to update.
A reference to a
A reference to a
A reference to memory that contains the source tile data that UpdateTiles uses to update the tiled resource.
A combination of
UpdateTiles drops write operations to unmapped areas (except on Tier_1 tiled resources, where writing to unmapped areas is invalid).
If a copy operation involves writing to the same memory location multiple times because multiple locations in the destination resource are mapped to the same tile memory, the resulting write operations to multi-mapped tiles are non-deterministic and non-repeatable; that is, accesses to the tile memory happen in whatever order the hardware happens to execute the copy operation.
The tiles involved in the copy operation can't include tiles that contain packed mipmaps or results of the copy operation are undefined. To transfer data to and from mipmaps that the hardware packs into one tile, you must use the standard (that is, non-tile specific) copy and update APIs (like ID3D11DeviceContext1::CopySubresourceRegion1 and ID3D11DeviceContext1::UpdateSubresource1) or ID3D11DeviceContext::GenerateMips for the whole mipmap chain.
The memory layout of the data on the source side of the copy operation is linear in memory within 64 KB tiles, which the hardware and driver swizzle and deswizzle per tile as appropriate when they transfer to and from a tiled resource. For multisample antialiasing (MSAA) surfaces, the hardware and driver traverse each pixel's samples in sample-index order before they move to the next pixel. For tiles that are partially filled on the right side (for a surface that has a width not a multiple of tile width in pixels), the pitch and stride to move down a row is the full size in bytes of the number pixels that would fit across the tile if the tile was full. So, there can be a gap between each row of pixels in memory. Mipmaps that are smaller than a tile are not packed together in the linear layout, which might seem to be a waste of memory space, but as mentioned you can't use ID3D11DeviceContext2::CopyTiles or UpdateTiles to copy to mipmaps that the hardware packs together. You can just use generic copy and update APIs (like ID3D11DeviceContext1::CopySubresourceRegion1 and ID3D11DeviceContext1::UpdateSubresource1) to copy small mipmaps individually. Although in the case of a generic copy API (like ID3D11DeviceContext1::CopySubresourceRegion1), the linear memory must be the same dimension as the tiled resource; ID3D11DeviceContext1::CopySubresourceRegion1 can't copy from a buffer resource to a Texture2D for instance.
For more info about tiled resources, see Tiled resources.
+Resizes a tile pool.
+A reference to an
The new size in bytes of the tile pool. The size must be a multiple of 64 KB or 0.
Returns
For E_INVALIDARG or E_OUTOFMEMORY, the existing tile pool remains unchanged, which includes existing mappings.
ResizeTilePool increases or decreases the size of the tile pool depending on whether the app needs more or less working set for the tiled resources that are mapped into it. An app can allocate additional tile pools for new tiled resources, but if any single tiled resource needs more space than initially available in its tile pool, the app can increase the size of the resource's tile pool. A tiled resource can't have mappings into multiple tile pools simultaneously.
When you increase the size of a tile pool, additional tiles are added to the end of the tile pool via one or more new allocations by the driver; your app can't detect the breakdown into the new allocations. Existing memory in the tile pool is left untouched, and existing tiled resource mappings into that memory remain intact.
When you decrease the size of a tile pool, tiles are removed from the end (this is allowed even below the initial allocation size, down to 0). This means that new mappings can't be made past the new size. But, existing mappings past the end of the new size remain intact and useable. The memory is kept active as long as mappings to any part of the allocations that are being used for the tile pool memory remains. If after decreasing, some memory has been kept active because tile mappings are pointing to it and the tile pool is increased again (by any amount), the existing memory is reused first before any additional allocations occur to service the size of the increase.
To be able to save memory, an app has to not only decrease a tile pool but also remove and remap existing mappings past the end of the new smaller tile pool size.
The act of decreasing (and removing mappings) doesn't necessarily produce immediate memory savings. Freeing of memory depends on how granular the driver's underlying allocations for the tile pool are. When a decrease in the size of a tile pool happens to be enough to make a driver allocation unused, the driver can free the allocation. If a tile pool was increased and if you then decrease to previous sizes (and remove and remap tile mappings correspondingly), you will most likely yield memory savings. But, this scenario isn't guaranteed in the case that the sizes don't exactly align with the underlying allocation sizes chosen by the driver.
For more info about tiled resources, see Tiled resources.
+Specifies a data access ordering constraint between multiple tiled resources. For more info about this constraint, see Remarks.
+A reference to an
A reference to an
Apps can use tiled resources to reuse tiles in different resources. But, a device and driver might not be able to determine whether some memory in a tile pool that was just rendered to is now being used for reading. +
For example, an app can render to some tiles in a tile pool with one tiled resource but then read from the same tiles by using a different tiled resource. These tiled-resource operations are different from using one resource and then just switching from writing with
When an app transitions from accessing (reading or writing) some location in a tile pool with one resource to accessing the same memory (read or write) via another tiled resource (with mappings to the same memory), the app must call TiledResourceBarrier after the first use of the resource and before the second. The parameters are the pTiledResourceOrViewAccessBeforeBarrier for accesses before the barrier (via rendering, copying), and the pTiledResourceOrViewAccessAfterBarrier for accesses after the barrier by using the same tile pool memory. If the resources are identical, the app doesn't need to call TiledResourceBarrier because this kind of hazard is already tracked and handled. +
The barrier call informs the driver that operations issued to the resource before the call must complete before any accesses that occur after the call via a different tiled resource that shares the same memory. +
Either or both of the parameters (before or after the barrier) can be
An app can pass a view reference, a resource, or
For more info about tiled resources, see Tiled resources.
+Allows apps to determine when either a capture or profiling request is enabled.
+Returns TRUE if capture or profiling is enabled and
Returns TRUE if the capture tool is present and capturing or the app is being profiled such that SetMarkerInt or BeginEventInt will be logged to ETW. Otherwise, it returns
If apps detect that capture is being performed, they can prevent the Direct3D debugging tools, such as Microsoft Visual Studio?2013, from capturing them. The purpose of the D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY flag prior to Windows?8.1 was to allow the Direct3D runtime to prevent debugging tools from capturing apps.
+Allows applications to annotate graphics commands.
+An optional string that will be logged to ETW when ETW logging is active. If ?#d? appears in the string, it will be replaced by the value of the Data parameter similar to the way printf works.
A signed data value that will be logged to ETW when ETW logging is active.
SetMarkerInt allows applications to annotate graphics commands, in order to provide more context to what the GPU is executing. When ETW logging or a support tool is enabled, an additional marker is correlated between the CPU and GPU timelines. The pLabel and Data value are logged to ETW. When the appropriate ETW logging is not enabled, this method does nothing.
+Allows applications to annotate the beginning of a range of graphics commands.
+An optional string that will be logged to ETW when ETW logging is active. If ?#d? appears in the string, it will be replaced by the value of the Data parameter similar to the way printf works.
A signed data value that will be logged to ETW when ETW logging is active.
BeginEventInt allows applications to annotate the beginning of a range of graphics commands, in order to provide more context to what the GPU is executing. When ETW logging (or a supported tool) is enabled, an additional marker is correlated between the CPU and GPU timelines. The pLabel and Data value are logged to ETW. When the appropriate ETW logging is not enabled, this method does nothing.
+Allows applications to annotate the end of a range of graphics commands.
+EndEvent allows applications to annotate the end of a range of graphics commands, in order to provide more context to what the GPU is executing. When the appropriate ETW logging is not enabled, this method does nothing. When ETW logging is enabled, an additional marker is correlated between the CPU and GPU timelines.
+Gets or sets whether hardware protection is enabled.
+Sends queued-up commands in the command buffer to the graphics processing unit (GPU), with a specified context type and an optional event handle to create an event query.
+ A
An optional event handle. When specified, this method creates an event query.
Flush1 operates asynchronously, therefore it can return either before or after the GPU finishes executing the queued graphics commands, which will eventually complete. To create an event query, you can call ID3D11Device::CreateQuery with the value D3D11_QUERY_EVENT value. To determine when the GPU is finished processing the graphics commands, you can then use that event query in a call to ID3D11DeviceContext::GetData.
Flush1 has parameters. For more information, see ID3D11DeviceContext::Flush, which doesn't have parameters.
+Sets the hardware protection state.
+Specifies whether to enable hardware protection.
Gets whether hardware protection is enabled.
+ After this method returns, points to a
Get or sets the number of milliseconds to sleep after IDXGISwapChain::Present is called.
+Value is set with ID3D11Debug::SetPresentPerRenderOpDelay.
+Get or sets the swap chain that the runtime will use for automatically calling IDXGISwapChain::Present.
+The swap chain retrieved by this method will only be used if D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP is set in the feature mask.
+Set a bit field of flags that will turn debug features on and off.
+A combination of feature-mask flags that are combined by using a bitwise OR operation. If a flag is present, that feature will be set to on, otherwise the feature will be set to off. For descriptions of the feature-mask flags, see Remarks.
This method returns one of the Direct3D 11 Return Codes.
Setting one of the following feature-mask flags will cause a rendering-operation method (listed below) to do some extra task when called.
| D3D11_DEBUG_FEATURE_FINISH_PER_RENDER_OP (0x2) | Application will wait for the GPU to finish processing the rendering operation before continuing. |
| D3D11_DEBUG_FEATURE_FLUSH_PER_RENDER_OP (0x1) | Runtime will additionally call ID3D11DeviceContext::Flush. |
| D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP (0x4) | Runtime will call IDXGISwapChain::Present. Presentation of render buffers will occur according to the settings established by prior calls to ID3D11Debug::SetSwapChain and ID3D11Debug::SetPresentPerRenderOpDelay. |
?
These feature-mask flags apply to the following rendering-operation methods:
By setting one of the following feature-mask flags, you can control the behavior of the IDXGIDevice2::OfferResources and IDXGIDevice2::ReclaimResources methods to aid in testing and debugging.
Note??These flags are supported by the Direct3D 11.1 runtime, which is available starting with Windows?8.?| D3D11_DEBUG_FEATURE_ALWAYS_DISCARD_OFFERED_RESOURCE (0x8) | When you call IDXGIDevice2::OfferResources to offer resources while this flag is enabled, their content is always discarded. Use this flag to test code paths that regenerate resource content on reclaim. You cannot use this flag in combination with D3D11_DEBUG_FEATURE_NEVER_DISCARD_OFFERED_RESOURCE. |
| D3D11_DEBUG_FEATURE_NEVER_DISCARD_OFFERED_RESOURCE (0x10) | When you call IDXGIDevice2::OfferResources to offer resources while this flag is enabled, their content is never discarded. Use this flag to test code paths that do not need to regenerate resource content on reclaim. You cannot use this flag in combination with D3D11_DEBUG_FEATURE_ALWAYS_DISCARD_OFFERED_RESOURCE. |
?
The behavior of the IDXGIDevice2::OfferResources and IDXGIDevice2::ReclaimResources methods depends on system-wide memory pressure. Therefore, the scenario where content is lost and must be regenerated is uncommon for most applications. The preceding new options in the Direct3D debug layer let you simulate that scenario consistently and test code paths.
The following flag is supported by the Direct3D 11.1 runtime.
| D3D11_DEBUG_FEATURE_AVOID_BEHAVIOR_CHANGING_DEBUG_AIDS (0x40) | Disables the following default debugging behavior. |
?
When the debug layer is enabled, it performs certain actions to reveal application problems. By setting the D3D11_DEBUG_FEATURE_AVOID_BEHAVIOR_CHANGING_DEBUG_AIDS feature-mask flag, you can enable the debug layer without getting the following default debugging behavior:
The following flag is supported by the Direct3D 11.2 runtime.
| D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION (0x80) | Disables the following default debugging behavior. |
?
By default (that is, without D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION set), the debug layer validates the proper usage of all tile mappings for tiled resources for bound resources for every operation performed on the device context (for example, draw, copy, and so on). Depending on the size of the tiled resources used (if any), this validation can be processor intensive and slow. Apps might want to initially run with tiled resource tile mapping validation on; then, when they determine that the calling pattern is safe, they can disable the validation by setting D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION.
If D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION is set when a tiled resource is created, the debug layer never performs the tracking of tile mapping for that resource for its entire lifetime. Alternatively, if D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION is set for any given device context method call (like draw or copy calls) involving tiled resources, the debug layer skips all tile mapping validation for the call.
+Get a bitfield of flags that indicates which debug features are on or off.
+Mask of feature-mask flags bitwise ORed together. If a flag is present, then that feature will be set to on, otherwise the feature will be set to off. See ID3D11Debug::SetFeatureMask for a list of possible feature-mask flags.
Set the number of milliseconds to sleep after IDXGISwapChain::Present is called.
+This method returns one of the following Direct3D 11 Return Codes.
The application will only sleep if D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP is a set in the feature mask. If that flag is not set the number of milliseconds is set but ignored and the application does not sleep. 10ms is used as a default value if this method is never called.
+Get the number of milliseconds to sleep after IDXGISwapChain::Present is called.
+Number of milliseconds to sleep after Present is called.
Value is set with ID3D11Debug::SetPresentPerRenderOpDelay.
+Sets a swap chain that the runtime will use for automatically calling IDXGISwapChain::Present.
+This method returns one of the following Direct3D 11 Return Codes.
The swap chain set by this method will only be used if D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP is set in the feature mask.
+Get the swap chain that the runtime will use for automatically calling IDXGISwapChain::Present.
+This method returns one of the following Direct3D 11 Return Codes.
The swap chain retrieved by this method will only be used if D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP is set in the feature mask.
+Check to see if the draw pipeline state is valid.
+A reference to the
This method returns one of the following Direct3D 11 Return Codes.
Use validate prior to calling a draw method (for example, ID3D11DeviceContext::Draw); validation requires the debug layer.
+Report information about a device object's lifetime.
+A value from the
This method returns one of the following Direct3D 11 Return Codes.
ReportLiveDeviceObjects uses the value in Flags to determine the amount of information to report about a device object's lifetime.
+Verifies whether the dispatch pipeline state is valid.
+A reference to the
This method returns one of the return codes described in the topic Direct3D 11 Return Codes.
Use this method before you call a dispatch method (for example, ID3D11DeviceContext::Dispatch). Validation requires the debug layer.
+Get a message from the message queue.
+Index into message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter (which can be obtained with
Get the storage filter at the top of the storage-filter stack.
+Get the retrieval filter at the top of the retrieval-filter stack.
+Get or sets the maximum number of messages that can be added to the message queue.
+When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out.
+Get the number of messages that were allowed to pass through a storage filter.
+Get the number of messages that were denied passage through a storage filter.
+Get the number of messages currently stored in the message queue.
+Get the number of messages that are able to pass through a retrieval filter.
+Get the number of messages that were discarded due to the message count limit.
+Get and set the message count limit with ID3D11InfoQueue::GetMessageCountLimit and ID3D11InfoQueue::SetMessageCountLimit, respectively.
+Get the size of the storage-filter stack in bytes.
+Get the size of the retrieval-filter stack in bytes.
+Get or sets a boolean that turns the debug output on or off.
+Set the maximum number of messages that can be added to the message queue.
+Maximum number of messages that can be added to the message queue. -1 means no limit.
This method returns one of the following Direct3D 11 Return Codes.
When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out.
+Clear all messages from the message queue.
+Get a message from the message queue.
+Index into message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter (which can be obtained with ID3D11InfoQueue::GetNumStoredMessagesAllowedByRetrievalFilter). 0 is the message at the front of the message queue.
Returned message (see
Size of pMessage in bytes, including the size of the message string that the pMessage points to.
This method returns one of the following Direct3D 11 Return Codes.
This method does not remove any messages from the message queue.
This method gets messages from the message queue after an optional retrieval filter has been applied.
Applications should call this method twice to retrieve a message - first to obtain the size of the message and second to get the message. Here is a typical example:
// Get the size of the message +messageLength = 0; + hr = pInfoQueue->GetMessage(0, null , &messageLength); // Allocate space and get the message +* pMessage = ( *)malloc(messageLength); + hr = pInfoQueue->GetMessage(0, pMessage, &messageLength); +
For an overview see Information Queue Overview.
+Get the number of messages that were allowed to pass through a storage filter.
+Number of messages allowed by a storage filter.
Get the number of messages that were denied passage through a storage filter.
+Number of messages denied by a storage filter.
Get the number of messages currently stored in the message queue.
+Number of messages currently stored in the message queue.
Get the number of messages that are able to pass through a retrieval filter.
+Number of messages allowed by a retrieval filter.
Get the number of messages that were discarded due to the message count limit.
+Number of messages discarded.
Get and set the message count limit with ID3D11InfoQueue::GetMessageCountLimit and ID3D11InfoQueue::SetMessageCountLimit, respectively.
+Get the maximum number of messages that can be added to the message queue.
+Maximum number of messages that can be added to the queue. -1 means no limit.
When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out.
+Add storage filters to the top of the storage-filter stack.
+Array of storage filters (see
This method returns one of the following Direct3D 11 Return Codes.
Get the storage filter at the top of the storage-filter stack.
+Storage filter at the top of the storage-filter stack.
Size of the storage filter in bytes. If pFilter is
This method returns one of the following Direct3D 11 Return Codes.
Remove a storage filter from the top of the storage-filter stack.
+Push an empty storage filter onto the storage-filter stack.
+This method returns one of the following Direct3D 11 Return Codes.
An empty storage filter allows all messages to pass through.
+Push a copy of storage filter currently on the top of the storage-filter stack onto the storage-filter stack.
+This method returns one of the following Direct3D 11 Return Codes.
Push a storage filter onto the storage-filter stack.
+Pointer to a storage filter (see
This method returns one of the following Direct3D 11 Return Codes.
Pop a storage filter from the top of the storage-filter stack.
+Get the size of the storage-filter stack in bytes.
+Size of the storage-filter stack in bytes.
Add storage filters to the top of the retrieval-filter stack.
+Array of retrieval filters (see
This method returns one of the following Direct3D 11 Return Codes.
The following code example shows how to use ID3D11InfoQueue::AddRetrievalFilterEntries:
+cats[] = { ..., ..., ... }; + sevs[] = { ..., ..., ... }; + UINT ids[] = { ..., ..., ... }; filter; + memset( &filter, 0, sizeof(filter) ); // To set the type of messages to allow, + // set filter.AllowList as follows: + filter.AllowList.NumCategories = sizeof(cats / sizeof( )); + filter.AllowList.pCategoryList = cats; + filter.AllowList.NumSeverities = sizeof(sevs / sizeof( )); + filter.AllowList.pSeverityList = sevs; + filter.AllowList.NumIDs = sizeof(ids) / sizeof(UINT); + filter.AllowList.pIDList = ids; // To set the type of messages to deny, set filter.DenyList + // similarly to the preceding filter.AllowList. // The following single call sets all of the preceding information. + hr = infoQueue->AddRetrievalFilterEntries( &filter ); +
Get the retrieval filter at the top of the retrieval-filter stack.
+Retrieval filter at the top of the retrieval-filter stack.
Size of the retrieval filter in bytes. If pFilter is
This method returns one of the following Direct3D 11 Return Codes.
Remove a retrieval filter from the top of the retrieval-filter stack.
+Push an empty retrieval filter onto the retrieval-filter stack.
+This method returns one of the following Direct3D 11 Return Codes.
An empty retrieval filter allows all messages to pass through.
+Push a copy of retrieval filter currently on the top of the retrieval-filter stack onto the retrieval-filter stack.
+This method returns one of the following Direct3D 11 Return Codes.
Push a retrieval filter onto the retrieval-filter stack.
+Pointer to a retrieval filter (see
This method returns one of the following Direct3D 11 Return Codes.
Pop a retrieval filter from the top of the retrieval-filter stack.
+Get the size of the retrieval-filter stack in bytes.
+Size of the retrieval-filter stack in bytes.
Add a debug message to the message queue and send that message to debug output.
+Category of a message (see
Severity of a message (see
Unique identifier of a message (see
User-defined message.
This method returns one of the following Direct3D 11 Return Codes.
This method is used by the runtime's internal mechanisms to add debug messages to the message queue and send them to debug output. For applications to add their own custom messages to the message queue and send them to debug output, call ID3D11InfoQueue::AddApplicationMessage.
+Add a user-defined message to the message queue and send that message to debug output.
+Severity of a message (see
Message string.
This method returns one of the following Direct3D 11 Return Codes.
Set a message category to break on when a message with that category passes through the storage filter.
+Message category to break on (see
Turns this breaking condition on or off (true for on, false for off).
This method returns one of the following Direct3D 11 Return Codes.
Set a message severity level to break on when a message with that severity level passes through the storage filter.
+A
Turns this breaking condition on or off (true for on, false for off).
This method returns one of the following Direct3D 11 Return Codes.
Set a message identifier to break on when a message with that identifier passes through the storage filter.
+Message identifier to break on (see
Turns this breaking condition on or off (true for on, false for off).
This method returns one of the following Direct3D 11 Return Codes.
Get a message category to break on when a message with that category passes through the storage filter.
+Message category to break on (see
Whether this breaking condition is turned on or off (true for on, false for off).
Get a message severity level to break on when a message with that severity level passes through the storage filter.
+Message severity level to break on (see
Whether this breaking condition is turned on or off (true for on, false for off).
Get a message identifier to break on when a message with that identifier passes through the storage filter.
+Message identifier to break on (see
Whether this breaking condition is turned on or off (true for on, false for off).
Set a boolean that turns the debug output on or off.
+Disable/Enable the debug output (TRUE to disable or mute the output,
This will stop messages that pass the storage filter from being printed out in the debug output, however those messages will still be added to the message queue.
+Get a boolean that turns the debug output on or off.
+Whether the debug output is on or off (true for on, false for off).
Allow or deny certain types of messages to pass through a filter.
+Number of message categories to allow or deny.
Array of message categories to allow or deny. Array must have at least NumCategories members (see
Number of message severity levels to allow or deny.
Array of message severity levels to allow or deny. Array must have at least NumSeverities members (see
Number of message IDs to allow or deny.
Array of message IDs to allow or deny. Array must have at least NumIDs members (see
A description of a single element for the input-assembler stage.
+An input-layout object contains an array of structures, each structure defines one element being read from an input slot. Create an input-layout object by calling ID3D11Device::CreateInputLayout. For an example, see the "Create the Input-Layout Object" subtopic under the Getting Started with the Input-Assembler Stage topic.
+The HLSL semantic associated with this element in a shader input-signature.
The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name
matrix
, however each of the four component would have different semantic indices (0, 1, 2, and 3).
The data type of the element data. See
An integer value that identifies the input-assembler (see input slot). Valid values are between 0 and 15, defined in D3D11.h.
Optional. Offset (in bytes) between each element. Use D3D11_APPEND_ALIGNED_ELEMENT for convenience to define the current element directly after the previous one, including any packing if necessary.
Identifies the input data class for a single input slot (see
The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data (the slot class is set to D3D11_INPUT_PER_VERTEX_DATA).
A debug message in the Information Queue.
+This structure is returned from ID3D11InfoQueue::GetMessage as part of the Information Queue feature (see
The category of the message. See
The severity of the message. See
The ID of the message. See
The message string.
The length of pDescription in bytes.
Get a query description.
+Get a query description.
+Pointer to a query description (see
Gets a query description.
+Gets a query description.
+A reference to a
Create a rasterizer state object that tells the rasterizer stage how to behave.
+4096 unique rasterizer state objects can be created on a device at a time.
If an application attempts to create a rasterizer-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique rasterizer state objects will stay the same.
+Gets the description for rasterizer state that you used to create the rasterizer-state object.
+You use the description for rasterizer state in a call to the ID3D11Device::CreateRasterizerState method to create the rasterizer-state object.
+Gets the description for rasterizer state that you used to create the rasterizer-state object.
+A reference to a
You use the description for rasterizer state in a call to the ID3D11Device::CreateRasterizerState method to create the rasterizer-state object.
+Gets the description for rasterizer state that you used to create the rasterizer-state object.
+You use the description for rasterizer state in a call to the ID3D11Device1::CreateRasterizerState1 method to create the rasterizer-state object.
+Gets the description for rasterizer state that you used to create the rasterizer-state object.
+A reference to a
You use the description for rasterizer state in a call to the ID3D11Device1::CreateRasterizerState1 method to create the rasterizer-state object.
+Gets the description for rasterizer state that you used to create the rasterizer-state object.
+You use the description for rasterizer state in a call to the ID3D11Device3::CreateRasterizerState2 method to create the rasterizer-state object.
+Gets the description for rasterizer state that you used to create the rasterizer-state object.
+ A reference to a
You use the description for rasterizer state in a call to the ID3D11Device3::CreateRasterizerState2 method to create the rasterizer-state object.
+Describes rasterizer state.
+Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call ID3D11Device::CreateRasterizerState. To set rasterizer state, call ID3D11DeviceContext::RSSetState.
If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.
| State | Default Value |
|---|---|
| FillMode | Solid |
| CullMode | Back |
| FrontCounterClockwise | |
| DepthBias | 0 |
| SlopeScaledDepthBias | 0.0f |
| DepthBiasClamp | 0.0f |
| DepthClipEnable | TRUE |
| ScissorEnable | |
| MultisampleEnable | |
| AntialiasedLineEnable |
?
Note??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to
| Line-rendering algorithm | MultisampleEnable | AntialiasedLineEnable |
|---|---|---|
| Aliased | ||
| Alpha antialiased | TRUE | |
| Quadrilateral | TRUE | |
| Quadrilateral | TRUE | TRUE |
?
The settings of the MultisampleEnable and AntialiasedLineEnable members apply only to multisample antialiasing (MSAA) render targets (that is, render targets with sample counts greater than 1). Because of the differences in feature-level behavior and as long as you aren?t performing any line drawing or don?t mind that lines render as quadrilaterals, we recommend that you always set MultisampleEnable to TRUE whenever you render on MSAA render targets.
+Determines the fill mode to use when rendering (see
Indicates triangles facing the specified direction are not drawn (see
Determines if a triangle is front- or back-facing. If this parameter is TRUE, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If this parameter is
Depth value added to a given pixel. For info about depth bias, see Depth Bias.
Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.
Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.
Enable clipping based on distance.
The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default?TRUE, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm). +
0 < w
+ -w <= x <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
+ -w <= y <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
+ 0 <= z <= w
+ When you set DepthClipEnable to
Enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.
Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to
Specifies whether to enable line antialiasing; only applies if doing line drawing and MultisampleEnable is
Describes rasterizer state.
+Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call ID3D11Device1::CreateRasterizerState1. To set rasterizer state, call ID3D11DeviceContext::RSSetState.
If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.
| State | Default Value |
|---|---|
| FillMode | Solid |
| CullMode | Back |
| FrontCounterClockwise | |
| DepthBias | 0 |
| SlopeScaledDepthBias | 0.0f |
| DepthBiasClamp | 0.0f |
| DepthClipEnable | TRUE |
| ScissorEnable | |
| MultisampleEnable | |
| AntialiasedLineEnable | |
| ForcedSampleCount | 0 |
?
Note??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to
| Line-rendering algorithm | MultisampleEnable | AntialiasedLineEnable |
|---|---|---|
| Aliased | ||
| Alpha antialiased | TRUE | |
| Quadrilateral | TRUE | |
| Quadrilateral | TRUE | TRUE |
?
The settings of the MultisampleEnable and AntialiasedLineEnable members apply only to multisample antialiasing (MSAA) render targets (that is, render targets with sample counts greater than 1). Because of the differences in feature-level behavior and as long as you aren?t performing any line drawing or don?t mind that lines render as quadrilaterals, we recommend that you always set MultisampleEnable to TRUE whenever you render on MSAA render targets.
+Determines the fill mode to use when rendering.
Indicates that triangles facing the specified direction are not drawn.
Specifies whether a triangle is front- or back-facing. If TRUE, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If
Depth value added to a given pixel. For info about depth bias, see Depth Bias.
Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.
Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.
Specifies whether to enable clipping based on distance.
The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default?TRUE, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm). +
0 < w
+ -w <= x <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
+ -w <= y <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
+ 0 <= z <= w
+ When you set DepthClipEnable to
Specifies whether to enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.
Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to
Specifies whether to enable line antialiasing; only applies if doing line drawing and MultisampleEnable is
The sample count that is forced while UAV rendering or rasterizing. Valid values are 0, 1, 2, 4, 8, and optionally 16. 0 indicates that the sample count is not forced.
Note??If you want to render with ForcedSampleCount set to 1 or greater, you must follow these guidelines:
Describes the blend state for a render target.
+You specify an array of
For info about how blending is done, see the output-merger stage.
Here are the default values for blend state.
| State | Default Value |
|---|---|
| BlendEnable | |
| SrcBlend | D3D11_BLEND_ONE |
| DestBlend | D3D11_BLEND_ZERO |
| BlendOp | D3D11_BLEND_OP_ADD |
| SrcBlendAlpha | D3D11_BLEND_ONE |
| DestBlendAlpha | D3D11_BLEND_ZERO |
| BlendOpAlpha | D3D11_BLEND_OP_ADD |
| RenderTargetWriteMask | D3D11_COLOR_WRITE_ENABLE_ALL |
?
+Enable (or disable) blending.
This blend option specifies the operation to perform on the RGB value that the pixel shader outputs. The BlendOp member defines how to combine the SrcBlend and DestBlend operations.
This blend option specifies the operation to perform on the current RGB value in the render target. The BlendOp member defines how to combine the SrcBlend and DestBlend operations.
This blend operation defines how to combine the SrcBlend and DestBlend operations.
This blend option specifies the operation to perform on the alpha value that the pixel shader outputs. Blend options that end in _COLOR are not allowed. The BlendOpAlpha member defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
This blend option specifies the operation to perform on the current alpha value in the render target. Blend options that end in _COLOR are not allowed. The BlendOpAlpha member defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
This blend operation defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
A write mask.
Get the properties of a render target view.
+Get the properties of a render target view.
+Pointer to the description of a render target view (see
Gets the properties of a render-target view.
+Gets the properties of a render-target view.
+A reference to a
Get the type of the resource.
+Windows?Phone?8: This API is supported.
+Get or sets the eviction priority of a resource.
+Get the type of the resource.
+ Pointer to the resource type (see
Windows?Phone?8: This API is supported.
+Set the eviction priority of a resource.
+Eviction priority for the resource, which is one of the following values:
Resource priorities determine which resource to evict from video memory when the system has run out of video memory. The resource will not be lost; it will be removed from video memory and placed into system memory, or possibly placed onto the hard drive. The resource will be loaded back into video memory when it is required.
A resource that is set to the maximum priority, DXGI_RESOURCE_PRIORITY_MAXIMUM, is only evicted if there is no other way of resolving the incoming memory request. The Windows Display Driver Model (WDDM) tries to split an incoming memory request to its minimum size and evict lower-priority resources before evicting a resource with maximum priority.
Changing the priorities of resources should be done carefully. The wrong eviction priorities could be a detriment to performance rather than an improvement.
+Get the eviction priority of a resource.
+One of the following values, which specifies the eviction priority for the resource:
Defines a 3D box.
+The following diagram shows a 3D box, where the origin is the left, front, top corner.
The values for right, bottom, and back are each one pixel past the end of the pixels that are included in the box region. That is, the values for left, top, and front are included in the box region while the values for right, bottom, and back are excluded from the box region. For example, for a box that is one pixel wide, (right - left) == 1; the box region includes the left pixel but not the right pixel.
Coordinates of a box are in bytes for buffers and in texels for textures.
+The x position of the left hand side of the box.
The y position of the top of the box.
The z position of the front of the box.
The x position of the right hand side of the box.
The y position of the bottom of the box.
The z position of the back of the box.
Get the resource that is accessed through this view.
+This function increments the reference count of the resource by one, so it is necessary to call Release on the returned reference when the application is done with it. Destroying (or losing) the returned reference before Release is called will result in a memory leak.
+Get the resource that is accessed through this view.
+This function increments the reference count of the resource by one, so it is necessary to call Dispose on the returned reference when the application is done with it. Destroying (or losing) the returned reference before Release is called will result in a memory leak.
+Get the resource that is accessed through this view.
+Address of a reference to the resource that is accessed through this view. (See
This function increments the reference count of the resource by one, so it is necessary to call Release on the returned reference when the application is done with it. Destroying (or losing) the returned reference before Release is called will result in a memory leak.
+Gets the description for sampler state that you used to create the sampler-state object.
+You use the description for sampler state in a call to the ID3D11Device::CreateSamplerState method to create the sampler-state object.
+Gets the description for sampler state that you used to create the sampler-state object.
+A reference to a
You use the description for sampler state in a call to the ID3D11Device::CreateSamplerState method to create the sampler-state object.
+Describes a sampler state.
+These are the default values for sampler state.
| State | Default Value |
|---|---|
| Filter | D3D11_FILTER_MIN_MAG_MIP_LINEAR |
| AddressU | D3D11_TEXTURE_ADDRESS_CLAMP |
| AddressV | D3D11_TEXTURE_ADDRESS_CLAMP |
| AddressW | D3D11_TEXTURE_ADDRESS_CLAMP |
| MinLOD | -3.402823466e+38F (-FLT_MAX) |
| MaxLOD | 3.402823466e+38F (FLT_MAX) |
| MipMapLODBias | 0.0f |
| MaxAnisotropy | 1 |
| ComparisonFunc | D3D11_COMPARISON_NEVER |
| BorderColor | float4(1.0f,1.0f,1.0f,1.0f) |
| Texture | N/A |
?
+ Filtering method to use when sampling a texture (see
Method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see
Method to use for resolving a v texture coordinate that is outside the 0 to 1 range.
Method to use for resolving a w texture coordinate that is outside the 0 to 1 range.
Offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then the texture will be sampled at mipmap level 5.
Clamping value used if D3D11_FILTER_ANISOTROPIC or D3D11_FILTER_COMPARISON_ANISOTROPIC is specified in Filter. Valid values are between 1 and 16.
A function that compares sampled data against existing sampled data. The function options are listed in
Border color to use if D3D11_TEXTURE_ADDRESS_BORDER is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive.
Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.
Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. To have no upper limit on LOD set this to a large value such as D3D11_FLOAT32_MAX.
Get the shader resource view's description.
+Get the shader resource view's description.
+A reference to a
Gets the shader-resource view's description.
+Gets the shader-resource view's description.
+A reference to a
Description of a vertex element in a vertex buffer in an output slot.
+Zero-based, stream number.
Type of output element; possible values include: "POSITION", "NORMAL", or "TEXCOORD0". Note that if SemanticName is
Output element's zero-based index. Should be used if, for example, you have more than one texture coordinate stored in each vertex.
Which component of the entry to begin writing out to. Valid values are 0 to 3. For example, if you only wish to output to the y and z components of a position, then StartComponent should be 1 and ComponentCount should be 2.
The number of components of the entry to write out to. Valid values are 1 to 4. For example, if you only wish to output to the y and z components of a position, then StartComponent should be 1 and ComponentCount should be 2. Note that if SemanticName is
The associated stream output buffer that is bound to the pipeline (see ID3D11DeviceContext::SOSetTargets). The valid range for OutputSlot is 0 to 3.
Get the properties of the texture resource.
+Get the properties of the texture resource.
+Pointer to a resource description (see
Get the properties of the texture resource.
+Get the properties of the texture resource.
+Pointer to a resource description (see
Gets the properties of the texture resource.
+Gets the properties of the texture resource.
+A reference to a
Get the properties of the texture resource.
+Get the properties of the texture resource.
+Pointer to a resource description (see
Gets the properties of the texture resource.
+Gets the properties of the texture resource.
+A reference to a
Get a description of the resource.
+Get a description of the resource.
+Pointer to a resource description (see
Gets a description of the resource.
+Gets a description of the resource.
+A reference to a
[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
Gets a reference to a DirectX Video Acceleration (DXVA) decoder buffer.
+The graphics driver allocates the buffers that are used for DXVA decoding. This method locks the Microsoft Direct3D surface that contains the buffer. When you are done using the buffer, call
[This documentation is preliminary and is subject to change.]
Applies to: desktop apps | Metro style apps
Gets a reference to a DirectX Video Acceleration (DXVA) decoder buffer.
+A reference to the
The type of buffer to retrieve, specified as a member of the
The graphics driver allocates the buffers that are used for DXVA decoding. This method locks the Microsoft Direct3D surface that contains the buffer. When you are done using the buffer, call
Gets a reference to a decoder buffer.
+A reference to the
The type of buffer to retrieve, specified as a member of the
Receives the size of the buffer, in bytes.
Receives a reference to the start of the memory buffer.
If this method succeeds, it returns
The graphics driver allocates the buffers that are used for decoding. This method locks the Microsoft Direct3D surface that contains the buffer. When you are done using the buffer, call ID3D11VideoContext::ReleaseDecoderBuffer to unlock the surface.
+Releases a buffer that was obtained by calling the ID3D11VideoContext::GetDecoderBuffer method.
+If this method succeeds, it returns
Starts a decoding operation to decode a video frame.
+A reference to the
A reference to the
The size of the content key that is specified in pContentKey. If pContentKey is
An optional reference to a content key that was used to encrypt the frame data. If no content key was used, set this parameter to
If this method succeeds, it returns
After this method is called, call ID3D11VideoContext::SubmitDecoderBuffers to perform decoding operations. When all decoding operations have been executed, call ID3D11VideoContext::DecoderEndFrame.
Each call to DecoderBeginFrame must have a matching call to DecoderEndFrame. In most cases you cannot nest DecoderBeginFrame calls, but some codecs, such as like VC-1, can have nested DecoderBeginFrame calls for special operations like post processing.
The following encryption scenarios are supported through the content key:
Signals the end of a decoding operation.
+A reference to the
If this method succeeds, it returns
Submits one or more buffers for decoding.
+A reference to the
The number of buffers submitted for decoding.
A reference to an array of
If this method succeeds, it returns
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with D3D11_QUERY_EVENT and D3D11_QUERY_TIMESTAMP when using feature levels lower than 11. D3D11_QUERY_PIPELINE_STATISTICS will not include this function for any feature level.
When using feature levels 9_x, all partially encrypted buffers must use the same EncryptedBlockInfo, and partial encryption cannot be turned off on a per frame basis.
+Performs an extended function for decoding. This method enables extensions to the basic decoder functionality.
+A reference to the
A reference to a
If this method succeeds, it returns
Sets the target rectangle for the video processor.
+A reference to the
Specifies whether to apply the target rectangle.
A reference to a
The target rectangle is the area within the destination surface where the output will be drawn. The target rectangle is given in pixel coordinates, relative to the destination surface.
If this method is never called, or if the Enable parameter is
Sets the background color for the video processor.
+A reference to the
If TRUE, the color is specified as a YCbCr value. Otherwise, the color is specified as an RGB value.
A reference to a
The video processor uses the background color to fill areas of the target rectangle that do not contain a video image. Areas outside the target rectangle are not affected.
+Sets the output color space for the video processor.
+A reference to the
A reference to a
Sets the alpha fill mode for data that the video processor writes to the render target.
+A reference to the
The alpha fill mode, specified as a
The zero-based index of an input stream. This parameter is used if AlphaFillMode is D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM. Otherwise, the parameter is ignored.
To find out which fill modes the device supports, call the ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps method. If the driver reports the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_FILL capability, the driver supports all of the fill modes. Otherwise, the AlphaFillMode parameter must be D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE.
The default fill mode is D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE.
+Sets the amount of downsampling to perform on the output.
+A reference to the
If TRUE, downsampling is enabled. Otherwise, downsampling is disabled and the Size member is ignored.
The sampling size.
Downsampling is sometimes used to reduce the quality of premium content when other forms of content protection are not available. By default, downsampling is disabled.
If the Enable parameter is TRUE, the driver downsamples the composed image to the specified size, and then scales it back to the size of the target rectangle.
The width and height of Size must be greater than zero. If the size is larger than the target rectangle, downsampling does not occur.
To use this feature, the driver must support downsampling, indicated by the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_CONSTRICTION capability flag. To query for this capability, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps.
+Specifies whether the video processor produces stereo video frames.
+A reference to the
If TRUE, stereo output is enabled. Otherwise, the video processor produces mono video frames.
By default, the video processor produces mono video frames.
To use this feature, the driver must support stereo video, indicated by the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO capability flag. To query for this capability, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps.
+Sets a driver-specific video processing state.
+A reference to the
A reference to a
The size of the pData buffer, in bytes.
A reference to a buffer that contains private state data. The method passes this buffer directly to the driver without validation. It is the responsibility of the driver to validate the data.
If this method succeeds, it returns
Gets the current target rectangle for the video processor.
+A reference to the
Receives the value TRUE if the target rectangle was explicitly set using the ID3D11VideoContext::VideoProcessorSetOutputTargetRect method. Receives the value
If Enabled receives the value TRUE, this parameter receives the target rectangle. Otherwise, this parameter is ignored.
Gets the current background color for the video processor.
+A reference to the
Receives the value TRUE if the background color is a YCbCr color, or
A reference to a
Gets the current output color space for the video processor.
+A reference to the
A reference to a
Gets the current alpha fill mode for the video processor.
+A reference to the
Receives the alpha fill mode, as a
If the alpha fill mode is D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM, this parameter receives the zero-based index of an input stream. The input stream provides the alpha values for the alpha fill.
Gets the current level of downsampling that is performed by the video processor.
+A reference to the
Receives the value TRUE if downsampling was explicitly enabled using the ID3D11VideoContext::VideoProcessorSetOutputConstriction method. Receives the value
If Enabled receives the value TRUE, this parameter receives the downsampling size. Otherwise, this parameter is ignored.
Queries whether the video processor produces stereo video frames.
+A reference to the
Receives the value TRUE if stereo output is enabled, or
Gets private state data from the video processor.
+A reference to the
A reference to a
The size of the pData buffer, in bytes.
A reference to a buffer that receives the private state data.
If this method succeeds, it returns
Specifies whether an input stream on the video processor contains interlaced or progressive frames.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
A
Sets the color space for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
A reference to a
Sets the rate at which the video processor produces output frames for an input stream.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
The output rate, specified as a
Specifies how the driver performs frame-rate conversion, if required.
| Value | Meaning |
|---|---|
| Repeat frames. |
| Interpolate frames. |
?
A reference to a
The standard output rates are normal frame-rate (D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL) and half frame-rate (D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF). In addition, the driver might support custom rates for rate conversion or inverse telecine. To get the list of custom rates, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCustomRate.
Depending on the output rate, the driver might need to convert the frame rate. If so, the value of RepeatFrame controls whether the driver creates interpolated frames or simply repeats input frames.
+Sets the source rectangle for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Specifies whether to apply the source rectangle.
A reference to a
The source rectangle is the portion of the input surface that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface.
If this method is never called, or if the Enable parameter is
Sets the destination rectangle for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Specifies whether to apply the destination rectangle.
A reference to a
The destination rectangle is the portion of the output surface that receives the blit for this stream. The destination rectangle is given in pixel coordinates, relative to the output surface.
The default destination rectangle is an empty rectangle (0, 0, 0, 0). If this method is never called, or if the Enable parameter is
Sets the planar alpha for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Specifies whether alpha blending is enabled.
The planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque). If Enable is
To use this feature, the driver must support stereo video, indicated by the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALHPA_STREAM capability flag. To query for this capability, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps.
Alpha blending is disabled by default.
For each pixel, the destination color value is computed as follows:
Cd = Cs * (As * Ap * Ae) + Cd * (1.0 - As * Ap * Ae)
where:
Cd = The color value of the destination pixelCs = The color value of the source pixelAs = The per-pixel source alphaAp = The planar alpha valueAe = The palette-entry alpha value, or 1.0 (see Note)The destination alpha value is computed according to the alpha fill mode. For more information, see ID3D11VideoContext::VideoProcessorSetOutputAlphaFillMode.
+Sets the color-palette entries for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
The number of elements in the pEntries array.
A reference to an array of palette entries. For RGB streams, the palette entries use the DXGI_FORMAT_B8G8R8A8 representation. For YCbCr streams, the palette entries use the DXGI_FORMAT_AYUV representation. The caller allocates the array.
This method applies only to input streams that have a palettized color format. Palettized formats with 4 bits per pixel (bpp) use the first 16 entries in the list. Formats with 8 bpp use the first 256 entries.
If a pixel has a palette index greater than the number of entries, the device treats the pixel as white with opaque alpha. For full-range RGB, this value is (255, 255, 255, 255); for YCbCr the value is (255, 235, 128, 128).
If the driver does not report the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE capability flag, every palette entry must have an alpha value of 0xFF (opaque). To query for this capability, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps.
+Sets the pixel aspect ratio for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Specifies whether the pSourceAspectRatio and pDestinationAspectRatio parameters contain valid values. Otherwise, the pixel aspect ratios are unspecified.
A reference to a
A reference to a
This function can only be called if the driver reports the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO capability. If this capability is not set, this function will have no effect.
Pixel aspect ratios of the form 0/n and n/0 are not valid.
The default pixel aspect ratio is 1:1 (square pixels).
+Sets the luma key for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Specifies whether luma keying is enabled.
The lower bound for the luma key. The valid range is [0?1]. If Enable is
The upper bound for the luma key. The valid range is [0?1]. If Enable is
To use this feature, the driver must support luma keying, indicated by the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LUMA_KEY capability flag. To query for this capability, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps. In addition, if the input format is RGB, the device must support the D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_LUMA_KEY capability.
The values of Lower and Upper give the lower and upper bounds of the luma key, using a nominal range of [0...1]. Given a format with n bits per channel, these values are converted to luma values as follows:
val = f * ((1 < < n)-1)
Any pixel whose luma value falls within the upper and lower bounds (inclusive) is treated as transparent.
For example, if the pixel format uses 8-bit luma, the upper bound is calculated as follows:
BYTE Y = BYTE(max(min(1.0, Upper), 0.0) * 255.0)
Note that the value is clamped to the range [0...1] before multiplying by 255.
+Enables or disables stereo 3D video for an input stream on the video processor. In addition, this method specifies the layout of the video frames in memory.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Specifies whether stereo 3D is enabled for this stream. If the value is
Specifies the layout of the two stereo views in memory, as a
If TRUE, frame 0 contains the left view. Otherwise, frame 0 contains the right view.
This parameter is ignored for the following stereo formats:
If TRUE, frame 0 contains the base view. Otherwise, frame 1 contains the base view.
This parameter is ignored for the following stereo formats:
A flag from the
For D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET format, this parameter specifies how to generate the left and right views:
If Format is not D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET, this parameter must be zero.
Enables or disables automatic processing features on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
If TRUE, automatic processing features are enabled. If
By default, the driver might perform certain processing tasks automatically during the video processor blit. This method enables the application to disable these extra video processing features. For example, if you provide your own pixel shader for the video processor, you might want to disable the driver's automatic processing.
+Enables or disables an image filter for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
The filter, specified as a
To query which filters the driver supports, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps.
Specifies whether to enable the filter.
The filter level. If Enable is
To find the valid range of levels for a specified filter, call ID3D11VideoProcessorEnumerator::GetVideoProcessorFilterRange.
Sets a driver-specific state on a video processing stream.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
A reference to a
The size of the pData buffer, in bytes.
A reference to a buffer that contains private state data. The method passes this buffer directly to the driver without validation. It is the responsibility of the driver to validate the data.
If this method succeeds, it returns
Gets the format of an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives a
Gets the color space for an input stream of the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives a
Gets the rate at which the video processor produces output frames for an input stream.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives a
Receives a Boolean value that specifies how the driver performs frame-rate conversion, if required.
| Value | Meaning |
|---|---|
| Repeat frames. |
| Interpolate frames. |
?
A reference to a
Gets the source rectangle for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives the value TRUE if the source rectangle is enabled, or
A reference to a
Gets the destination rectangle for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives the value TRUE if the destination rectangle is enabled, or
A reference to a
Gets the planar alpha for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives the value TRUE if planar alpha is enabled, or
Receives the planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque).
Gets the color-palette entries for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
The number of entries in the pEntries array.
A reference to a UINT array allocated by the caller. The method fills the array with the palette entries. For RGB streams, the palette entries use the DXGI_FORMAT_B8G8R8A8 representation. For YCbCr streams, the palette entries use the DXGI_FORMAT_AYUV representation.
This method applies only to input streams that have a palettized color format. Palettized formats with 4 bits per pixel (bpp) use 16 palette entries. Formats with 8 bpp use 256 entries.
+Gets the pixel aspect ratio for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives the value TRUE if the pixel aspect ratio is specified. Otherwise, receives the value
A reference to a
A reference to a
When the method returns, if *pEnabled is TRUE, the pSourceAspectRatio and pDestinationAspectRatio parameters contain the pixel aspect ratios. Otherwise, the default pixel aspect ratio is 1:1 (square pixels).
+Gets the luma key for an input stream of the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives the value TRUE if luma keying is enabled, or
Receives the lower bound for the luma key. The valid range is [0?1].
Receives the upper bound for the luma key. The valid range is [0?1].
Gets the stereo 3D format for an input stream on the video processor
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives the value TRUE if stereo 3D is enabled for this stream, or
Receives a
Receives a Boolean value.
| Value | Meaning |
|---|---|
| Frame 0 contains the left view. |
| Frame 0 contains the right view. |
?
Receives a Boolean value.
| Value | Meaning |
|---|---|
| Frame 0 contains the base view. |
| Frame 1 contains the base view. |
?
Receives a
Receives the pixel offset used for D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET format. This parameter is ignored for other stereo formats.
Queries whether automatic processing features of the video processor are enabled.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Receives the value TRUE if automatic processing features are enabled, or
Automatic processing refers to additional image processing that drivers might have performed on the image data prior to the application receiving the data.
+Gets the image filter settings for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
The filter to query, specified as a
Receives the value TRUE if the image filter is enabled, or
Receives the filter level.
Gets a driver-specific state for a video processing stream.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
A reference to a
The size of the pData buffer, in bytes.
A reference to a buffer that receives the private state data.
If this method succeeds, it returns
Performs a video processing operation on one or more input samples and writes the result to a Direct3D surface.
+A reference to the
A reference to the
The frame number of the output video frame, indexed from zero.
The number of input streams to process.
A reference to an array of
If this method succeeds, it returns
The maximum value of StreamCount is given in the MaxStreamStates member of the
If the output stereo mode is TRUE:
Otherwise:
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with D3D11_QUERY_EVENT and D3D11_QUERY_TIMESTAMP when using feature levels lower than 11. D3D11_QUERY_PIPELINE_STATISTICS will not include this function for any feature level.
+Establishes the session key for a cryptographic session.
+A reference to the
The size of the pData byte array, in bytes.
A reference to a byte array that contains the encrypted session key.
If this method succeeds, it returns
The key exchange mechanism depends on the type of cryptographic session.
For RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP), the software decoder generates the secret key, encrypts the secret key by using the public key with RSAES-OAEP, and places the cipher text in the pData parameter. The actual size of the buffer for RSAES-OAEP is 256 bytes.
+Reads encrypted data from a protected surface.
+A reference to the
A reference to the
A reference to the
The size of the pIV buffer, in bytes.
A reference to a buffer that receives the initialization vector (IV). The caller allocates this buffer, but the driver generates the IV.
For 128-bit AES-CTR encryption, pIV points to a
Not all drivers support this method. To query the driver capabilities, call ID3D11VideoDevice::GetContentProtectionCaps and check for the D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK flag in the Caps member of the
Some drivers might require a separate key to decrypt the data that is read back. To check for this requirement, call GetContentProtectionCaps and check for the D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY flag. If this flag is present, call ID3D11VideoContext::GetEncryptionBltKey to get the decryption key.
This method has the following limitations:
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with D3D11_QUERY_EVENT and D3D11_QUERY_TIMESTAMP when using feature levels lower than 11. D3D11_QUERY_PIPELINE_STATISTICS will not include this function for any feature level.
+Writes encrypted data to a protected surface.
+A reference to the
A reference to the surface that contains the source data.
A reference to the protected surface where the encrypted data is written.
A reference to a
If the driver supports partially encrypted buffers, pEncryptedBlockInfo indicates which portions of the buffer are encrypted. If the entire surface is encrypted, set this parameter to
To check whether the driver supports partially encrypted buffers, call ID3D11VideoDevice::GetContentProtectionCaps and check for the D3D11_CONTENT_PROTECTION_CAPS_PARTIAL_DECRYPTION capabilities flag. If the driver does not support partially encrypted buffers, set this parameter to
The size of the encrypted content key, in bytes.
A reference to a buffer that contains a content encryption key, or
If the driver supports content keys, use the content key to encrypt the surface. Encrypt the content key using the session key, and place the resulting cipher text in pContentKey. If the driver does not support content keys, use the session key to encrypt the surface and set pContentKey to
The size of the pIV buffer, in bytes.
A reference to a buffer that contains the initialization vector (IV).
For 128-bit AES-CTR encryption, pIV points to a
For other encryption types, a different structure might be used, or the encryption might not use an IV.
Not all hardware or drivers support this functionality for all cryptographic types. This function can only be called when the D3D11_CONTENT_PROTECTION_CAPS_DECRYPTION_BLT cap is reported.
This method does not support writing to sub-rectangles of the surface.
If the hardware and driver support a content key:
Otherwise, the data is encrypted by the caller using the session key and
If the driver and hardware support partially encrypted buffers, pEncryptedBlockInfo indicates which portions of the buffer are encrypted and which is not. If the entire buffer is encrypted, pEncryptedBlockinfo should be
The
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with D3D11_QUERY_EVENT and D3D11_QUERY_TIMESTAMP when using feature levels lower than 11. D3D11_QUERY_PIPELINE_STATISTICS will not include this function for any feature level.
+Gets a random number that can be used to refresh the session key.
+A reference to the
The size of the pRandomNumber array, in bytes. The size should match the size of the session key.
A reference to a byte array that receives a random number.
To generate a new session key, perform a bitwise XOR between the previous session key and the random number. The new session key does not take affect until the application calls ID3D11VideoContext::FinishSessionKeyRefresh.
To query whether the driver supports this method, call ID3D11VideoDevice::GetContentProtectionCaps and check for the D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY capabilities flag.
+Switches to a new session key.
+A reference to the
This function can only be called when the D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY cap is reported.
Before calling this method, call ID3D11VideoContext::StartSessionKeyRefresh. The StartSessionKeyRefresh method gets a random number from the driver, which is used to create a new session key. The new session key does not become active until the application calls FinishSessionKeyRefresh. After the application calls FinishSessionKeyRefresh, all protected surfaces are encrypted using the new session key.
+Gets the cryptographic key to decrypt the data returned by the ID3D11VideoContext::EncryptionBlt method.
+If this method succeeds, it returns
This method applies only when the driver requires a separate content key for the EncryptionBlt method. For more information, see the Remarks for EncryptionBlt.
Each time this method is called, the driver generates a new key.
The KeySize should match the size of the session key.
The read back key is encrypted by the driver/hardware using the session key.
+Establishes a session key for an authenticated channel.
+A reference to the
The size of the data in the pData array, in bytes.
A reference to a byte array that contains the encrypted session key. The buffer must contain 256 bytes of data, encrypted using RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP).
If this method succeeds, it returns
This method will fail if the channel type is D3D11_AUTHENTICATED_CHANNEL_D3D11, because the Direct3D11 channel does not support authentication.
+Sends a query to an authenticated channel.
+A reference to the
The size of the pInput array, in bytes.
A reference to a byte array that contains input data for the query. This array always starts with a
The size of the pOutput array, in bytes.
A reference to a byte array that receives the result of the query. This array always starts with a
If this method succeeds, it returns
Sends a configuration command to an authenticated channel.
+A reference to the
The size of the pInput array, in bytes.
A reference to a byte array that contains input data for the command. This buffer always starts with a
A reference to a
If this method succeeds, it returns
Sets the stream rotation for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Specifies if the stream is to be rotated in a clockwise orientation.
Specifies the rotation of the stream.
This is an optional state and the application should only use it if D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ROTATION is reported in
The stream source rectangle will be specified in the pre-rotation coordinates (typically landscape) and the stream destination rectangle will be specified in the post-rotation coordinates (typically portrait). The application must update the stream destination rectangle correctly when using a rotation value other than 0? and 180?.
+Gets the stream rotation for an input stream on the video processor.
+A reference to the
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
Specifies if the stream is rotated.
Specifies the rotation of the stream in a clockwise orientation.
Specifies the type of Microsoft Direct3D authenticated channel.
+Direct3D?11 channel. This channel provides communication with the Direct3D runtime.
Software driver channel. This channel provides communication with a driver that implements content protection mechanisms in software.
Hardware driver channel. This channel provides communication with a driver that implements content protection mechanisms in the GPU hardware.
Specifies the type of process that is identified in the
Bind a buffer as a vertex buffer to the input-assembler stage.
Bind a buffer as an index buffer to the input-assembler stage.
Bind a buffer as a constant buffer to a shader stage; this flag may NOT be combined with any other bind flag.
Bind a buffer or texture to a shader stage; this flag cannot be used with the D3D11_MAP_WRITE_NO_OVERWRITE flag.
Note??The Direct3D 11.1 runtime, which is available starting with Windows?8, enables mapping dynamic constant buffers and shader resource views (SRVs) of dynamic buffers with D3D11_MAP_WRITE_NO_OVERWRITE. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call ID3D11Device::CheckFeatureSupport with D3D11_FEATURE_D3D11_OPTIONS. CheckFeatureSupport fills members of aBind an output buffer for the stream-output stage.
Bind a texture as a render target for the output-merger stage.
Bind a texture as a depth-stencil target for the output-merger stage.
Bind an unordered access resource.
Set this flag to indicate that a 2D texture is used to receive output from the decoder API. The common way to create resources for a decoder output is by calling the ID3D11Device::CreateTexture2D method to create an array of 2D textures. However, you cannot use texture arrays that are created with this flag in calls to ID3D11Device::CreateShaderResourceView.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that a 2D texture is used to receive input from the video encoder API. The common way to create resources for a video encoder is by calling the ID3D11Device::CreateTexture2D method to create an array of 2D textures. However, you cannot use texture arrays that are created with this flag in calls to ID3D11Device::CreateShaderResourceView.
Direct3D 11:??This value is not supported until Direct3D 11.1.
RGB or alpha blending operation.
+The runtime implements RGB blending and alpha blending separately. Therefore, blend state requires separate blend operations for RGB data and alpha data. These blend operations are specified in a blend description. The two sources ?source 1 and source 2? are shown in the blending block diagram.
Blend state is used by the output-merger stage to determine how to blend together two RGB pixel values and two alpha values. The two RGB pixel values and two alpha values are the RGB pixel value and alpha value that the pixel shader outputs and the RGB pixel value and alpha value already in the output render target. The blend option controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The blend operation controls how the blending stage mathematically combines these modulated values.
+Add source 1 and source 2.
Subtract source 1 from source 2.
Subtract source 2 from source 1.
Find the minimum of source 1 and source 2.
Find the maximum of source 1 and source 2.
Blend factors, which modulate values for the pixel shader and render target.
+Blend operations are specified in a blend description.
+The blend factor is (0, 0, 0, 0). No pre-blend operation.
The blend factor is (1, 1, 1, 1). No pre-blend operation.
The blend factor is (R?, G?, B?, A?), that is color data (RGB) from a pixel shader. No pre-blend operation.
The blend factor is (1 - R?, 1 - G?, 1 - B?, 1 - A?), that is color data (RGB) from a pixel shader. The pre-blend operation inverts the data, generating 1 - RGB.
The blend factor is (A?, A?, A?, A?), that is alpha data (A) from a pixel shader. No pre-blend operation.
The blend factor is ( 1 - A?, 1 - A?, 1 - A?, 1 - A?), that is alpha data (A) from a pixel shader. The pre-blend operation inverts the data, generating 1 - A.
The blend factor is (Ad Ad Ad Ad), that is alpha data from a render target. No pre-blend operation.
The blend factor is (1 - Ad 1 - Ad 1 - Ad 1 - Ad), that is alpha data from a render target. The pre-blend operation inverts the data, generating 1 - A.
The blend factor is (Rd, Gd, Bd, Ad), that is color data from a render target. No pre-blend operation.
The blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad), that is color data from a render target. The pre-blend operation inverts the data, generating 1 - RGB.
The blend factor is (f, f, f, 1); where f = min(A?, 1 - Ad). The pre-blend operation clamps the data to 1 or less. +
The blend factor is the blend factor set with ID3D11DeviceContext::OMSetBlendState. No pre-blend operation.
The blend factor is the blend factor set with ID3D11DeviceContext::OMSetBlendState. The pre-blend operation inverts the blend factor, generating 1 - blend_factor.
The blend factor is data sources both as color data output by a pixel shader. There is no pre-blend operation. This blend factor supports dual-source color blending.
The blend factor is data sources both as color data output by a pixel shader. The pre-blend operation inverts the data, generating 1 - RGB. This blend factor supports dual-source color blending.
The blend factor is data sources as alpha data output by a pixel shader. There is no pre-blend operation. This blend factor supports dual-source color blending.
The blend factor is data sources as alpha data output by a pixel shader. The pre-blend operation inverts the data, generating 1 - A. This blend factor supports dual-source color blending.
Specifies the type of I/O bus that is used by the graphics adapter.
+Indicates a type of bus other than the types listed here. +
PCI bus. +
PCI-X bus. +
PCI Express bus. +
Accelerated Graphics Port (AGP) bus. +
The implementation for the graphics adapter is in a motherboard chipset's north bridge. This flag implies that data never goes over an expansion bus (such as PCI or AGP) when it is transferred from main memory to the graphics adapter.
Indicates that the graphics adapter is connected to a motherboard chipset's north bridge by tracks on the motherboard, and all of the graphics adapter's chips are soldered to the motherboard. This flag implies that data never goes over an expansion bus (such as PCI or AGP) when it is transferred from main memory to the graphics adapter.
The graphics adapter is connected to a motherboard chipset's north bridge by tracks on the motherboard, and all of the graphics adapter's chips are connected through sockets to the motherboard. +
The graphics adapter is connected to the motherboard through a daughterboard connector. +
The graphics adapter is connected to the motherboard through a daughterboard connector, and the graphics adapter is inside an enclosure that is not user accessible. +
One of the D3D11_BUS_IMPL_MODIFIER_Xxx flags is set. +
Indicates to check the multisample quality levels of a tiled resource.
Allow data to be stored in the red component.
Allow data to be stored in the green component.
Allow data to be stored in the blue component.
Allow data to be stored in the alpha component.
Allow data to be stored in all components.
Comparison options.
+A comparison option determines whether how the runtime compares source (new) data against destination (existing) data before storing the new data. The comparison option is declared in a description before an object is created. The API allows you to set a comparison option for a depth-stencil buffer (see
Never pass the comparison.
If the source data is less than the destination data, the comparison passes.
If the source data is equal to the destination data, the comparison passes.
If the source data is less than or equal to the destination data, the comparison passes.
If the source data is greater than the destination data, the comparison passes.
If the source data is not equal to the destination data, the comparison passes.
If the source data is greater than or equal to the destination data, the comparison passes.
Always pass the comparison.
Identifies whether conservative rasterization is on or off.
+Conservative rasterization is off.
Conservative rasterization is on.
Specifies if the hardware and driver support conservative rasterization and at what tier level.
+Conservative rasterization isn't supported.
Tier_1 conservative rasterization is supported.
Tier_2 conservative rasterization is supported.
Tier_3 conservative rasterization is supported.
Contains flags that describe content-protection capabilities.
+The content protection is implemented in software by the driver.
The content protection is implemented in hardware by the GPU. +
Content protection is always applied to a protected surface, regardless of whether the application explicitly enables protection.
The driver can use partially encrypted buffers. If this capability is not present, the entire buffer must be either encrypted or clear.
The driver can encrypt data using a separate content key that is encrypted using the session key.
The driver can refresh the session key without renegotiating the key.
The driver can read back encrypted data from a protected surface. For more information, see ID3D11VideoContext::EncryptionBlt.
The driver requires a separate key to read encrypted data from a protected surface.
If the encryption type is D3DCRYPTOTYPE_AES128_CTR, the application must use a sequential count in the
The driver supports encrypted slice data, but does not support any other encrypted data in the compressed buffer. The caller should not encrypt any data within the buffer other than the slice data.
Note??The driver should only report this flag for the specific profiles that have this limitation. ?The driver can copy encrypted data from one resource to another, decrypting the data as part of the process.
The hardware supports the protection of specific resources. This means that:
Note??This enumeration value is supported starting with Windows?10.
Physical pages of a protected resource can be evicted and potentially paged to disk in low memory conditions without losing the contents of the resource when paged back in.
Note??This enumeration value is supported starting with Windows?10.
The hardware supports an automatic teardown mechanism that could trigger hardware keys or protected content to become lost in some conditions. The application can register to be notified when these events occur.
Note??This enumeration value is supported starting with Windows?10.
The secure environment is tightly coupled with the GPU and an
Note??This enumeration value is supported starting with Windows?10.
Specifies the context in which a query occurs.
+This enum is used by the following:
The query can occur in all contexts.
The query occurs in the context of a 3D command queue.
The query occurs in the context of a 3D compute queue.
The query occurs in the context of a 3D copy queue.
The query occurs in the context of video.
The existing contents of the resource cannot be overwritten.
The existing contents of the resource are undefined and can be discarded.
Options for performance counters.
+Independent hardware vendors may define their own set of performance counters for their devices, by giving the enumeration value a number that is greater than the value for D3D11_COUNTER_DEVICE_DEPENDENT_0.
This enumeration is used by
Define a performance counter that is dependent on the hardware device.
Data type of a performance counter.
+These flags are an output parameter in ID3D11Device::CheckCounter.
+32-bit floating point.
16-bit unsigned integer.
32-bit unsigned integer.
64-bit unsigned integer.
The resource is to be mappable so that the CPU can change its contents. Resources created with this flag cannot be set as outputs of the pipeline and must be created with either dynamic or staging usage (see
The resource is to be mappable so that the CPU can read its contents. Resources created with this flag cannot be set as either inputs or outputs to the pipeline and must be created with staging usage (see
Represents the status of an
Indicates triangles facing a particular direction are not drawn.
+This enumeration is part of a rasterizer-state object description (see
Always draw all triangles.
Do not draw triangles that are front-facing.
Do not draw triangles that are back-facing.
Clear the depth buffer, using fast clear if possible, then place the resource in a compressed state.
Clear the stencil buffer, using fast clear if possible, then place the resource in a compressed state.
Specifies how to access a resource used in a depth-stencil view.
+This enumeration is used in
D3D11_DSV_DIMENSION_UNKNOWN is not a valid value for
The resource will be accessed as a 1D texture.
The resource will be accessed as an array of 1D textures.
The resource will be accessed as a 2D texture.
The resource will be accessed as an array of 2D textures.
The resource will be accessed as a 2D texture with multisampling.
The resource will be accessed as an array of 2D textures with multisampling.
Indicates that depth values are read only.
Indicates that stencil values are read only.
Identify the portion of a depth-stencil buffer for writing depth data.
+Turn off writes to the depth-stencil buffer.
Turn on writes to the depth-stencil buffer.
Device context options.
+This enumeration is used by ID3D11DeviceContext::GetType.
+The device context is an immediate context.
The device context is a deferred context.
Use this flag if your application will only call methods of Direct3D?11 interfaces from a single thread. By default, the
Creates a device that supports the debug layer.
To use this flag, you must have D3D11*SDKLayers.dll installed; otherwise, device creation fails. To get D3D11_1SDKLayers.dll, install the SDK for Windows?8.
Prevents multiple threads from being created. When this flag is used with a Windows Advanced Rasterization Platform (WARP) device, no additional threads will be created by WARP and all rasterization will occur on the calling thread. This flag is not recommended for general use. See remarks.
Creates a device that supports BGRA formats (DXGI_FORMAT_B8G8R8A8_UNORM and DXGI_FORMAT_B8G8R8A8_UNORM_SRGB). All 10level9 and higher hardware with WDDM 1.1+ drivers support BGRA formats.
Note??Required for Direct2D interoperability with Direct3D resources. ?Causes the device and driver to keep information that you can use for shader debugging. The exact impact from this flag will vary from driver to driver.
To use this flag, you must have D3D11_1SDKLayers.dll installed; otherwise, device creation fails. The created device supports the debug layer. To get D3D11_1SDKLayers.dll, install the SDK for Windows?8.
If you use this flag and the current driver does not support shader debugging, device creation fails. Shader debugging requires a driver that is implemented to the WDDM for Windows?8 (WDDM 1.2).
Direct3D 11:??This value is not supported until Direct3D 11.1.
Causes the Direct3D runtime to ignore registry settings that turn on the debug layer. You can turn on the debug layer by using the DirectX Control Panel that was included as part of the DirectX SDK. We shipped the last version of the DirectX SDK in June 2010; you can download it from the Microsoft Download Center. You can set this flag in your app, typically in release builds only, to prevent end users from using the DirectX Control Panel to monitor how the app uses Direct3D.
Note??You can also set this flag in your app to prevent Direct3D debugging tools, such as Visual Studio Ultimate?2012, from hooking your app. ?Windows?8.1:??This flag doesn't prevent Visual Studio?2013 and later running on Windows?8.1 and later from hooking your app; instead use ID3D11DeviceContext2::IsAnnotationEnabled. This flag still prevents Visual Studio?2013 and later running on Windows?8 and earlier from hooking your app.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Use this flag if the device will produce GPU workloads that take more than two seconds to complete, and you want the operating system to allow them to successfully finish. If this flag is not set, the operating system performs timeout detection and recovery when it detects a GPU packet that took more than two seconds to execute. If this flag is set, the operating system allows such a long running packet to execute without resetting the GPU. We recommend not to set this flag if your device needs to be highly responsive so that the operating system can detect and recover from GPU timeouts. We recommend to set this flag if your device needs to perform time consuming background tasks such as compute, image recognition, and video encoding to allow such tasks to successfully finish.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Forces the creation of the Direct3D device to fail if the display driver is not implemented to the WDDM for Windows?8 (WDDM 1.2). When the display driver is not implemented to WDDM 1.2, only a Direct3D device that is created with feature level 9.1, 9.2, or 9.3 supports video; therefore, if this flag is set, the runtime creates the Direct3D device only for feature level 9.1, 9.2, or 9.3. We recommend not to specify this flag for applications that want to favor Direct3D capability over video. If feature level 10 and higher is available, the runtime will use that feature level regardless of video support.
If this flag is set, device creation on the Basic Render Device (BRD) will succeed regardless of the BRD's missing support for video decode. This is because the Media Foundation video stack operates in software mode on BRD. In this situation, if you force the video stack to create the Direct3D device twice (create the device once with this flag, next discover BRD, then again create the device without the flag), you actually degrade performance.
If you attempt to create a Direct3D device with driver type D3D_DRIVER_TYPE_NULL, D3D_DRIVER_TYPE_REFERENCE, or D3D_DRIVER_TYPE_SOFTWARE, device creation fails at any feature level because none of the associated drivers provide video capability. If you attempt to create a Direct3D device with driver type D3D_DRIVER_TYPE_WARP, device creation succeeds to allow software fallback for video.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Direct3D 11 feature options.
+This enumeration is used when querying a driver about support for these features by calling ID3D11Device::CheckFeatureSupport. Each value in this enumeration has a corresponding data structure that is required to be passed to the pFeatureSupportData parameter of ID3D11Device::CheckFeatureSupport.
+ The driver supports multithreading. To see an example of testing a driver for multithread support, see How To: Check for Driver Support. Refer to
Supports the use of the double-precision shaders in HLSL. Refer to
Supports the formats in
Supports the formats in
Supports compute shaders and raw and structured buffers. Refer to
Supports Direct3D 11.1 feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports specific adapter architecture. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports Direct3D?9 feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports minimum precision of shaders. For more info about HLSL minimum precision, see using HLSL minimum precision. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports Direct3D?9 shadowing feature. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.1.
Supports Direct3D 11.2 feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.2.
Supports Direct3D 11.2 instancing options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.2.
Supports Direct3D 11.2 marker options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.2.
Supports Direct3D?9 feature options, which includes the Direct3D?9 shadowing feature and instancing support. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.2.
Supports Direct3D 11.3 conservative rasterization feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.3.
Supports Direct3D 11.4 conservative rasterization feature options. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.4.
Supports GPU virtual addresses. Refer to
Supports a single boolean for NV12 shared textures. Refer to
Direct3D 11:??This value is not supported until Direct3D 11.4.
The device context is an immediate context.
The device context is a deferred context.
Determines the fill mode to use when rendering triangles.
+This enumeration is part of a rasterizer-state object description (see
Draw lines connecting the vertices. Adjacent vertices are not drawn.
Fill the triangles formed by the vertices. Adjacent vertices are not drawn.
Filtering options during texture sampling.
+During texture sampling, one or more texels are read and combined (this is calling filtering) to produce a single value. Point sampling reads a single texel while linear sampling reads two texels (endpoints) and linearly interpolates a third value between the endpoints.
HLSL texture-sampling functions also support comparison filtering during texture sampling. Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.
You can use HLSL intrinsic texture-sampling functions that implement texture filtering only or companion functions that use texture filtering with comparison filtering.
| Texture Sampling Function | Texture Sampling Function with Comparison Filtering |
|---|---|
| sample | samplecmp or samplecmplevelzero |
?
Comparison filters only work with textures that have the following DXGI formats: R32_FLOAT_X8X24_TYPELESS, R32_FLOAT, R24_UNORM_X8_TYPELESS, R16_UNORM.
+Use point sampling for minification, magnification, and mip-level sampling.
Use point sampling for minification and magnification; use linear interpolation for mip-level sampling.
Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling.
Use point sampling for minification; use linear interpolation for magnification and mip-level sampling.
Use linear interpolation for minification; use point sampling for magnification and mip-level sampling.
Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling.
Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.
Use linear interpolation for minification, magnification, and mip-level sampling.
Use anisotropic interpolation for minification, magnification, and mip-level sampling.
Use point sampling for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification and magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.
Use point sampling for minification; use linear interpolation for magnification and mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification; use point sampling for magnification and mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification and magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.
Use linear interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
Use anisotropic interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.
Fetch the same set of texels as D3D11_FILTER_MIN_MAG_MIP_POINT and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_MAG_MIP_LINEAR and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_ANISOTROPIC and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_MAG_MIP_POINT and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_MIN_MAG_MIP_LINEAR and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Fetch the same set of texels as D3D11_FILTER_ANISOTROPIC and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the MinMaxFiltering member in the
Specifies the type of sampler filter reduction.
+ This enum is used by the
Indicates standard (default) filter reduction.
Indicates a comparison filter reduction.
Indicates minimum filter reduction.
Indicates maximum filter reduction.
Types of magnification or minification sampler filters.
+Point filtering used as a texture magnification or minification filter. The texel with coordinates nearest to the desired pixel value is used. The texture filter to be used between mipmap levels is nearest-point mipmap filtering. The rasterizer uses the color from the texel of the nearest mipmap texture.
Bilinear interpolation filtering used as a texture magnification or minification filter. A weighted average of a 2 x 2 area of texels surrounding the desired pixel is used. The texture filter to use between mipmap levels is trilinear mipmap interpolation. The rasterizer linearly interpolates pixel color, using the texels of the two nearest mipmap textures.
Type of data contained in an input slot.
+Use these values to specify the type of data for a particular input element (see
Input data is per-vertex data.
Input data is per-instance data.
Specifies logical operations to configure for a render target.
+Clears the render target.
Sets the render target.
Copys the render target.
Performs an inverted-copy of the render target.
No operation is performed on the render target.
Inverts the render target.
Performs a logical AND operation on the render target.
Performs a logical NAND operation on the render target.
Performs a logical OR operation on the render target.
Performs a logical NOR operation on the render target.
Performs a logical XOR operation on the render target.
Performs a logical equal operation on the render target.
Performs a logical AND and reverse operation on the render target.
Performs a logical AND and invert operation on the render target.
Performs a logical OR and reverse operation on the render target.
Performs a logical OR and invert operation on the render target.
Identifies a resource to be accessed for reading and writing by the CPU. Applications may combine one or more of these flags.
+This enumeration is used in ID3D11DeviceContext::Map.
These remarks are divided into the following topics:
Resource is mapped for reading. The resource must have been created with read access (see D3D11_CPU_ACCESS_READ).
Resource is mapped for writing. The resource must have been created with write access (see D3D11_CPU_ACCESS_WRITE).
Resource is mapped for reading and writing. The resource must have been created with read and write access (see D3D11_CPU_ACCESS_READ and D3D11_CPU_ACCESS_WRITE).
Resource is mapped for writing; the previous contents of the resource will be undefined. The resource must have been created with write access and dynamic usage (See D3D11_CPU_ACCESS_WRITE and D3D11_USAGE_DYNAMIC).
Resource is mapped for writing; the existing contents of the resource cannot be overwritten (see Remarks). This flag is only valid on vertex and index buffers. The resource must have been created with write access (see D3D11_CPU_ACCESS_WRITE). Cannot be used on a resource created with the D3D11_BIND_CONSTANT_BUFFER flag.
Note??The Direct3D 11.1 runtime, which is available starting with Windows?8, enables mapping dynamic constant buffers and shader resource views (SRVs) of dynamic buffers with D3D11_MAP_WRITE_NO_OVERWRITE. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call ID3D11Device::CheckFeatureSupport with D3D11_FEATURE_D3D11_OPTIONS. CheckFeatureSupport fills members of aCategories of debug messages. This will identify the category of a message when retrieving a message with ID3D11InfoQueue::GetMessage and when adding a message with ID3D11InfoQueue::AddMessage. When creating an info queue filter, these values can be used to allow or deny any categories of messages to pass through the storage and retrieval filters.
+This is part of the Information Queue feature. See
Debug message severity levels for an information queue.
+Use these values to allow or deny message categories to pass through the storage and retrieval filters for an information queue (see
Defines some type of corruption which has occurred.
Defines an error message.
Defines a warning message.
Defines an information message.
Defines a message other than corruption, error, warning, or information.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Tell the hardware that if it is not yet sure if something is hidden or not to draw it anyway. This is only used with an occlusion predicate. Predication data cannot be returned to your application via ID3D11DeviceContext::GetData when using this flag.
Query types.
+Create a query with ID3D11Device::CreateQuery.
+ Determines whether or not the GPU is finished processing commands. When the GPU is finished processing commands ID3D11DeviceContext::GetData will return
Get the number of samples that passed the depth and stencil tests in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData returns a UINT64. If a depth or stencil test is disabled, then each of those tests will be counted as a pass.
Get a timestamp value where ID3D11DeviceContext::GetData returns a UINT64. This kind of query is only useful if two timestamp queries are done in the middle of a D3D11_QUERY_TIMESTAMP_DISJOINT query. The difference of two timestamps can be used to determine how many ticks have elapsed, and the D3D11_QUERY_TIMESTAMP_DISJOINT query will determine if that difference is a reliable value and also has a value that shows how to convert the number of ticks into seconds. See
Determines whether or not a D3D11_QUERY_TIMESTAMP is returning reliable values, and also gives the frequency of the processor enabling you to convert the number of elapsed ticks into seconds. ID3D11DeviceContext::GetData will return a
Get pipeline statistics, such as the number of pixel shader invocations in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData will return a
Similar to D3D11_QUERY_OCCLUSION, except ID3D11DeviceContext::GetData returns a
Get streaming output statistics, such as the number of primitives streamed out in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData will return a
Determines whether or not any of the streaming output buffers overflowed in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData returns a
Get streaming output statistics for stream 0, such as the number of primitives streamed out in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData will return a
Determines whether or not the stream 0 output buffers overflowed in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData returns a
Get streaming output statistics for stream 1, such as the number of primitives streamed out in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData will return a
Determines whether or not the stream 1 output buffers overflowed in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData returns a
Get streaming output statistics for stream 2, such as the number of primitives streamed out in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData will return a
Determines whether or not the stream 2 output buffers overflowed in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData returns a
Get streaming output statistics for stream 3, such as the number of primitives streamed out in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData will return a
Determines whether or not the stream 3 output buffers overflowed in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End. ID3D11DeviceContext::GetData returns a
These flags identify the type of resource that will be viewed as a render target.
+This enumeration is used in
Do not use this value, as it will cause ID3D11Device::CreateRenderTargetView to fail.
The resource will be accessed as a buffer.
The resource will be accessed as a 1D texture.
The resource will be accessed as an array of 1D textures.
The resource will be accessed as a 2D texture.
The resource will be accessed as an array of 2D textures.
The resource will be accessed as a 2D texture with multisampling.
The resource will be accessed as an array of 2D textures with multisampling.
The resource will be accessed as a 3D texture.
Specifies to obtain a summary about a device object's lifetime.
Specifies to obtain detailed information about a device object's lifetime.
Do not use this enumeration constant. It is for internal use only.
Identifies the type of resource being used.
+This enumeration is used in ID3D11Resource::GetType.
+Resource is of unknown type.
Resource is a buffer.
Resource is a 1D texture.
Resource is a 2D texture.
Resource is a 3D texture.
Enables MIP map generation by using ID3D11DeviceContext::GenerateMips on a texture resource. The resource must be created with the bind flags that specify that the resource is a render target and a shader resource.
Enables resource data sharing between two or more Direct3D devices. The only resources that can be shared are 2D non-mipmapped textures.
D3D11_RESOURCE_MISC_SHARED and D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX are mutually exclusive.
WARP and REF devices do not support shared resources. If you try to create a resource with this flag on either a WARP or REF device, the create method will return an E_OUTOFMEMORY error code.
Note?? Starting with Windows?8, WARP devices fully support shared resources. ? Note?? Starting with Windows?8, we recommend that you enable resource data sharing between two or more Direct3D devices by using a combination of the D3D11_RESOURCE_MISC_SHARED_NTHANDLE and D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flags instead. ?Sets a resource to be a cube texture created from a Texture2DArray that contains 6 textures.
Enables instancing of GPU-generated content.
Enables a resource as a byte address buffer.
Enables a resource as a structured buffer.
Enables a resource with MIP map clamping for use with ID3D11DeviceContext::SetResourceMinLOD.
Enables the resource to be synchronized by using the IDXGIKeyedMutex::AcquireSync and IDXGIKeyedMutex::ReleaseSync APIs. The following Direct3D?11 resource creation APIs, that take
If you call any of these methods with the D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag set, the interface returned will support the
D3D11_RESOURCE_MISC_SHARED and D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX are mutually exclusive.
WARP and REF devices do not support shared resources. If you try to create a resource with this flag on either a WARP or REF device, the create method will return an E_OUTOFMEMORY error code.
Note?? Starting with Windows?8, WARP devices fully support shared resources. ?Enables a resource compatible with GDI. You must set the D3D11_RESOURCE_MISC_GDI_COMPATIBLE flag on surfaces that you use with GDI. Setting the D3D11_RESOURCE_MISC_GDI_COMPATIBLE flag allows GDI rendering on the surface via IDXGISurface1::GetDC.
Consider the following programming tips for using D3D11_RESOURCE_MISC_GDI_COMPATIBLE when you create a texture or use that texture in a swap chain:
You must set the texture format to one of the following types.
Set this flag to enable the use of NT HANDLE values when you create a shared resource. By enabling this flag, you deprecate the use of existing HANDLE values.
When you use this flag, you must combine it with the D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag by using a bitwise OR operation. The resulting value specifies a new shared resource type that directs the runtime to use NT HANDLE values for the shared resource. The runtime then must confirm that the shared resource works on all hardware at the specified feature level.
Without this flag set, the runtime does not strictly validate shared resource parameters (that is, formats, flags, usage, and so on). When the runtime does not validate shared resource parameters, behavior of much of the Direct3D API might be undefined and might vary from driver to driver.
Direct3D 11 and earlier:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the resource might contain protected content; therefore, the operating system should use the resource only when the driver and hardware support content protection. If the driver and hardware do not support content protection and you try to create a resource with this flag, the resource creation fails.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the operating system restricts access to the shared surface. You can use this flag together with the D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER flag and only when you create a shared surface. The process that creates the shared resource can always open the shared resource.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the driver restricts access to the shared surface. You can use this flag in conjunction with the D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE flag and only when you create a shared surface. The process that creates the shared resource can always open the shared resource.
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the resource is guarded. Such a resource is returned by the IDCompositionSurface::BeginDraw (DirectComposition) and ISurfaceImageSourceNative::BeginDraw (Windows Runtime) APIs. For these APIs, you provide a region of interest (ROI) on a surface to update. This surface isn't compatible with multiple render targets (MRT).
A guarded resource automatically restricts all writes to the region that is related to one of the preceding APIs. Additionally, the resource enforces access to the ROI with these restrictions:
Direct3D 11:??This value is not supported until Direct3D 11.1.
Set this flag to indicate that the resource is a tile pool.
Direct3D 11:??This value is not supported until Direct3D 11.2.
Set this flag to indicate that the resource is a tiled resource.
Direct3D 11:??This value is not supported until Direct3D 11.2.
Set this flag to indicate that the resource should be created such that it will be protected by the hardware. Resource creation will fail if hardware content protection is not supported.
This flag has the following restrictions:
Creating a texture using this flag does not automatically guarantee that hardware protection will be enabled for the underlying allocation. Some implementations require that the DRM components are first initialized prior to any guarantees of protection.
?Note?? This enumeration value is supported starting with Windows?10.
Identifies expected resource use during rendering. The usage directly reflects whether a resource is accessible by the CPU and/or the graphics processing unit (GPU).
+An application identifies the way a resource is intended to be used (its usage) in a resource description. There are several structures for creating resources including:
| Differences between Direct3D 9 and Direct3D 10/11: In Direct3D 9, you specify the type of memory a resource should be created in at resource creation time (using D3DPOOL). It was an application's job to decide what memory pool would provide the best combination of functionality and performance. In Direct3D 10/11, an application no longer specifies what type of memory (the pool) to create a resource in. Instead, you specify the intended usage of the resource, and let the runtime (in concert with the driver and a memory manager) choose the type of memory that will achieve the best performance. |
?
+A resource that requires read and write access by the GPU. This is likely to be the most common usage choice.
A resource that can only be read by the GPU. It cannot be written by the GPU, and cannot be accessed at all by the CPU. This type of resource must be initialized when it is created, since it cannot be changed after creation.
A resource that is accessible by both the GPU (read only) and the CPU (write only). A dynamic resource is a good choice for a resource that will be updated by the CPU at least once per frame. To update a dynamic resource, use a Map method.
For info about how to use dynamic resources, see How to: Use dynamic resources.
A resource that supports data transfer (copy) from the GPU to the CPU.
Indicates that the driver does not support shader caching.
Indicates that the driver supports an OS-managed shader cache that stores compiled shaders in memory during the current run of the application.
Indicates that the driver supports an OS-managed shader cache that stores compiled shaders on disk to accelerate future runs of the application.
Values that specify minimum precision levels at shader stages.
+Minimum precision level is 10-bit.
Minimum precision level is 16-bit.
View the buffer as raw. For more info about raw viewing of buffers, see Raw Views of Buffers.
Options that specify how to perform shader debug tracking.
+This enumeration is used by the following methods:
No debug tracking is performed.
Track the reading of uninitialized data.
Track read-after-write hazards.
Track write-after-read hazards.
Track write-after-write hazards.
Track that hazards are allowed in which data is written but the value does not change.
Track that only one type of atomic operation is used on an address.
Track read-after-write hazards across thread groups.
Track write-after-read hazards across thread groups.
Track write-after-write hazards across thread groups.
Track that only one type of atomic operation is used on an address across thread groups.
Track hazards that are specific to unordered access views (UAVs).
Track all hazards.
Track all hazards and track that hazards are allowed in which data is written but the value does not change.
All of the preceding tracking options are set except D3D11_SHADER_TRACKING_OPTION_IGNORE.
Indicates which resource types to track.
+The ID3D11TracingDevice::SetShaderTrackingOptionsByType or ID3D11RefDefaultTrackingOptions::SetTrackingOptions method tracks a specific type of resource.
Note??This API requires the Windows Software Development Kit (SDK) for Windows?8.? +No resource types are tracked.
Track device memory that is created with unordered access view (UAV) bind flags.
Track device memory that is created without UAV bind flags.
Track all device memory.
Track all shaders that use group shared memory.
Track all device memory except device memory that is created without UAV bind flags.
Track all device memory except device memory that is created with UAV bind flags.
Track all memory on the device.
Specifies a multi-sample pattern type.
+An app calls ID3D11Device::CheckMultisampleQualityLevels to get the number of quality levels available during multisampling. A 0 quality level means the hardware does not support multisampling for the particular format. If the number of quality levels is greater than 0 and the hardware supports the fixed sample patterns for the sample count, the app can request the fixed patterns by specifying quality level as either D3D11_STANDARD_MULTISAMPLE_PATTERN or D3D11_CENTER_MULTISAMPLE_PATTERN. The app can call ID3D11Device::CheckFormatSupport to check for support of the standard fixed patterns. If the hardware only supports the fixed patterns but no additional vendor-specific patterns, the runtime can report the number of quality levels as 1, and the hardware can pretend 0 quality level behaves the same as quality level equal to D3D11_STANDARD_MULTISAMPLE_PATTERN.
The runtime defines the following standard sample patterns for 1(trivial), 2, 4, 8, and 16 sample counts. Hardware must support 1, 4, and 8 sample counts. Hardware vendors can expose more sample counts beyond these. However, if vendors support 2, 4(required), 8(required), or 16, they must also support the corresponding standard pattern or center pattern for each of those sample counts.
+Pre-defined multi-sample patterns required for Direct3D?11 and Direct3D?10.1 hardware.
Pattern where all of the samples are located at the pixel center.
The stencil operations that can be performed during depth-stencil testing.
+Keep the existing stencil data.
Set the stencil data to 0.
Set the stencil data to the reference value set by calling ID3D11DeviceContext::OMSetDepthStencilState.
Increment the stencil value by 1, and clamp the result.
Decrement the stencil value by 1, and clamp the result.
Invert the stencil data.
Increment the stencil value by 1, and wrap the result if necessary.
Decrement the stencil value by 1, and wrap the result if necessary.
Identify a technique for resolving texture coordinates that are outside of the boundaries of a texture.
+Tile the texture at every (u,v) integer junction. For example, for u values between 0 and 3, the texture is repeated three times.
Flip the texture at every (u,v) integer junction. For u values between 0 and 1, for example, the texture is addressed normally; between 1 and 2, the texture is flipped (mirrored); between 2 and 3, the texture is normal again; and so on.
Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.
Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in
Similar to D3D11_TEXTURE_ADDRESS_MIRROR and D3D11_TEXTURE_ADDRESS_CLAMP. Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value.
The different faces of a cube texture.
+Positive X face.
Negative X face.
Positive Y face.
Negative Y face.
Positive Z face.
Negative Z face.
Specifies texture layout options.
+This enumeration controls the swizzle pattern of default textures and enable map support on default textures. Callers must query
The standard swizzle formats applies within each page-sized chunk, and pages are laid out in linear order with respect to one another. A 16-bit interleave pattern defines the conversion from pre-swizzled intra-page location to the post-swizzled location.
To demonstrate, consider the 32bpp swizzle format above. This is represented by the following interleave masks, where bits on the left are most-significant.
UINT xBytesMask = 1010 1010 1000 1111
+ UINT yMask = 0101 0101 0111 0000
+ To compute the swizzled address, the following code could be used (where the _pdep_u32 instruction is supported):
UINT swizzledOffset = resourceBaseOffset + _pdep_u32(xOffset, xBytesMask) + _pdep_u32(yOffset, yBytesMask);
+
+ The texture layout is undefined, and is selected by the driver.
Data for the texture is stored in row major (sometimes called pitch-linear) order.
A default texture uses the standardized swizzle pattern.
Indicates that the GPU isn't currently referencing any of the portions of destination memory being written. +
Indicates that the ID3D11DeviceContext2::CopyTiles operation involves copying a linear buffer to a swizzled tiled resource. This means to copy tile data from the + specified buffer location, reading tiles sequentially, + to the specified tile region (in x,y,z order if the region is a box), swizzling to optimal hardware memory layout as needed. + In this ID3D11DeviceContext2::CopyTiles call, you specify the source data with the pBuffer parameter and the destination with the pTiledResource parameter. +
Indicates that the ID3D11DeviceContext2::CopyTiles operation involves copying a swizzled tiled resource to a linear buffer. This means to copy tile data from the tile region, reading tiles sequentially (in x,y,z order if the region is a box), + to the specified buffer location, deswizzling to linear memory layout as needed. + In this ID3D11DeviceContext2::CopyTiles call, you specify the source data with the pTiledResource parameter and the destination with the pBuffer parameter. +
Indicates the tier level at which tiled resources are supported.
+Tiled resources are not supported.
Tier_1 tiled resources are supported.
The device supports calls to CreateTexture2D and so on with the D3D11_RESOURCE_MISC_TILED flag.
The device supports calls to CreateBuffer with the D3D11_RESOURCE_MISC_TILE_POOL flag.
If you access tiles (read or write) that are
Tier_2 tiled resources are supported.
Superset of Tier_1 functionality, which includes this additional support:
Tier_3 tiled resources are supported.
Superset of Tier_2 functionality, Tier 3 is essentially Tier 2 but with the additional support of Texture3D for Tiled Resources.
Indicates that no overwriting of tiles occurs in the tile-mapping operation.
Resource contains raw, unstructured data. Requires the UAV format to be DXGI_FORMAT_R32_TYPELESS. For more info about raw viewing of buffers, see Raw Views of Buffers.
Allow data to be appended to the end of the buffer. D3D11_BUFFER_UAV_FLAG_APPEND flag must also be used for any view that will be used as a AppendStructuredBuffer or a ConsumeStructuredBuffer. Requires the UAV format to be DXGI_FORMAT_UNKNOWN.
Adds a counter to the unordered-access-view buffer. D3D11_BUFFER_UAV_FLAG_COUNTER can only be used on a UAV that is a RWStructuredBuffer and it enables the functionality needed for the IncrementCounter and DecrementCounter methods in HLSL. Requires the UAV format to be DXGI_FORMAT_UNKNOWN.
Unordered-access view options.
+ This enumeration is used by a unordered access-view description (see
The view type is unknown.
View the resource as a buffer.
View the resource as a 1D texture.
View the resource as a 1D texture array.
View the resource as a 2D texture.
View the resource as a 2D texture array.
View the resource as a 3D texture array.
Specifies how to access a resource that is used in a video decoding output view.
+This enumeration is used with the
Not a valid value.
The resource will be accessed as a 2D texture. +
Specifies a type of compressed buffer for decoding.
+Picture decoding parameter buffer. +
Macroblock control command buffer. +
Residual difference block data buffer. +
Deblocking filter control command buffer. +
Inverse quantization matrix buffer. +
Slice-control buffer. +
Bitstream data buffer. +
Motion vector buffer. +
Film grain synthesis data buffer. +
Specifies capabilities of the video decoder.
+Indicates that the graphics driver supports at least a subset of downsampling operations.
Indicates that the decoding hardware cannot support the decode operation in real-time. Decoding is still supported for transcoding scenarios. With this capability, it is possible that decoding can occur in real-time if downsampling is enabled. +
Indicates that the driver supports changing down sample parameters after the initial down sample parameters have been applied. For more information, see ID3D11VideoContext1::DecoderUpdateDownsampling.
Describes how a video stream is interlaced.
+Frames are progressive.
Frames are interlaced. The top field of each frame is displayed first.
Frame are interlaced. The bottom field of each frame is displayed first.
Specifies the alpha fill mode for video processing.
+Alpha values inside the target rectangle are set to opaque.
Alpha values inside the target rectangle are set to the alpha value specified in the background color. To set the background color, call the ID3D11VideoContext::VideoProcessorSetOutputBackgroundColor method.
Existing alpha values remain unchanged in the output surface.
Alpha values are taken from an input stream, scaled, and copied to the corresponding destination rectangle for that stream. The input stream is specified in the StreamIndex parameter of the ID3D11VideoContext::VideoProcessorSetOutputAlphaFillMode method.
If the input stream does not have alpha data, the video processor sets the alpha values in the target rectangle to opaque. If the input stream is disabled or the source rectangle is empty, the alpha values in the target rectangle are not modified.
Specifies the automatic image processing capabilities of the video processor.
+Denoise.
Deringing.
Edge enhancement.
Color correction.
Flesh-tone mapping.
Image stabilization.
Enhanced image resolution.
Anamorphic scaling.
Specifies flags that indicate the most efficient methods for performing video processing operations.
+Multi-plane overlay hardware can perform the rotation operation more efficiently than the ID3D11VideoContext::VideoProcessorBlt method.
Multi-plane overlay hardware can perform the scaling operation more efficiently than the ID3D11VideoContext::VideoProcessorBlt method.
Multi-plane overlay hardware can perform the colorspace conversion operation more efficiently than the ID3D11VideoContext::VideoProcessorBlt method.
The video processor output data should be at least triple buffered for optimal performance.
Defines video processing capabilities for a Microsoft Direct3D?11 video processor.
+The video processor can blend video content in linear color space. Most video content is gamma corrected, resulting in nonlinear values. This capability flag means that the video processor converts colors to linear space before blending, which produces better results.
The video processor supports the xvYCC color space for YCbCr data.
The video processor can perform range conversion when the input and output are both RGB but use different color ranges (0-255 or 16-235, for 8-bit RGB).
The video processor can apply a matrix conversion to YCbCr values when the input and output are both YCbCr. For example, the driver can convert colors from BT.601 to BT.709.
The video processor supports YUV nominal range .
Supported in Windows?8.1 and later.
Defines features that a Microsoft Direct3D?11 video processor can support.
+The video processor can set alpha values on the output pixels. For more information, see ID3D11VideoContext::VideoProcessorSetOutputAlphaFillMode.
The video processor can downsample the video output. For more information, see ID3D11VideoContext::VideoProcessorSetOutputConstriction.
The video processor can perform luma keying. For more information, see ID3D11VideoContext::VideoProcessorSetStreamLumaKey.
The video processor can apply alpha values from color palette entries.
The driver does not support full video processing capabilities. If this capability flag is set, the video processor has the following limitations:
The video processor can support 3D stereo video. For more information, see ID3D11VideoContext::VideoProcessorSetStreamStereoFormat.
All drivers setting this caps must support the following stereo formats: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL, D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL, and D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE.
The driver can rotate the input data either 90, 180, or 270 degrees clockwise as part of the video processing operation.
The driver supports the VideoProcessorSetStreamAlpha call.
The driver supports the VideoProcessorSetStreamPixelAspectRatio call.
Identifies a video processor filter.
+Brightness filter.
Contrast filter.
Hue filter.
Saturation filter.
Noise reduction filter.
Edge enhancement filter.
Anamorphic scaling filter.
Stereo adjustment filter. When stereo 3D video is enabled, this filter adjusts the offset between the left and right views, allowing the user to reduce potential eye strain.
The filter value indicates the amount by which the left and right views are adjusted. A positive value shifts the images away from each other: the left image toward the left, and the right image toward the right. A negative value shifts the images in the opposite directions, closer to each other.
Defines image filter capabilities for a Microsoft Direct3D?11 video processor.
+These capability flags indicate support for the image filters defined by the
The video processor can adjust the brightness level.
The video processor can adjust the contrast level.
The video processor can adjust hue.
The video processor can adjust the saturation level.
The video processor can perform noise reduction.
The video processor can perform edge enhancement.
The video processor can perform anamorphic scaling. Anamorphic scaling can be used to stretch 4:3 content to a widescreen 16:9 aspect ratio.
For stereo 3D video, the video processor can adjust the offset between the left and right views, allowing the user to reduce potential eye strain.
Defines capabilities related to input formats for a Microsoft Direct3D?11 video processor.
+These flags define video processing capabilities that usually are not needed, and that video devices are therefore not required to support.
The first three flags relate to RGB support for functions that are normally applied to YCbCr video: deinterlacing, color adjustment, and luma keying. A device that supports these functions for YCbCr is not required to support them for RGB input. Supporting RGB input for these functions is an additional capability, reflected by these constants. Note that the driver might convert the input to another color space, perform the indicated function, and then convert the result back to RGB.
Similarly, a device that supports deinterlacing is not required to support deinterlacing of palettized formats. This capability is indicated by the D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_PALETTE_INTERLACED flag.
+The video processor can deinterlace an input stream that contains interlaced RGB video.
The video processor can perform color adjustment on RGB video.
The video processor can perform luma keying on RGB video.
The video processor can deinterlace input streams with palettized color formats.
Specifies how a video format can be used for video processing.
+The format can be used as the input to the video processor.
The format can be used as the output from the video processor.
Specifies the inverse telecine (IVTC) capabilities of a video processor.
+The video processor can reverse 3:2 pulldown.
The video processor can reverse 2:2 pulldown.
The video processor can reverse 2:2:2:4 pulldown.
The video processor can reverse 2:3:3:2 pulldown.
The video processor can reverse 3:2:3:2:2 pulldown.
The video processor can reverse 5:5 pulldown.
The video processor can reverse 6:4 pulldown.
The video processor can reverse 8:7 pulldown.
The video processor can reverse 2:2:2:2:2:2:2:2:2:2:2:3 pulldown.
The video processor can reverse other telecine modes not listed here.
Specifies values for the luminance range of YUV data.
+Driver defaults are used, which should be Studio luminance range [16-235],
Studio luminance range [16-235]
Full luminance range [0-255]
Specifies the rate at which the video processor produces output frames from an input stream.
+The output is the normal frame rate.
The output is half the frame rate.
The output is a custom frame rate.
Specifies video processing capabilities that relate to deinterlacing, inverse telecine (IVTC), and frame-rate conversion.
+The video processor can perform blend deinterlacing.
In blend deinterlacing, the two fields from an interlaced frame are blended into a single progressive frame. A video processor uses blend deinterlacing when it deinterlaces at half rate, as when converting 60i to 30p. Blend deinterlacing does not require reference frames.
The video processor can perform bob deinterlacing.
In bob deinterlacing, missing field lines are interpolated from the lines above and below. Bob deinterlacing does not require reference frames.
The video processor can perform adaptive deinterlacing.
Adaptive deinterlacing uses spatial or temporal interpolation, and switches between the two on a field-by-field basis, depending on the amount of motion. If the video processor does not receive enough reference frames to perform adaptive deinterlacing, it falls back to bob deinterlacing.
The video processor can perform motion-compensated deinterlacing.
Motion-compensated deinterlacing uses motion vectors to recreate missing lines. If the video processor does not receive enough reference frames to perform motion-compensated deinterlacing, it falls back to bob deinterlacing.
The video processor can perform inverse telecine (IVTC).
If the video processor supports this capability, the ITelecineCaps member of the
The video processor can convert the frame rate by interpolating frames.
Specifies the video rotation states.
+The video is not rotated.
The video is rotated 90 degrees clockwise.
The video is rotated 180 degrees clockwise.
The video is rotated 270 degrees clockwise.
Defines stereo 3D capabilities for a Microsoft Direct3D?11 video processor.
+The video processor supports the D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET format.
The video processor supports the D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED format.
The video processor supports the D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED format.
The video processor supports the D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD format.
The video processor can flip one or both views. For more information, see
For stereo 3D video, specifies whether the data in frame 0 or frame 1 is flipped, either horizontally or vertically.
+Neither frame is flipped.
The data in frame 0 is flipped.
The data in frame 1 is flipped.
Specifies the layout in memory of a stereo 3D video frame.
+This enumeration designates the two stereo views as "frame 0" and "frame 1". The LeftViewFrame0 parameter of the VideoProcessorSetStreamStereoFormat method specifies which view is the left view, and which is the right view.
For packed formats, if the source rectangle clips part of the surface, the driver interprets the rectangle in logical coordinates relative to the stereo view, rather than absolute pixel coordinates. The result is that frame 0 and frame 1 are clipped proportionately.
To query whether the device supports stereo 3D video, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check for the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO flag in the FeatureCaps member of the
The sample does not contain stereo data. If the stereo format is not specified, this value is the default.
Frame 0 and frame 1 are packed side-by-side, as shown in the following diagram.
All drivers that support stereo video must support this format.
Frame 0 and frame 1 are packed top-to-bottom, as shown in the following diagram.
All drivers that support stereo video must support this format.
Frame 0 and frame 1 are placed in separate resources or in separate texture array elements within the same resource.
All drivers that support stereo video must support this format.
The sample contains non-stereo data. However, the driver should create a left/right output of this sample using a specified offset. The offset is specified in the MonoOffset parameter of the ID3D11VideoContext::VideoProcessorSetStreamStereoFormat method.
This format is primarily intended for subtitles and other subpicture data, where the entire sample is presented on the same plane.
Support for this stereo format is optional.
Frame 0 and frame 1 are packed into interleaved rows, as shown in the following diagram.
Support for this stereo format is optional.
Frame 0 and frame 1 are packed into interleaved columns, as shown in the following diagram.
Support for this stereo format is optional.
Frame 0 and frame 1 are packed in a checkerboard format, as shown in the following diagram.
Support for this stereo format is optional.
Specifies the intended use for a video processor.
+Normal video playback. The graphics driver should expose a set of capabilities that are appropriate for real-time video playback.
Optimal speed. The graphics driver should expose a minimal set of capabilities that are optimized for performance.
Use this setting if you want better performance and can accept some reduction in video quality. For example, you might use this setting in power-saving mode or to play video thumbnails.
Optimal quality. The grahics driver should expose its maximum set of capabilities.
Specify this setting to get the best video quality possible. It is appropriate for tasks such as video editing, when quality is more important than speed. It is not appropriate for real-time playback.
Specifies how to access a resource that is used in a video processor input view.
+This enumeration is used with the
Not a valid value.
The resource will be accessed as a 2D texture.
Specifies how to access a resource that is used in a video processor output view.
+This enumeration is used with the
Not a valid value.
The resource will be accessed as a 2D texture.
The resource will be accessed as an array of 2D textures.
Creates a device that represents the display adapter.
+ A reference to the video adapter to use when creating a device. Pass
The
A handle to a DLL that implements a software rasterizer. If DriverType is D3D_DRIVER_TYPE_SOFTWARE, Software must not be
The runtime layers to enable (see
A reference to an array of
{ D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1,}; Note?? If the Direct3D 11.1 runtime is present on the computer and pFeatureLevels is set to The number of elements in pFeatureLevels.
The SDK version; use
Returns the address of a reference to an
If successful, returns the first
Returns the address of a reference to an
This method can return one of the Direct3D 11 Return Codes.
This method returns E_INVALIDARG if you set the pAdapter parameter to a non-
This method returns
This entry-point is supported by the Direct3D 11 runtime, which is available on Windows 7, Windows Server 2008 R2, and as an update to Windows Vista (KB971644).
To create a Direct3D 11.1 device (
To create a Direct3D 11.2 device (
Set ppDevice and ppImmediateContext to
For an example, see How To: Create a Device and Immediate Context; to create a device and a swap chain at the same time, use D3D11CreateDeviceAndSwapChain.
If you set the pAdapter parameter to a non-
| Differences between Direct3D 10 and Direct3D 11: In Direct3D 10, the presence of pAdapter dictated which adapter to use and the DriverType could mismatch what the adapter was. In Direct3D 11, if you are trying to create a hardware or a software device, set pAdapter !=
On the other hand, if pAdapter ==
|
?
The function signature PFN_D3D11_CREATE_DEVICE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.
Windows?Phone?8: This API is supported.
Windows Phone 8.1: This API is supported.
+Creates a device that uses Direct3D 11 functionality in Direct3D 12, specifying a pre-existing D3D12 device to use for D3D11 interop.
+ Specifies a pre-existing D3D12 device to use for D3D11 interop. May not be
One or more bitwise OR'ed flags from
An array of any of the following:
The first feature level which is less than or equal to the D3D12 device's feature level will be used to perform D3D11 validation. Creation will fail if no acceptable feature levels are provided. Providing
The size of the feature levels array, in bytes.
An array of unique queues for D3D11On12 to use. Valid queue types: 3D command queue.
The size of the command queue array, in bytes.
Which node of the D3D12 device to use. Only 1 bit may be set.
Pointer to the returned
A reference to the returned
A reference to the returned feature level. May be
This method returns one of the Direct3D 12 Return Codes that are documented for D3D11CreateDevice. See Direct3D 12 Return Codes.
This method returns
The function signature PFN_D3D11ON12_CREATE_DEVICE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.
+Get the size of the data (in bytes) that is output when calling ID3D11DeviceContext::GetData.
+Get the size of the data (in bytes) that is output when calling ID3D11DeviceContext::GetData.
+Size of the data (in bytes) that is output when calling GetData.
Gets the size of the driver's certificate chain.
+Gets a handle to the authenticated channel.
+Gets the size of the driver's certificate chain.
+Receives the size of the certificate chain, in bytes.
If this method succeeds, it returns
Gets the driver's certificate chain.
+The size of the pCertificate array, in bytes. To get the size of the certificate chain, call ID3D11CryptoSession::GetCertificateSize.
A reference to a byte array that receives the driver's certificate chain. The caller must allocate the array.
If this method succeeds, it returns
Gets a handle to the authenticated channel.
+Receives a handle to the channel.
Gets the type of encryption that is supported by this session.
+The application specifies the encryption type when it creates the session.
+Gets the decoding profile of the session.
+The application specifies the profile when it creates the session.
+Gets the size of the driver's certificate chain.
+To get the certificate, call ID3D11CryptoSession::GetCertificate.
+Gets a handle to the cryptographic session.
+You can use this handle to associate the session with a decoder. This enables the decoder to decrypt data that is encrypted using this session.
+Gets the type of encryption that is supported by this session.
+Receives a
| Value | Meaning |
|---|---|
| 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher. |
?
The application specifies the encryption type when it creates the session.
+Gets the decoding profile of the session.
+Receives the decoding profile. For a list of possible values, see ID3D11VideoDevice::GetVideoDecoderProfile.
The application specifies the profile when it creates the session.
+Gets the size of the driver's certificate chain.
+Receives the size of the certificate chain, in bytes.
If this method succeeds, it returns
To get the certificate, call ID3D11CryptoSession::GetCertificate.
+Gets the driver's certificate chain.
+The size of the pCertificate array, in bytes. To get the size of the certificate chain, call ID3D11CryptoSession::GetCertificateSize.
A reference to a byte array that receives the driver's certificate chain. The caller must allocate the array.
If this method succeeds, it returns
Gets a handle to the cryptographic session.
+Receives a handle to the session.
You can use this handle to associate the session with a decoder. This enables the decoder to decrypt data that is encrypted using this session.
+This method creates D3D11 resources for use with D3D 11on12.
+A reference to an already-created D3D12 resource or heap.
A
The use of the resource on input, as a bitwise-OR'd combination of
The use of the resource on output, as a bitwise-OR'd combination of
The globally unique identifier (
After the method returns, points to the newly created wrapped D3D11 resource or heap.
This method returns one of the Direct3D 12 Return Codes.
Releases D3D11 resources that were wrapped for D3D 11on12.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
Call this method prior to calling Flush, to insert resource barriers to the appropriate "out" state, and to mark that they should then be expected to be in the "in" state. If no resource list is provided, all wrapped resources are transitioned. These resources will be marked as ?not acquired? in hazard tracking until ID3D11On12Device::AcquireWrappedResources is called.
Keyed mutex resources cannot be provided to this method; use IDXGIKeyedMutex::ReleaseSync instead.
+Acquires D3D11 resources for use with D3D 11on12. Indicates that rendering to the wrapped resources can begin again.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
This method marks the resources as "acquired" in hazard tracking.
Keyed mutex resources cannot be provided to this method; use IDXGIKeyedMutex::AcquireSync instead.
+Releases D3D11 resources that were wrapped for D3D 11on12.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
Call this method prior to calling Flush, to insert resource barriers to the appropriate "out" state, and to mark that they should then be expected to be in the "in" state. If no resource list is provided, all wrapped resources are transitioned. These resources will be marked as ?not acquired? in hazard tracking until ID3D11On12Device::AcquireWrappedResources is called.
Keyed mutex resources cannot be provided to this method; use IDXGIKeyedMutex::ReleaseSync instead.
+Releases D3D11 resources that were wrapped for D3D 11on12.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
Call this method prior to calling Flush, to insert resource barriers to the appropriate "out" state, and to mark that they should then be expected to be in the "in" state. If no resource list is provided, all wrapped resources are transitioned. These resources will be marked as ?not acquired? in hazard tracking until ID3D11On12Device::AcquireWrappedResources is called.
Keyed mutex resources cannot be provided to this method; use IDXGIKeyedMutex::ReleaseSync instead.
+Acquires D3D11 resources for use with D3D 11on12. Indicates that rendering to the wrapped resources can begin again.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
This method marks the resources as "acquired" in hazard tracking.
Keyed mutex resources cannot be provided to this method; use IDXGIKeyedMutex::AcquireSync instead.
+Acquires D3D11 resources for use with D3D 11on12. Indicates that rendering to the wrapped resources can begin again.
+ Specifies a reference to a set of D3D11 resources, defined by
Count of the number of resources.
This method marks the resources as "acquired" in hazard tracking.
Keyed mutex resources cannot be provided to this method; use IDXGIKeyedMutex::AcquireSync instead.
+Registers the "device removed" event and indicates when a Direct3D device has become removed for any reason, using an asynchronous notification mechanism.
+The handle to the "device removed" event.
A reference to information about the "device removed" event, which can be used in UnregisterDeviceRemoved to unregister the event.
Indicates when a Direct3D device has become removed for any reason, using an asynchronous notification mechanism, rather than as an
Applications register and un-register a Win32 event handle with a particular device. That event handle will be signaled when the device becomes removed. A poll into the device's ID3D11Device::GetDeviceRemovedReason method indicates that the device is removed.
ISignalableNotifier or SetThreadpoolWait can be used by UWP apps.
When the graphics device is lost, the app or title will receive the graphics event, so that the app or title knows that its graphics device is no longer valid and it is safe for the app or title to re-create its DirectX devices. In response to this event, the app or title needs to re-create its rendering device and pass it into a SetRenderingDevice call on the composition graphics device objects.
After setting this new rendering device, the app or title needs to redraw content of all the pre-existing surfaces after the composition graphics device's OnRenderingDeviceReplaced event is fired.
This method supports Composition for device loss.
The event is not signaled when it is most ideal to re-create. So, instead, we recommend iterating through the adapter ordinals and creating the first ordinal that will succeed.
The application can register an event with the device. The application will be signaled when the device becomes removed.
If the device is already removed, calls to RegisterDeviceRemovedEvent will signal the event immediately. No device-removed error code will be returned from RegisterDeviceRemovedEvent.
Each "device removed" event is never signaled, or is signaled only once. These events are not signaled during device destruction. These events are unregistered during destruction.
The semantics of RegisterDeviceRemovedEvent are similar to IDXGIFactory2::RegisterOcclusionStatusEvent.
+Unregisters the "device removed" event.
+Information about the "device removed" event, retrieved during a successful RegisterDeviceRemovedEvent call.
See RegisterDeviceRemovedEvent.
+Bind an array of shader resources to the domain-shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with
For information about creating shader-resource views, see ID3D11Device::CreateShaderResourceView.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Set a domain shader to the device.
+ Pointer to a domain shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Windows?Phone?8: This API is supported.
+Set an array of sampler states to the domain-shader stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
//Default sampler state: +SamplerDesc; + SamplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; + SamplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.MipLODBias = 0; + SamplerDesc.MaxAnisotropy = 1; + SamplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER; + SamplerDesc.BorderColor[0] = 1.0f; + SamplerDesc.BorderColor[1] = 1.0f; + SamplerDesc.BorderColor[2] = 1.0f; + SamplerDesc.BorderColor[3] = 1.0f; + SamplerDesc.MinLOD = -FLT_MAX; + SamplerDesc.MaxLOD = FLT_MAX;
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets the constant buffers used by the domain-shader stage.
+ Index into the zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the DSSetConstantBuffers1 method instead.
Windows?Phone?8: This API is supported.
+Get the domain-shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to be returned by the device.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the domain shader currently set on the device.
+Address of a reference to a domain shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get an array of sampler state interfaces from the domain-shader stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the constant buffers used by the domain-shader stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Set a domain shader to the device.
+ Pointer to a domain shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Windows?Phone?8: This API is supported.
+Set a domain shader to the device.
+ Pointer to a domain shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Windows?Phone?8: This API is supported.
+Sets the constant buffers used by the geometry shader pipeline stage.
+Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
You can't use the
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the GSSetConstantBuffers1 method instead.
+Set a geometry shader to the device.
+Pointer to a geometry shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Bind an array of shader resources to the geometry shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with
For information about creating shader-resource views, see ID3D11Device::CreateShaderResourceView.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Set an array of sampler states to the geometry shader pipeline stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
//Default sampler state: +SamplerDesc; + SamplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; + SamplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.MipLODBias = 0; + SamplerDesc.MaxAnisotropy = 1; + SamplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER; + SamplerDesc.BorderColor[0] = 1.0f; + SamplerDesc.BorderColor[1] = 1.0f; + SamplerDesc.BorderColor[2] = 1.0f; + SamplerDesc.BorderColor[3] = 1.0f; + SamplerDesc.MinLOD = -FLT_MAX; + SamplerDesc.MaxLOD = FLT_MAX;
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Get the constant buffers used by the geometry shader pipeline stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the geometry shader currently set on the device.
+Address of a reference to a geometry shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the geometry shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to be returned by the device.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get an array of sampler state interfaces from the geometry shader pipeline stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Set a geometry shader to the device.
+Pointer to a geometry shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a geometry shader to the device.
+Pointer to a geometry shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Bind an array of shader resources to the hull-shader stage.
+If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with
For information about creating shader-resource views, see ID3D11Device::CreateShaderResourceView.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Set a hull shader to the device.
+Pointer to a hull shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set an array of sampler states to the hull-shader stage.
+Any sampler may be set to
//Default sampler state: +SamplerDesc; + SamplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; + SamplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.MipLODBias = 0; + SamplerDesc.MaxAnisotropy = 1; + SamplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER; + SamplerDesc.BorderColor[0] = 1.0f; + SamplerDesc.BorderColor[1] = 1.0f; + SamplerDesc.BorderColor[2] = 1.0f; + SamplerDesc.BorderColor[3] = 1.0f; + SamplerDesc.MinLOD = -FLT_MAX; + SamplerDesc.MaxLOD = FLT_MAX;
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Set the constant buffers used by the hull-shader stage.
+The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the HSSetConstantBuffers1 method instead.
+Get the hull-shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to be returned by the device.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the hull shader currently set on the device.
+Address of a reference to a hull shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get an array of sampler state interfaces from the hull-shader stage.
+Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the constant buffers used by the hull-shader stage.
+Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Set a hull shader to the device.
+Pointer to a hull shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a hull shader to the device.
+Pointer to a hull shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Enter a device's critical section.
+If SetMultithreadProtected is set to true, then entering a device's critical section prevents other threads from simultaneously calling that device's methods, calling DXGI methods, and calling the methods of all resource, view, shader, state, and asynchronous interfaces.
This function should be used in multithreaded applications when there is a series of graphics commands that must happen in order. This function is typically called at the beginning of the series of graphics commands, and Leave is typically called after those graphics commands.
+Leave a device's critical section.
+This function is typically used in multithreaded applications when there is a series of graphics commands that must happen in order. Enter is typically called at the beginning of a series of graphics commands, and this function is typically called after those graphics commands.
+Turns multithread protection on or off.
+Set to true to turn multithread protection on, false to turn it off.
True if multithread protection was already turned on prior to calling this method, false otherwise.
Find out if multithread protection is turned on or not.
+Returns true if multithread protection is turned on, false otherwise.
Bind an array of shader resources to the pixel shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this API will fill the destination shader resource slot with
For information about creating shader-resource views, see ID3D11Device::CreateShaderResourceView.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets a pixel shader to the device.
+ Pointer to a pixel shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Set ppClassInstances to
Windows?Phone?8: This API is supported.
+Set an array of sampler states to the pixel shader pipeline stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
| State | Default Value |
|---|---|
| Filter | D3D11_FILTER_MIN_MAG_MIP_LINEAR |
| AddressU | D3D11_TEXTURE_ADDRESS_CLAMP |
| AddressV | D3D11_TEXTURE_ADDRESS_CLAMP |
| AddressW | D3D11_TEXTURE_ADDRESS_CLAMP |
| MipLODBias | 0 |
| MaxAnisotropy | 1 |
| ComparisonFunc | D3D11_COMPARISON_NEVER |
| BorderColor[0] | 1.0f |
| BorderColor[1] | 1.0f |
| BorderColor[2] | 1.0f |
| BorderColor[3] | 1.0f |
| MinLOD | -FLT_MAX |
| MaxLOD | FLT_MAX |
?
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Sets the constant buffers used by the pixel shader pipeline stage.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems, can bind a larger number of
To enable the shader to access other parts of the buffer, call PSSetConstantBuffers1 instead of PSSetConstantBuffers. PSSetConstantBuffers1 has additional parameters pFirstConstant and pNumConstants.
+Bind an array of shader resources to the pixel shader stage.
+Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this API will fill the destination shader resource slot with
For information about creating shader-resource views, see ID3D11Device::CreateShaderResourceView.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Get the pixel shader currently set on the device.
+ Address of a reference to a pixel shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed, to avoid memory leaks.
Windows?Phone?8: This API is supported.
+Get an array of sampler states from the pixel shader pipeline stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Arry of sampler-state interface references (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the constant buffers used by the pixel shader pipeline stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Sets a pixel shader to the device.
+ Pointer to a pixel shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Set ppClassInstances to
Windows?Phone?8: This API is supported.
+Sets a pixel shader to the device.
+ Pointer to a pixel shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
Set ppClassInstances to
Windows?Phone?8: This API is supported.
+Sets graphics processing unit (GPU) debug reference default tracking options for specific resource types.
+ A
A combination of D3D11_SHADER_TRACKING_OPTIONS-typed flags that are combined by using a bitwise OR operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."
This method returns one of the Direct3D 11 return codes.
This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Sets graphics processing unit (GPU) debug reference tracking options.
+This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Sets graphics processing unit (GPU) debug reference tracking options.
+A combination of D3D11_SHADER_TRACKING_OPTIONS-typed flags that are combined by using a bitwise OR operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."
This method returns one of the Direct3D 11 return codes.
This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Reserved.
Reserved.
Sets the reference rasterizer's default race-condition tracking options for the specified resource types.
+A
A combination of D3D11_SHADER_TRACKING_OPTIONS-typed flags that are combined by using a bitwise OR operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on," otherwise the tracking option is set to "off."
This method returns one of the Direct3D 11 return codes.
This API requires the Windows Software Development Kit (SDK) for Windows?8.
+Sets the reference rasterizer's race-condition tracking options for a specific shader.
+A reference to the
A combination of D3D11_SHADER_TRACKING_OPTIONS-typed flags that are combined by using a bitwise OR operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."
This method returns one of the Direct3D 11 return codes.
Determines whether the calling application is running under a Microsoft Direct3D profiling tool.
+You can call GetStatus to determine whether your application is running under a Direct3D profiling tool before you make further calls to other methods of the
Marks the beginning of a section of event code.
+A
Returns the number of previous calls to BeginEvent that have not yet been finalized by calls to the ID3DUserDefinedAnnotation::EndEvent method.
The return value is ?1 if the calling application is not running under a Direct3D profiling tool.
You call the EndEvent method to mark the end of the section of event code.
A user can visualize the event when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.
BeginEvent has no effect if the calling application is not running under an enabled Direct3D profiling tool.
+Marks the end of a section of event code.
+Returns the number of previous calls to the ID3DUserDefinedAnnotation::BeginEvent method that have not yet been finalized by calls to EndEvent.
The return value is ?1 if the calling application is not running under a Direct3D profiling tool.
You call the BeginEvent method to mark the beginning of the section of event code.
A user can visualize the event when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.
EndEvent has no effect if the calling application is not running under an enabled Direct3D profiling tool.
+Marks a single point of execution in code.
+A
A user can visualize the marker when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.
SetMarker has no effect if the calling application is not running under an enabled Direct3D profiling tool.
+Determines whether the calling application is running under a Microsoft Direct3D profiling tool.
+The return value is nonzero if the calling application is running under a Direct3D profiling tool such as Visual Studio Ultimate?2012, and zero otherwise.
You can call GetStatus to determine whether your application is running under a Direct3D profiling tool before you make further calls to other methods of the
Sets the constant buffers used by the vertex shader pipeline stage.
+ Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to
Number of buffers to set (ranges from 0 to
Array of constant buffers (see
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of
If the application wants the shader to access other parts of the buffer, it must call the VSSetConstantBuffers1 method instead.
Windows?Phone?8: This API is supported.
+Set a vertex shader to the device.
+Pointer to a vertex shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Bind an array of shader resources to the vertex-shader stage.
+Index into the device's zero-based array to begin setting shader resources to (range is from 0 to
Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (range is from 0 to
Array of shader resource view interfaces to set to the device.
If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this API will fill the destination shader resource slot with
For information about creating shader-resource views, see ID3D11Device::CreateShaderResourceView.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Set an array of sampler states to the vertex shader pipeline stage.
+Index into the device's zero-based array to begin setting samplers to (ranges from 0 to
Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Pointer to an array of sampler-state interfaces (see
Any sampler may be set to
//Default sampler state: +SamplerDesc; + SamplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; + SamplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + SamplerDesc.MipLODBias = 0; + SamplerDesc.MaxAnisotropy = 1; + SamplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER; + SamplerDesc.BorderColor[0] = 1.0f; + SamplerDesc.BorderColor[1] = 1.0f; + SamplerDesc.BorderColor[2] = 1.0f; + SamplerDesc.BorderColor[3] = 1.0f; + SamplerDesc.MinLOD = -FLT_MAX; + SamplerDesc.MaxLOD = FLT_MAX;
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
+Get the constant buffers used by the vertex shader pipeline stage.
+Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to
Number of buffers to retrieve (ranges from 0 to
Array of constant buffer interface references (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the vertex shader currently set on the device.
+Address of a reference to a vertex shader (see
Pointer to an array of class instance interfaces (see
The number of class-instance elements in the array.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get the vertex shader resources.
+Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to
The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to
Array of shader resource view interfaces to be returned by the device.
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Get an array of sampler states from the vertex shader pipeline stage.
+Index into a zero-based array to begin getting samplers from (ranges from 0 to
Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to
Arry of sampler-state interface references (see
Any returned interfaces will have their reference count incremented by one. Applications should call IUnknown::Release on the returned interfaces when they are no longer needed to avoid memory leaks.
+Set a vertex shader to the device.
+Pointer to a vertex shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Set a vertex shader to the device.
+Pointer to a vertex shader (see
A reference to an array of class-instance interfaces (see
The number of class-instance interfaces in the array.
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
The maximum number of instances a shader can have is 256.
+Submits one or more buffers for decoding.
+A reference to the
The number of buffers submitted for decoding.
A reference to an array of
If this method succeeds, it returns
This function does not honor any D3D11 predicate that may have been set.
Allows the driver to return IHV specific information used when initializing the new hardware key.
+A reference to the
The size of the memory referenced by the pPrivateInputData parameter.
The private input data. The contents of this parameter is defined by the implementation of the secure execution environment. It may contain data about the license or about the stream properties.
A reference to the private output data. The return data is defined by the implementation of the secure execution environment. It may contain graphics-specific data to be associated with the underlying hardware key.
This method returns one of the following error codes.
| The operation completed successfully. | |
| E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
Checks the status of a crypto session.
+Specifies a
A
This method returns one of the following error codes.
| The operation completed successfully. | |
| E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
| E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
Indicates that decoder downsampling will be used and that the driver should allocate the appropriate reference frames.
+A reference to the
The color space information of the reference frame data.
The resolution, format, and colorspace of the output/display frames. This is the destination resolution and format of the downsample operation.
The number of reference frames to be used in the operation.
This method returns one of the following error codes.
| The operation completed successfully. | |
| E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
| E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
This function can only be called once for a specific
Updates the decoder downsampling parameters.
+A reference to the
The resolution, format, and colorspace of the output/display frames. This is the destination resolution and format of the downsample operation.
This method returns one of the following error codes.
| The operation completed successfully. | |
| E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
| E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
This method can only be called after decode downsampling is enabled by calling DecoderEnableDownsampling. This method is only supported if the D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_DYNAMIC capability is reported.
+Sets the color space information for the video processor output surface.
+A reference to the
A
Sets a value indicating whether the output surface from a call to ID3D11VideoContext::VideoProcessorBlt will be read by Direct3D shaders.
+Gets the color space information for the video processor output surface.
+A reference to the
A reference to a
Gets a value indicating whether the output surface from a call to ID3D11VideoContext::VideoProcessorBlt can be read by Direct3D shaders.
+Sets the color space information for the video processor input stream.
+A reference to the
An index identifying the input stream.
A
Specifies whether the video processor input stream should be flipped vertically or horizontally.
+A reference to the
An index identifying the input stream.
True if mirroring should be enabled; otherwise, false.
True if the stream should be flipped horizontally; otherwise, false.
True if the stream should be flipped vertically; otherwise, false.
When used in combination, transformations on the processor input stream should be applied in the following order:
Gets the color space information for the video processor input stream.
+A reference to the
An index identifying the input stream.
A reference to a
Gets values that indicate whether the video processor input stream is being flipped vertically or horizontally.
+A reference to the
An index identifying the input stream.
A reference to a boolean value indicating whether mirroring is enabled. True if mirroring is enabled; otherwise, false.
A reference to a boolean value indicating whether the stream is being flipped horizontally. True if the stream is being flipped horizontally; otherwise, false.
A reference to a boolean value indicating whether the stream is being flipped vertically. True if the stream is being flipped vertically; otherwise, false.
Returns driver hints that indicate which of the video processor operations are best performed using multi-plane overlay hardware rather than ID3D11VideoContext::VideoProcessorBlt method.
+This method returns one of the following error codes.
| The operation completed successfully. | |
| E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
| E_OUTOFMEMORY | There is insufficient memory to complete the operation. |
?
This method computes the behavior hints using the current state of the video processor as set by the "SetOutput" and "SetStream" methods of
Gets a handle to the driver.
+The driver handle can be used to configure content protection.
+Gets the parameters that were used to create the decoder.
+A reference to a
A reference to a
If this method succeeds, it returns
Gets a handle to the driver.
+Receives a handle to the driver.
If this method succeeds, it returns
The driver handle can be used to configure content protection.
+Gets the properties of the video decoder output view. +
+Gets the properties of the video decoder output view. +
+A reference to a
Gets the number of profiles that are supported by the driver.
+To enumerate the profiles, call ID3D11VideoDevice::GetVideoDecoderProfile.
+Creates a video decoder device for Microsoft Direct3D?11.
+A reference to a
A reference to a
Receives a reference to the
If this method succeeds, it returns
This method allocates the necessary decoder buffers.
The ID3D11DeviceContext::ClearState method does not affect the internal state of the video decoder.
+Creates a video processor device for Microsoft Direct3D?11.
+A reference to the
Specifies the frame-rate conversion capabilities for the video processor. The value is a zero-based index that corresponds to the TypeIndex parameter of the ID3D11VideoProcessorEnumerator::GetVideoProcessorRateConversionCaps method.
Receives a reference to the
If this method succeeds, it returns
The ID3D11DeviceContext::ClearState method does not affect the internal state of the video processor.
+Creates a channel to communicate with the Microsoft Direct3D device or the graphics driver. The channel can be used to send commands and queries for content protection.
+Specifies the type of channel, as a member of the
Receives a reference to the
If this method succeeds, it returns
If the ChannelType parameter is D3D11_AUTHENTICATED_CHANNEL_D3D11, the method creates a channel with the Direct3D device. This type of channel does not support authentication.
If ChannelType is D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE or D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE, the method creates an authenticated channel with the graphics driver.
+Creates a cryptographic session to encrypt video content that is sent to the graphics driver.
+A reference to a
| Value | Meaning |
|---|---|
| 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher. |
?
A reference to a
A reference to a
| Value | Meaning |
|---|---|
| The caller will create the session key, encrypt it with RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP) by using the driver's public key, and pass the session key to the driver. |
?
Receives a reference to the
If this method succeeds, it returns
The ID3D11DeviceContext::ClearState method does not affect the internal state of the cryptographic session.
+Creates a resource view for a video decoder, describing the output sample for the decoding operation.
+A reference to the
A reference to a
Receives a reference to the
If this method succeeds, it returns
Set the ppVDOVView parameter to
Creates a resource view for a video processor, describing the input sample for the video processing operation.
+A reference to the
A reference to the
A reference to a
Receives a reference to the
If this method succeeds, it returns
Set the ppVPIView parameter to
The surface format is given in the FourCC member of the
Resources used for video processor input views must use the following bind flag combinations:
Creates a resource view for a video processor, describing the output sample for the video processing operation.
+A reference to the
A reference to the
A reference to a
Receives a reference to the
If this method succeeds, it returns
Set the ppVPOView parameter to
Resources used for video processor output views must use the following
If stereo output is enabled, the output view must have 2 array elements. Otherwise, it must only have a single array element.
+Enumerates the video processor capabilities of the driver.
+A reference to a
Receives a reference to the
If this method succeeds, it returns
To create the video processor device, pass the
Gets the number of profiles that are supported by the driver.
+Returns the number of profiles.
To enumerate the profiles, call ID3D11VideoDevice::GetVideoDecoderProfile.
+Gets a profile that is supported by the driver.
+The zero-based index of the profile. To get the number of profiles that the driver supports, call ID3D11VideoDevice::GetVideoDecoderProfileCount.
Receives a
If this method succeeds, it returns
Given aprofile, checks whether the driver supports a specified output format.
+A reference to a
A
Receives the value TRUE if the format is supported, or
If this method succeeds, it returns
If the driver does not support the profile given in pDecoderProfile, the method returns E_INVALIDARG. If the driver supports the profile, but the DXGI format is not compatible with the profile, the method succeeds but returns the value
Gets the number of decoder configurations that the driver supports for a specified video description.
+A reference to a
Receives the number of decoder configurations.
If this method succeeds, it returns
To enumerate the decoder configurations, call ID3D11VideoDevice::GetVideoDecoderConfig.
+Gets a decoder configuration that is supported by the driver.
+A reference to a
The zero-based index of the decoder configuration. To get the number of configurations that the driver supports, call ID3D11VideoDevice::GetVideoDecoderConfigCount.
A reference to a
If this method succeeds, it returns
Queries the driver for its content protection capabilities.
+A reference to a
| Value | Meaning |
|---|---|
| 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher. |
?
If no encryption will be used, set this parameter to
A reference to a
The driver might disallow some combinations of encryption type and profile.
A reference to a
If this method succeeds, it returns
Gets a cryptographic key-exchange mechanism that is supported by the driver.
+A reference to a
| Value | Meaning |
|---|---|
| 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher. |
?
A reference to a
The zero-based index of the key-exchange type. The driver reports the number of types in the KeyExchangeTypeCount member of the
Receives a
If this method succeeds, it returns
Sets private data on the video device and associates that data with a
The
The size of the data, in bytes.
A reference to the data.
If this method succeeds, it returns
Sets a private
If this method succeeds, it returns
Retrieves optional sizes for private driver data.
+Indicates the crypto type for which the private input and output size is queried.
Indicates the decoder profile for which the private input and output size is queried.
Indicates the key exchange type for which the private input and output size is queried.
Returns the size of private data that the driver needs for input commands.
Returns the size of private data that the driver needs for output commands.
If this method succeeds, it returns
When pKeyExchangeType is D3D11_KEY_EXCHANGE_HW_PROTECTION, the following behavior is expected in the ID3D11VideoContext::NegotiateCryptoSessionKeyExchange method:
Retrieves capabilities and limitations of the video decoder.
+The decode profile for which the capabilities are queried.
The video width for which the capabilities are queried.
The video height for which the capabilities are queried.
The frame rate of the video content. This information is used by the driver to determine whether the video can be decoded in real-time.
The bit rate of the video stream. A value of zero indicates that the bit rate can be ignored.
The type of cryptography used to encrypt the video stream. A value of
A reference to a bitwise OR combination of
This method returns one of the following error codes.
| The operation completed successfully. | |
| E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
?
Indicates whether the video decoder supports downsampling with the specified input format, and whether real-time downsampling is supported.
+An object describing the decoding profile, the resolution, and format of the input stream. This is the resolution and format to be downsampled.
A
The configuration data associated with the decode profile.
The frame rate of the video content. This is used by the driver to determine whether the video can be decoded in real-time.
An object describing the resolution, format, and colorspace of the output frames. This is the destination resolution and format of the downsample operation.
Pointer to a boolean value set by the driver that indicates if downsampling is supported with the specified input data. True if the driver supports the requested downsampling; otherwise, false.
Pointer to a boolean value set by the driver that indicates if real-time decoding is supported with the specified input data. True if the driver supports the requested real-time decoding; otherwise, false. Note that the returned value is based on the current configuration of the video decoder and does not guarantee that real-time decoding will be supported for future downsampling operations.
This method returns one of the following error codes.
| The operation completed successfully. | |
| E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
?
You should call GetVideoDecoderCaps to determine whether decoder downsampling is supported before checking support for a specific configuration.
+Allows the driver to recommend optimal output downsample parameters from the input parameters.
+A
A
The configuration data associated with the decode profile.
The frame rate of the video content. This is used by the driver to determine whether the video can be decoded in real-time.
Pointer to a
This method returns one of the following error codes.
| The operation completed successfully. | |
| E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
?
You should call GetVideoDecoderCaps to determine whether decoder downsampling is supported before checking support for a specific configuration.
+Gets the content description that was used to create the video processor.
+Gets the rate conversion capabilities of the video processor.
+Gets the content description that was used to create the video processor.
+A reference to a
Gets the rate conversion capabilities of the video processor.
+A reference to a
Gets the content description that was used to create this enumerator.
+Gets the capabilities of the video processor.
+Gets the content description that was used to create this enumerator.
+A reference to a
If this method succeeds, it returns
Queries whether the video processor supports a specified video format.
+The video format to query, specified as a
Receives a bitwise OR of zero or more flags from the
If this method succeeds, it returns
Gets the capabilities of the video processor.
+A reference to a
If this method succeeds, it returns
Returns a group of video processor capabilities that are associated with frame-rate conversion, including deinterlacing and inverse telecine.
+The zero-based index of the group to retrieve. To get the maximum index, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the RateConversionCapsCount member of the
A reference to a
If this method succeeds, it returns
The capabilities defined in the
Gets a list of custom frame rates that a video processor supports.
+The zero-based index of the frame-rate capability group. To get the maxmum index, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the RateConversionCapsCount member of the
The zero-based index of the custom rate to retrieve. To get the maximum index, call ID3D11VideoProcessorEnumerator::GetVideoProcessorRateConversionCaps and check the CustomRateCount member of the
This index value is always relative to the capability group specified in the TypeIndex parameter.
A reference to a
If this method succeeds, it returns
Gets the range of values for an image filter.
+The type of image filter, specified as a
A reference to a
If this method succeeds, it returns
Indicates whether the driver supports the specified combination of format and colorspace conversions.
+The format of the video processor input.
The colorspace of the video processor input.
The format of the video processor output.
The colorspace of the video processor output.
Pointer to a boolean that is set by the driver to indicate if the specified combination of format and colorspace conversions is supported. True if the conversion is supported; otherwise, false.
This method returns one of the following error codes.
| The operation completed successfully. | |
| E_INVALIDARG | An invalid parameter was passed or this function was called using an invalid calling pattern. |
?
Gets the properties of the video processor input view.
+Gets the properties of the video processor input view.
+A reference to a
Gets the properties of the video processor output view.
+Gets the properties of the video processor output view.
+A reference to a
Contains an initialization vector (IV) for 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher encryption.
+The IV, in big-endian format.
The block count, in big-endian format.
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE command.
+A
A
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION command.
+A
A handle to the decoder device. Get this from ID3D11VideoDecoder::GetDriverHandle.
A handle to the cryptographic session. Get this from ID3D11CryptoSession::GetCryptoSessionHandle.
A handle to the Direct3D device. Get this from D3D11VideoContext::QueryAuthenticatedChannel using D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE. +
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE command.
+A
The initial sequence number for queries.
The initial sequence number for commands.
Contains input data for the ID3D11VideoContext::ConfigureAuthenticatedChannel method.
+Contains the response from the ID3D11VideoContext::ConfigureAuthenticatedChannel method.
+Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_PROTECTION command.
+A
A
Contains input data for a D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE command.
+A
A
A process handle. If the ProcessType member equals D3D11_PROCESSIDTYPE_HANDLE, the ProcessHandle member specifies a handle to a process. Otherwise, the value is ignored.
If TRUE, the specified process has access to restricted shared resources.
Specifies the protection level for video content.
+If 1, video content protection is enabled.
If 1, the application requires video to be displayed using either a hardware overlay or full-screen exclusive mode.
Reserved. Set all bits to zero.
Use this member to access all of the bits in the union.
Contains the response to a D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT query.
+A
The number of encryption GUIDs.
Contains input data for a D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID query.
+A
The index of the encryption
Contains the response to a D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID query.
+A
The index of the encryption
A
Contains the response to a D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE query.
+A
A
Contains input data for a D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION query.
+A
A handle to a decoder device.
Contains the response to a D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION query.
+A
A handle to a decoder device.
A handle to the cryptographic session that is associated with the decoder device.
A handle to the Direct3D device that is associated with the decoder device.
Contains the response to a D3D11_AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE query.
+A
A
Contains the response to a D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE query.
+A
A handle to the device.
Contains input data for the ID3D11VideoContext::QueryAuthenticatedChannel method.
+Contains a response from the ID3D11VideoContext::QueryAuthenticatedChannel method.
+Contains input data for a D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT query.
+A
A handle to the device.
A handle to the cryptographic session.
Contains the response to a D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT query.
+A
A handle to the device.
A handle to the cryptographic session.
The number of output IDs associated with the specified device and cryptographic session.
Contains input data for a D3D11_AUTHENTICATED_QUERY_OUTPUT_ID query.
+A
A handle to the device.
A handle to the cryptographic session.
The index of the output ID.
Contains the response to a D3D11_AUTHENTICATED_QUERY_OUTPUT_ID query.
+A
A handle to the device.
A handle to the cryptographic session.
The index of the output ID.
An output ID that is associated with the specified device and cryptographic session.
Contains the response to a D3D11_AUTHENTICATED_QUERY_PROTECTION query.
+A
A
Contains the response to a D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT query.
+A
The number of processes that are allowed to open shared resources that have restricted access. A process cannot open such a resource unless the process has been granted access.
Contains input data for a D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS query.
+A
The index of the process.
Contains the response to a D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS query.
+The Desktop Window Manager (DWM) process is identified by setting ProcessIdentifier equal to D3D11_PROCESSIDTYPE_DWM. Other processes are identified by setting the process handle in ProcessHandle and setting ProcessIdentifier equal to D3D11_PROCESSIDTYPE_HANDLE.
+A
The index of the process in the list of processes.
A
A process handle. If the ProcessIdentifier member equals D3D11_PROCESSIDTYPE_HANDLE, the ProcessHandle member contains a valid handle to a process. Otherwise, this member is ignored.
Contains the response to a D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT query.
+A
The number of protected, shared resources that can be opened by any process without restrictions.
Describes an HLSL class instance.
+The
The members of this structure except InstanceIndex are valid (non default values) if they describe a class instance aquired using ID3D11ClassLinkage::CreateClassInstance. The InstanceIndex member is only valid when the class instance is aquired using ID3D11ClassLinkage::GetClassInstance.
+The instance ID of an HLSL class; the default value is 0.
The instance index of an HLSL class; the default value is 0.
The type ID of an HLSL class; the default value is 0.
Describes the constant buffer associated with an HLSL class; the default value is 0.
The base constant buffer offset associated with an HLSL class; the default value is 0.
The base texture associated with an HLSL class; the default value is 127.
The base sampler associated with an HLSL class; the default value is 15.
True if the class was created; the default value is false.
Information about the video card's performance counter capabilities.
+This structure is returned by ID3D11Device::CheckCounterInfo.
+Largest device-dependent counter ID that the device supports. If none are supported, this value will be 0. Otherwise it will be greater than or equal to D3D11_COUNTER_DEVICE_DEPENDENT_0. See
Number of counters that can be simultaneously supported.
Number of detectable parallel units that the counter is able to discern. Values are 1 ~ 4. Use NumDetectableParallelUnits to interpret the values of the VERTEX_PROCESSING, GEOMETRY_PROCESSING, PIXEL_PROCESSING, and OTHER_GPU_PROCESSING counters.
Describes a counter.
+This structure is used by ID3D11Counter::GetDesc, ID3D11Device::CheckCounter and ID3D11Device::CreateCounter.
+Type of counter (see
Reserved.
Used with ID3D11On12Device::CreateWrappedResource to override flags that would be inferred by the resource properties or heap properties, including bind flags, misc flags, and CPU access flags.
+Use this structure with CreateWrappedResource.
+Stencil operations that can be performed based on the results of stencil test.
+All stencil operations are specified as a
This structure is a member of a depth-stencil description.
+The stencil operation to perform when stencil testing fails.
The stencil operation to perform when stencil testing passes and depth testing fails.
The stencil operation to perform when stencil testing and depth testing both pass.
A function that compares stencil data against existing stencil data. The function options are listed in
Specifies the subresources of a texture that are accessible from a depth-stencil view.
+These are valid formats for a depth-stencil view:
A depth-stencil view cannot use a typeless format. If the format chosen is DXGI_FORMAT_UNKNOWN, then the format of the parent resource is used.
A depth-stencil-view description is needed when calling ID3D11Device::CreateDepthStencilView.
+Specifies the subresource from a 1D texture that is accessible to a depth-stencil view.
+This structure is one member of a depth-stencil-view description (see
The index of the first mipmap level to use.
Specifies the subresources from an array of 1D textures to use in a depth-stencil view.
+This structure is one member of a depth-stencil-view description (see
The index of the first mipmap level to use.
The index of the first texture to use in an array of textures.
Number of textures to use.
Specifies the subresource from a 2D texture that is accessible to a depth-stencil view.
+This structure is one member of a depth-stencil-view description (see
The index of the first mipmap level to use.
Specifies the subresources from an array 2D textures that are accessible to a depth-stencil view.
+This structure is one member of a depth-stencil-view description (see
The index of the first mipmap level to use.
The index of the first texture to use in an array of textures.
Number of textures to use.
Specifies the subresource from a multisampled 2D texture that is accessible to a depth-stencil view.
+Because a multisampled 2D texture contains a single subtexture, there is nothing to specify; this unused member is included so that this structure will compile in C.
+Unused.
Specifies the subresources from an array of multisampled 2D textures for a depth-stencil view.
+This structure is one member of a depth-stencil-view description (see
The index of the first texture to use in an array of textures.
Number of textures to use.
Resource data format (see
Type of resource (see
A value that describes whether the texture is read only. Pass 0 to specify that it is not read only; otherwise, pass one of the members of the
Specifies a 1D texture subresource (see
Specifies an array of 1D texture subresources (see
Specifies a 2D texture subresource (see
Specifies an array of 2D texture subresources (see
Specifies a multisampled 2D texture (see
Specifies an array of multisampled 2D textures (see
Arguments for draw indexed instanced indirect.
+The members of this structure serve the same purpose as the parameters of ID3D11DeviceContext::DrawIndexedInstanced.
+The number of indices read from the index buffer for each instance.
The number of instances to draw.
The location of the first index read by the GPU from the index buffer.
A value added to each index before reading a vertex from the vertex buffer.
A value added to each index before reading per-instance data from a vertex buffer.
Arguments for draw instanced indirect.
+The members of this structure serve the same purpose as the parameters of ID3D11DeviceContext::DrawInstanced.
+The number of vertices to draw.
The number of instances to draw.
The index of the first vertex.
A value added to each index before reading per-instance data from a vertex buffer.
Specifies which bytes in a video surface are encrypted.
+The number of bytes that are encrypted at the start of the buffer.
The number of bytes that are skipped after the first NumEncryptedBytesAtBeginning bytes, and then after each block of NumBytesInEncryptPattern bytes. Skipped bytes are not encrypted.
The number of bytes that are encrypted after each block of skipped bytes.
Describes information about Direct3D 11.1 adapter architecture.
+Specifies whether a rendering device batches rendering commands and performs multipass rendering into tiles or bins over a render area. Certain API usage patterns that are fine for TileBasedDefferredRenderers (TBDRs) can perform worse on non-TBDRs and vice versa. Applications that are careful about rendering can be friendly to both TBDR and non-TBDR architectures. TRUE if the rendering device batches rendering commands and
Describes compute shader and raw and structured buffer support in the current graphics driver.
+Direct3D 11 devices (D3D_FEATURE_LEVEL_11_0) are required to support Compute Shader model 5.0. Direct3D 10.x devices (D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_10_1) can optionally support Compute Shader model 4.0 or 4.1.
+TRUE if compute shaders and raw and structured buffers are supported; otherwise
Describes Direct3D 11.1 feature options in the current graphics driver.
+If a Microsoft Direct3D device supports feature level 11.1 (D3D_FEATURE_LEVEL_11_1), when you call ID3D11Device::CheckFeatureSupport with D3D11_FEATURE_D3D11_OPTIONS, CheckFeatureSupport returns a reference to
Feature level 11.1 provides the following additional features:
The runtime always sets the following groupings of members identically. That is, all the values in a grouping are TRUE or
Specifies whether logic operations are available in blend state. The runtime sets this member to TRUE if logic operations are available in blend state and
Specifies whether the driver can render with no render target views (RTVs) or depth stencil views (DSVs), and only unordered access views (UAVs) bound. The runtime sets this member to TRUE if the driver can render with no RTVs or DSVs and only UAVs bound and
Specifies whether the driver supports the ID3D11DeviceContext1::DiscardView and ID3D11DeviceContext1::DiscardResource methods. The runtime sets this member to TRUE if the driver supports these methods and
Specifies whether the driver supports new semantics for copy and update that are exposed by the ID3D11DeviceContext1::CopySubresourceRegion1 and ID3D11DeviceContext1::UpdateSubresource1 methods. The runtime sets this member to TRUE if the driver supports new semantics for copy and update. The runtime sets this member to
Specifies whether the driver supports the ID3D11DeviceContext1::ClearView method. The runtime sets this member to TRUE if the driver supports this method and
Specifies whether you can call ID3D11DeviceContext1::CopySubresourceRegion1 with overlapping source and destination rectangles. The runtime sets this member to TRUE if you can call CopySubresourceRegion1 with overlapping source and destination rectangles and
Specifies whether the driver supports partial updates of constant buffers. The runtime sets this member to TRUE if the driver supports partial updates of constant buffers and
Specifies whether the driver supports new semantics for setting offsets in constant buffers for a shader. The runtime sets this member to TRUE if the driver supports allowing you to specify offsets when you call new methods like the ID3D11DeviceContext1::VSSetConstantBuffers1 method and
Specifies whether you can call ID3D11DeviceContext::Map with D3D11_MAP_WRITE_NO_OVERWRITE on a dynamic constant buffer (that is, whether the driver supports this operation). The runtime sets this member to TRUE if the driver supports this operation and
Specifies whether you can call ID3D11DeviceContext::Map with D3D11_MAP_WRITE_NO_OVERWRITE on a dynamic buffer SRV (that is, whether the driver supports this operation). The runtime sets this member to TRUE if the driver supports this operation and
Specifies whether the driver supports multisample rendering when you render with RTVs bound. If TRUE, you can set the ForcedSampleCount member of
Specifies whether the hardware and driver support the msad4 intrinsic function in shaders. The runtime sets this member to TRUE if the hardware and driver support calls to msad4 intrinsic functions in shaders. If
Specifies whether the hardware and driver support the fma intrinsic function and other extended doubles instructions (DDIV and DRCP) in shaders. The fma intrinsic function emits an extended doubles DFMA instruction. The runtime sets this member to TRUE if the hardware and driver support extended doubles instructions in shaders (shader model 5 and higher). Support of this option implies support of basic double-precision shader instructions as well. You can use the D3D11_FEATURE_DOUBLES value to query for support of double-precision shaders. If
Specifies whether the hardware and driver support sharing a greater variety of Texture2D resource types and formats. The runtime sets this member to TRUE if the hardware and driver support extended Texture2D resource sharing.
Describes Direct3D 11.2 feature options in the current graphics driver.
+ If the Direct3D API is the Direct3D 11.2 runtime and can support 11.2 features, ID3D11Device::CheckFeatureSupport for D3D11_FEATURE_D3D11_OPTIONS1 will return a SUCCESS code when valid parameters are passed. The members of
Specifies whether the hardware and driver support tiled resources. The runtime sets this member to a
Specifies whether the hardware and driver support the filtering options (
Specifies whether the hardware and driver also support the ID3D11DeviceContext1::ClearView method on depth formats. For info about valid depth formats, see
Specifies support for creating
Describes Direct3D 11.3 feature options in the current graphics driver.
+Whether to use the VP and RT array index from any shader feeding the rasterizer.
Describes Direct3D 11.4 feature options in the current graphics driver.
+Use this structure with the D3D11_FEATURE_D3D11_OPTIONS4 member of
Refer to the section on NV12 in Direct3D 11.4 Features.
+Specifies a
Describes Direct3D 9 feature options in the current graphics driver.
+Specifies whether the driver supports the nonpowers-of-2-unconditionally feature. For more information about this feature, see feature level. The runtime sets this member to TRUE for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to
Describes Direct3D 9 feature options in the current graphics driver.
+You can use the D3D11_FEATURE_D3D9_OPTIONS1 enumeration value with ID3D11Device::CheckFeatureSupport to query a driver about support for Direct3D 9 feature options rather than making multiple calls to ID3D11Device::CheckFeatureSupport by using D3D11_FEATURE_D3D9_OPTIONS, D3D11_FEATURE_D3D9_SHADOW_SUPPORT, and D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT, which provide identical info about supported Direct3D 9 feature options.
+Specifies whether the driver supports the nonpowers-of-2-unconditionally feature. For more info about this feature, see feature level. The runtime sets this member to TRUE for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to
Specifies whether the driver supports the shadowing feature with the comparison-filtering mode set to less than or equal to. The runtime sets this member to TRUE for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to TRUE only if the hardware and driver support the shadowing feature; otherwise
Specifies whether the hardware and driver support simple instancing. The runtime sets this member to TRUE if the hardware and driver support simple instancing.
Specifies whether the hardware and driver support setting a single face of a TextureCube as a render target while the depth stencil surface that is bound alongside can be a Texture2D (as opposed to TextureCube). The runtime sets this member to TRUE if the hardware and driver support this feature; otherwise
If the hardware and driver don't support this feature, the app must match the render target surface type with the depth stencil surface type. Because hardware at Direct3D 9.3 and lower feature levels doesn't allow TextureCube depth surfaces, the only way to render a scene into a TextureCube while having depth buffering enabled is to render each TextureCube face separately to a Texture2D render target first (because that can be matched with a Texture2D depth), and then copy the results into the TextureCube. If the hardware and driver support this feature, the app can just render to the TextureCube faces directly while getting depth buffering out of a Texture2D depth buffer.
You only need to query this feature from hardware at Direct3D 9.3 and lower feature levels because hardware at Direct3D 10.0 and higher feature levels allow TextureCube depth surfaces.
Describes Direct3D?9 shadow support in the current graphics driver.
+Shadows are an important element in realistic 3D scenes. You can use the shadow buffer technique to render shadows. The basic principle of the technique is to use a depth buffer to store the scene depth info from the perspective of the light source, and then compare each point rendered in the scene with that buffer to determine if it is in shadow.
To render objects into the scene with shadows on them, you create sampler state objects with comparison filtering set and the comparison mode (ComparisonFunc) to LessEqual. You can also set BorderColor addressing on this depth sampler, even though BorderColor isn't typically allowed on feature levels 9.1 and 9.2. By using the border color and picking 0.0 or 1.0 as the border color value, you can control whether the regions off the edge of the shadow map appear to be always in shadow or never in shadow respectively. + You can control the shadow filter quality by the Mag and Min filter settings in the comparison sampler. Point sampling will produce shadows with non-anti-aliased edges. Linear filter sampler settings will result in higher quality shadow edges, but might affect performance on some power-optimized devices.
Note??If you use a separate setting for Mag versus Min filter options, you produce an undefined result. Anisotropic filtering is not supported. The Mip filter choice is not relevant because feature level 9.x does not allow mipmapped depth buffers.?Note??On feature level 9.x, you can't compile a shader with the SampleCmp and SampleCmpLevelZero intrinsic functions by using older versions of the compiler. For example, you can't use the fxc.exe compiler that ships with the DirectX SDK or use the D3DCompile** functions (like D3DCompileFromFile) that are implemented in D3DCompiler_43.dll and earlier. These intrinsic functions on feature level 9.x are only supported in the fxc.exe compiler that ships with the Windows?8 SDK and later and with the D3DCompile** functions that are implemented in D3DCompiler_44.dll and later. + But these intrinsic functions are present in shader models for feature levels higher than 9.x.? +Specifies whether the driver supports the shadowing feature with the comparison-filtering mode set to less than or equal to. The runtime sets this member to TRUE for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to TRUE only if the hardware and driver support the shadowing feature; otherwise
Describes whether simple instancing is supported.
+ If the Direct3D API is the Direct3D 11.2 runtime and can support 11.2 features, ID3D11Device::CheckFeatureSupport for D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT will return a SUCCESS code when valid parameters are passed. The SimpleInstancingSupported member of
Simple instancing means that instancing is supported with the caveat that the InstanceDataStepRate member of the
Specifies whether the hardware and driver support simple instancing. The runtime sets this member to TRUE if the hardware and driver support simple instancing.
Describes double data type support in the current graphics driver.
+If the runtime sets DoublePrecisionFloatShaderOps to TRUE, the hardware and driver support the following Shader Model 5 instructions:
Specifies whether double types are allowed. If TRUE, double types are allowed; otherwise
Describes which resources are supported by the current graphics driver for a given format.
+
Combination of
Describes which unordered resource options are supported by the current graphics driver for a given format.
+
Combination of
Describes feature data GPU virtual address support, including maximum address bits per resource and per process.
+ See
The maximum GPU virtual address bits per resource.
The maximum GPU virtual address bits per process.
Describes whether a GPU profiling technique is supported.
+If the Direct3D API is the Direct3D 11.2 runtime and can support 11.2 features, ID3D11Device::CheckFeatureSupport for D3D11_FEATURE_MARKER_SUPPORT will return a SUCCESS code when valid parameters are passed. The Profile member of
Specifies whether the hardware and driver support a GPU profiling technique that can be used with development tools. The runtime sets this member to TRUE if the hardware and driver support data marking.
Stencil operations that can be performed based on the results of stencil test.
+All stencil operations are specified as a
This structure is a member of a depth-stencil description.
+The stencil operation to perform when stencil testing fails.
Describes precision support options for shaders in the current graphics driver.
+For hardware at Direct3D 10 and higher feature levels, the runtime sets both members identically. For hardware at Direct3D 9.3 and lower feature levels, the runtime can set a lower precision support in the PixelShaderMinPrecision member than the AllOtherShaderStagesMinPrecision member; for 9.3 and lower, all other shader stages represent only the vertex shader.
For more info about HLSL minimum precision, see using HLSL minimum precision.
+A combination of
A combination of
Describes the multi-threading features that are supported by the current graphics driver.
+Use the
TRUE means resources can be created concurrently on multiple threads while drawing;
TRUE means command lists are supported by the current driver;
Allow or deny certain types of messages to pass through a filter.
+Number of message categories to allow or deny.
Array of message categories to allow or deny. Array must have at least NumCategories members (see
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Represents key exchange data for hardware content protection.
+A reference to this structure is passed in the pData parameter of ID3D11VideoContext::NegotiateCryptoSessionKeyExchange method when the
The function ID of the DRM command. The values and meanings of the function ID are defined by the DRM specification.
Pointer to a buffer containing a
Pointer to a buffer containing a
The result of the hardware DRM command.
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Represents key exchange input data for hardware content protection.
+The size of the private data reserved for IHV usage. This size is determined from the pPrivateInputSize parameter returned by the ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize function.
The size of the DRM command data.
If PrivateDataSize is greater than 0, pbInput[0] ? pbInput[PrivateDataSize - 1] is reserved for IHV use.
pbInput[PrivateDataSize] ? pbInput[HWProtectionDataSize + PrivateDataSize - 1] contains the input data for the DRM command. The format and size of the DRM command is defined by the DRM specification.
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Represents key exchange output data for hardware content protection.
+The size of the private data reserved for IHV usage. This size is determined from the pPrivateOutputSize parameter returned by the ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize function.
The maximum size of data that the driver can return in the output buffer. The last byte that it can write to is pbOuput[PrivateDataSize + MaxHWProtectionDataSize ? 1].
The size of the output data written by the driver.
The number of 100 nanosecond units spent transporting the data.
The number of 100 nanosecond units spent executing the content protection command.
If PrivateDataSize is greater than 0, pbInput[0] ? pbOutput[PrivateDataSize - 1] is reserved for IHV use.
pbOutput[PrivateDataSize] ? pbOutput[HWProtectionDataSize + PrivateDataSize - 1] contains the input data for the DRM command. The format and size of the DRM command is defined by the DRM specification.
Contains a Message Authentication Code (MAC).
+A byte array that contains the cryptographic MAC value of the message.
Describes the tile structure of a tiled resource with mipmaps.
+Number of standard mipmaps in the tiled resource.
Number of packed mipmaps in the tiled resource.
This number starts from the least detailed mipmap (either sharing tiles or using non standard tile layout). This number is 0 if no + such packing is in the resource. For array surfaces, this value is the number of mipmaps that are packed for a given array slice where each array slice repeats the same + packing. +
On Tier_2 tiled resources hardware, mipmaps that fill at least one standard shaped tile in all dimensions + are not allowed to be included in the set of packed mipmaps. On Tier_1 hardware, mipmaps that are an integer multiple of one standard shaped tile in all dimensions are not allowed to be included in the set of packed mipmaps. Mipmaps with at least one + dimension less than the standard tile shape may or may not be packed. When a given mipmap needs to be packed, all coarser + mipmaps for a given array slice are considered packed as well. +
Number of tiles for the packed mipmaps in the tiled resource.
If there is no packing, this value is meaningless and is set to 0. + Otherwise, it is set to the number of tiles + that are needed to represent the set of packed mipmaps. + The pixel layout within the packed mipmaps is hardware specific. + If apps define only partial mappings for the set of tiles in packed mipmaps, read and write behavior is vendor specific and undefined. + For arrays, this value is only the count of packed mipmaps within + the subresources for each array slice.
Offset of the first packed tile for the resource + in the overall range of tiles. If NumPackedMips is 0, this + value is meaningless and is 0. Otherwise, it is the + offset of the first packed tile for the resource in the overall + range of tiles for the resource. A value of 0 for + StartTileIndexInOverallResource means the entire resource is packed. + For array surfaces, this is the offset for the tiles that contain the packed + mipmaps for the first array slice. Packed mipmaps for each array slice in arrayed surfaces are at this offset + past the beginning of the tiles for each array slice.
Note??The + number of overall tiles, packed or not, for a given array slice is + simply the total number of tiles for the resource divided by the + resource's array size, so it is easy to locate the range of tiles for + any given array slice, out of which StartTileIndexInOverallResource identifies + which of those are packed. ?Query information about graphics-pipeline activity in between calls to ID3D11DeviceContext::Begin and ID3D11DeviceContext::End.
+Query information about the reliability of a timestamp query.
+For a list of query types see
How frequently the GPU counter increments in Hz.
If this is TRUE, something occurred in between the query's ID3D11DeviceContext::Begin and ID3D11DeviceContext::End calls that caused the timestamp counter to become discontinuous or disjoint, such as unplugging the AC cord on a laptop, overheating, or throttling up/down due to laptop savings events. The timestamp returned by ID3D11DeviceContext::GetData for a timestamp query is only reliable if Disjoint is
Describes a query.
+Type of query (see
Miscellaneous flags (see
Describes a query.
+A
A combination of
A
Describes rasterizer state.
+Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call ID3D11Device3::CreateRasterizerState2. To set rasterizer state, call ID3D11DeviceContext::RSSetState.
If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.
| State | Default Value |
|---|---|
| FillMode | Solid |
| CullMode | Back |
| FrontCounterClockwise | |
| DepthBias | 0 |
| SlopeScaledDepthBias | 0.0f |
| DepthBiasClamp | 0.0f |
| DepthClipEnable | TRUE |
| ScissorEnable | |
| MultisampleEnable | |
| AntialiasedLineEnable | |
| ForcedSampleCount | 0 |
| ConservativeRaster | D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF |
?
Note??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to
| Line-rendering algorithm | MultisampleEnable | AntialiasedLineEnable |
|---|---|---|
| Aliased | ||
| Alpha antialiased | TRUE | |
| Quadrilateral | TRUE | |
| Quadrilateral | TRUE | TRUE |
?
The settings of the MultisampleEnable and AntialiasedLineEnable members apply only to multisample antialiasing (MSAA) render targets (that is, render targets with sample counts greater than 1). Because of the differences in feature-level behavior and as long as you aren?t performing any line drawing or don?t mind that lines render as quadrilaterals, we recommend that you always set MultisampleEnable to TRUE whenever you render on MSAA render targets.
+A
A
Specifies whether a triangle is front- or back-facing. If TRUE, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If
Depth value added to a given pixel. For info about depth bias, see Depth Bias.
Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.
Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.
Specifies whether to enable clipping based on distance.
The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default?TRUE, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm). +
0 < w
+ -w <= x <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
+ -w <= y <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
+ 0 <= z <= w
+ When you set DepthClipEnable to
Specifies whether to enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.
Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to
Specifies whether to enable line antialiasing; only applies if doing line drawing and MultisampleEnable is
The sample count that is forced while UAV rendering or rasterizing. Valid values are 0, 1, 2, 4, 8, and optionally 16. 0 indicates that the sample count is not forced.
Note??If you want to render with ForcedSampleCount set to 1 or greater, you must follow these guidelines:
A
Describes the blend state for a render target.
+You specify an array of
For info about how blending is done, see the output-merger stage.
Here are the default values for blend state.
| State | Default Value |
|---|---|
| BlendEnable | |
| LogicOpEnable | |
| SrcBlend | D3D11_BLEND_ONE |
| DestBlend | D3D11_BLEND_ZERO |
| BlendOp | D3D11_BLEND_OP_ADD |
| SrcBlendAlpha | D3D11_BLEND_ONE |
| DestBlendAlpha | D3D11_BLEND_ZERO |
| BlendOpAlpha | D3D11_BLEND_OP_ADD |
| LogicOp | D3D11_LOGIC_OP_NOOP |
| RenderTargetWriteMask | D3D11_COLOR_WRITE_ENABLE_ALL |
?
+Enable (or disable) blending.
Enable (or disable) a logical operation.
This blend option specifies the operation to perform on the RGB value that the pixel shader outputs. The BlendOp member defines how to combine the SrcBlend and DestBlend operations.
This blend option specifies the operation to perform on the current RGB value in the render target. The BlendOp member defines how to combine the SrcBlend and DestBlend operations.
This blend operation defines how to combine the SrcBlend and DestBlend operations.
This blend option specifies the operation to perform on the alpha value that the pixel shader outputs. Blend options that end in _COLOR are not allowed. The BlendOpAlpha member defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
This blend option specifies the operation to perform on the current alpha value in the render target. Blend options that end in _COLOR are not allowed. The BlendOpAlpha member defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
This blend operation defines how to combine the SrcBlendAlpha and DestBlendAlpha operations.
A
A write mask.
Specifies the subresources from a resource that are accessible using a render-target view.
+A render-target-view description is passed into ID3D11Device::CreateRenderTargetView to create a render target.
A render-target-view cannot use the following formats:
If the format is set to DXGI_FORMAT_UNKNOWN, then the format of the resource that the view binds to the pipeline will be used.
+Specifies the elements in a buffer resource to use in a render-target view.
+ A render-target view is a member of a render-target-view description (see
Number of bytes between the beginning of the buffer and the first element to access.
The offset of the first element in the view to access, relative to element 0.
The total number of elements in the view.
The width of each element (in bytes). This can be determined from the format stored in the render-target-view description.
Specifies the subresource from a 1D texture to use in a render-target view.
+This structure is one member of a render-target-view description (see
The index of the mipmap level to use mip slice.
Specifies the subresources from an array of 1D textures to use in a render-target view.
+This structure is one member of a render-target-view description (see
The index of the mipmap level to use mip slice.
The index of the first texture to use in an array of textures.
Number of textures to use.
Specifies the subresource from a 2D texture to use in a render-target view.
+This structure is one member of a render-target-view description (see
The index of the mipmap level to use mip slice.
Specifies the subresource from a multisampled 2D texture to use in a render-target view.
+Since a multisampled 2D texture contains a single subresource, there is actually nothing to specify in
Integer of any value. See remarks.
Specifies the subresources from an array of 2D textures to use in a render-target view.
+This structure is one member of a render-target-view description (see
The index of the mipmap level to use mip slice.
The index of the first texture to use in an array of textures.
Number of textures in the array to use in the render target view, starting from FirstArraySlice.
Specifies the subresources from a an array of multisampled 2D textures to use in a render-target view.
+This structure is one member of a render-target-view description (see
The index of the first texture to use in an array of textures.
Number of textures to use.
Specifies the subresources from a 3D texture to use in a render-target view.
+This structure is one member of a render target view. See
The index of the mipmap level to use mip slice.
First depth level to use.
Number of depth levels to use in the render-target view, starting from FirstWSlice. A value of -1 indicates all of the slices along the w axis, starting from FirstWSlice.
The data format (see
The resource type (see
Specifies which buffer elements can be accessed (see
Specifies the subresources in a 1D texture that can be accessed (see
Specifies the subresources in a 1D texture array that can be accessed (see
Specifies the subresources in a 2D texture that can be accessed (see
Specifies the subresources in a 2D texture array that can be accessed (see
Specifies a single subresource because a multisampled 2D texture only contains one subresource (see
Specifies the subresources in a multisampled 2D texture array that can be accessed (see
Specifies subresources in a 3D texture that can be accessed (see
Describes the subresources from a resource that are accessible using a render-target view.
+A render-target-view description is passed into ID3D11Device3::CreateRenderTargetView1 to create a render target.
A render-target-view can't use the following formats:
If the format is set to DXGI_FORMAT_UNKNOWN, then the format of the resource that the view binds to the pipeline will be used.
+Describes the subresource from a 2D texture to use in a render-target view.
+The index of the mipmap level to use mip slice.
The index (plane slice number) of the plane to use in the texture.
Describes the subresources from an array of 2D textures to use in a render-target view.
+The index of the mipmap level to use mip slice.
The index of the first texture to use in an array of textures.
Number of textures in the array to use in the render-target view, starting from FirstArraySlice.
The index (plane slice number) of the plane to use in an array of textures.
A
A
A
A
A
A
A
A
A
A
Describes a shader-resource view.
+A view is a format-specific way to look at the data in a resource. The view determines what data to look at, and how it is cast when read.
When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you cannot create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view. For example, a DXGI_FORMAT_R32G32B32_TYPELESS resource can be viewed with one of these typed formats: DXGI_FORMAT_R32G32B32_FLOAT, DXGI_FORMAT_R32G32B32_UINT, and DXGI_FORMAT_R32G32B32_SINT, since these typed formats are compatible with the typeless resource.
Create a shader-resource-view description by calling ID3D11Device::CreateShaderResourceView. To view a shader-resource-view description, call ID3D11ShaderResourceView::GetDesc.
+Specifies the elements in a buffer resource to use in a shader-resource view.
+ The
Number of bytes between the beginning of the buffer and the first element to access.
The offset of the first element in the view to access, relative to element 0.
The total number of elements in the view.
The width of each element (in bytes). This can be determined from the format stored in the shader-resource-view description.
Describes the elements in a raw buffer resource to use in a shader-resource view.
+This structure is used by
The index of the first element to be accessed by the view.
The number of elements in the resource.
A
Specifies the subresource from a 1D texture to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
As an example, assuming MostDetailedMip = 6 and MipLevels = 2, the view will have access to 2 mipmap levels, 6 and 7, of the original texture for which ID3D11Device::CreateShaderResourceView creates the view. In this situation, MostDetailedMip is greater than the MipLevels in the view. However, MostDetailedMip is not greater than the MipLevels in the original resource.
+Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture1D for which ID3D11Device::CreateShaderResourceView creates a view) -1.
The maximum number of mipmap levels for the view of the texture. See the remarks.
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Specifies the subresources from an array of 1D textures to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture1D for which ID3D11Device::CreateShaderResourceView creates a view) -1.
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
The index of the first texture to use in an array of textures.
Number of textures in the array.
Specifies the subresource from a 2D texture to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture2D for which ID3D11Device::CreateShaderResourceView creates a view) -1.
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Specifies the subresources from an array of 2D textures to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture2D for which ID3D11Device::CreateShaderResourceView creates a view) -1.
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
The index of the first texture to use in an array of textures.
Number of textures in the array.
Specifies the subresources from a 3D texture to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture3D for which ID3D11Device::CreateShaderResourceView creates a view) -1.
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Specifies the subresource from a cube texture to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original TextureCube for which ID3D11Device::CreateShaderResourceView creates a view) -1.
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Specifies the subresources from an array of cube textures to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original TextureCube for which ID3D11Device::CreateShaderResourceView creates a view) -1.
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
Index of the first 2D texture to use.
Number of cube textures in the array.
Specifies the subresources from a multisampled 2D texture to use in a shader-resource view.
+Since a multisampled 2D texture contains a single subresource, there is actually nothing to specify in
Integer of any value. See remarks.
Specifies the subresources from an array of multisampled 2D textures to use in a shader-resource view.
+This structure is one member of a shader-resource-view description (see
The index of the first texture to use in an array of textures.
Number of textures to use.
A
The resource type of the view. See D3D11_SRV_DIMENSION. This should be the same as the resource type of the underlying resource. This parameter also determines which _SRV to use in the union below.
View the resource as a buffer using information from a shader-resource view (see
View the resource as a 1D texture using information from a shader-resource view (see
View the resource as a 1D-texture array using information from a shader-resource view (see
View the resource as a 2D-texture using information from a shader-resource view (see
View the resource as a 2D-texture array using information from a shader-resource view (see
View the resource as a 2D-multisampled texture using information from a shader-resource view (see
View the resource as a 2D-multisampled-texture array using information from a shader-resource view (see
View the resource as a 3D texture using information from a shader-resource view (see
View the resource as a 3D-cube texture using information from a shader-resource view (see
View the resource as a 3D-cube-texture array using information from a shader-resource view (see
View the resource as a raw buffer using information from a shader-resource view (see
Describes a shader-resource view.
+A view is a format-specific way to look at the data in a resource. The view determines what data to look at, and how it is cast when read.
When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you cannot create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view. For example, a DXGI_FORMAT_R32G32B32_TYPELESS resource can be viewed with one of these typed formats: DXGI_FORMAT_R32G32B32_FLOAT, DXGI_FORMAT_R32G32B32_UINT, and DXGI_FORMAT_R32G32B32_SINT, since these typed formats are compatible with the typeless resource.
Create a shader-resource-view description by calling ID3D11Device3::CreateShaderResourceView1. To view a shader-resource-view description, call ID3D11ShaderResourceView1::GetDesc1.
+Describes the subresource from a 2D texture to use in a shader-resource view.
+Index of the most detailed mipmap level to use; this number is between 0 and (MipLevels (from the original Texture2D for which ID3D11Device3::CreateShaderResourceView1 creates a view) - 1 ).
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
The index (plane slice number) of the plane to use in the texture.
Describes the subresources from an array of 2D textures to use in a shader-resource view.
+Index of the most detailed mipmap level to use; this number is between 0 and ( MipLevels (from the original Texture2D for which ID3D11Device3::CreateShaderResourceView1 creates a view) - 1).
The maximum number of mipmap levels for the view of the texture. See the remarks in
Set to -1 to indicate all the mipmap levels from MostDetailedMip on down to least detailed.
The index of the first texture to use in an array of textures.
Number of textures in the array.
The index (plane slice number) of the plane to use in an array of textures.
A
A D3D11_SRV_DIMENSION-typed value that specifies the resource type of the view. This type is the same as the resource type of the underlying resource. This member also determines which _SRV to use in the union below.
A
A
A
A
A
A
A
A
A
A
A
Query information about the amount of data streamed out to the stream-output buffers in between ID3D11DeviceContext::Begin and ID3D11DeviceContext::End.
+Describes a tiled subresource volume.
+Each packed mipmap is individually reported as 0 for WidthInTiles, HeightInTiles and DepthInTiles. +
The total number of tiles in subresources is WidthInTiles*HeightInTiles*DepthInTiles.
+The width in tiles of the subresource.
The height in tiles of the subresource.
The depth in tiles of the subresource.
The index of the tile in the overall tiled subresource to start with.
GetResourceTiling sets StartTileIndexInOverallResource to D3D11_PACKED_TILE (0xffffffff) to indicate that the whole
+
Describes a 1D texture.
+This structure is used in a call to ID3D11Device::CreateTexture1D.
In addition to this structure, you can also use the CD3D11_TEXTURE1D_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, to help create a texture description.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (D3D_FEATURE_LEVEL_10_0) and call D3D11CreateDevice to create an
Texture width (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Number of textures in the array. The range is from 1 to
Texture format (see
Value that identifies how the texture is to be read from and written to. The most common value is D3D11_USAGE_DEFAULT; see
Flags (see
Flags (see
Flags (see
Identifies a texture resource for a video processor output view.
+The zero-based index into the array of subtextures.
The index of the first texture to use.
The number of textures in the array.
Describes a 2D texture.
+This structure is used in a call to ID3D11Device::CreateTexture2D.
In addition to this structure, you can also use the CD3D11_TEXTURE2D_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, to help create a texture description.
The device places some size restrictions (must be multiples of a minimum size) for a subsampled, block compressed, or bit-format resource.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (D3D_FEATURE_LEVEL_10_0) and call D3D11CreateDevice to create an
Texture width (in texels). The range is from 1 to
Texture height (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Number of textures in the texture array. The range is from 1 to
Texture format (see
Structure that specifies multisampling parameters for the texture. See
Value that identifies how the texture is to be read from and written to. The most common value is D3D11_USAGE_DEFAULT; see
Flags (see
Flags (see
Flags (see
Describes a 2D texture.
+This structure is used in a call to ID3D11Device3::CreateTexture2D1.
In addition to this structure, you can also use the CD3D11_TEXTURE2D_DESC1 derived structure, which is defined in D3D11_3.h and behaves like an inherited class, to help create a texture description.
The device places some size restrictions (must be multiples of a minimum size) for a subsampled, block compressed, or bit-format resource.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (D3D_FEATURE_LEVEL_10_0) and call D3D11CreateDevice to create an
Texture width (in texels). The range is from 1 to
Texture height (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Number of textures in the texture array. The range is from 1 to
Texture format (see
Structure that specifies multisampling parameters for the texture. See
Value that identifies how the texture is to be read from and written to. The most common value is D3D11_USAGE_DEFAULT; see
Flags (see
Flags (see
Flags (see
A
The TextureLayout parameter selects both the actual layout of the texture in memory and the layout visible to the application while the texture is mapped. These flags may not be requested without CPU access also requested.
It is illegal to set CPU access flags on default textures without also setting TextureLayout to a value other than D3D11_TEXTURE_LAYOUT_UNDEFINED.
D3D11_TEXTURE_LAYOUT_ROW_MAJOR may only be used to create non-multisampled, textures with a single subresource (Planar YUV textures are supported). These textures may only be used as a source and destination of copy operations, and BindFlags must be zero. +
D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE may only be used to create non-multisampled, non-depth-stencil textures.
Identifies the texture resource for a video decoder output view.
+The zero-based index of the texture.
Identifies the texture resource for a video processor input view.
+The zero-based index into the array of subtextures.
The zero-based index of the texture.
Identifies a texture resource for a video processor output view.
+The zero-based index into the array of subtextures.
Describes a 3D texture.
+This structure is used in a call to ID3D11Device::CreateTexture3D.
In addition to this structure, you can also use the CD3D11_TEXTURE3D_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, to help create a texture description.
The device restricts the size of subsampled, block compressed, and bit format resources to be multiples of sizes specific to each format.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (D3D_FEATURE_LEVEL_10_0) and call D3D11CreateDevice to create an
Texture width (in texels). The range is from 1 to
Texture height (in texels). The range is from 1 to
Texture depth (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Texture format (see
Value that identifies how the texture is to be read from and written to. The most common value is D3D11_USAGE_DEFAULT; see
Flags (see
Flags (see
Flags (see
Describes a 3D texture.
+This structure is used in a call to ID3D11Device3::CreateTexture3D1.
In addition to this structure, you can also use the CD3D11_TEXTURE3D_DESC1 derived structure, which is defined in D3D11_3.h and behaves like an inherited class, to help create a texture description.
The device restricts the size of subsampled, block compressed, and bit format resources to be multiples of sizes specific to each format.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (D3D_FEATURE_LEVEL_10_0) and call D3D11CreateDevice to create an
Texture width (in texels). The range is from 1 to
Texture height (in texels). The range is from 1 to
Texture depth (in texels). The range is from 1 to
The maximum number of mipmap levels in the texture. See the remarks in
Texture format (see
Value that identifies how the texture is to be read from and written to. The most common value is D3D11_USAGE_DEFAULT; see
Flags (see
Flags (see
Flags (see
A
The TextureLayout parameter selects both the actual layout of the texture in memory and the layout visible to the application while the texture is mapped. These flags may not be requested without CPU access also requested.
It is illegal to set CPU access flags on default textures without also setting Layout to a value other than D3D11_TEXTURE_LAYOUT_UNDEFINED.
D3D11_TEXTURE_LAYOUT_ROW_MAJOR may not be used with 3D textures. D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE may not be used with 3D textures that have mipmaps.
Describes the coordinates of a tiled resource.
+The x position of a tiled resource. Used for buffer and 1D, 2D, and 3D textures.
The y position of a tiled resource. Used for 2D and 3D textures.
The z position of a tiled resource. Used for 3D textures.
A subresource index value into mipmaps and arrays. Used for 1D, 2D, and 3D textures.
For mipmaps that use nonstandard tiling, or are packed, or both use nonstandard tiling and are packed, any subresource value that indicates any of the packed mipmaps all refer to the same tile.
Describes the size of a tiled region.
+The number of tiles in the tiled region.
Specifies whether the runtime uses the Width, Height, and Depth members to define the region.
If TRUE, the runtime uses the Width, Height, and Depth members to define the region.
If
Regardless of whether you specify TRUE or
When the region includes mipmaps that are packed with nonstandard tiling, bUseBox must be
The width of the tiled region, in tiles. Used for buffer and 1D, 2D, and 3D textures.
The height of the tiled region, in tiles. Used for 2D and 3D textures.
The depth of the tiled region, in tiles. Used for 3D textures or arrays. For arrays, used for advancing in depth jumps to next slice of same mipmap size, which isn't contiguous in the subresource counting space if there are multiple mipmaps.
Describes the shape of a tile by specifying its dimensions.
+Texels are equivalent to pixels. For untyped buffer resources, a texel is just a byte. For multisample antialiasing (MSAA) surfaces, the numbers are still in terms of pixels/texels. + The values here are independent of the surface dimensions. Even if the surface is smaller than what would fit in a tile, the full tile dimensions are reported here. +
+The width in texels of the tile.
The height in texels of the tile.
The depth in texels of the tile.
Specifies the subresources from a resource that are accessible using an unordered-access view.
+An unordered-access-view description is passed into ID3D11Device::CreateUnorderedAccessView to create a view.
+Describes the elements in a buffer to use in a unordered-access view.
+This structure is used by a
The zero-based index of the first element to be accessed.
The number of elements in the resource. For structured buffers, this is the number of structures in the buffer.
View options for the resource (see
Describes a unordered-access 1D texture resource.
+This structure is used by a
The mipmap slice index.
Describes an array of unordered-access 1D texture resources.
+This structure is used by a
The mipmap slice index.
The zero-based index of the first array slice to be accessed.
The number of slices in the array.
Describes a unordered-access 2D texture resource.
+This structure is used by a
The mipmap slice index.
Describes an array of unordered-access 2D texture resources.
+This structure is used by a
The mipmap slice index.
The zero-based index of the first array slice to be accessed.
The number of slices in the array.
Describes a unordered-access 3D texture resource.
+This structure is used by a
The mipmap slice index.
The zero-based index of the first depth slice to be accessed.
The number of depth slices.
The data format (see
The resource type (see
Specifies which buffer elements can be accessed (see
Specifies the subresources in a 1D texture that can be accessed (see
Specifies the subresources in a 1D texture array that can be accessed (see
Specifies the subresources in a 2D texture that can be accessed (see
Specifies the subresources in a 2D texture array that can be accessed (see
Specifies subresources in a 3D texture that can be accessed (see
Describes the subresources from a resource that are accessible using an unordered-access view.
+An unordered-access-view description is passed into ID3D11Device3::CreateUnorderedAccessView1 to create a view.
+Describes a unordered-access 2D texture resource.
+The mipmap slice index.
The index (plane slice number) of the plane to use in the texture.
Describes an array of unordered-access 2D texture resources.
+The mipmap slice index.
The zero-based index of the first array slice to be accessed.
The number of slices in the array.
The index (plane slice number) of the plane to use in an array of textures.
A
A
A
A
A
A
A
A
Defines a color value for Microsoft Direct3D?11 video.
+The anonymous union can represent both RGB and YCbCr colors. The interpretation of the union depends on the context.
+A
A
Specifies an RGB color value.
+The RGB values have a nominal range of [0...1]. For an RGB format with n bits per channel, the value of each color component is calculated as follows:
val = f * ((1 < < n)-1)
For example, for RGB-32 (8 bits per channel), val = BYTE(f * 255.0).
The red value.
The green value.
The blue value.
The alpha value. Values range from 0 (transparent) to 1 (opaque). +
Describes the content-protection capabilities of a graphics driver.
+A bitwise OR of zero or more flags from the
The number of cryptographic key-exchange types that are supported by the driver. To get the list of key-exchange types, call the ID3D11VideoDevice::CheckCryptoKeyExchange method.
The encyrption block size, in bytes. The size of data to be encrypted must be a multiple of this value.
The total amount of memory, in bytes, that can be used to hold protected surfaces.
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Provides data to the ID3D11VideoContext::DecoderBeginFrame method.
+This structure is passed in the pContentKey parameter of the ID3D11VideoContext::DecoderBeginFrame function when D3D11_DECODER_ENCRYPTION_HW_CENC is specified in the guidConfigBitstreamEncryption member of the
Describes a compressed buffer for decoding.
+The type of buffer, specified as a member of the
Reserved.
The offset of the relevant data from the beginning of the buffer, in bytes. This value must be zero. +
The macroblock address of the first macroblock in the buffer. The macroblock address is given in raster scan order. +
The macroblock address of the first macroblock in the buffer. The macroblock address is given in raster scan order. +
The number of macroblocks of data in the buffer. This count includes skipped macroblocks.
Reserved. Set to zero.
Reserved. Set to zero.
Reserved. Set to zero.
Reserved. Set to zero.
A reference to a buffer that contains an initialization vector (IV) for encrypted data. If the decode buffer does not contain encrypted data, set this member to
The size of the buffer specified in the pIV parameter. If pIV is
If TRUE, the video surfaces are partially encrypted.
A
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Describes a compressed buffer for decoding.
+The type of buffer.
The offset of the relevant data from the beginning of the buffer, in bytes. This value must be zero.
Size of the relevant data.
A reference to a buffer that contains an initialization vector (IV) for encrypted data. If the decode buffer does not contain encrypted data, set this member to
The size of the buffer specified in the pIV parameter. If pIV is
A reference to an array of
Values in the sub sample mapping blocks are relative to the start of the decode buffer.
The number of
Describes the configuration of a Microsoft Direct3D?11 decoder device for DirectX Video Acceleration (DXVA).
+If the bitstream data buffers are encrypted using the D3D11CryptoSession mechanism, this
If the macroblock control data buffers are encrypted using the D3D11CryptoSession mechanism, this
If the residual difference decoding data buffers are encrypted using the D3D11CryptoSession mechanism, this
Indicates whether the host-decoder sends raw bit-stream data. If the value is 1, the data for the pictures will be sent in bit-stream buffers as raw bit-stream content. If the value is 0, picture data will be sent using macroblock control command buffers. If either ConfigResidDiffHost or ConfigResidDiffAccelerator is 1, the value must be 0.
Specifies whether macroblock control commands are in raster scan order or in arbitrary order. If the value is 1, the macroblock control commands within each macroblock control command buffer are in raster-scan order. If the value is 0, the order is arbitrary. For some types of bit streams, forcing raster order either greatly increases the number of required macroblock control buffers that must be processed, or requires host reordering of the control information. Therefore, supporting arbitrary order can be more efficient.
Contains the host residual difference configuration. If the value is 1, some residual difference decoding data may be sent as blocks in the spatial domain from the host. If the value is 0, spatial domain data will not be sent.
Indicates the word size used to represent residual difference spatial-domain blocks for predicted (non-intra) pictures when using host-based residual difference decoding.
If ConfigResidDiffHost is 1 and ConfigSpatialResid8 is 1, the host will send residual difference spatial-domain blocks for non-intra macroblocks using 8-bit signed samples and for intra macroblocks in predicted (non-intra) pictures in a format that depends on the value of ConfigIntraResidUnsigned:
If ConfigResidDiffHost is 1 and ConfigSpatialResid8 is 0, the host will send residual difference spatial-domain blocks of data for non-intra macroblocks using 16-bit signed samples and for intra macroblocks in predicted (non-intra) pictures in a format that depends on the value of ConfigIntraResidUnsigned:
If ConfigResidDiffHost is 0, ConfigSpatialResid8 must be 0.
For intra pictures, spatial-domain blocks must be sent using 8-bit samples if bits-per-pixel (BPP) is 8, and using 16-bit samples if BPP > 8. If ConfigIntraResidUnsigned is 0, these samples are sent as signed integer values relative to a constant reference value of 2^(BPP?1), and if ConfigIntraResidUnsigned is 1, these samples are sent as unsigned integer values relative to a constant reference value of 0.
If the value is 1, 8-bit difference overflow blocks are subtracted rather than added. The value must be 0 unless ConfigSpatialResid8 is 1.
The ability to subtract differences rather than add them enables 8-bit difference decoding to be fully compliant with the full ?255 range of values required in video decoder specifications, because +255 cannot be represented as the addition of two signed 8-bit numbers, but any number in the range ?255 can be represented as the difference between two signed 8-bit numbers (+255 = +127 minus ?128).
If the value is 1, spatial-domain blocks for intra macroblocks must be clipped to an 8-bit range on the host and spatial-domain blocks for non-intra macroblocks must be clipped to a 9-bit range on the host. If the value is 0, no such clipping is necessary by the host.
The value must be 0 unless ConfigSpatialResid8 is 0 and ConfigResidDiffHost is 1.
If the value is 1, any spatial-domain residual difference data must be sent in a chrominance-interleaved form matching the YUV format chrominance interleaving pattern. The value must be 0 unless ConfigResidDiffHost is 1 and the YUV format is NV12 or NV21.
Indicates the method of representation of spatial-domain blocks of residual difference data for intra blocks when using host-based difference decoding.
If ConfigResidDiffHost is 1 and ConfigIntraResidUnsigned is 0, spatial-domain residual difference data blocks for intra macroblocks must be sent as follows:
If ConfigResidDiffHost is 1 and ConfigIntraResidUnsigned is 1, spatial-domain residual difference data blocks for intra macroblocks must be sent as follows:
The value of the member must be 0 unless ConfigResidDiffHost is 1.
If the value is 1, transform-domain blocks of coefficient data may be sent from the host for accelerator-based IDCT. If the value is 0, accelerator-based IDCT will not be used. If both ConfigResidDiffHost and ConfigResidDiffAccelerator are 1, this indicates that some residual difference decoding will be done on the host and some on the accelerator, as indicated by macroblock-level control commands.
The value must be 0 if ConfigBitstreamRaw is 1.
If the value is 1, the inverse scan for transform-domain block processing will be performed on the host, and absolute indices will be sent instead for any transform coefficients. If the value is 0, the inverse scan will be performed on the accelerator.
The value must be 0 if ConfigResidDiffAccelerator is 0 or if Config4GroupedCoefs is 1.
If the value is 1, the IDCT specified in Annex W of ITU-T Recommendation H.263 is used. If the value is 0, any compliant IDCT can be used for off-host IDCT.
The H.263 annex does not comply with the IDCT requirements of MPEG-2 corrigendum 2, so the value must not be 1 for use with MPEG-2 video.
The value must be 0 if ConfigResidDiffAccelerator is 0, indicating purely host-based residual difference decoding.
If the value is 1, transform coefficients for off-host IDCT will be sent using the DXVA_TCoef4Group structure. If the value is 0, the DXVA_TCoefSingle structure is used. The value must be 0 if ConfigResidDiffAccelerator is 0 or if ConfigHostInverseScan is 1.
Specifies how many frames the decoder device processes at any one time.
Contains decoder-specific configuration information.
Describes a video stream for a Microsoft Direct3D?11 video decoder or video processor.
+The decoding profile. To get the list of profiles supported by the device, call the ID3D11VideoDevice::GetVideoDecoderProfile method.
The width of the video frame, in pixels.
The height of the video frame, in pixels.
The output surface format, specified as a
Contains driver-specific data for the ID3D11VideoContext::DecoderExtension method.
+The exact meaning of each structure member depends on the value of Function.
+Describes a video decoder output view.
+The decoding profile. To get the list of profiles supported by the device, call the ID3D11VideoDevice::GetVideoDecoderProfile method.
The resource type of the view, specified as a member of the
A
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Describes a sub sample mapping block.
+Values in the sub sample mapping blocks are relative to the start of the decode buffer.
+The number of clear (non-encrypted) bytes at the start of the block.
The number of encrypted bytes following the clear bytes.
Describes the capabilities of a Microsoft Direct3D?11 video processor.
+The video processor stores state information for each input stream. These states persist between blits. With each blit, the application selects which streams to enable or disable. Disabling a stream does not affect the state information for that stream.
The MaxStreamStates member gives the maximum number of stream states that can be saved. The MaxInputStreams member gives the maximum number of streams that can be enabled during a blit. These two values can differ.
+A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the D3D11_VIDEO_PROCESSPR_FILTER_CAPS enumeration.
A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the
The number of frame-rate conversion capabilities. To enumerate the frame-rate conversion capabilities, call the ID3D11VideoProcessorEnumerator::GetVideoProcessorRateConversionCaps method.
The maximum number of input streams that can be enabled at the same time.
The maximum number of input streams for which the device can store state data.
Specifies the color space for video processing.
+The RGB_Range member applies to RGB output, while the YCbCr_Matrix and YCbCr_xvYCC members apply to YCbCr output. If the driver performs color-space conversion on the background color, it uses the values that apply to both color spaces.
If the driver supports extended YCbCr (xvYCC), it returns the D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_xvYCC capabilities flag in the ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps method. Otherwise, the driver ignores the value of YCbCr_xvYCC and treats all YCbCr output as conventional YCbCr.
If extended YCbCr is supported, it can be used with either transfer matrix. Extended YCbCr does not change the black point or white point?the black point is still 16 and the white point is still 235. However, extended YCbCr explicitly allows blacker-than-black values in the range 1?15, and whiter-than-white values in the range 236?254. When extended YCbCr is used, the driver should not clip the luma values to the nominal 16?235 range.
+Specifies whether the output is intended for playback or video processing (such as editing or authoring). The device can optimize the processing based on the type. The default state value is 0 (playback).
| Value | Meaning |
|---|---|
| Playback |
| Video processing |
?
Specifies the RGB color range. The default state value is 0 (full range).
| Value | Meaning |
|---|---|
| Full range (0-255) |
| Limited range (16-235) |
?
Specifies the YCbCr transfer matrix. The default state value is 0 (BT.601).
| Value | Meaning |
|---|---|
| ITU-R BT.601 |
| ITU-R BT.709 |
?
Specifies whether the output uses conventional YCbCr or extended YCbCr (xvYCC). The default state value is zero (conventional YCbCr).
| Value | Meaning |
|---|---|
| Conventional YCbCr |
| Extended YCbCr (xvYCC) |
?
Specifies the
Introduced in Windows?8.1.
Reserved. Set to zero.
Describes a video stream for a video processor.
+A member of the
The frame rate of the input video stream, specified as a
The width of the input frames, in pixels.
The height of the input frames, in pixels.
The frame rate of the output video stream, specified as a
The width of the output frames, in pixels.
The height of the output frames, in pixels.
A member of the
Specifies a custom rate for frame-rate conversion or inverse telecine (IVTC).
+The CustomRate member gives the rate conversion factor, while the remaining members define the pattern of input and output samples.
+The ratio of the output frame rate to the input frame rate, expressed as a
The number of output frames that will be generated for every N input samples, where N = InputFramesOrFields.
If TRUE, the input stream must be interlaced. Otherwise, the input stream must be progressive.
The number of input fields or frames for every N output frames that will be generated, where N = OutputFrames.
Defines the range of supported values for an image filter.
+The multiplier enables the filter range to have a fractional step value.
For example, a hue filter might have an actual range of [?180.0 ... +180.0] with a step size of 0.25. The device would report the following range and multiplier:
In this case, a filter value of 2 would be interpreted by the device as 0.50 (or 2 ? 0.25).
The device should use a multiplier that can be represented exactly as a base-2 fraction.
+The minimum value of the filter.
The maximum value of the filter.
The default value of the filter.
A multiplier. Use the following formula to translate the filter setting into the actual filter value: Actual Value = Set Value???Multiplier.
Describes a video processor input view.
+The surface format. If zero, the driver uses the DXGI format that was used to create the resource. If you are using feature level 9, the value must be zero.
The resource type of the view, specified as a member of the
A
Describes a video processor output view.
+The resource type of the view, specified as a member of the
A
Use this member of the union when ViewDimension equals D3D11_VPOV_DIMENSION_TEXTURE2D.
A
Use this member of the union when ViewDimension equals D3D11_VPOV_DIMENSION_TEXTURE2DARRAY.
Defines a group of video processor capabilities that are associated with frame-rate conversion, including deinterlacing and inverse telecine.
+The number of past reference frames required to perform the optimal video processing.
The number of future reference frames required to perform the optimal video processing.
A bitwise OR of zero or more flags from the
A bitwise OR of zero or more flags from the
The number of custom frame rates that the driver supports. To get the list of custom frame rates, call the ID3D11VideoProcessorEnumerator::GetVideoProcessorCustomRate method.
Contains stream-level data for the ID3D11VideoContext::VideoProcessorBlt method.
+If the stereo 3D format is D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE, the ppPastSurfaces, pInputSurface, and ppFutureSurfaces members contain the left view.
+[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Provides information about the input streams passed into the ID3DVideoContext1::VideoProcessorGetBehaviorHints method.
+[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Describes a video sample.
+The width of the video sample.
The height of the video sample.
The format of the video sample.
The colorspace of the sample.
s = det([o_2 - o_1, d_2, d_1 x d_2]) / ||d_1 x d_2||^2
+ t = det([o_2 - o_1, d_1, d_1 x d_2]) / ||d_1 x d_2||^2
+ Where o_1 is the position of the first ray, o_2 is the position of the second ray,
+ d_1 is the normalized direction of the first ray, d_2 is the normalized direction
+ of the second ray, det denotes the determinant of a matrix, x denotes the cross
+ product, [ ] denotes a matrix, and || || denotes the length or magnitude of a vector.
+ start + (end - start) * amount
+ Passing start + (end - start) * amount
+ Passing