Win32 API 日本語リファレンス
ホームGraphics.Direct3D12 › D3D12_FEATURE_DATA_D3D12_OPTIONS

D3D12_FEATURE_DATA_D3D12_OPTIONS

構造体
サイズx64: 60 バイト / x86: 60 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
DoublePrecisionFloatShaderOpsBOOL4+0+0

シェーダー操作で double 型を使用できるかどうかを指定します。 TRUE の場合は double 型を使用でき、それ以外の場合は FALSE です。 サポートされる操作は、Direct3D 11 の D3D11_FEATURE_DATA_D3D11_OPTIONS 構造体の ExtendedDoublesShaderInstructions メンバーと同等です。

double 型を使用してコンパイルされた HLSL シェーダーを使用するには、ランタイムが DoublePrecisionFloatShaderOpsTRUE に設定していなければなりません。

OutputMergerLogicOpBOOL4+4+4ブレンド ステートで論理演算を使用できるかどうかを指定します。ランタイムは、ブレンド ステートで論理演算を使用できる場合はこのメンバーを TRUE に、それ以外の場合は FALSE に設定します。このメンバーは、機能レベル 9.1、9.2、9.3 では FALSE です。 機能レベル 10、10.1、11 では省略可能です。 機能レベル 11.1 および 12 では TRUE です。
MinPrecisionSupportD3D12_SHADER_MIN_PRECISION_SUPPORT4+8+8ビット単位のOR演算で組み合わせた D3D12_SHADER_MIN_PRECISION_SUPPORT 型の値の組み合わせです。結果の値は、ドライバーが各シェーダー ステージに対してサポートする最小精度レベルを指定します。値が 0 の場合、ドライバーはすべてのシェーダー ステージで完全な 32 ビット精度のみをサポートします。
TiledResourcesTierD3D12_TILED_RESOURCES_TIER4+12+12ハードウェアとドライバーがタイル化リソースをサポートするかどうかを指定します。ランタイムは、ハードウェアとドライバーがタイル化リソースをサポートするかどうか、およびそのティア レベルを示す D3D12_TILED_RESOURCES_TIER 型の値をこのメンバーに設定します。
ResourceBindingTierD3D12_RESOURCE_BINDING_TIER4+16+16ハードウェアとドライバーがリソース バインディングをサポートするレベルを指定します。ランタイムは、ティア レベルを示す D3D12_RESOURCE_BINDING_TIER 型の値をこのメンバーに設定します。
PSSpecifiedStencilRefSupportedBOOL4+20+20ピクセル シェーダーによるステンシル参照値の指定がサポートされるかどうかを指定します。TRUE の場合はサポートされ、それ以外の場合は FALSE です。
TypedUAVLoadAdditionalFormatsBOOL4+24+24型指定されたアンオーダード アクセス ビュー (UAV) に対する追加フォーマットの読み込みがサポートされるかどうかを指定します。 TRUE の場合はサポートされ、それ以外の場合は FALSE です。
ROVsSupportedBOOL4+28+28Rasterizer Order Views (ROV) がサポートされるかどうかを指定します。TRUE の場合はサポートされ、それ以外の場合は FALSE です。
ConservativeRasterizationTierD3D12_CONSERVATIVE_RASTERIZATION_TIER4+32+32ハードウェアとドライバーが保守的ラスタライズをサポートするレベルを指定します。ランタイムは、ティア レベルを示す D3D12_CONSERVATIVE_RASTERIZATION_TIER 型の値をこのメンバーに設定します。
MaxGPUVirtualAddressBitsPerResourceDWORD4+36+36このフィールドは使用しないでください。代わりに、より正確な D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT クエリ (MaxGPUVirtualAddressBitsPerResource メンバーを持つ構造体) を使用してください。
StandardSwizzle64KBSupportedBOOL4+40+40ハードウェアが 64KB 標準スウィズル パターンのテクスチャをサポートする場合は TRUE です。 このパターンをサポートすることで、ゼロコピーによるテクスチャの最適化が可能になり、同時にテクスチャ内の各次元についてほぼ等方的な局所性が得られます。 テクスチャ スウィズルのオプションと制限については、D3D12_TEXTURE_LAYOUT を参照してください。
CrossNodeSharingTierD3D12_CROSS_NODE_SHARING_TIER4+44+44複数のノードを持つアダプターのノード間における共有レベル (Tier 1 Emulated、Tier 1、Tier 2 など) を指定する D3D12_CROSS_NODE_SHARING_TIER 列挙型の定数です。
CrossAdapterRowMajorTextureSupportedBOOL4+48+48FALSE は、デバイスがアダプター間の行優先テクスチャに対するコピー操作のみをサポートすることを意味します。 TRUE は、デバイスがアダプター間の行優先テクスチャのシェーダー リソース ビュー、アンオーダード アクセス ビュー、およびレンダー ターゲット ビューをサポートすることを意味します。 「アダプター間 (Cross-adapter)」とは、(異なる IHV 製であっても) 複数のアダプターの間を指します。
VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulationBOOL4+52+52ラスタライザーにデータを供給する任意のシェーダーからのビューポート (VP) 配列インデックスおよびレンダー ターゲット (RT) 配列インデックスが、ジオメトリ シェーダーによるエミュレーションなしでサポートされるかどうかを示します。 D3D11_FEATURE_DATA_D3D11_OPTIONS3 構造体の VPAndRTArrayIndexFromAnyShaderFeedingRasterizer メンバーと比較してください。 ID3D12ShaderReflection::GetRequiresFlags では、#define D3D_SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER を参照してください。
ResourceHeapTierD3D12_RESOURCE_HEAP_TIER4+56+56ハードウェアとドライバーが、リソースの種類に関連するヒープの属性付けを必要とするレベルを指定します。 ランタイムは、このメンバーに D3D12_RESOURCE_HEAP_TIER 列挙型の定数を設定します。

