Win32 API 日本語リファレンス
ホームGraphics.Direct3D12 › D3D12_AUTO_BREADCRUMB_NODE1

D3D12_AUTO_BREADCRUMB_NODE1

構造体
サイズx64: 96 バイト / x86: 48 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
pCommandListDebugNameABYTE*8/4+0+0コマンドリストのデバッグ名(ANSI文字列)へのポインター。
pCommandListDebugNameWLPWSTR8/4+8+4コマンドリストのデバッグ名(ワイド文字列)。
pCommandQueueDebugNameABYTE*8/4+16+8コマンドキューのデバッグ名(ANSI文字列)へのポインター。
pCommandQueueDebugNameWLPWSTR8/4+24+12コマンドキューのデバッグ名(ワイド文字列)。
pCommandListID3D12GraphicsCommandList*8/4+32+16対象のグラフィックスコマンドリストへのポインター。
pCommandQueueID3D12CommandQueue*8/4+40+20対象のコマンドキューへのポインター。
BreadcrumbCountDWORD4+48+24コマンド履歴に記録された操作の総数。
pLastBreadcrumbValueDWORD*8/4+56+28GPUが最後に完了した操作のインデックスを指すポインター。
pCommandHistoryD3D12_AUTO_BREADCRUMB_OP*8/4+64+32記録されたGPU操作の履歴配列へのポインター。
pNextD3D12_AUTO_BREADCRUMB_NODE1*8/4+72+36次のブレッドクラムノードへのポインター。末尾はNULL。
BreadcrumbContextsCountDWORD4+80+40ブレッドクラムコンテキスト配列の要素数。
pBreadcrumbContextsD3D12_DRED_BREADCRUMB_CONTEXT*8/4+88+44ブレッドクラムコンテキスト配列へのポインター。

各言語での定義

#include <windows.h>

// D3D12_AUTO_BREADCRUMB_NODE1  (x64 96 / x86 48 バイト)
typedef struct D3D12_AUTO_BREADCRUMB_NODE1 {
    BYTE* pCommandListDebugNameA;
    LPWSTR pCommandListDebugNameW;
    BYTE* pCommandQueueDebugNameA;
    LPWSTR pCommandQueueDebugNameW;
    ID3D12GraphicsCommandList* pCommandList;
    ID3D12CommandQueue* pCommandQueue;
    DWORD BreadcrumbCount;
    DWORD* pLastBreadcrumbValue;
    D3D12_AUTO_BREADCRUMB_OP* pCommandHistory;
    D3D12_AUTO_BREADCRUMB_NODE1* pNext;
    DWORD BreadcrumbContextsCount;
    D3D12_DRED_BREADCRUMB_CONTEXT* pBreadcrumbContexts;
} D3D12_AUTO_BREADCRUMB_NODE1;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_AUTO_BREADCRUMB_NODE1
{
    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;
    public uint BreadcrumbContextsCount;
    public IntPtr pBreadcrumbContexts;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_AUTO_BREADCRUMB_NODE1
    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
    Public BreadcrumbContextsCount As UInteger
    Public pBreadcrumbContexts As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class D3D12_AUTO_BREADCRUMB_NODE1(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),
        ("BreadcrumbContextsCount", wintypes.DWORD),
        ("pBreadcrumbContexts", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct D3D12_AUTO_BREADCRUMB_NODE1 {
    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,
    pub BreadcrumbContextsCount: u32,
    pub pBreadcrumbContexts: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type D3D12_AUTO_BREADCRUMB_NODE1 struct {
	pCommandListDebugNameA uintptr
	pCommandListDebugNameW uintptr
	pCommandQueueDebugNameA uintptr
	pCommandQueueDebugNameW uintptr
	pCommandList uintptr
	pCommandQueue uintptr
	BreadcrumbCount uint32
	pLastBreadcrumbValue uintptr
	pCommandHistory uintptr
	pNext uintptr
	BreadcrumbContextsCount uint32
	pBreadcrumbContexts uintptr
}
type
  D3D12_AUTO_BREADCRUMB_NODE1 = record
    pCommandListDebugNameA: Pointer;
    pCommandListDebugNameW: Pointer;
    pCommandQueueDebugNameA: Pointer;
    pCommandQueueDebugNameW: Pointer;
    pCommandList: Pointer;
    pCommandQueue: Pointer;
    BreadcrumbCount: DWORD;
    pLastBreadcrumbValue: Pointer;
    pCommandHistory: Pointer;
    pNext: Pointer;
    BreadcrumbContextsCount: DWORD;
    pBreadcrumbContexts: Pointer;
  end;
const D3D12_AUTO_BREADCRUMB_NODE1 = extern struct {
    pCommandListDebugNameA: ?*anyopaque,
    pCommandListDebugNameW: ?*anyopaque,
    pCommandQueueDebugNameA: ?*anyopaque,
    pCommandQueueDebugNameW: ?*anyopaque,
    pCommandList: ?*anyopaque,
    pCommandQueue: ?*anyopaque,
    BreadcrumbCount: u32,
    pLastBreadcrumbValue: ?*anyopaque,
    pCommandHistory: ?*anyopaque,
    pNext: ?*anyopaque,
    BreadcrumbContextsCount: u32,
    pBreadcrumbContexts: ?*anyopaque,
};
type
  D3D12_AUTO_BREADCRUMB_NODE1 {.bycopy.} = object
    pCommandListDebugNameA: pointer
    pCommandListDebugNameW: pointer
    pCommandQueueDebugNameA: pointer
    pCommandQueueDebugNameW: pointer
    pCommandList: pointer
    pCommandQueue: pointer
    BreadcrumbCount: uint32
    pLastBreadcrumbValue: pointer
    pCommandHistory: pointer
    pNext: pointer
    BreadcrumbContextsCount: uint32
    pBreadcrumbContexts: pointer
struct D3D12_AUTO_BREADCRUMB_NODE1
{
    void* pCommandListDebugNameA;
    void* pCommandListDebugNameW;
    void* pCommandQueueDebugNameA;
    void* pCommandQueueDebugNameW;
    void* pCommandList;
    void* pCommandQueue;
    uint BreadcrumbCount;
    void* pLastBreadcrumbValue;
    void* pCommandHistory;
    void* pNext;
    uint BreadcrumbContextsCount;
    void* pBreadcrumbContexts;
}

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_NODE1 サイズ: 48 バイト(x86)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 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_NODE1* (+36, 4byte)  varptr(st)+36 を基点に操作(4byte:入れ子/配列)
; BreadcrumbContextsCount : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; pBreadcrumbContexts : D3D12_DRED_BREADCRUMB_CONTEXT* (+44, 4byte)  varptr(st)+44 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_AUTO_BREADCRUMB_NODE1 サイズ: 96 バイト(x64)
dim st, 24    ; 4byte整数×24(構造体サイズ 96 / 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_NODE1* (+72, 8byte)  varptr(st)+72 を基点に操作(8byte:入れ子/配列)
; BreadcrumbContextsCount : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; pBreadcrumbContexts : D3D12_DRED_BREADCRUMB_CONTEXT* (+88, 8byte)  varptr(st)+88 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_AUTO_BREADCRUMB_NODE1
    #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
    #field int BreadcrumbContextsCount
    #field intptr pBreadcrumbContexts
#endstruct

stdim st, D3D12_AUTO_BREADCRUMB_NODE1        ; NSTRUCT 変数を確保
st->BreadcrumbCount = 100
mes "BreadcrumbCount=" + st->BreadcrumbCount