Bagikan melalui


Memeriksa Dukungan Fitur Perangkat Keras

Bagian ini mencakup cara memeriksa Dukungan Format untuk Perangkat Keras Tingkat Fitur Direct3D menggunakan panggilan API.

Untuk D3D11, gunakan ID3D11Device::CheckFormatSupport untuk memverifikasi info secara terprogram di bagian sebelumnya. Untuk D3D12 gunakan ID3D12::CheckFeatureSupport.

Format target D3D12 D3D11
Buffer D3D12_FORMAT_SUPPORT1_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_BUFFER (D3D11_FORMAT_SUPPORT)
Buffer Vertex Perakitan Input D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER (D3D11_FORMAT_SUPPORT)
Buffer Indeks Perakitan Input D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER (D3D11_FORMAT_SUPPORT)
Buffer Output Aliran 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)
Sampel shader (filter apa pun) D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_SAMPLE (D3D11_FORMAT_SUPPORT)
Sample_c shader (filter perbandingan) D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON (D3D11_FORMAT_SUPPORT)
Sampel shader (1_bit_filter mono) 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)
Pembuatan Otomatis Mipmap Catatan:
D3D12 tidak lagi memiliki fungsionalitas pembuatan mipmap khusus. Aplikasi harus menerapkannya sendiri menggunakan shader.


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)
Target Kedalaman/Stensil D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DEPTH_STENCIL (D3D11_FORMAT_SUPPORT)
UAV mentah dan SRV
UAV dan SRV Terstruktur
Jenis UAV D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW (D3D11_FORMAT_SUPPORT)
Penyimpanan Berjenis UAV D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE (D3D11_FORMAT_SUPPORT2)
Beban Berjenis UAV D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD (D3D11_FORMAT_SUPPORT2)
Tambahkan Atom UAV D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD (D3D12_FORMAT_SUPPORT2) D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD (D3D11_FORMAT_SUPPORT2)
Operasi Bitwise Atom UAV 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)
Pertukaran Atom UAV 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 Dapat Dikunci Catatan:
Hanya satu format yang menghalangi akses cpu (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)
Multisample Count RT Lainnya D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET (D3D11_FORMAT_SUPPORT)
Penyelesaian Multisample D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE (D3D11_FORMAT_SUPPORT)
Beban Multisample D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD (D3D11_FORMAT_SUPPORT)
Tampilkan Scan-Out D3D12_FORMAT_SUPPORT1_DISPLAY (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DISPLAY (D3D11_FORMAT_SUPPORT)
Transmisikan Dalam Tata Letak Bit D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT (D3D11_FORMAT_SUPPORT)
Dukungan Decoder Video D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_DECODER_OUTPUT (D3D11_FORMAT_SUPPORT)
Input Prosesor Video D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT (D3D11_FORMAT_SUPPORT)
Output Prosesor Video D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT (D3D12_FORMAT_SUPPORT1) D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT (D3D11_FORMAT_SUPPORT)
Sumber Daya Bersama Catatan:
Tekstur semua format dapat menjadi sumber daya berkomitmen bersama atau ditempatkan dalam tumpukan bersama.


D3D11_FORMAT_SUPPORT2_SHAREABLE (D3D11_FORMAT_SUPPORT2)
BackBuffer Castable Bahkan Sepenuhnya Diketik D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST (D3D12_FORMAT_SUPPORT1) Catatan:
Tidak ada API yang tersedia.


Sumber Daya Ubin 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)

Tingkat Fitur Perangkat Keras D3D12

DXGI_FORMAT

D3D11_FORMAT_SUPPORT

D3D11_FORMAT_SUPPORT2

Panduan Pemrograman untuk DXGI