D3D11_CREATE_DEVICE_FLAG Enumeration

Describes parameters that are used to create a device.

Syntax

typedef enum D3D11_CREATE_DEVICE_FLAG
{
    D3D11_CREATE_DEVICE_FAST_KICKOFFS = 0,
    D3D11_CREATE_DEVICE_SWITCH_TO_REF = 0,
    D3D11_CREATE_DEVICE_SINGLETHREADED = 0,
    D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x8,
    D3D11_CREATE_DEVICE_BGRA_SUPPORT = 0,
    D3D11_CREATE_DEVICE_DEBUGGABLE = 0,
    D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = 0,
    D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT = 0,
    D3D11_CREATE_DEVICE_VIDEO_SUPPORT = 0,
    D3D11_CREATE_DEVICE_DEBUG = 0x2,
    D3D11_CREATE_DEVICE_VIDEO_EXCLUSIVE = 0x00010000,
    D3D11_CREATE_DEVICE_INSTRUMENTED = 0x00100000,
    D3D11_CREATE_DEVICE_VALIDATED = 0x00200000,
    D3D11_CREATE_DEVICE_USE_FOR_TIMING = 0x00800000,
    D3D11_CREATE_DEVICE_USE_LEGACY_CONTEXT_MANAGEMENT = 0x01000000,
    D3D11_CREATE_DEVICE_IMMEDIATE_CONTEXT_FAST_SEMANTICS = 0x02000000,
    D3D11_CREATE_DEVICE_MANUAL_GARBAGE_COLLECTION = 0x04000000,
    D3D11_CREATE_DEVICE_LEGACY_SLOWER_KICKOFFS = 0x08000000,
    D3D11_CREATE_DEVICE_WRITE_COMBINED_COMMAND_BUFFERS = 0x10000000,
    D3D11_CREATE_DEVICE_WRITE_COMBINED_DYNAMIC_BUFFERS = 0x20000000,
    D3D11_CREATE_DEVICE_NULL_GPU = 0x40000000,
    D3D11_CREATE_DEVICE_USE_CACHED_GARLIC_MEMORY = 0x80000000
} D3D11_CREATE_DEVICE_FLAG;  

Constants

