共用方式為


檢查硬體功能支援

本節說明如何使用 API 呼叫來檢查 Direct3D 功能層級硬體的格式支援。

針對 D3D11,請使用 ID3D11Device::CheckFormatSupport ,以程式設計方式驗證上一節中的資訊。 針對 D3D12,請使用 ID3D12::CheckFeatureSupport

格式化目標 D3D12 D3D11
Buffer D3D12_FORMAT_SUPPORT1_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_BUFFER (D3D11_FORMAT_SUPPORT)
輸入組合器頂點緩衝區 D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER (D3D11_FORMAT_SUPPORT)
輸入組合器索引緩衝區 D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER (D3D11_FORMAT_SUPPORT)
資料流程輸出緩衝區 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)
著色器 ld D3D12_FORMAT_SUPPORT1_SHADER_LOAD (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_LOAD (D3D11_FORMAT_SUPPORT)
著色器範例 (任何篩選準則) D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_SAMPLE (D3D11_FORMAT_SUPPORT)
著色器sample_c (比較篩選準則) D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON (D3D11_FORMAT_SUPPORT)
著色器範例 (mono 1_bit_filter) D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT (D3D11_FORMAT_SUPPORT)
著色器收集4 D3D12_FORMAT_SUPPORT1_SHADER_GATHER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_GATHER (D3D11_FORMAT_SUPPORT)
著色器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 自動產生 注意:
D3D12 不再具有專用 Mipmap 產生功能。 應用程式必須使用著色器自行實作。


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)
輸出合併邏輯作業 D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP (D3D11_FORMAT_SUPPORT2)
深度/樣板目標 D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DEPTH_STENCIL (D3D11_FORMAT_SUPPORT)
原始 UAV 和 SRV
結構化 UAV 和 SRV
具類型的 UAV D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW (D3D11_FORMAT_SUPPORT)
UAV 具類型存放區 D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE (D3D11_FORMAT_SUPPORT2)
UAV 具類型載入 D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD (D3D11_FORMAT_SUPPORT2)
UAV 不可部分完成新增 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD (D3D11_FORMAT_SUPPORT2)
UAV 不可部分完成的位 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 不可部分完成的 Exchange D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE (D3D11_FORMAT_SUPPORT2)
UAV 不可部分完成簽署的最小值/最大值 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 可鎖定 注意:
只有單一格式會排除 cpu 存取 (420_OPAQUE) 。


D3D11_FORMAT_SUPPORT_CPU_LOCKABLE (D3D11_FORMAT_SUPPORT)
4x 多重取樣 RenderTarget D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET (D3D11_FORMAT_SUPPORT)
8x 多重取樣 RenderTarget D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET (D3D11_FORMAT_SUPPORT)
其他多重取樣計數 RT D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET (D3D11_FORMAT_SUPPORT)
多重取樣解析 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE (D3D11_FORMAT_SUPPORT)
多重取樣載入 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD (D3D11_FORMAT_SUPPORT)
顯示 Scan-Out D3D12_FORMAT_SUPPORT1_DISPLAY (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DISPLAY (D3D11_FORMAT_SUPPORT)
在位配置內轉換 D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT (D3D11_FORMAT_SUPPORT)
影片解碼器支援 D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DECODER_OUTPUT (D3D11_FORMAT_SUPPORT)
視訊處理器輸入 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT (D3D11_FORMAT_SUPPORT)
視訊處理器輸出 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT (D3D11_FORMAT_SUPPORT)
共用資源 注意:
所有格式的紋理可以是共用認可資源,或放在共用堆積中。


D3D11_FORMAT_SUPPORT2_SHAREABLE (D3D11_FORMAT_SUPPORT2)
BackBuffer 可轉換甚至完全型別 D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST (D3D12_FORMAT_SUPPORT1) 注意:
沒有可用的 API。


磚化資源 D3D12_FORMAT_SUPPORT2_TILED (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_TILED (D3D11_FORMAT_SUPPORT2)
視訊編碼器 D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_VIDEO_ENCODER (D3D11_FORMAT_SUPPORT)
多平面重迭 D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY (D3D11_FORMAT_SUPPORT2)

D3D12 硬體功能層級

DXGI_FORMAT

D3D11_FORMAT_SUPPORT

D3D11_FORMAT_SUPPORT2

DXGI 的程式設計指南