公式ドキュメント

現在のグラフィックス ドライバーにおける Direct3D 12 の機能オプションについて説明します。

解説(Remarks)

D3D12_FEATURE を参照してください。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での定義

#include <windows.h>

// D3D12_FEATURE_DATA_D3D12_OPTIONS  (x64 60 / x86 60 バイト)
typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS {
    BOOL DoublePrecisionFloatShaderOps;
    BOOL OutputMergerLogicOp;
    D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport;
    D3D12_TILED_RESOURCES_TIER TiledResourcesTier;
    D3D12_RESOURCE_BINDING_TIER ResourceBindingTier;
    BOOL PSSpecifiedStencilRefSupported;
    BOOL TypedUAVLoadAdditionalFormats;
    BOOL ROVsSupported;
    D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier;
    DWORD MaxGPUVirtualAddressBitsPerResource;
    BOOL StandardSwizzle64KBSupported;
    D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier;
    BOOL CrossAdapterRowMajorTextureSupported;
    BOOL VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation;
    D3D12_RESOURCE_HEAP_TIER ResourceHeapTier;
} D3D12_FEATURE_DATA_D3D12_OPTIONS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_D3D12_OPTIONS
{
    [MarshalAs(UnmanagedType.Bool)] public bool DoublePrecisionFloatShaderOps;
    [MarshalAs(UnmanagedType.Bool)] public bool OutputMergerLogicOp;
    public int MinPrecisionSupport;
    public int TiledResourcesTier;
    public int ResourceBindingTier;
    [MarshalAs(UnmanagedType.Bool)] public bool PSSpecifiedStencilRefSupported;
    [MarshalAs(UnmanagedType.Bool)] public bool TypedUAVLoadAdditionalFormats;
    [MarshalAs(UnmanagedType.Bool)] public bool ROVsSupported;
    public int ConservativeRasterizationTier;
    public uint MaxGPUVirtualAddressBitsPerResource;
    [MarshalAs(UnmanagedType.Bool)] public bool StandardSwizzle64KBSupported;
    public int CrossNodeSharingTier;
    [MarshalAs(UnmanagedType.Bool)] public bool CrossAdapterRowMajorTextureSupported;
    [MarshalAs(UnmanagedType.Bool)] public bool VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation;
    public int ResourceHeapTier;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_D3D12_OPTIONS
    <MarshalAs(UnmanagedType.Bool)> Public DoublePrecisionFloatShaderOps As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public OutputMergerLogicOp As Boolean
    Public MinPrecisionSupport As Integer
    Public TiledResourcesTier As Integer
    Public ResourceBindingTier As Integer
    <MarshalAs(UnmanagedType.Bool)> Public PSSpecifiedStencilRefSupported As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public TypedUAVLoadAdditionalFormats As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public ROVsSupported As Boolean
    Public ConservativeRasterizationTier As Integer
    Public MaxGPUVirtualAddressBitsPerResource As UInteger
    <MarshalAs(UnmanagedType.Bool)> Public StandardSwizzle64KBSupported As Boolean
    Public CrossNodeSharingTier As Integer
    <MarshalAs(UnmanagedType.Bool)> Public CrossAdapterRowMajorTextureSupported As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation As Boolean
    Public ResourceHeapTier As Integer
End Structure
import ctypes
from ctypes import wintypes

class D3D12_FEATURE_DATA_D3D12_OPTIONS(ctypes.Structure):
    _fields_ = [
        ("DoublePrecisionFloatShaderOps", wintypes.BOOL),
        ("OutputMergerLogicOp", wintypes.BOOL),
        ("MinPrecisionSupport", ctypes.c_int),
        ("TiledResourcesTier", ctypes.c_int),
        ("ResourceBindingTier", ctypes.c_int),
        ("PSSpecifiedStencilRefSupported", wintypes.BOOL),
        ("TypedUAVLoadAdditionalFormats", wintypes.BOOL),
        ("ROVsSupported", wintypes.BOOL),
        ("ConservativeRasterizationTier", ctypes.c_int),
        ("MaxGPUVirtualAddressBitsPerResource", wintypes.DWORD),
        ("StandardSwizzle64KBSupported", wintypes.BOOL),
        ("CrossNodeSharingTier", ctypes.c_int),
        ("CrossAdapterRowMajorTextureSupported", wintypes.BOOL),
        ("VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation", wintypes.BOOL),
        ("ResourceHeapTier", ctypes.c_int),
    ]
#[repr(C)]
pub struct D3D12_FEATURE_DATA_D3D12_OPTIONS {
    pub DoublePrecisionFloatShaderOps: i32,
    pub OutputMergerLogicOp: i32,
    pub MinPrecisionSupport: i32,
    pub TiledResourcesTier: i32,
    pub ResourceBindingTier: i32,
    pub PSSpecifiedStencilRefSupported: i32,
    pub TypedUAVLoadAdditionalFormats: i32,
    pub ROVsSupported: i32,
    pub ConservativeRasterizationTier: i32,
    pub MaxGPUVirtualAddressBitsPerResource: u32,
    pub StandardSwizzle64KBSupported: i32,
    pub CrossNodeSharingTier: i32,
    pub CrossAdapterRowMajorTextureSupported: i32,
    pub VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation: i32,
    pub ResourceHeapTier: i32,
}
import "golang.org/x/sys/windows"

type D3D12_FEATURE_DATA_D3D12_OPTIONS struct {
	DoublePrecisionFloatShaderOps int32
	OutputMergerLogicOp int32
	MinPrecisionSupport int32
	TiledResourcesTier int32
	ResourceBindingTier int32
	PSSpecifiedStencilRefSupported int32
	TypedUAVLoadAdditionalFormats int32
	ROVsSupported int32
	ConservativeRasterizationTier int32
	MaxGPUVirtualAddressBitsPerResource uint32
	StandardSwizzle64KBSupported int32
	CrossNodeSharingTier int32
	CrossAdapterRowMajorTextureSupported int32
	VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation int32
	ResourceHeapTier int32
}
type
  D3D12_FEATURE_DATA_D3D12_OPTIONS = record
    DoublePrecisionFloatShaderOps: BOOL;
    OutputMergerLogicOp: BOOL;
    MinPrecisionSupport: Integer;
    TiledResourcesTier: Integer;
    ResourceBindingTier: Integer;
    PSSpecifiedStencilRefSupported: BOOL;
    TypedUAVLoadAdditionalFormats: BOOL;
    ROVsSupported: BOOL;
    ConservativeRasterizationTier: Integer;
    MaxGPUVirtualAddressBitsPerResource: DWORD;
    StandardSwizzle64KBSupported: BOOL;
    CrossNodeSharingTier: Integer;
    CrossAdapterRowMajorTextureSupported: BOOL;
    VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation: BOOL;
    ResourceHeapTier: Integer;
  end;
const D3D12_FEATURE_DATA_D3D12_OPTIONS = extern struct {
    DoublePrecisionFloatShaderOps: i32,
    OutputMergerLogicOp: i32,
    MinPrecisionSupport: i32,
    TiledResourcesTier: i32,
    ResourceBindingTier: i32,
    PSSpecifiedStencilRefSupported: i32,
    TypedUAVLoadAdditionalFormats: i32,
    ROVsSupported: i32,
    ConservativeRasterizationTier: i32,
    MaxGPUVirtualAddressBitsPerResource: u32,
    StandardSwizzle64KBSupported: i32,
    CrossNodeSharingTier: i32,
    CrossAdapterRowMajorTextureSupported: i32,
    VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation: i32,
    ResourceHeapTier: i32,
};
type
  D3D12_FEATURE_DATA_D3D12_OPTIONS {.bycopy.} = object
    DoublePrecisionFloatShaderOps: int32
    OutputMergerLogicOp: int32
    MinPrecisionSupport: int32
    TiledResourcesTier: int32
    ResourceBindingTier: int32
    PSSpecifiedStencilRefSupported: int32
    TypedUAVLoadAdditionalFormats: int32
    ROVsSupported: int32
    ConservativeRasterizationTier: int32
    MaxGPUVirtualAddressBitsPerResource: uint32
    StandardSwizzle64KBSupported: int32
    CrossNodeSharingTier: int32
    CrossAdapterRowMajorTextureSupported: int32
    VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation: int32
    ResourceHeapTier: int32
struct D3D12_FEATURE_DATA_D3D12_OPTIONS
{
    int DoublePrecisionFloatShaderOps;
    int OutputMergerLogicOp;
    int MinPrecisionSupport;
    int TiledResourcesTier;
    int ResourceBindingTier;
    int PSSpecifiedStencilRefSupported;
    int TypedUAVLoadAdditionalFormats;
    int ROVsSupported;
    int ConservativeRasterizationTier;
    uint MaxGPUVirtualAddressBitsPerResource;
    int StandardSwizzle64KBSupported;
    int CrossNodeSharingTier;
    int CrossAdapterRowMajorTextureSupported;
    int VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation;
    int ResourceHeapTier;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_D3D12_OPTIONS サイズ: 60 バイト(x64)
dim st, 15    ; 4byte整数×15(構造体サイズ 60 / 4 切り上げ)
; DoublePrecisionFloatShaderOps : BOOL (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; OutputMergerLogicOp : BOOL (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; MinPrecisionSupport : D3D12_SHADER_MIN_PRECISION_SUPPORT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; TiledResourcesTier : D3D12_TILED_RESOURCES_TIER (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ResourceBindingTier : D3D12_RESOURCE_BINDING_TIER (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; PSSpecifiedStencilRefSupported : BOOL (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; TypedUAVLoadAdditionalFormats : BOOL (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; ROVsSupported : BOOL (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; ConservativeRasterizationTier : D3D12_CONSERVATIVE_RASTERIZATION_TIER (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; MaxGPUVirtualAddressBitsPerResource : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; StandardSwizzle64KBSupported : BOOL (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; CrossNodeSharingTier : D3D12_CROSS_NODE_SHARING_TIER (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; CrossAdapterRowMajorTextureSupported : BOOL (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation : BOOL (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; ResourceHeapTier : D3D12_RESOURCE_HEAP_TIER (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_FEATURE_DATA_D3D12_OPTIONS
    #field bool DoublePrecisionFloatShaderOps
    #field bool OutputMergerLogicOp
    #field int MinPrecisionSupport
    #field int TiledResourcesTier
    #field int ResourceBindingTier
    #field bool PSSpecifiedStencilRefSupported
    #field bool TypedUAVLoadAdditionalFormats
    #field bool ROVsSupported
    #field int ConservativeRasterizationTier
    #field int MaxGPUVirtualAddressBitsPerResource
    #field bool StandardSwizzle64KBSupported
    #field int CrossNodeSharingTier
    #field bool CrossAdapterRowMajorTextureSupported
    #field bool VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation
    #field int ResourceHeapTier
#endstruct

stdim st, D3D12_FEATURE_DATA_D3D12_OPTIONS        ; NSTRUCT 変数を確保
st->DoublePrecisionFloatShaderOps = 100
mes "DoublePrecisionFloatShaderOps=" + st->DoublePrecisionFloatShaderOps