The blend-state interface holds a description for blending state that you can bind to the output-merger stage.
Blending applies a simple function to combine output values from a pixel shader with data in a render target. You have control over how the pixels are blended by using a predefined set of blending operations and preblending operations.
To create a blend-state object, call
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
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
The blend-state interface holds a description for blending state that you can bind to the output-merger stage. This blend-state interface supports logical operations as well as blending operations.
Blending applies a simple function to combine output values from a pixel shader with data in a render target. You have control over how the pixels are blended by using a predefined set of blending operations and preblending operations.
To create a blend-state object, call
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
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
Describes the blend state that you use in a call to
Here are the default values for blend state.
State | Default Value |
---|---|
AlphaToCoverageEnable | |
IndependentBlendEnable | |
RenderTarget[0].BlendEnable | |
RenderTarget[0].SrcBlend | |
RenderTarget[0].DestBlend | |
RenderTarget[0].BlendOp | |
RenderTarget[0].SrcBlendAlpha | |
RenderTarget[0].DestBlendAlpha | |
RenderTarget[0].BlendOpAlpha | |
RenderTarget[0].RenderTargetWriteMask |
?
Note?? If the driver type is set to
Describes the blend state that you use in a call to
Here are the default values for blend state.
State | Default Value |
---|---|
AlphaToCoverageEnable | |
IndependentBlendEnable | |
RenderTarget[0].BlendEnable | |
RenderTarget[0].LogicOpEnable | |
RenderTarget[0].SrcBlend | |
RenderTarget[0].DestBlend | |
RenderTarget[0].BlendOp | |
RenderTarget[0].SrcBlendAlpha | |
RenderTarget[0].DestBlendAlpha | |
RenderTarget[0].BlendOpAlpha | |
RenderTarget[0].LogicOp | |
RenderTarget[0].RenderTargetWriteMask |
?
If the driver type is set to
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
A buffer interface accesses a buffer resource, which is unstructured memory. Buffers typically store vertex or index data.
There are three types of buffers: vertex, index, or a shader-constant buffer. Create a buffer resource by calling
A buffer must be bound to the pipeline before it can be accessed. Buffers can be bound to the input-assembler stage by calls to
Buffers can be bound to multiple pipeline stages simultaneously for reading. A buffer can also be bound to a single pipeline stage for writing; however, the same buffer cannot be bound for reading and writing simultaneously.
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
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
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
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.
This interface encapsulates an HLSL class.
This interface is created by calling
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
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
For more information about using the
Windows?Phone?8: This API is supported.
This interface encapsulates an HLSL dynamic linkage.
A class linkage object can hold up to 64K gotten instances. A gotten instance is a handle that references a variable name in any shader that is created with that linkage object. When you create a shader with a class linkage object, the runtime gathers these instances and stores them in the class linkage object. For more information about how a class linkage object is used, see Storing Variables and Types for Shaders to Share.
An
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
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.
A compute-shader interface manages an executable program (a compute shader) that controls the compute-shader stage.
The compute-shader interface has no methods; use HLSL to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..
To create a compute-shader interface, call
This interface is defined in D3D11.h.
This interface encapsulates methods for measuring GPU performance.
A counter can be created with
This is a derived class of
Counter data is gathered by issuing an
Counters are best suited for profiling.
For a list of the types of performance counters, see
Get a counter description.
Get a counter description.
Pointer to a counter description (see
The depth-stencil-state interface holds a description for depth-stencil state that you can bind to the output-merger stage.
To create a depth-stencil-state object, call
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
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
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 | |
DepthFunc | |
StencilEnable | |
StencilReadMask | D3D11_DEFAULT_STENCIL_READ_MASK |
StencilWriteMask | D3D11_DEFAULT_STENCIL_WRITE_MASK |
FrontFace.StencilFunc and BackFace.StencilFunc | |
FrontFace.StencilDepthFailOp and BackFace.StencilDepthFailOp | |
FrontFace.StencilPassOp and BackFace.StencilPassOp | |
FrontFace.StencilFailOp and BackFace.StencilFailOp |
?
The formats that support stenciling are
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
To bind a depth-stencil view to the pipeline, call
A depth-stencil-view interface accesses a texture resource during depth-stencil testing.
To create a depth-stencil view, call
To bind a depth-stencil view to the pipeline, call
A depth-stencil-view interface accesses a texture resource during depth-stencil testing.
To create a depth-stencil view, call
To bind a depth-stencil view to the pipeline, call
The device interface represents a virtual adapter; it is used to create resources.
A device is created using
Windows?Phone?8: This API is supported.
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
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
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:
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,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
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
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
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
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
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
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
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 theFor 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
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
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
Calling CheckFeatureSupport with Feature set to
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
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
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.
The device interface represents a virtual adapter; it is used to create resources.
{ , , , , , , ,};
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 theFor 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
{, , , , , , ,};
The number of elements in pFeatureLevels. Unlike
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
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
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
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
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
To share a resource between two devices
The device interface represents a virtual adapter; it is used to create resources.
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 theFor 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
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.
The device interface represents a virtual adapter; it is used to create resources.
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
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
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
The provided resource must be 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
The provided resource must be 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.
Note??The latest version of this interface is A device is created using
Windows?Phone?8: This API is supported.
The device interface represents a virtual adapter; it is used to create resources.
A device-child interface accesses data used by a device.
There are several types of device child interfaces, all of which inherit this interface. They include shaders, state objects, and input layouts.
Windows?Phone?8: This API is supported.
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
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
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
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
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
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 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.
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 = ; SamplerDesc.AddressU = ; SamplerDesc.AddressV = ; SamplerDesc.AddressW = ; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = ; 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.
The
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
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
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
Mark the end of a series of commands.
A reference to an
Use
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
GetData retrieves the data that the runtime collected between calls to
If DataSize is 0, GetData is only used to check status.
An application gathers counter data by calling
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
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
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,
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
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
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
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 useCopy 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
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
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
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
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:
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:
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_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:
(optional) (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
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
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 |
Source and destination are prestructured and typeless | Both the source and desintation must have the same typeless format (i.e. both must have For example, given the
|
?
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 (
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
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
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
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
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
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
For more information about how to use FinishCommandList, see How to: Record a Command List.
Windows?Phone?8: This API is supported.
The
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
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).
The
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
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
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
Passing in
State | Default Value |
---|---|
AlphaToCoverageEnable | |
IndependentBlendEnable | |
RenderTarget[0].BlendEnable | |
RenderTarget[0].SrcBlend | |
RenderTarget[0].DestBlend | |
RenderTarget[0].BlendOp | |
RenderTarget[0].SrcBlendAlpha | |
RenderTarget[0].DestBlendAlpha | |
RenderTarget[0].BlendOpAlpha | |
RenderTarget[0].RenderTargetWriteMask |
?
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
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
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
Passing in
State | Default Value |
---|---|
AlphaToCoverageEnable | |
IndependentBlendEnable | |
RenderTarget[0].BlendEnable | |
RenderTarget[0].SrcBlend | |
RenderTarget[0].DestBlend | |
RenderTarget[0].BlendOp | |
RenderTarget[0].SrcBlendAlpha | |
RenderTarget[0].DestBlendAlpha | |
RenderTarget[0].BlendOpAlpha | |
RenderTarget[0].RenderTargetWriteMask |
?
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.
The
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
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
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
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
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.
The
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
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.
The device context interface represents a device context; it is used to render commands.
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 orDiscards 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 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 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 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 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 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
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
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
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
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
If the format is integer, such as
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.
The device context interface represents a device context; it is used to render commands.
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
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
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
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
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
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
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
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.
The device context interface represents a device context; it is used to render commands.
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
Flush1 has parameters. For more information, see
Sets the hardware protection state.
Specifies whether to enable hardware protection.
Gets whether hardware protection is enabled.
After this method returns, points to a
A debug interface controls debug settings, validates pipeline state and can only be used if the debug layer is turned on.
This interface is obtained by querying it from the
For more information about the debug layer, see Debug Layer.
Windows?Phone?8: This API is supported.
Get or sets the number of milliseconds to sleep after
Value is set with
Get or sets the swap chain that the runtime will use for automatically calling
The swap chain retrieved by this method will only be used if
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.
Application will wait for the GPU to finish processing the rendering operation before continuing. | |
Runtime will additionally call | |
Runtime will call |
?
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
When you call | |
When you call |
?
The behavior of the
The following flag is supported by the Direct3D 11.1 runtime.
Disables the following default debugging behavior. |
?
When the debug layer is enabled, it performs certain actions to reveal application problems. By setting the
The following flag is supported by the Direct3D 11.2 runtime.
Disables the following default debugging behavior. |
?
By default (that is, without
If
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
Set the number of milliseconds to sleep after
This method returns one of the following Direct3D 11 Return Codes.
The application will only sleep if
Get the number of milliseconds to sleep after
Number of milliseconds to sleep after Present is called.
Value is set with
Sets a swap chain that the runtime will use for automatically calling
This method returns one of the following Direct3D 11 Return Codes.
The swap chain set by this method will only be used if
Get the swap chain that the runtime will use for automatically calling
This method returns one of the following Direct3D 11 Return Codes.
The swap chain retrieved by this method will only be used if
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,
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,
A domain-shader interface manages an executable program (a domain shader) that controls the domain-shader stage.
The domain-shader interface has no methods; use HLSL to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..
To create a domain-shader interface, call
This interface is defined in D3D11.h.
The device context interface represents a device context; it is used to render commands.
Optional flags that control the behavior of
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
Identifies how to bind a resource to the pipeline.
In general, binding flags can be combined using a logical OR (except the constant-buffer flag); however, you should use a single flag to allow the device to optimize the resource usage.
This enumeration is used by a:
A shader-resource buffer is NOT a constant buffer; rather, it is a texture or buffer resource that is bound to a shader, that contains texture or buffer data (it is not limited to a single element type in the buffer). A shader-resource buffer is created with 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
Bind 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
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
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
The blend factor is the blend factor set with
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.
Identifies how to check multisample quality levels.
Indicates to check the multisample quality levels of a tiled resource.
Identify which components of each pixel of a render target are writable during blending.
These flags can be combined with a bitwise OR.
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.
Unordered resource support options for a compute shader resource (see
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
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.
Specifies how to handle the existing contents of a resource during a copy or update operation of a region within that resource.
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
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
32-bit floating point.
16-bit unsigned integer.
32-bit unsigned integer.
64-bit unsigned integer.
Specifies the types of CPU access allowed for a resource.
This enumeration is used in
Applications may combine one or more of these flags with a logical OR. When possible, create resources with no CPU access flags, as this enables better resource optimization.
The
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
Describes flags that are used to create a device context state object (
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.
Specifies the parts of the depth stencil to clear.
These flags are used when calling
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
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.
Depth-stencil view options.
This enumeration is used by
Limiting a depth-stencil buffer to read-only access allows more than one depth-stencil view to be bound to the pipeline simultaneously, since it is not possible to have a read/write conflicts between separate views.
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
The device context is an immediate context.
The device context is a deferred context.
Describes parameters that are used to create a device.
Device creation flags are used by
An application might dynamically create (and destroy) threads to improve performance especially on a machine with multiple CPU cores. There may be cases, however, when an application needs to prevent extra threads from being created. This can happen when you want to simplify debugging, profile code or develop a tool for instance. For these cases, use
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 (
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
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
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
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.
Device context options.
This enumeration is used by
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
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
Fetch the same set of texels as
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.
Which resources are supported for a given format and given device (see
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.
Specifies how the CPU should respond when an application calls the
This enumeration is used by
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
These remarks are divided into the following topics:
Resource is mapped for reading. The resource must have been created with read access (see
Resource is mapped for writing. The resource must have been created with write access (see
Resource is mapped for reading and writing. The resource must have been created with read and write access (see
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
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
Categories of debug messages. This will identify the category of a message when retrieving a message with
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.
Flags that describe miscellaneous query behavior.
This flag is part of a query description (see
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
Query types.
Create a query with
Determines whether or not the GPU is finished processing commands. When the GPU is finished processing commands
Get the number of samples that passed the depth and stencil tests in between
Get a timestamp value where
Determines whether or not a
Get pipeline statistics, such as the number of pixel shader invocations in between
Similar to
Get streaming output statistics, such as the number of primitives streamed out in between
Determines whether or not any of the streaming output buffers overflowed in between
Get streaming output statistics for stream 0, such as the number of primitives streamed out in between
Determines whether or not the stream 0 output buffers overflowed in between
Get streaming output statistics for stream 1, such as the number of primitives streamed out in between
Determines whether or not the stream 1 output buffers overflowed in between
Get streaming output statistics for stream 2, such as the number of primitives streamed out in between
Determines whether or not the stream 2 output buffers overflowed in between
Get streaming output statistics for stream 3, such as the number of primitives streamed out in between
Determines whether or not the stream 3 output buffers overflowed in between
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
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.
Options for the amount of information to report about a device object's lifetime.
This enumeration is used by
Several inline functions exist to combine the options using operators, see the D3D11SDKLayers.h header file for details.
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
Resource is of unknown type.
Resource is a buffer.
Resource is a 1D texture.
Resource is a 2D texture.
Resource is a 3D texture.
Identifies options for resources.
This enumeration is used in
These flags can be combined by bitwise OR.
The
Enables MIP map generation by using
Enables resource data sharing between two or more Direct3D devices. The only resources that can be shared are 2D non-mipmapped textures.
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 theSets 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
Enables the resource to be synchronized by using the
If you call any of these methods with the
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
Consider the following programming tips for using
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
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
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
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
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.
Describes the level of support for shader caching in the current graphics driver.
This enum is used by the D3D_FEATURE_DATA_SHADER_CACHE structure.
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.
Identifies how to view a buffer resource.
This enumeration is used by
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
Indicates which resource types to track.
The
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
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
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
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.
Identifies how to copy a tile.
Indicates that the GPU isn't currently referencing any of the portions of destination memory being written.
Indicates that the
Indicates that the
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
The device supports calls to CreateBuffer with the
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.
Identifies how to perform a tile-mapping operation.
Indicates that no overwriting of tiles occurs in the tile-mapping operation.
Specifies a range of tile mappings to use with
Identifies unordered-access view options for a buffer resource.
Resource contains raw, unstructured data. Requires the UAV format to be
Allow data to be appended to the end of the buffer.
Adds a counter to the unordered-access-view buffer.
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
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
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
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
Multi-plane overlay hardware can perform the scaling operation more efficiently than the
Multi-plane overlay hardware can perform the colorspace conversion operation more efficiently than the
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
The video processor can downsample the video output. For more information, see
The video processor can perform luma keying. For more information, see
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
All drivers setting this caps must support the following stereo formats:
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
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
The video processor supports the
The video processor supports the
The video processor supports the
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
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
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
The runtime layers to enable (see
A reference to an array of
{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
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.
This interface encapsulates methods for retrieving data from the GPU asynchronously.
There are three types of asynchronous interfaces, all of which inherit this interface:
Get the size of the data (in bytes) that is output when calling
Get the size of the data (in bytes) that is output when calling
Size of the data (in bytes) that is output when calling GetData.
Provides a communication channel with the graphics driver or the Microsoft Direct3D runtime.
To get a reference to this interface, call
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
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.
The
There is no explicit creation method, simply declare an
Gets the initialization flags associated with the deferred context that created the command list.
The GetContextFlags method gets the flags that were supplied to the ContextFlags parameter of
Gets the initialization flags associated with the deferred context that created the command list.
The context flag is reserved for future use and is always 0.
The GetContextFlags method gets the flags that were supplied to the ContextFlags parameter of
Represents a cryptographic session.
To get a reference to this interface, call
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
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
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
Gets the driver's certificate chain.
The size of the pCertificate array, in bytes. To get the size of the certificate chain, call
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.
Handles the creation, wrapping and releasing of D3D11 resources for Direct3D 11on12.
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
Keyed mutex resources cannot be provided to this method; use
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
Keyed mutex resources cannot be provided to this method; use
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
Keyed mutex resources cannot be provided to this method; use
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
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
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
The device interface represents a virtual adapter; it is used to create resources.
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
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
Unregisters the "device removed" event.
Information about the "device removed" event, retrieved during a successful RegisterDeviceRemovedEvent call.
See RegisterDeviceRemovedEvent.
The
The
The
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
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 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.
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 = ; SamplerDesc.AddressU = ; SamplerDesc.AddressV = ; SamplerDesc.AddressW = ; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = ; 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.
A geometry-shader interface manages an executable program (a geometry shader) that controls the geometry-shader stage.
The geometry-shader interface has no methods; use HLSL to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..
To create a geometry shader interface, call either
This interface is defined in D3D11.h.
The
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.
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 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
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 = ; SamplerDesc.AddressU = ; SamplerDesc.AddressV = ; SamplerDesc.AddressW = ; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = ; 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.
A hull-shader interface manages an executable program (a hull shader) that controls the hull-shader stage.
The hull-shader interface has no methods; use HLSL to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..
To create a hull-shader interface, call
This interface is defined in D3D11.h.
The
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
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 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.
Set an array of sampler states to the hull-shader stage.
Any sampler may be set to
//Default sampler state:SamplerDesc; SamplerDesc.Filter = ; SamplerDesc.AddressU = ; SamplerDesc.AddressV = ; SamplerDesc.AddressW = ; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = ; 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.
An information-queue interface stores, retrieves, and filters debug messages. The queue consists of a message queue, an optional storage filter stack, and a optional retrieval filter stack.
To get this interface, turn on debug layer and use IUnknown::QueryInterface from the
Windows?Phone?8: This API is supported.
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
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
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 messagemessageLength = 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
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
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
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).
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.
An input-layout interface holds a definition of how to feed vertex data that is laid out in memory into the input-assembler stage of the graphics pipeline.
To create an input-layout object, call
Provides threading protection for critical sections of a multi-threaded application.
This interface is obtained by querying it from an immediate device context created with the
Unlike D3D10, there is no multithreaded layer in D3D11. By default, multithread protection is turned off. Use SetMultithreadProtected to turn it on, then Enter and Leave to encapsulate graphics commands that must be executed in a specific order.
By default in D3D11, applications can only use one thread with the immediate context at a time. But, applications can use this interface to change that restriction. The interface can turn on threading protection for the immediate context, which will increase the overhead of each immediate context call in order to share one context with multiple threads.
Find out if multithread protection is turned on or not.
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.
A pixel-shader interface manages an executable program (a pixel shader) that controls the pixel-shader stage.
The pixel-shader interface has no methods; use HLSL to implement your shader functionality. All shaders in are implemented from a common set of features referred to as the common-shader core..
To create a pixel shader interface, call
This interface is defined in D3D11.h.
The
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
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.
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.
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 | |
AddressU | |
AddressV | |
AddressW | |
MipLODBias | 0 |
MaxAnisotropy | 1 |
ComparisonFunc | |
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
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.
A predicate interface determines whether geometry should be processed depending on the results of a previous draw call.
To create a predicate object, call
There are two types of predicates: stream-output-overflow predicates and occlusion predicates. Stream-output-overflow predicates cause any geometry residing in stream-output buffers that were overflowed to not be processed. Occlusion predicates cause any geometry that did not have a single sample pass the depth/stencil tests to not be processed.
A query interface queries information from the GPU.
A query can be created with
Query data is typically gathered by issuing an
There are, however, some queries that do not require calls to Begin. For a list of possible queries see
A query is typically executed as shown in the following code:
queryDesc; ... // Fill out queryDesc structure * pQuery; pDevice->CreateQuery(&queryDesc, &pQuery); pDeviceContext->Begin(pQuery); ... // Issue graphics commands pDeviceContext->End(pQuery); UINT64 queryData; // This data type is different depending on the query type while( != pDeviceContext->GetData(pQuery, &queryData, sizeof(UINT64), 0) ) { }
When using a query that does not require a call to Begin, it still requires a call to End. The call to End causes the data returned by GetData to be accurate up until the last call to End.
Get a query description.
Get a query description.
Pointer to a query description (see
Represents a query object for querying information from the graphics processing unit (GPU).
A query can be created with
Query data is typically gathered by issuing an
There are, however, some queries that do not require calls to Begin. For a list of possible queries see
When using a query that does not require a call to Begin, it still requires a call to End. The call to End causes the data returned by GetData to be accurate up until the last call to End.
Gets a query description.
Gets a query description.
A reference to a
The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage.
To create a rasterizer-state object, call
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
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
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.
The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage. This rasterizer-state interface supports forced sample count.
To create a rasterizer-state object, call
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
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
The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage. This rasterizer-state interface supports forced sample count and conservative rasterization mode.
To create a rasterizer-state object, call
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
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
Sets graphics processing unit (GPU) debug reference default tracking options for specific resource types.
This API requires the Windows Software Development Kit (SDK) for Windows?8.
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.
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.
A render-target-view interface identifies the render-target subresources that can be accessed during rendering.
To create a render-target view, call
A rendertarget is a resource that can be written by the output-merger stage at the end of a render pass. Each render-target should also have a corresponding depth-stencil view.
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
A render-target-view interface represents the render-target subresources that can be accessed during rendering.
To create a render-target view, call
A render target is a resource that can be written by the output-merger stage at the end of a render pass. Each render target can also have a corresponding depth-stencil view.
Gets the properties of a render-target view.
Gets the properties of a render-target view.
A reference to a
A resource interface provides common actions on all resources.
You don't directly create a resource interface; instead, you create buffers and textures that inherit from a resource interface. For more info, see How to: Create a Vertex Buffer, How to: Create an Index Buffer, How to: Create a Constant Buffer, and How to: Create a Texture.
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,
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:
A view interface specifies the parts of a resource the pipeline can access during rendering.
A view interface is the base interface for all views. There are four types of views; a depth-stencil view, a render-target view, a shader-resource view, and an unordered-access view.
All resources must be bound to the pipeline before they can be accessed.
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.
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.
The sampler-state interface holds a description for sampler state that you can bind to any shader stage of the pipeline for reference by texture sample operations.
To create a sampler-state object, call
To bind a sampler-state object to any pipeline shader stage, call the following methods:
You can bind the same sampler-state object to multiple shader stages simultaneously.
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
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
A shader-resource-view interface specifies the subresources a shader can access during rendering. Examples of shader resources include a constant buffer, a texture buffer, and a texture.
To create a shader-resource view, call
A shader-resource view is required when binding a resource to a shader stage; the binding occurs by calling
Get the shader resource view's description.
Get the shader resource view's description.
A reference to a
A shader-resource-view interface represents the subresources a shader can access during rendering. Examples of shader resources include a constant buffer, a texture buffer, and a texture.
To create a shader-resource view, call
A shader-resource view is required when binding a resource to a shader stage; the binding occurs by calling
Gets the shader-resource view's description.
Gets the shader-resource view's description.
A reference to a
Reserved.
Reserved.
A 1D texture interface accesses texel data, which is structured memory.
To create an empty 1D texture, call
Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call
Get the properties of the texture resource.
Get the properties of the texture resource.
Pointer to a resource description (see
A 2D texture interface manages texel data, which is structured memory.
To create an empty Texture2D resource, call
Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call
Get the properties of the texture resource.
Get the properties of the texture resource.
Pointer to a resource description (see
A 2D texture interface represents texel data, which is structured memory.
To create an empty Texture2D resource, call
Textures can't be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render-target or depth-stencil resource, call
Gets the properties of the texture resource.
Gets the properties of the texture resource.
A reference to a
A 3D texture interface accesses texel data, which is structured memory.
To create an empty Texture3D resource, call
Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call
Get the properties of the texture resource.
Get the properties of the texture resource.
Pointer to a resource description (see
A 3D texture interface represents texel data, which is structured memory.
To create an empty Texture3D resource, call
Textures can't be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render-target or depth-stencil resource, call
Gets the properties of the texture resource.
Gets the properties of the texture resource.
A reference to a
The tracing device interface sets shader tracking information, which enables accurate logging and playback of shader execution.
To get this interface, turn on the debug layer and use IUnknown::QueryInterface from the
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.
A view interface specifies the parts of a resource the pipeline can access during rendering.
To create a view for an unordered access resource, call
All resources must be bound to the pipeline before they can be accessed. Call
Get a description of the resource.
Get a description of the resource.
Pointer to a resource description (see
An unordered-access-view interface represents the parts of a resource the pipeline can access during rendering.
To create a view for an unordered access resource, call
All resources must be bound to the pipeline before they can be accessed. Call
Gets a description of the resource.
Gets a description of the resource.
A reference to a
The
The methods of
The
The
You must call the BeginEvent and EndEvent methods in pairs; pairs of calls to these methods can nest within pairs of calls to these methods at a higher level in the application's call stack. In other words, a "Draw World" section can entirely contain another section named "Draw Trees," which can in turn entirely contain a section called "Draw Oaks." You can only associate an EndEvent method with the most recent BeginEvent method, that is, pairs cannot overlap. You cannot call an EndEvent for any BeginEvent that preceded the most recent BeginEvent. In fact, the runtime interprets the first EndEvent as ending the second BeginEvent.
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
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
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
A vertex-shader interface manages an executable program (a vertex shader) that controls the vertex-shader stage.
The vertex-shader interface has no methods; use HLSL to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..
To create a vertex shader interface, call
This interface is defined in D3D11.h.
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.
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.
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
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 = ; SamplerDesc.AddressU = ; SamplerDesc.AddressV = ; SamplerDesc.AddressW = ; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = ; 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.
Provides the video functionality of a Microsoft Direct3D?11 device.
To get a reference to this interface, call QueryInterface with an
This interface provides access to several areas of Microsoft Direct3D video functionality:
In Microsoft Direct3D?9, the equivalent functions were distributed across several interfaces:
[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
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
Releases a buffer that was obtained by calling the
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
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
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
To find out which fill modes the device supports, call the
The default fill mode is
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
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
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
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
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
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
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
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
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 (
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
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
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
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
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
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
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
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
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
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
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
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
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
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
If Format is not
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
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
The filter, specified as a
To query which filters the driver supports, call
Specifies whether to enable the filter.
The filter level. If Enable is
To find the valid range of levels for a specified filter, call
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
To query whether the driver supports this method, call
Switches to a new session key.
A reference to the
This function can only be called when the
Before calling this method, call
Gets the cryptographic key to decrypt the data returned by the
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
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
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
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
Specifies if the stream is rotated.
Specifies the rotation of the stream in a clockwise orientation.
[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
[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 the video functionality of a Microsoft Direct3D?11 device.
To get a reference to this interface, call QueryInterface with an
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
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
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
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
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
Provides the video functionality of a Microsoft Direct3D?11 device.
To get a reference to this interface, call QueryInterface with an
This interface provides access to several areas of Microsoft Direct3D video functionality:
In Microsoft Direct3D?9, the equivalent functions were distributed across several interfaces:
Represents a hardware-accelerated video decoder for Microsoft Direct3D?11.
To get a reference to this interface, call
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.
Identifies the output surfaces that can be accessed during video decoding.
To get a reference to this interface, call
Gets the properties of the video decoder output view.
Gets the properties of the video decoder output view.
A reference to a
Provides the video decoding and video processing capabilities of a Microsoft Direct3D?11 device.
The Direct3D?11 device supports this interface. To get a reference to this interface, call QueryInterface with an
If you query an
Gets the number of profiles that are supported by the driver.
To enumerate the profiles, call
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
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
Receives a reference to the
If this method succeeds, it returns
The
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
If ChannelType is
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
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
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
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
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
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
Provides the video decoding and video processing capabilities of a Microsoft Direct3D?11 device.
The Direct3D?11 device supports this interface. To get a reference to this interface, call QueryInterface with an
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
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.
Represents a video processor for Microsoft Direct3D?11.
To get a reference to this interface, call
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 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
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
The zero-based index of the custom rate to retrieve. To get the maximum index, call
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
Enumerates the video processor capabilities of a Microsoft Direct3D?11 device.
To get a reference to this interface, call
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. |
?
Identifies the input surfaces that can be accessed during video processing.
To get a reference to this interface, call
Gets the properties of the video processor input view.
Gets the properties of the video processor input view.
A reference to a
Identifies the output surfaces that can be accessed during video processing.
To get a reference to this interface, call
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
A handle to the cryptographic session. Get this from
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
Contains the response from the
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
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
Contains a response from the
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
A
The index of the process in the list of processes.
A
A process handle. If the ProcessIdentifier member equals
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
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
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
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
Type of counter (see
Reserved.
Used with
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
A depth-stencil-view description is needed when calling
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
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
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 (
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 (
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
Specifies whether the driver supports new semantics for copy and update that are exposed by the
Specifies whether the driver supports the
Specifies whether you can call
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
Specifies whether you can call
Specifies whether you can call
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
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,
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
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
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
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 theSpecifies 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,
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,
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
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
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
[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
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
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
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.
A debug message in the Information Queue.
This structure is returned from
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.
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
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
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
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
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 rasterizer state.
Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call
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 |
?
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 | |
SrcBlend | |
DestBlend | |
BlendOp | |
SrcBlendAlpha | |
DestBlendAlpha | |
BlendOpAlpha | |
RenderTargetWriteMask |
?
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.
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 | |
DestBlend | |
BlendOp | |
SrcBlendAlpha | |
DestBlendAlpha | |
BlendOpAlpha | |
LogicOp | |
RenderTargetWriteMask |
?
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
A render-target-view cannot use the following formats:
If the format is set to
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
A render-target-view can't use the following formats:
If the format is set to
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
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.
Describes a sampler state.
These are the default values for sampler state.
State | Default Value |
---|---|
Filter | |
AddressU | |
AddressV | |
AddressW | |
MinLOD | -3.402823466e+38F (-FLT_MAX) |
MaxLOD | 3.402823466e+38F (FLT_MAX) |
MipMapLODBias | 0.0f |
MaxAnisotropy | 1 |
ComparisonFunc | |
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
A function that compares sampled data against existing sampled data. The function options are listed in
Border color to use if
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.
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
Create a shader-resource-view description by calling
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
Index of the most detailed mipmap level to use; this number is between 0 and MipLevels (from the original Texture1D for which
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
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
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
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
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
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
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
Create a shader-resource-view description by calling
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
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
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
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
Query information about the amount of data streamed out to the stream-output buffers in between
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
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 (
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
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
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 (
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
Flags (see
Flags (see
Flags (see
Describes a 2D texture.
This structure is used in a call to
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 (
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
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
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
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 (
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
Flags (see
Flags (see
Flags (see
Describes a 3D texture.
This structure is used in a call to
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 (
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
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
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
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
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
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
This structure is passed in the pContentKey parameter 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
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
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
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
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
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
A
Use this member of the union when ViewDimension equals
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
Contains stream-level data for the
If the stereo 3D format is
[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.