Prise en charge de la fonctionnalité de vérification du matériel
Cette section explique comment case activée sur la prise en charge du format pour le matériel de niveau de fonctionnalité Direct3D à l’aide d’appels d’API.
Pour D3D11, utilisez ID3D11Device::CheckFormatSupport pour vérifier par programmation les informations des sections précédentes. Pour D3D12, utilisez ID3D12::CheckFeatureSupport.
Mettre en forme la cible | D3D12 | D3D11 |
---|---|---|
Buffer | D3D12_FORMAT_SUPPORT1_BUFFER (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_BUFFER (D3D11_FORMAT_SUPPORT) |
Mémoire tampon de vertex de l’assembleur d’entrée | D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER (D3D11_FORMAT_SUPPORT) |
Mémoire tampon d’index de l’assembleur d’entrée | D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER (D3D11_FORMAT_SUPPORT) |
Mémoire tampon de sortie de flux | 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) |
Nuanceur ld | D3D12_FORMAT_SUPPORT1_SHADER_LOAD (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_SHADER_LOAD (D3D11_FORMAT_SUPPORT) |
Exemple de nuanceur (n’importe quel filtre) | D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_SHADER_SAMPLE (D3D11_FORMAT_SUPPORT) |
Nuanceur sample_c (filtre de comparaison) | D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON (D3D11_FORMAT_SUPPORT) |
Exemple de nuanceur (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) |
Gather4_c nuanceur | 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) |
Génération automatique de Mipmap |
Remarque : D3D12 n’a plus de fonctionnalité de génération mipmap dédiée. Les applications doivent l’implémenter elles-mêmes à l’aide de nuanceurs. |
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) |
Opération logique de fusion de sortie | D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP | D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP (D3D11_FORMAT_SUPPORT2) |
Profondeur/cible de gabarit | D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_DEPTH_STENCIL (D3D11_FORMAT_SUPPORT) |
UAV brut et SRV | ||
UAV structuré et SRV | ||
UAV typé | D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW (D3D11_FORMAT_SUPPORT) |
Magasin typé UAV | D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE (D3D12_FORMAT_SUPPORT2) | D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE (D3D11_FORMAT_SUPPORT2) |
Charge typée par UAV | 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) |
Opérations au niveau du bit atomique 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) |
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) |
Verrouillable du processeur |
Remarque : Un seul format empêche l’accès au processeur (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) |
Autres nombres d’échantillons multiples RT | D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET (D3D11_FORMAT_SUPPORT) |
Résolution multiéchantillon | D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE (D3D11_FORMAT_SUPPORT) |
Chargement multi-échantillon | D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD (D3D11_FORMAT_SUPPORT) |
Afficher Scan-Out | D3D12_FORMAT_SUPPORT1_DISPLAY (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_DISPLAY (D3D11_FORMAT_SUPPORT) |
Cast in Bit Layout | D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT (D3D11_FORMAT_SUPPORT) |
Prise en charge du décodeur vidéo | D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_DECODER_OUTPUT (D3D11_FORMAT_SUPPORT) |
Entrée du processeur vidéo | D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT (D3D11_FORMAT_SUPPORT) |
Sortie du processeur vidéo | D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT (D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT (D3D11_FORMAT_SUPPORT) |
Ressource partagée |
Remarque : Les textures de tous les formats peuvent être des ressources validées partagées ou être placées dans des tas partagés. |
D3D11_FORMAT_SUPPORT2_SHAREABLE (D3D11_FORMAT_SUPPORT2) |
BackBuffer Castable même entièrement typé | D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST (D3D12_FORMAT_SUPPORT1) |
Remarque : Aucune API disponible. |
Ressource en mosaïque | D3D12_FORMAT_SUPPORT2_TILED (D3D12_FORMAT_SUPPORT2) | D3D11_FORMAT_SUPPORT2_TILED (D3D11_FORMAT_SUPPORT2) |
Encodeur vidéo | D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER(D3D12_FORMAT_SUPPORT1) | D3D11_FORMAT_SUPPORT_VIDEO_ENCODER (D3D11_FORMAT_SUPPORT) |
Superposition multiplane | D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY (D3D12_FORMAT_SUPPORT2) | D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY (D3D11_FORMAT_SUPPORT2) |