Windows Dev Center

D3D10_RESOURCE_MISC_FLAG enumeration

Identifies other, less common options for resources.

Syntax


typedef enum D3D10_RESOURCE_MISC_FLAG { 
  D3D10_RESOURCE_MISC_GENERATE_MIPS      = 0x1L,
  D3D10_RESOURCE_MISC_SHARED             = 0x2L,
  D3D10_RESOURCE_MISC_TEXTURECUBE        = 0x4L,
  D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX  = 0x10L,
  D3D10_RESOURCE_MISC_GDI_COMPATIBLE     = 0x20L
} D3D10_RESOURCE_MISC_FLAG;

Constants

D3D10_RESOURCE_MISC_GENERATE_MIPS

Enables an application to call ID3D10Device::GenerateMips on a texture resource. The resource must be created with the bind flags that specify that the resource is a render target and a shader resource.

D3D10_RESOURCE_MISC_SHARED

Enables the sharing of resource data 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. Attempting to create a resource with this flag on either a WARP or REF device will cause the create method to return an E_OUTOFMEMORY error code.

D3D10_RESOURCE_MISC_TEXTURECUBE

Enables an application to create a cube texture from a Texture2DArray that contains 6 textures.

D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX

Enables the resource created to be synchronized using the IDXGIKeyedMutex::AcquireSync and ReleaseSync APIs. The following resource creation D3D10 APIs, that all take a D3D10_RESOURCE_MISC_FLAG parameter, have been extended to support the new flag.

  • ID3D10Device1::CreateTexture1D
  • ID3D10Device1::CreateTexture2D
  • ID3D10Device1::CreateTexture3D
  • ID3D10Device1::CreateBuffer

If any of the listed functions are called with the D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX flag set, the interface returned can be queried for an IDXGIKeyedMutex interface, which implements AcquireSync and ReleaseSync APIs to synchronize access to the surface. The device creating the surface, and any other device opening the surface (using OpenSharedResource) is required to call IDXGIKeyedMutex::AcquireSync before any rendering commands to the surface, and IDXGIKeyedMutex::ReleaseSync when it is done rendering.

WARP and REF devices do not support shared resources. Attempting to create a resource with this flag on either a WARP or REF device will cause the create method to return an E_OUTOFMEMORY error code.

D3D10_RESOURCE_MISC_GDI_COMPATIBLE

Enables a surface to be used for GDI interoperability. Setting this flag enables rendering on the surface via IDXGISurface1::GetDC.

Remarks

This enumeration is used in D3D10_BUFFER_DESC, D3D10_TEXTURE1D_DESC, D3D10_TEXTURE2D_DESC, D3D10_TEXTURE3D_DESC, D3DX10_IMAGE_INFO, and D3DX10_IMAGE_LOAD_INFO.

These flags can be combined by bitwise OR.

D3D10_RESOURCE_MISC_SHARED and D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX are mutually exclusive flags: either one may be set in the resource creation calls but not both simultaneously.

Requirements

Header

D3D10.h

See also

Resource Enumerations

 

 

Community Additions

ADD
Show:
© 2015 Microsoft