ホーム › Graphics.Direct3D12 › D3D12_FEATURE_DATA_D3D12_OPTIONS3
D3D12_FEATURE_DATA_D3D12_OPTIONS3
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| CopyQueueTimestampQueriesSupported | BOOL | 4 | +0 | +0 | コピーキューでのタイムスタンプクエリに対応するか。 |
| CastingFullyTypedFormatSupported | BOOL | 4 | +4 | +4 | 完全型付きフォーマットのキャストに対応するか。 |
| WriteBufferImmediateSupportFlags | D3D12_COMMAND_LIST_SUPPORT_FLAGS | 4 | +8 | +8 | WriteBufferImmediate対応コマンドリスト種別のフラグ群。 |
| ViewInstancingTier | D3D12_VIEW_INSTANCING_TIER | 4 | +12 | +12 | ビューインスタンシングのサポート階層。 |
| BarycentricsSupported | BOOL | 4 | +16 | +16 | シェーダー内のバリセントリック座標取得に対応するか。 |
各言語での定義
#include <windows.h>
// D3D12_FEATURE_DATA_D3D12_OPTIONS3 (x64 20 / x86 20 バイト)
typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS3 {
BOOL CopyQueueTimestampQueriesSupported;
BOOL CastingFullyTypedFormatSupported;
D3D12_COMMAND_LIST_SUPPORT_FLAGS WriteBufferImmediateSupportFlags;
D3D12_VIEW_INSTANCING_TIER ViewInstancingTier;
BOOL BarycentricsSupported;
} D3D12_FEATURE_DATA_D3D12_OPTIONS3;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_D3D12_OPTIONS3
{
[MarshalAs(UnmanagedType.Bool)] public bool CopyQueueTimestampQueriesSupported;
[MarshalAs(UnmanagedType.Bool)] public bool CastingFullyTypedFormatSupported;
public int WriteBufferImmediateSupportFlags;
public int ViewInstancingTier;
[MarshalAs(UnmanagedType.Bool)] public bool BarycentricsSupported;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_D3D12_OPTIONS3
<MarshalAs(UnmanagedType.Bool)> Public CopyQueueTimestampQueriesSupported As Boolean
<MarshalAs(UnmanagedType.Bool)> Public CastingFullyTypedFormatSupported As Boolean
Public WriteBufferImmediateSupportFlags As Integer
Public ViewInstancingTier As Integer
<MarshalAs(UnmanagedType.Bool)> Public BarycentricsSupported As Boolean
End Structureimport ctypes
from ctypes import wintypes
class D3D12_FEATURE_DATA_D3D12_OPTIONS3(ctypes.Structure):
_fields_ = [
("CopyQueueTimestampQueriesSupported", wintypes.BOOL),
("CastingFullyTypedFormatSupported", wintypes.BOOL),
("WriteBufferImmediateSupportFlags", ctypes.c_int),
("ViewInstancingTier", ctypes.c_int),
("BarycentricsSupported", wintypes.BOOL),
]#[repr(C)]
pub struct D3D12_FEATURE_DATA_D3D12_OPTIONS3 {
pub CopyQueueTimestampQueriesSupported: i32,
pub CastingFullyTypedFormatSupported: i32,
pub WriteBufferImmediateSupportFlags: i32,
pub ViewInstancingTier: i32,
pub BarycentricsSupported: i32,
}import "golang.org/x/sys/windows"
type D3D12_FEATURE_DATA_D3D12_OPTIONS3 struct {
CopyQueueTimestampQueriesSupported int32
CastingFullyTypedFormatSupported int32
WriteBufferImmediateSupportFlags int32
ViewInstancingTier int32
BarycentricsSupported int32
}type
D3D12_FEATURE_DATA_D3D12_OPTIONS3 = record
CopyQueueTimestampQueriesSupported: BOOL;
CastingFullyTypedFormatSupported: BOOL;
WriteBufferImmediateSupportFlags: Integer;
ViewInstancingTier: Integer;
BarycentricsSupported: BOOL;
end;const D3D12_FEATURE_DATA_D3D12_OPTIONS3 = extern struct {
CopyQueueTimestampQueriesSupported: i32,
CastingFullyTypedFormatSupported: i32,
WriteBufferImmediateSupportFlags: i32,
ViewInstancingTier: i32,
BarycentricsSupported: i32,
};type
D3D12_FEATURE_DATA_D3D12_OPTIONS3 {.bycopy.} = object
CopyQueueTimestampQueriesSupported: int32
CastingFullyTypedFormatSupported: int32
WriteBufferImmediateSupportFlags: int32
ViewInstancingTier: int32
BarycentricsSupported: int32struct D3D12_FEATURE_DATA_D3D12_OPTIONS3
{
int CopyQueueTimestampQueriesSupported;
int CastingFullyTypedFormatSupported;
int WriteBufferImmediateSupportFlags;
int ViewInstancingTier;
int BarycentricsSupported;
}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_OPTIONS3 サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; CopyQueueTimestampQueriesSupported : BOOL (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; CastingFullyTypedFormatSupported : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; WriteBufferImmediateSupportFlags : D3D12_COMMAND_LIST_SUPPORT_FLAGS (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ViewInstancingTier : D3D12_VIEW_INSTANCING_TIER (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; BarycentricsSupported : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_FEATURE_DATA_D3D12_OPTIONS3
#field bool CopyQueueTimestampQueriesSupported
#field bool CastingFullyTypedFormatSupported
#field int WriteBufferImmediateSupportFlags
#field int ViewInstancingTier
#field bool BarycentricsSupported
#endstruct
stdim st, D3D12_FEATURE_DATA_D3D12_OPTIONS3 ; NSTRUCT 変数を確保
st->CopyQueueTimestampQueriesSupported = 100
mes "CopyQueueTimestampQueriesSupported=" + st->CopyQueueTimestampQueriesSupported