ホーム › Graphics.Direct3D11 › D3D11_FEATURE_DATA_D3D11_OPTIONS2
D3D11_FEATURE_DATA_D3D11_OPTIONS2
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| PSSpecifiedStencilRefSupported | BOOL | 4 | +0 | +0 | ピクセルシェーダーからのステンシル参照値出力をサポートするか。TRUEで対応。 |
| TypedUAVLoadAdditionalFormats | BOOL | 4 | +4 | +4 | 型付きUAVロードで追加フォーマットをサポートするか。TRUEで対応。 |
| ROVsSupported | BOOL | 4 | +8 | +8 | ラスタライザー順序ビュー(ROV)をサポートするか。TRUEで対応。 |
| ConservativeRasterizationTier | D3D11_CONSERVATIVE_RASTERIZATION_TIER | 4 | +12 | +12 | コンサバティブラスタライゼーションの対応階層を示すD3D11_CONSERVATIVE_RASTERIZATION_TIER列挙値。 |
| TiledResourcesTier | D3D11_TILED_RESOURCES_TIER | 4 | +16 | +16 | タイルリソースの対応階層を示すD3D11_TILED_RESOURCES_TIER列挙値。 |
| MapOnDefaultTextures | BOOL | 4 | +20 | +20 | DEFAULT使用法のテクスチャへのMapをサポートするか。TRUEで対応。 |
| StandardSwizzle | BOOL | 4 | +24 | +24 | 標準スウィズルレイアウトをサポートするか。TRUEで対応。 |
| UnifiedMemoryArchitecture | BOOL | 4 | +28 | +28 | CPUとGPUがメモリを共有するUMAかどうか。TRUEで該当。 |
各言語での定義
#include <windows.h>
// D3D11_FEATURE_DATA_D3D11_OPTIONS2 (x64 32 / x86 32 バイト)
typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS2 {
BOOL PSSpecifiedStencilRefSupported;
BOOL TypedUAVLoadAdditionalFormats;
BOOL ROVsSupported;
D3D11_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier;
D3D11_TILED_RESOURCES_TIER TiledResourcesTier;
BOOL MapOnDefaultTextures;
BOOL StandardSwizzle;
BOOL UnifiedMemoryArchitecture;
} D3D11_FEATURE_DATA_D3D11_OPTIONS2;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D11_FEATURE_DATA_D3D11_OPTIONS2
{
[MarshalAs(UnmanagedType.Bool)] public bool PSSpecifiedStencilRefSupported;
[MarshalAs(UnmanagedType.Bool)] public bool TypedUAVLoadAdditionalFormats;
[MarshalAs(UnmanagedType.Bool)] public bool ROVsSupported;
public int ConservativeRasterizationTier;
public int TiledResourcesTier;
[MarshalAs(UnmanagedType.Bool)] public bool MapOnDefaultTextures;
[MarshalAs(UnmanagedType.Bool)] public bool StandardSwizzle;
[MarshalAs(UnmanagedType.Bool)] public bool UnifiedMemoryArchitecture;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D11_FEATURE_DATA_D3D11_OPTIONS2
<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 TiledResourcesTier As Integer
<MarshalAs(UnmanagedType.Bool)> Public MapOnDefaultTextures As Boolean
<MarshalAs(UnmanagedType.Bool)> Public StandardSwizzle As Boolean
<MarshalAs(UnmanagedType.Bool)> Public UnifiedMemoryArchitecture As Boolean
End Structureimport ctypes
from ctypes import wintypes
class D3D11_FEATURE_DATA_D3D11_OPTIONS2(ctypes.Structure):
_fields_ = [
("PSSpecifiedStencilRefSupported", wintypes.BOOL),
("TypedUAVLoadAdditionalFormats", wintypes.BOOL),
("ROVsSupported", wintypes.BOOL),
("ConservativeRasterizationTier", ctypes.c_int),
("TiledResourcesTier", ctypes.c_int),
("MapOnDefaultTextures", wintypes.BOOL),
("StandardSwizzle", wintypes.BOOL),
("UnifiedMemoryArchitecture", wintypes.BOOL),
]#[repr(C)]
pub struct D3D11_FEATURE_DATA_D3D11_OPTIONS2 {
pub PSSpecifiedStencilRefSupported: i32,
pub TypedUAVLoadAdditionalFormats: i32,
pub ROVsSupported: i32,
pub ConservativeRasterizationTier: i32,
pub TiledResourcesTier: i32,
pub MapOnDefaultTextures: i32,
pub StandardSwizzle: i32,
pub UnifiedMemoryArchitecture: i32,
}import "golang.org/x/sys/windows"
type D3D11_FEATURE_DATA_D3D11_OPTIONS2 struct {
PSSpecifiedStencilRefSupported int32
TypedUAVLoadAdditionalFormats int32
ROVsSupported int32
ConservativeRasterizationTier int32
TiledResourcesTier int32
MapOnDefaultTextures int32
StandardSwizzle int32
UnifiedMemoryArchitecture int32
}type
D3D11_FEATURE_DATA_D3D11_OPTIONS2 = record
PSSpecifiedStencilRefSupported: BOOL;
TypedUAVLoadAdditionalFormats: BOOL;
ROVsSupported: BOOL;
ConservativeRasterizationTier: Integer;
TiledResourcesTier: Integer;
MapOnDefaultTextures: BOOL;
StandardSwizzle: BOOL;
UnifiedMemoryArchitecture: BOOL;
end;const D3D11_FEATURE_DATA_D3D11_OPTIONS2 = extern struct {
PSSpecifiedStencilRefSupported: i32,
TypedUAVLoadAdditionalFormats: i32,
ROVsSupported: i32,
ConservativeRasterizationTier: i32,
TiledResourcesTier: i32,
MapOnDefaultTextures: i32,
StandardSwizzle: i32,
UnifiedMemoryArchitecture: i32,
};type
D3D11_FEATURE_DATA_D3D11_OPTIONS2 {.bycopy.} = object
PSSpecifiedStencilRefSupported: int32
TypedUAVLoadAdditionalFormats: int32
ROVsSupported: int32
ConservativeRasterizationTier: int32
TiledResourcesTier: int32
MapOnDefaultTextures: int32
StandardSwizzle: int32
UnifiedMemoryArchitecture: int32struct D3D11_FEATURE_DATA_D3D11_OPTIONS2
{
int PSSpecifiedStencilRefSupported;
int TypedUAVLoadAdditionalFormats;
int ROVsSupported;
int ConservativeRasterizationTier;
int TiledResourcesTier;
int MapOnDefaultTextures;
int StandardSwizzle;
int UnifiedMemoryArchitecture;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D11_FEATURE_DATA_D3D11_OPTIONS2 サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; PSSpecifiedStencilRefSupported : BOOL (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; TypedUAVLoadAdditionalFormats : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ROVsSupported : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ConservativeRasterizationTier : D3D11_CONSERVATIVE_RASTERIZATION_TIER (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; TiledResourcesTier : D3D11_TILED_RESOURCES_TIER (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; MapOnDefaultTextures : BOOL (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; StandardSwizzle : BOOL (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; UnifiedMemoryArchitecture : BOOL (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D11_FEATURE_DATA_D3D11_OPTIONS2
#field bool PSSpecifiedStencilRefSupported
#field bool TypedUAVLoadAdditionalFormats
#field bool ROVsSupported
#field int ConservativeRasterizationTier
#field int TiledResourcesTier
#field bool MapOnDefaultTextures
#field bool StandardSwizzle
#field bool UnifiedMemoryArchitecture
#endstruct
stdim st, D3D11_FEATURE_DATA_D3D11_OPTIONS2 ; NSTRUCT 変数を確保
st->PSSpecifiedStencilRefSupported = 100
mes "PSSpecifiedStencilRefSupported=" + st->PSSpecifiedStencilRefSupported