ホーム › Graphics.Direct3D12 › D3D12_FEATURE_DATA_D3D12_OPTIONS
D3D12_FEATURE_DATA_D3D12_OPTIONS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| DoublePrecisionFloatShaderOps | BOOL | 4 | +0 | +0 | 倍精度浮動小数点シェーダー演算に対応するか。 |
| OutputMergerLogicOp | BOOL | 4 | +4 | +4 | 出力マージャ段の論理演算に対応するか。 |
| MinPrecisionSupport | D3D12_SHADER_MIN_PRECISION_SUPPORT | 4 | +8 | +8 | シェーダーの最小精度(10/16bit)サポート状況。 |
| TiledResourcesTier | D3D12_TILED_RESOURCES_TIER | 4 | +12 | +12 | タイルドリソースのサポート階層。 |
| ResourceBindingTier | D3D12_RESOURCE_BINDING_TIER | 4 | +16 | +16 | リソースバインディングのサポート階層。 |
| PSSpecifiedStencilRefSupported | BOOL | 4 | +20 | +20 | ピクセルシェーダーからのステンシル参照値指定に対応するか。 |
| TypedUAVLoadAdditionalFormats | BOOL | 4 | +24 | +24 | 追加フォーマットの型付きUAVロードに対応するか。 |
| ROVsSupported | BOOL | 4 | +28 | +28 | ラスタライザオーダードビュー(ROV)に対応するか。 |
| ConservativeRasterizationTier | D3D12_CONSERVATIVE_RASTERIZATION_TIER | 4 | +32 | +32 | コンサバティブラスタライゼーションのサポート階層。 |
| MaxGPUVirtualAddressBitsPerResource | DWORD | 4 | +36 | +36 | 1リソースあたりのGPU仮想アドレスの最大ビット数。 |
| StandardSwizzle64KBSupported | BOOL | 4 | +40 | +40 | 64KB標準スウィズルテクスチャレイアウトに対応するか。 |
| CrossNodeSharingTier | D3D12_CROSS_NODE_SHARING_TIER | 4 | +44 | +44 | ノード間共有のサポート階層。 |
| CrossAdapterRowMajorTextureSupported | BOOL | 4 | +48 | +48 | アダプタ間の行優先テクスチャ共有に対応するか。 |
| VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation | BOOL | 4 | +52 | +52 | GS無しで任意シェーダーからのVP/RT配列インデックス出力に対応するか。 |
| ResourceHeapTier | D3D12_RESOURCE_HEAP_TIER | 4 | +56 | +56 | リソースヒープのサポート階層。 |
各言語での定義
#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 Structureimport 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: int32struct 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