ホーム › Graphics.Direct3D12 › D3D12_AUTO_BREADCRUMB_NODE
D3D12_AUTO_BREADCRUMB_NODE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pCommandListDebugNameA | BYTE* | 8/4 | +0 | +0 | コマンドリストのデバッグ名(ANSI文字列)へのポインター。 |
| pCommandListDebugNameW | LPWSTR | 8/4 | +8 | +4 | コマンドリストのデバッグ名(ワイド文字列)。 |
| pCommandQueueDebugNameA | BYTE* | 8/4 | +16 | +8 | コマンドキューのデバッグ名(ANSI文字列)へのポインター。 |
| pCommandQueueDebugNameW | LPWSTR | 8/4 | +24 | +12 | コマンドキューのデバッグ名(ワイド文字列)。 |
| pCommandList | ID3D12GraphicsCommandList* | 8/4 | +32 | +16 | 対象のグラフィックスコマンドリストへのポインター。 |
| pCommandQueue | ID3D12CommandQueue* | 8/4 | +40 | +20 | 対象のコマンドキューへのポインター。 |
| BreadcrumbCount | DWORD | 4 | +48 | +24 | コマンド履歴に記録された操作の総数。 |
| pLastBreadcrumbValue | DWORD* | 8/4 | +56 | +28 | GPUが最後に完了した操作のインデックスを指すポインター。 |
| pCommandHistory | D3D12_AUTO_BREADCRUMB_OP* | 8/4 | +64 | +32 | 記録されたGPU操作の履歴配列へのポインター。 |
| pNext | D3D12_AUTO_BREADCRUMB_NODE* | 8/4 | +72 | +36 | 次のブレッドクラムノードへのポインター。末尾はNULL。 |
各言語での定義
#include <windows.h>
// D3D12_AUTO_BREADCRUMB_NODE (x64 80 / x86 40 バイト)
typedef struct D3D12_AUTO_BREADCRUMB_NODE {
BYTE* pCommandListDebugNameA;
LPWSTR pCommandListDebugNameW;
BYTE* pCommandQueueDebugNameA;
LPWSTR pCommandQueueDebugNameW;
ID3D12GraphicsCommandList* pCommandList;
ID3D12CommandQueue* pCommandQueue;
DWORD BreadcrumbCount;
DWORD* pLastBreadcrumbValue;
D3D12_AUTO_BREADCRUMB_OP* pCommandHistory;
D3D12_AUTO_BREADCRUMB_NODE* pNext;
} D3D12_AUTO_BREADCRUMB_NODE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_AUTO_BREADCRUMB_NODE
{
public IntPtr pCommandListDebugNameA;
public IntPtr pCommandListDebugNameW;
public IntPtr pCommandQueueDebugNameA;
public IntPtr pCommandQueueDebugNameW;
public IntPtr pCommandList;
public IntPtr pCommandQueue;
public uint BreadcrumbCount;
public IntPtr pLastBreadcrumbValue;
public IntPtr pCommandHistory;
public IntPtr pNext;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_AUTO_BREADCRUMB_NODE
Public pCommandListDebugNameA As IntPtr
Public pCommandListDebugNameW As IntPtr
Public pCommandQueueDebugNameA As IntPtr
Public pCommandQueueDebugNameW As IntPtr
Public pCommandList As IntPtr
Public pCommandQueue As IntPtr
Public BreadcrumbCount As UInteger
Public pLastBreadcrumbValue As IntPtr
Public pCommandHistory As IntPtr
Public pNext As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class D3D12_AUTO_BREADCRUMB_NODE(ctypes.Structure):
_fields_ = [
("pCommandListDebugNameA", ctypes.c_void_p),
("pCommandListDebugNameW", ctypes.c_void_p),
("pCommandQueueDebugNameA", ctypes.c_void_p),
("pCommandQueueDebugNameW", ctypes.c_void_p),
("pCommandList", ctypes.c_void_p),
("pCommandQueue", ctypes.c_void_p),
("BreadcrumbCount", wintypes.DWORD),
("pLastBreadcrumbValue", ctypes.c_void_p),
("pCommandHistory", ctypes.c_void_p),
("pNext", ctypes.c_void_p),
]#[repr(C)]
pub struct D3D12_AUTO_BREADCRUMB_NODE {
pub pCommandListDebugNameA: *mut core::ffi::c_void,
pub pCommandListDebugNameW: *mut core::ffi::c_void,
pub pCommandQueueDebugNameA: *mut core::ffi::c_void,
pub pCommandQueueDebugNameW: *mut core::ffi::c_void,
pub pCommandList: *mut core::ffi::c_void,
pub pCommandQueue: *mut core::ffi::c_void,
pub BreadcrumbCount: u32,
pub pLastBreadcrumbValue: *mut core::ffi::c_void,
pub pCommandHistory: *mut core::ffi::c_void,
pub pNext: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type D3D12_AUTO_BREADCRUMB_NODE struct {
pCommandListDebugNameA uintptr
pCommandListDebugNameW uintptr
pCommandQueueDebugNameA uintptr
pCommandQueueDebugNameW uintptr
pCommandList uintptr
pCommandQueue uintptr
BreadcrumbCount uint32
pLastBreadcrumbValue uintptr
pCommandHistory uintptr
pNext uintptr
}type
D3D12_AUTO_BREADCRUMB_NODE = record
pCommandListDebugNameA: Pointer;
pCommandListDebugNameW: Pointer;
pCommandQueueDebugNameA: Pointer;
pCommandQueueDebugNameW: Pointer;
pCommandList: Pointer;
pCommandQueue: Pointer;
BreadcrumbCount: DWORD;
pLastBreadcrumbValue: Pointer;
pCommandHistory: Pointer;
pNext: Pointer;
end;const D3D12_AUTO_BREADCRUMB_NODE = extern struct {
pCommandListDebugNameA: ?*anyopaque,
pCommandListDebugNameW: ?*anyopaque,
pCommandQueueDebugNameA: ?*anyopaque,
pCommandQueueDebugNameW: ?*anyopaque,
pCommandList: ?*anyopaque,
pCommandQueue: ?*anyopaque,
BreadcrumbCount: u32,
pLastBreadcrumbValue: ?*anyopaque,
pCommandHistory: ?*anyopaque,
pNext: ?*anyopaque,
};type
D3D12_AUTO_BREADCRUMB_NODE {.bycopy.} = object
pCommandListDebugNameA: pointer
pCommandListDebugNameW: pointer
pCommandQueueDebugNameA: pointer
pCommandQueueDebugNameW: pointer
pCommandList: pointer
pCommandQueue: pointer
BreadcrumbCount: uint32
pLastBreadcrumbValue: pointer
pCommandHistory: pointer
pNext: pointerstruct D3D12_AUTO_BREADCRUMB_NODE
{
void* pCommandListDebugNameA;
void* pCommandListDebugNameW;
void* pCommandQueueDebugNameA;
void* pCommandQueueDebugNameW;
void* pCommandList;
void* pCommandQueue;
uint BreadcrumbCount;
void* pLastBreadcrumbValue;
void* pCommandHistory;
void* pNext;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; D3D12_AUTO_BREADCRUMB_NODE サイズ: 40 バイト(x86)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; pCommandListDebugNameA : BYTE* (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pCommandListDebugNameW : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pCommandQueueDebugNameA : BYTE* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pCommandQueueDebugNameW : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pCommandList : ID3D12GraphicsCommandList* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pCommandQueue : ID3D12CommandQueue* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; BreadcrumbCount : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; pLastBreadcrumbValue : DWORD* (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; pCommandHistory : D3D12_AUTO_BREADCRUMB_OP* (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; pNext : D3D12_AUTO_BREADCRUMB_NODE* (+36, 4byte) varptr(st)+36 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_AUTO_BREADCRUMB_NODE サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; pCommandListDebugNameA : BYTE* (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; pCommandListDebugNameW : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pCommandQueueDebugNameA : BYTE* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pCommandQueueDebugNameW : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pCommandList : ID3D12GraphicsCommandList* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pCommandQueue : ID3D12CommandQueue* (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; BreadcrumbCount : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; pLastBreadcrumbValue : DWORD* (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; pCommandHistory : D3D12_AUTO_BREADCRUMB_OP* (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; pNext : D3D12_AUTO_BREADCRUMB_NODE* (+72, 8byte) varptr(st)+72 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_AUTO_BREADCRUMB_NODE
#field intptr pCommandListDebugNameA
#field intptr pCommandListDebugNameW
#field intptr pCommandQueueDebugNameA
#field intptr pCommandQueueDebugNameW
#field intptr pCommandList
#field intptr pCommandQueue
#field int BreadcrumbCount
#field intptr pLastBreadcrumbValue
#field intptr pCommandHistory
#field intptr pNext
#endstruct
stdim st, D3D12_AUTO_BREADCRUMB_NODE ; NSTRUCT 変数を確保
st->BreadcrumbCount = 100
mes "BreadcrumbCount=" + st->BreadcrumbCount