ホーム › Graphics.Direct3D10 › D3D10_SHADER_DEBUG_SCOPEVAR_INFO
D3D10_SHADER_DEBUG_SCOPEVAR_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| TokenId | DWORD | 4 | +0 | +0 | このスコープ変数に対応するトークンのID。 |
| VarType | D3D10_SHADER_DEBUG_VARTYPE | 4 | +4 | +4 | スコープ変数の種類を示す列挙値。 |
| Class | D3D_SHADER_VARIABLE_CLASS | 4 | +8 | +8 | 変数のクラス(スカラ/ベクトル/行列等)を示す列挙値。 |
| Rows | DWORD | 4 | +12 | +12 | 行列型の行数。 |
| Columns | DWORD | 4 | +16 | +16 | 行列型の列数。 |
| StructMemberScope | DWORD | 4 | +20 | +20 | 構造体メンバのスコープインデックス。 |
| uArrayIndices | DWORD | 4 | +24 | +24 | 配列インデックスの数。 |
| ArrayElements | DWORD | 4 | +28 | +28 | 配列要素数情報へのインデックス。 |
| ArrayStrides | DWORD | 4 | +32 | +32 | 配列ストライド情報へのインデックス。 |
| uVariables | DWORD | 4 | +36 | +36 | このスコープ変数に含まれる変数の数。 |
| uFirstVariable | DWORD | 4 | +40 | +40 | 最初の変数へのインデックス。 |
各言語での定義
#include <windows.h>
// D3D10_SHADER_DEBUG_SCOPEVAR_INFO (x64 44 / x86 44 バイト)
typedef struct D3D10_SHADER_DEBUG_SCOPEVAR_INFO {
DWORD TokenId;
D3D10_SHADER_DEBUG_VARTYPE VarType;
D3D_SHADER_VARIABLE_CLASS Class;
DWORD Rows;
DWORD Columns;
DWORD StructMemberScope;
DWORD uArrayIndices;
DWORD ArrayElements;
DWORD ArrayStrides;
DWORD uVariables;
DWORD uFirstVariable;
} D3D10_SHADER_DEBUG_SCOPEVAR_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D10_SHADER_DEBUG_SCOPEVAR_INFO
{
public uint TokenId;
public int VarType;
public int Class;
public uint Rows;
public uint Columns;
public uint StructMemberScope;
public uint uArrayIndices;
public uint ArrayElements;
public uint ArrayStrides;
public uint uVariables;
public uint uFirstVariable;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D10_SHADER_DEBUG_SCOPEVAR_INFO
Public TokenId As UInteger
Public VarType As Integer
Public Class As Integer
Public Rows As UInteger
Public Columns As UInteger
Public StructMemberScope As UInteger
Public uArrayIndices As UInteger
Public ArrayElements As UInteger
Public ArrayStrides As UInteger
Public uVariables As UInteger
Public uFirstVariable As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D10_SHADER_DEBUG_SCOPEVAR_INFO(ctypes.Structure):
_fields_ = [
("TokenId", wintypes.DWORD),
("VarType", ctypes.c_int),
("Class", ctypes.c_int),
("Rows", wintypes.DWORD),
("Columns", wintypes.DWORD),
("StructMemberScope", wintypes.DWORD),
("uArrayIndices", wintypes.DWORD),
("ArrayElements", wintypes.DWORD),
("ArrayStrides", wintypes.DWORD),
("uVariables", wintypes.DWORD),
("uFirstVariable", wintypes.DWORD),
]#[repr(C)]
pub struct D3D10_SHADER_DEBUG_SCOPEVAR_INFO {
pub TokenId: u32,
pub VarType: i32,
pub Class: i32,
pub Rows: u32,
pub Columns: u32,
pub StructMemberScope: u32,
pub uArrayIndices: u32,
pub ArrayElements: u32,
pub ArrayStrides: u32,
pub uVariables: u32,
pub uFirstVariable: u32,
}import "golang.org/x/sys/windows"
type D3D10_SHADER_DEBUG_SCOPEVAR_INFO struct {
TokenId uint32
VarType int32
Class int32
Rows uint32
Columns uint32
StructMemberScope uint32
uArrayIndices uint32
ArrayElements uint32
ArrayStrides uint32
uVariables uint32
uFirstVariable uint32
}type
D3D10_SHADER_DEBUG_SCOPEVAR_INFO = record
TokenId: DWORD;
VarType: Integer;
Class: Integer;
Rows: DWORD;
Columns: DWORD;
StructMemberScope: DWORD;
uArrayIndices: DWORD;
ArrayElements: DWORD;
ArrayStrides: DWORD;
uVariables: DWORD;
uFirstVariable: DWORD;
end;const D3D10_SHADER_DEBUG_SCOPEVAR_INFO = extern struct {
TokenId: u32,
VarType: i32,
Class: i32,
Rows: u32,
Columns: u32,
StructMemberScope: u32,
uArrayIndices: u32,
ArrayElements: u32,
ArrayStrides: u32,
uVariables: u32,
uFirstVariable: u32,
};type
D3D10_SHADER_DEBUG_SCOPEVAR_INFO {.bycopy.} = object
TokenId: uint32
VarType: int32
Class: int32
Rows: uint32
Columns: uint32
StructMemberScope: uint32
uArrayIndices: uint32
ArrayElements: uint32
ArrayStrides: uint32
uVariables: uint32
uFirstVariable: uint32struct D3D10_SHADER_DEBUG_SCOPEVAR_INFO
{
uint TokenId;
int VarType;
int Class;
uint Rows;
uint Columns;
uint StructMemberScope;
uint uArrayIndices;
uint ArrayElements;
uint ArrayStrides;
uint uVariables;
uint uFirstVariable;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D10_SHADER_DEBUG_SCOPEVAR_INFO サイズ: 44 バイト(x64)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; TokenId : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; VarType : D3D10_SHADER_DEBUG_VARTYPE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Class : D3D_SHADER_VARIABLE_CLASS (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Rows : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; Columns : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; StructMemberScope : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; uArrayIndices : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ArrayElements : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ArrayStrides : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; uVariables : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; uFirstVariable : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D10_SHADER_DEBUG_SCOPEVAR_INFO
#field int TokenId
#field int VarType
#field int Class
#field int Rows
#field int Columns
#field int StructMemberScope
#field int uArrayIndices
#field int ArrayElements
#field int ArrayStrides
#field int uVariables
#field int uFirstVariable
#endstruct
stdim st, D3D10_SHADER_DEBUG_SCOPEVAR_INFO ; NSTRUCT 変数を確保
st->TokenId = 100
mes "TokenId=" + st->TokenId