Muokkaa

Jaa


Checking Hardware Feature Support

This section covers how to check on Format Support for Direct3D Feature Level Hardware using API calls.

For D3D11, use ID3D11Device::CheckFormatSupport to programmatically verify the info in the previous sections. For D3D12 use ID3D12::CheckFeatureSupport.

Format target D3D12 D3D11
Buffer D3D12_FORMAT_SUPPORT1_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_BUFFER (D3D11_FORMAT_SUPPORT)
Input Assembler Vertex Buffer D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER (D3D11_FORMAT_SUPPORT)
Input Assembler Index Buffer D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER (D3D11_FORMAT_SUPPORT)
Stream Output Buffer D3D12_FORMAT_SUPPORT1_SO_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SO_BUFFER (D3D11_FORMAT_SUPPORT)
Texture1D D3D12_FORMAT_SUPPORT1_TEXTURE1D (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_TEXTURE1D (D3D11_FORMAT_SUPPORT)
Texture2D D3D12_FORMAT_SUPPORT1_TEXTURE2D (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_TEXTURE2D (D3D11_FORMAT_SUPPORT)
Texture3D D3D12_FORMAT_SUPPORT1_TEXTURE3D (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_TEXTURE3D (D3D11_FORMAT_SUPPORT)
TextureCube D3D12_FORMAT_SUPPORT1_TEXTURECUBE (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_TEXTURECUBE (D3D11_FORMAT_SUPPORT)
Shader ld D3D12_FORMAT_SUPPORT1_SHADER_LOAD (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_LOAD (D3D11_FORMAT_SUPPORT)
Shader sample (any filter) D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_SAMPLE (D3D11_FORMAT_SUPPORT)
Shader sample_c (comparison filter) D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON (D3D11_FORMAT_SUPPORT)
Shader sample (mono 1_bit_filter) D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT (D3D11_FORMAT_SUPPORT)
Shader gather4 D3D12_FORMAT_SUPPORT1_SHADER_GATHER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_GATHER (D3D11_FORMAT_SUPPORT)
Shader gather4_c D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON (D3D11_FORMAT_SUPPORT)
Mipmap D3D12_FORMAT_SUPPORT1_MIP (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MIP (D3D11_FORMAT_SUPPORT)
Mipmap Auto-Generation Note:
D3D12 no longer has a dedicated mipmap generation functionality. Applications must implement it on their own using shaders.


D3D11_FORMAT_SUPPORT_MIP_AUTOGEN (D3D11_FORMAT_SUPPORT)
RenderTarget D3D12_FORMAT_SUPPORT1_RENDER_TARGET (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_RENDER_TARGET (D3D11_FORMAT_SUPPORT)
Blendable RenderTarget D3D12_FORMAT_SUPPORT1_BLENDABLE (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_BLENDABLE (D3D11_FORMAT_SUPPORT)
Output Merger Logic Op D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP (D3D11_FORMAT_SUPPORT2)
Depth/Stencil Target D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DEPTH_STENCIL (D3D11_FORMAT_SUPPORT)
Raw UAV and SRV
Structured UAV and SRV
Typed UAV D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW (D3D11_FORMAT_SUPPORT)
UAV Typed Store D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE (D3D11_FORMAT_SUPPORT2)
UAV Typed Load D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD (D3D11_FORMAT_SUPPORT2)
UAV Atomic Add D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD (D3D11_FORMAT_SUPPORT2)
UAV Atomic Bitwise Ops D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS (D3D11_FORMAT_SUPPORT2)
UAV Atomic Cmp&Store/ Cmp&Exch D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE (D3D11_FORMAT_SUPPORT2)
UAV Atomic Exchange D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE (D3D11_FORMAT_SUPPORT2)
UAV Atomic Signed Min/Max D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX (D3D11_FORMAT_SUPPORT2)
UAV Atomic Unsigned Min/Max D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX (D3D11_FORMAT_SUPPORT2)
CPU Lockable Note:
Only a single format precludes cpu access (420_OPAQUE).


D3D11_FORMAT_SUPPORT_CPU_LOCKABLE (D3D11_FORMAT_SUPPORT)
4x Multisample RenderTarget D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET (D3D11_FORMAT_SUPPORT)
8x Multisample RenderTarget D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET (D3D11_FORMAT_SUPPORT)
Other Multisample Count RT D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET (D3D11_FORMAT_SUPPORT)
Multisample Resolve D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE (D3D11_FORMAT_SUPPORT)
Multisample Load D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD (D3D11_FORMAT_SUPPORT)
Display Scan-Out D3D12_FORMAT_SUPPORT1_DISPLAY (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DISPLAY (D3D11_FORMAT_SUPPORT)
Cast Within Bit Layout D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT (D3D11_FORMAT_SUPPORT)
Video Decoder Support D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DECODER_OUTPUT (D3D11_FORMAT_SUPPORT)
Video Processor Input D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT (D3D11_FORMAT_SUPPORT)
Video Processor Output D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT (D3D11_FORMAT_SUPPORT)
Shared Resource Note:
Textures of all formats may be shared committed resources or be placed in shared heaps.


D3D11_FORMAT_SUPPORT2_SHAREABLE (D3D11_FORMAT_SUPPORT2)
BackBuffer Castable Even Fully Typed D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST (D3D12_FORMAT_SUPPORT1) Note:
No API available.


Tiled Resource D3D12_FORMAT_SUPPORT2_TILED (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_TILED (D3D11_FORMAT_SUPPORT2)
Video Encoder D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER(D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_VIDEO_ENCODER (D3D11_FORMAT_SUPPORT)
Multiplane Overlay D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY (D3D11_FORMAT_SUPPORT2)

D3D12 Hardware Feature Levels

DXGI_FORMAT

D3D11_FORMAT_SUPPORT

D3D11_FORMAT_SUPPORT2

Programming Guide for DXGI