ホーム › Graphics.Direct3D10 › D3D10_SHADER_DEBUG_INFO
D3D10_SHADER_DEBUG_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Size | DWORD | 4 | +0 | +0 | このデバッグ情報構造体のサイズ(バイト単位)。 |
| Creator | DWORD | 4 | +4 | +4 | コンパイラ名文字列へのオフセット。 |
| EntrypointName | DWORD | 4 | +8 | +8 | エントリポイント名へのオフセット。 |
| ShaderTarget | DWORD | 4 | +12 | +12 | シェーダターゲットプロファイル文字列へのオフセット。 |
| CompileFlags | DWORD | 4 | +16 | +16 | コンパイル時に指定されたフラグ。 |
| Files | DWORD | 4 | +20 | +20 | ソースファイルの数。 |
| FileInfo | DWORD | 4 | +24 | +24 | ファイル情報配列へのオフセット。 |
| Instructions | DWORD | 4 | +28 | +28 | 命令の数。 |
| InstructionInfo | DWORD | 4 | +32 | +32 | 命令情報配列へのオフセット。 |
| Variables | DWORD | 4 | +36 | +36 | 変数の数。 |
| VariableInfo | DWORD | 4 | +40 | +40 | 変数情報配列へのオフセット。 |
| InputVariables | DWORD | 4 | +44 | +44 | 入力変数の数。 |
| InputVariableInfo | DWORD | 4 | +48 | +48 | 入力変数情報配列へのオフセット。 |
| Tokens | DWORD | 4 | +52 | +52 | トークンの数。 |
| TokenInfo | DWORD | 4 | +56 | +56 | トークン情報配列へのオフセット。 |
| Scopes | DWORD | 4 | +60 | +60 | スコープの数。 |
| ScopeInfo | DWORD | 4 | +64 | +64 | スコープ情報配列へのオフセット。 |
| ScopeVariables | DWORD | 4 | +68 | +68 | スコープ変数の数。 |
| ScopeVariableInfo | DWORD | 4 | +72 | +72 | スコープ変数情報配列へのオフセット。 |
| UintOffset | DWORD | 4 | +76 | +76 | 符号なし整数データブロックへのオフセット。 |
| StringOffset | DWORD | 4 | +80 | +80 | 文字列データブロックへのオフセット。 |
各言語での定義
#include <windows.h>
// D3D10_SHADER_DEBUG_INFO (x64 84 / x86 84 バイト)
typedef struct D3D10_SHADER_DEBUG_INFO {
DWORD Size;
DWORD Creator;
DWORD EntrypointName;
DWORD ShaderTarget;
DWORD CompileFlags;
DWORD Files;
DWORD FileInfo;
DWORD Instructions;
DWORD InstructionInfo;
DWORD Variables;
DWORD VariableInfo;
DWORD InputVariables;
DWORD InputVariableInfo;
DWORD Tokens;
DWORD TokenInfo;
DWORD Scopes;
DWORD ScopeInfo;
DWORD ScopeVariables;
DWORD ScopeVariableInfo;
DWORD UintOffset;
DWORD StringOffset;
} D3D10_SHADER_DEBUG_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D10_SHADER_DEBUG_INFO
{
public uint Size;
public uint Creator;
public uint EntrypointName;
public uint ShaderTarget;
public uint CompileFlags;
public uint Files;
public uint FileInfo;
public uint Instructions;
public uint InstructionInfo;
public uint Variables;
public uint VariableInfo;
public uint InputVariables;
public uint InputVariableInfo;
public uint Tokens;
public uint TokenInfo;
public uint Scopes;
public uint ScopeInfo;
public uint ScopeVariables;
public uint ScopeVariableInfo;
public uint UintOffset;
public uint StringOffset;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D10_SHADER_DEBUG_INFO
Public Size As UInteger
Public Creator As UInteger
Public EntrypointName As UInteger
Public ShaderTarget As UInteger
Public CompileFlags As UInteger
Public Files As UInteger
Public FileInfo As UInteger
Public Instructions As UInteger
Public InstructionInfo As UInteger
Public Variables As UInteger
Public VariableInfo As UInteger
Public InputVariables As UInteger
Public InputVariableInfo As UInteger
Public Tokens As UInteger
Public TokenInfo As UInteger
Public Scopes As UInteger
Public ScopeInfo As UInteger
Public ScopeVariables As UInteger
Public ScopeVariableInfo As UInteger
Public UintOffset As UInteger
Public StringOffset As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D10_SHADER_DEBUG_INFO(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("Creator", wintypes.DWORD),
("EntrypointName", wintypes.DWORD),
("ShaderTarget", wintypes.DWORD),
("CompileFlags", wintypes.DWORD),
("Files", wintypes.DWORD),
("FileInfo", wintypes.DWORD),
("Instructions", wintypes.DWORD),
("InstructionInfo", wintypes.DWORD),
("Variables", wintypes.DWORD),
("VariableInfo", wintypes.DWORD),
("InputVariables", wintypes.DWORD),
("InputVariableInfo", wintypes.DWORD),
("Tokens", wintypes.DWORD),
("TokenInfo", wintypes.DWORD),
("Scopes", wintypes.DWORD),
("ScopeInfo", wintypes.DWORD),
("ScopeVariables", wintypes.DWORD),
("ScopeVariableInfo", wintypes.DWORD),
("UintOffset", wintypes.DWORD),
("StringOffset", wintypes.DWORD),
]#[repr(C)]
pub struct D3D10_SHADER_DEBUG_INFO {
pub Size: u32,
pub Creator: u32,
pub EntrypointName: u32,
pub ShaderTarget: u32,
pub CompileFlags: u32,
pub Files: u32,
pub FileInfo: u32,
pub Instructions: u32,
pub InstructionInfo: u32,
pub Variables: u32,
pub VariableInfo: u32,
pub InputVariables: u32,
pub InputVariableInfo: u32,
pub Tokens: u32,
pub TokenInfo: u32,
pub Scopes: u32,
pub ScopeInfo: u32,
pub ScopeVariables: u32,
pub ScopeVariableInfo: u32,
pub UintOffset: u32,
pub StringOffset: u32,
}import "golang.org/x/sys/windows"
type D3D10_SHADER_DEBUG_INFO struct {
Size uint32
Creator uint32
EntrypointName uint32
ShaderTarget uint32
CompileFlags uint32
Files uint32
FileInfo uint32
Instructions uint32
InstructionInfo uint32
Variables uint32
VariableInfo uint32
InputVariables uint32
InputVariableInfo uint32
Tokens uint32
TokenInfo uint32
Scopes uint32
ScopeInfo uint32
ScopeVariables uint32
ScopeVariableInfo uint32
UintOffset uint32
StringOffset uint32
}type
D3D10_SHADER_DEBUG_INFO = record
Size: DWORD;
Creator: DWORD;
EntrypointName: DWORD;
ShaderTarget: DWORD;
CompileFlags: DWORD;
Files: DWORD;
FileInfo: DWORD;
Instructions: DWORD;
InstructionInfo: DWORD;
Variables: DWORD;
VariableInfo: DWORD;
InputVariables: DWORD;
InputVariableInfo: DWORD;
Tokens: DWORD;
TokenInfo: DWORD;
Scopes: DWORD;
ScopeInfo: DWORD;
ScopeVariables: DWORD;
ScopeVariableInfo: DWORD;
UintOffset: DWORD;
StringOffset: DWORD;
end;const D3D10_SHADER_DEBUG_INFO = extern struct {
Size: u32,
Creator: u32,
EntrypointName: u32,
ShaderTarget: u32,
CompileFlags: u32,
Files: u32,
FileInfo: u32,
Instructions: u32,
InstructionInfo: u32,
Variables: u32,
VariableInfo: u32,
InputVariables: u32,
InputVariableInfo: u32,
Tokens: u32,
TokenInfo: u32,
Scopes: u32,
ScopeInfo: u32,
ScopeVariables: u32,
ScopeVariableInfo: u32,
UintOffset: u32,
StringOffset: u32,
};type
D3D10_SHADER_DEBUG_INFO {.bycopy.} = object
Size: uint32
Creator: uint32
EntrypointName: uint32
ShaderTarget: uint32
CompileFlags: uint32
Files: uint32
FileInfo: uint32
Instructions: uint32
InstructionInfo: uint32
Variables: uint32
VariableInfo: uint32
InputVariables: uint32
InputVariableInfo: uint32
Tokens: uint32
TokenInfo: uint32
Scopes: uint32
ScopeInfo: uint32
ScopeVariables: uint32
ScopeVariableInfo: uint32
UintOffset: uint32
StringOffset: uint32struct D3D10_SHADER_DEBUG_INFO
{
uint Size;
uint Creator;
uint EntrypointName;
uint ShaderTarget;
uint CompileFlags;
uint Files;
uint FileInfo;
uint Instructions;
uint InstructionInfo;
uint Variables;
uint VariableInfo;
uint InputVariables;
uint InputVariableInfo;
uint Tokens;
uint TokenInfo;
uint Scopes;
uint ScopeInfo;
uint ScopeVariables;
uint ScopeVariableInfo;
uint UintOffset;
uint StringOffset;
}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_INFO サイズ: 84 バイト(x64)
dim st, 21 ; 4byte整数×21(構造体サイズ 84 / 4 切り上げ)
; Size : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Creator : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; EntrypointName : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ShaderTarget : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; CompileFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Files : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; FileInfo : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Instructions : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; InstructionInfo : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; Variables : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; VariableInfo : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; InputVariables : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; InputVariableInfo : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; Tokens : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; TokenInfo : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; Scopes : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; ScopeInfo : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ScopeVariables : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ScopeVariableInfo : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; UintOffset : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; StringOffset : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D10_SHADER_DEBUG_INFO
#field int Size
#field int Creator
#field int EntrypointName
#field int ShaderTarget
#field int CompileFlags
#field int Files
#field int FileInfo
#field int Instructions
#field int InstructionInfo
#field int Variables
#field int VariableInfo
#field int InputVariables
#field int InputVariableInfo
#field int Tokens
#field int TokenInfo
#field int Scopes
#field int ScopeInfo
#field int ScopeVariables
#field int ScopeVariableInfo
#field int UintOffset
#field int StringOffset
#endstruct
stdim st, D3D10_SHADER_DEBUG_INFO ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size