ホーム › Graphics.Direct3D12 › D3D12_NODE_OUTPUT_OVERRIDES
D3D12_NODE_OUTPUT_OVERRIDES
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| OutputIndex | DWORD | 4 | +0 | +0 | 上書き対象とする出力のインデックス。 |
| pNewName | D3D12_NODE_ID* | 8/4 | +8 | +4 | 出力に割り当てる新しいノードID。NULLで変更なし。 |
| pAllowSparseNodes | BOOL* | 8/4 | +16 | +8 | 疎なノードを許可するか否かのBOOLへのポインター。NULLで変更なし。 |
| pMaxRecords | DWORD* | 8/4 | +24 | +12 | 出力レコード数の上限へのポインター。NULLで変更なし。 |
| pMaxRecordsSharedWithOutputIndex | DWORD* | 8/4 | +32 | +16 | レコード数上限を共有する出力インデックスへのポインター。NULLで変更なし。 |
各言語での定義
#include <windows.h>
// D3D12_NODE_OUTPUT_OVERRIDES (x64 40 / x86 20 バイト)
typedef struct D3D12_NODE_OUTPUT_OVERRIDES {
DWORD OutputIndex;
D3D12_NODE_ID* pNewName;
BOOL* pAllowSparseNodes;
DWORD* pMaxRecords;
DWORD* pMaxRecordsSharedWithOutputIndex;
} D3D12_NODE_OUTPUT_OVERRIDES;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_NODE_OUTPUT_OVERRIDES
{
public uint OutputIndex;
public IntPtr pNewName;
[MarshalAs(UnmanagedType.Bool)] public bool pAllowSparseNodes;
public IntPtr pMaxRecords;
public IntPtr pMaxRecordsSharedWithOutputIndex;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_NODE_OUTPUT_OVERRIDES
Public OutputIndex As UInteger
Public pNewName As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public pAllowSparseNodes As Boolean
Public pMaxRecords As IntPtr
Public pMaxRecordsSharedWithOutputIndex As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class D3D12_NODE_OUTPUT_OVERRIDES(ctypes.Structure):
_fields_ = [
("OutputIndex", wintypes.DWORD),
("pNewName", ctypes.c_void_p),
("pAllowSparseNodes", ctypes.c_void_p),
("pMaxRecords", ctypes.c_void_p),
("pMaxRecordsSharedWithOutputIndex", ctypes.c_void_p),
]#[repr(C)]
pub struct D3D12_NODE_OUTPUT_OVERRIDES {
pub OutputIndex: u32,
pub pNewName: *mut core::ffi::c_void,
pub pAllowSparseNodes: *mut core::ffi::c_void,
pub pMaxRecords: *mut core::ffi::c_void,
pub pMaxRecordsSharedWithOutputIndex: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type D3D12_NODE_OUTPUT_OVERRIDES struct {
OutputIndex uint32
pNewName uintptr
pAllowSparseNodes uintptr
pMaxRecords uintptr
pMaxRecordsSharedWithOutputIndex uintptr
}type
D3D12_NODE_OUTPUT_OVERRIDES = record
OutputIndex: DWORD;
pNewName: Pointer;
pAllowSparseNodes: Pointer;
pMaxRecords: Pointer;
pMaxRecordsSharedWithOutputIndex: Pointer;
end;const D3D12_NODE_OUTPUT_OVERRIDES = extern struct {
OutputIndex: u32,
pNewName: ?*anyopaque,
pAllowSparseNodes: ?*anyopaque,
pMaxRecords: ?*anyopaque,
pMaxRecordsSharedWithOutputIndex: ?*anyopaque,
};type
D3D12_NODE_OUTPUT_OVERRIDES {.bycopy.} = object
OutputIndex: uint32
pNewName: pointer
pAllowSparseNodes: pointer
pMaxRecords: pointer
pMaxRecordsSharedWithOutputIndex: pointerstruct D3D12_NODE_OUTPUT_OVERRIDES
{
uint OutputIndex;
void* pNewName;
void* pAllowSparseNodes;
void* pMaxRecords;
void* pMaxRecordsSharedWithOutputIndex;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; D3D12_NODE_OUTPUT_OVERRIDES サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; OutputIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pNewName : D3D12_NODE_ID* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; pAllowSparseNodes : BOOL* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pMaxRecords : DWORD* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pMaxRecordsSharedWithOutputIndex : DWORD* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_NODE_OUTPUT_OVERRIDES サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; OutputIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pNewName : D3D12_NODE_ID* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; pAllowSparseNodes : BOOL* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pMaxRecords : DWORD* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pMaxRecordsSharedWithOutputIndex : DWORD* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_NODE_OUTPUT_OVERRIDES
#field int OutputIndex
#field intptr pNewName
#field intptr pAllowSparseNodes
#field intptr pMaxRecords
#field intptr pMaxRecordsSharedWithOutputIndex
#endstruct
stdim st, D3D12_NODE_OUTPUT_OVERRIDES ; NSTRUCT 変数を確保
st->OutputIndex = 100
mes "OutputIndex=" + st->OutputIndex