ホーム › Graphics.Direct3D12 › D3D12_FEATURE_DATA_D3D12_OPTIONS21
D3D12_FEATURE_DATA_D3D12_OPTIONS21
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| WorkGraphsTier | D3D12_WORK_GRAPHS_TIER | 4 | +0 | +0 | ワークグラフのサポート階層。 |
| ExecuteIndirectTier | D3D12_EXECUTE_INDIRECT_TIER | 4 | +4 | +4 | ExecuteIndirectのサポート階層。 |
| SampleCmpGradientAndBiasSupported | BOOL | 4 | +8 | +8 | 勾配/バイアス付きSampleCmpに対応するか。 |
| ExtendedCommandInfoSupported | BOOL | 4 | +12 | +12 | 拡張コマンド情報に対応するか。 |
各言語での定義
#include <windows.h>
// D3D12_FEATURE_DATA_D3D12_OPTIONS21 (x64 16 / x86 16 バイト)
typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS21 {
D3D12_WORK_GRAPHS_TIER WorkGraphsTier;
D3D12_EXECUTE_INDIRECT_TIER ExecuteIndirectTier;
BOOL SampleCmpGradientAndBiasSupported;
BOOL ExtendedCommandInfoSupported;
} D3D12_FEATURE_DATA_D3D12_OPTIONS21;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_D3D12_OPTIONS21
{
public int WorkGraphsTier;
public int ExecuteIndirectTier;
[MarshalAs(UnmanagedType.Bool)] public bool SampleCmpGradientAndBiasSupported;
[MarshalAs(UnmanagedType.Bool)] public bool ExtendedCommandInfoSupported;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_D3D12_OPTIONS21
Public WorkGraphsTier As Integer
Public ExecuteIndirectTier As Integer
<MarshalAs(UnmanagedType.Bool)> Public SampleCmpGradientAndBiasSupported As Boolean
<MarshalAs(UnmanagedType.Bool)> Public ExtendedCommandInfoSupported As Boolean
End Structureimport ctypes
from ctypes import wintypes
class D3D12_FEATURE_DATA_D3D12_OPTIONS21(ctypes.Structure):
_fields_ = [
("WorkGraphsTier", ctypes.c_int),
("ExecuteIndirectTier", ctypes.c_int),
("SampleCmpGradientAndBiasSupported", wintypes.BOOL),
("ExtendedCommandInfoSupported", wintypes.BOOL),
]#[repr(C)]
pub struct D3D12_FEATURE_DATA_D3D12_OPTIONS21 {
pub WorkGraphsTier: i32,
pub ExecuteIndirectTier: i32,
pub SampleCmpGradientAndBiasSupported: i32,
pub ExtendedCommandInfoSupported: i32,
}import "golang.org/x/sys/windows"
type D3D12_FEATURE_DATA_D3D12_OPTIONS21 struct {
WorkGraphsTier int32
ExecuteIndirectTier int32
SampleCmpGradientAndBiasSupported int32
ExtendedCommandInfoSupported int32
}type
D3D12_FEATURE_DATA_D3D12_OPTIONS21 = record
WorkGraphsTier: Integer;
ExecuteIndirectTier: Integer;
SampleCmpGradientAndBiasSupported: BOOL;
ExtendedCommandInfoSupported: BOOL;
end;const D3D12_FEATURE_DATA_D3D12_OPTIONS21 = extern struct {
WorkGraphsTier: i32,
ExecuteIndirectTier: i32,
SampleCmpGradientAndBiasSupported: i32,
ExtendedCommandInfoSupported: i32,
};type
D3D12_FEATURE_DATA_D3D12_OPTIONS21 {.bycopy.} = object
WorkGraphsTier: int32
ExecuteIndirectTier: int32
SampleCmpGradientAndBiasSupported: int32
ExtendedCommandInfoSupported: int32struct D3D12_FEATURE_DATA_D3D12_OPTIONS21
{
int WorkGraphsTier;
int ExecuteIndirectTier;
int SampleCmpGradientAndBiasSupported;
int ExtendedCommandInfoSupported;
}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_OPTIONS21 サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; WorkGraphsTier : D3D12_WORK_GRAPHS_TIER (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ExecuteIndirectTier : D3D12_EXECUTE_INDIRECT_TIER (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; SampleCmpGradientAndBiasSupported : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ExtendedCommandInfoSupported : BOOL (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_FEATURE_DATA_D3D12_OPTIONS21
#field int WorkGraphsTier
#field int ExecuteIndirectTier
#field bool SampleCmpGradientAndBiasSupported
#field bool ExtendedCommandInfoSupported
#endstruct
stdim st, D3D12_FEATURE_DATA_D3D12_OPTIONS21 ; NSTRUCT 変数を確保
st->WorkGraphsTier = 100
mes "WorkGraphsTier=" + st->WorkGraphsTier