ホーム › Graphics.Direct3D12 › D3D12_FEATURE_DATA_D3D12_OPTIONS1
D3D12_FEATURE_DATA_D3D12_OPTIONS1
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| WaveOps | BOOL | 4 | +0 | +0 | ウェーブ(SIMD)組み込み演算に対応するか。 |
| WaveLaneCountMin | DWORD | 4 | +4 | +4 | ウェーブあたりの最小レーン数。 |
| WaveLaneCountMax | DWORD | 4 | +8 | +8 | ウェーブあたりの最大レーン数。 |
| TotalLaneCount | DWORD | 4 | +12 | +12 | GPU全体の総レーン数。 |
| ExpandedComputeResourceStates | BOOL | 4 | +16 | +16 | 拡張コンピュートリソースステートに対応するか。 |
| Int64ShaderOps | BOOL | 4 | +20 | +20 | 64ビット整数シェーダー演算に対応するか。 |
各言語での定義
#include <windows.h>
// D3D12_FEATURE_DATA_D3D12_OPTIONS1 (x64 24 / x86 24 バイト)
typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1 {
BOOL WaveOps;
DWORD WaveLaneCountMin;
DWORD WaveLaneCountMax;
DWORD TotalLaneCount;
BOOL ExpandedComputeResourceStates;
BOOL Int64ShaderOps;
} D3D12_FEATURE_DATA_D3D12_OPTIONS1;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
{
[MarshalAs(UnmanagedType.Bool)] public bool WaveOps;
public uint WaveLaneCountMin;
public uint WaveLaneCountMax;
public uint TotalLaneCount;
[MarshalAs(UnmanagedType.Bool)] public bool ExpandedComputeResourceStates;
[MarshalAs(UnmanagedType.Bool)] public bool Int64ShaderOps;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_D3D12_OPTIONS1
<MarshalAs(UnmanagedType.Bool)> Public WaveOps As Boolean
Public WaveLaneCountMin As UInteger
Public WaveLaneCountMax As UInteger
Public TotalLaneCount As UInteger
<MarshalAs(UnmanagedType.Bool)> Public ExpandedComputeResourceStates As Boolean
<MarshalAs(UnmanagedType.Bool)> Public Int64ShaderOps As Boolean
End Structureimport ctypes
from ctypes import wintypes
class D3D12_FEATURE_DATA_D3D12_OPTIONS1(ctypes.Structure):
_fields_ = [
("WaveOps", wintypes.BOOL),
("WaveLaneCountMin", wintypes.DWORD),
("WaveLaneCountMax", wintypes.DWORD),
("TotalLaneCount", wintypes.DWORD),
("ExpandedComputeResourceStates", wintypes.BOOL),
("Int64ShaderOps", wintypes.BOOL),
]#[repr(C)]
pub struct D3D12_FEATURE_DATA_D3D12_OPTIONS1 {
pub WaveOps: i32,
pub WaveLaneCountMin: u32,
pub WaveLaneCountMax: u32,
pub TotalLaneCount: u32,
pub ExpandedComputeResourceStates: i32,
pub Int64ShaderOps: i32,
}import "golang.org/x/sys/windows"
type D3D12_FEATURE_DATA_D3D12_OPTIONS1 struct {
WaveOps int32
WaveLaneCountMin uint32
WaveLaneCountMax uint32
TotalLaneCount uint32
ExpandedComputeResourceStates int32
Int64ShaderOps int32
}type
D3D12_FEATURE_DATA_D3D12_OPTIONS1 = record
WaveOps: BOOL;
WaveLaneCountMin: DWORD;
WaveLaneCountMax: DWORD;
TotalLaneCount: DWORD;
ExpandedComputeResourceStates: BOOL;
Int64ShaderOps: BOOL;
end;const D3D12_FEATURE_DATA_D3D12_OPTIONS1 = extern struct {
WaveOps: i32,
WaveLaneCountMin: u32,
WaveLaneCountMax: u32,
TotalLaneCount: u32,
ExpandedComputeResourceStates: i32,
Int64ShaderOps: i32,
};type
D3D12_FEATURE_DATA_D3D12_OPTIONS1 {.bycopy.} = object
WaveOps: int32
WaveLaneCountMin: uint32
WaveLaneCountMax: uint32
TotalLaneCount: uint32
ExpandedComputeResourceStates: int32
Int64ShaderOps: int32struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
{
int WaveOps;
uint WaveLaneCountMin;
uint WaveLaneCountMax;
uint TotalLaneCount;
int ExpandedComputeResourceStates;
int Int64ShaderOps;
}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_OPTIONS1 サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; WaveOps : BOOL (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; WaveLaneCountMin : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; WaveLaneCountMax : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; TotalLaneCount : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ExpandedComputeResourceStates : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Int64ShaderOps : BOOL (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_FEATURE_DATA_D3D12_OPTIONS1
#field bool WaveOps
#field int WaveLaneCountMin
#field int WaveLaneCountMax
#field int TotalLaneCount
#field bool ExpandedComputeResourceStates
#field bool Int64ShaderOps
#endstruct
stdim st, D3D12_FEATURE_DATA_D3D12_OPTIONS1 ; NSTRUCT 変数を確保
st->WaveOps = 100
mes "WaveOps=" + st->WaveOps