Constant Description
D3D11_CREATE_DEVICE_FAST_KICKOFFSEliminates costly transitions to and from the host OS for kickoffs, by using a local graphics primary ring buffer. This flag remains in effect until the device is terminated.
D3D11_CREATE_DEVICE_SWITCH_TO_REFThis flag is not supported on Xbox One.
D3D11_CREATE_DEVICE_SINGLETHREADEDThis flag is not supported on Xbox One.
D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONSThis flag is not supported on Xbox One.
D3D11_CREATE_DEVICE_BGRA_SUPPORTThis flag is not supported on Xbox One.
D3D11_CREATE_DEVICE_DEBUGGABLEThis flag is not supported on Xbox One.
D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRYThis flag is not supported on Xbox One.
D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUTThis flag is not supported on Xbox One.
D3D11_CREATE_DEVICE_VIDEO_SUPPORTThis flag is not supported on Xbox One.
D3D11_CREATE_DEVICE_DEBUGCreates 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.
D3D11_CREATE_DEVICE_VIDEO_EXCLUSIVEUsed to create a D3D11.x device which is dedicated to decode/encode processing and is capable of interop with D3D12.x. This device is limited primarily to resource creation and GPU decode/encode (that is, you can't use it for video processing for color space conversion, for de-interlace, or for arbitrary rendering). To retrieve decoded results, a title should Map/Unmap using the immediate context on this device. Devices created using this flag support the following APIs:
Note
NV12 textures in D3D12.x are created with a 256-byte pitch for compatibility with the D3D11.x memory layout and hardware decode/encode access.
Use of this feature is subject to the following restrictions:
  • D3D12.x must access decoded buffers through placement resources.
  • The D3D11.x device must be created after the D3D12.x device. The D3D11.x device must also be released before the D3D12.X device.
  • The flavor of driver must match between D3D11.x and D3D12.x. For example, if an INSTRUMENTED D3D12.x device is created then an INSTRUMENTED D3D11.x device must be created as well.
D3D11_CREATE_DEVICE_INSTRUMENTEDEnsures instrumentation in the graphics library, for use with PIX. This flag exists in Xbox One, not in other Windows platforms.
D3D11_CREATE_DEVICE_VALIDATEDTurns on an option to validate parameters. This flag exists in Xbox One, not in other Windows platforms.
D3D11_CREATE_DEVICE_USE_FOR_TIMINGIndicates that this device should be used for PIX timing captures in multiple-device scenarios. Only one device at a time can be created using this flag. If no devices are created using this flag, the first device created is used for PIX timing captures. This flag exists in Xbox One, not in other Windows platforms.
D3D11_CREATE_DEVICE_USE_LEGACY_CONTEXT_MANAGEMENTUses the legacy method for managing GPU state contexts, which is slower and uses more memory bandwidth. This flag exists in Xbox One, not in other Windows platforms.
D3D11_CREATE_DEVICE_IMMEDIATE_CONTEXT_FAST_SEMANTICSApplies fast semantics at context granularity. To create an immediate context with fast semantics, include this flag in a call to D3D11XCreateDeviceX. This flag exists in Xbox One, not in other Windows platforms. See Optimizing Monolithic Driver Performance; Fast Semantics; Fast Semantics Render Loops.
D3D11_CREATE_DEVICE_MANUAL_GARBAGE_COLLECTIONThis flag specifies that manual garbage collection should be used. If this flag is set, the title should periodically call ID3D11DeviceX::GarbageCollect to allow Direct3D to free any GPU memory that has been released and is no longer in use by the GPU. Calling GarbageCollect should always been done from a worker thread other than the render thread, because considerable time can be consumed in XMemFree and the kernel Memory Manager. Typically, GarbageCollect should be called once per frame. If this flag is not set, Direct3D will start up a thread on the title's behalf to do this work.
D3D11_CREATE_DEVICE_LEGACY_SLOWER_KICKOFFSUses transitions to and from the host OS for kickoffs.
D3D11_CREATE_DEVICE_WRITE_COMBINED_COMMAND_BUFFERSCauses Direct3D to create all of its internal command buffers in write-combined memory. This may result in better CPU performance for titles than using cacheable memory by reducing CPU cache pollution as the frame is composed. The GPU will use its more efficient Garlic bus to read them. By default, Direct3D creates the GPU command buffers in CPU cacheable memory and uses the GPU Onion bus to read them. This flag is Xbox One-specific. This flag exists in Xbox One, not in other Windows platforms.
D3D11_CREATE_DEVICE_WRITE_COMBINED_DYNAMIC_BUFFERSCauses Direct3D to create all of its Dynamic Resource buffers in write-combined memory. This may result in better CPU performance for titles than using cacheable memory by reducing CPU cache pollution when operating on memory returned by the Map method. The GPU will use its more efficient Garlic bus to read them. Titles must be careful to abide by proper Write Combining performance rules when operating on memory returned via calls to Direct3D’s Map method otherwise use of this flag may result in significantly worse CPU performance. The CPU should never be used to read from Write Combined memory as those will be handled as extremely inefficient uncached reads. Additionally, all CPU writes should always be properly streaming: that is, always increasing in address, and consecutive without gaps or overlaps. By default, Direct3D creates the dynamic resources in CPU cacheable memory and uses the GPU Onion bus to read them. This flag is Xbox One-specific; this flag exists in Xbox One, not in other Windows platforms.
D3D11_CREATE_DEVICE_NULL_GPUThe device is created without the ability to execute work on the GPU. All command buffer kickoffs are discarded, and all CPU synchronization is eliminated. PIX captures are still enabled. This mode is useful for debugging scenarios where command buffer corruption or invalid packets are suspected. This flag is Xbox One-specific; this flag exists in Xbox One, not in other Windows platforms.
D3D11_CREATE_DEVICE_USE_CACHED_GARLIC_MEMORYSetting this flag reverts to the old default behavior, which was to use cached garlic memory. Cached garlic memory is memory that is CPU cached and GPU noncoherent. However, cached garlic memory is difficult to use properly, because the CPU and GPU cache contents for this memory can easily get out of sync, causing issues that are difficult to debug. In newer releases, the graphics driver no longer requests cached garlic graphics memory for resources. The graphics driver uses standard CPU writecombined and GPU noncoherent memory where it was using cached garlic memory previously. The D3D11_CREATE_DEVICE_USE_CACHED_GARLIC_MEMORY flag can be used to revert to the older behavior (which can reintroduce the problems mentioned above). This flag is available just in case the new behavior caused a performance regression that a title cannot easily rectify. This flag exists in Xbox One, not in other Windows platforms.

Remarks

Device creation flags are used by D3D11CreateDevice and D3D11CreateDeviceAndSwapChain.

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).