ホーム › Graphics.Direct3D10 › D3D10_SHADER_DEBUG_SCOPE_INFO
D3D10_SHADER_DEBUG_SCOPE_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ScopeType | D3D10_SHADER_DEBUG_SCOPETYPE | 4 | +0 | +0 | スコープの種類(グローバル/ブロック等)を示す列挙値。 |
| Name | DWORD | 4 | +4 | +4 | スコープ名へのオフセットまたはインデックス。 |
| uNameLen | DWORD | 4 | +8 | +8 | スコープ名の文字長。 |
| uVariables | DWORD | 4 | +12 | +12 | スコープに含まれる変数の数。 |
| VariableData | DWORD | 4 | +16 | +16 | スコープ変数データへのインデックス。 |
各言語での定義
#include <windows.h>
// D3D10_SHADER_DEBUG_SCOPE_INFO (x64 20 / x86 20 バイト)
typedef struct D3D10_SHADER_DEBUG_SCOPE_INFO {
D3D10_SHADER_DEBUG_SCOPETYPE ScopeType;
DWORD Name;
DWORD uNameLen;
DWORD uVariables;
DWORD VariableData;
} D3D10_SHADER_DEBUG_SCOPE_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D10_SHADER_DEBUG_SCOPE_INFO
{
public int ScopeType;
public uint Name;
public uint uNameLen;
public uint uVariables;
public uint VariableData;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D10_SHADER_DEBUG_SCOPE_INFO
Public ScopeType As Integer
Public Name As UInteger
Public uNameLen As UInteger
Public uVariables As UInteger
Public VariableData As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D10_SHADER_DEBUG_SCOPE_INFO(ctypes.Structure):
_fields_ = [
("ScopeType", ctypes.c_int),
("Name", wintypes.DWORD),
("uNameLen", wintypes.DWORD),
("uVariables", wintypes.DWORD),
("VariableData", wintypes.DWORD),
]#[repr(C)]
pub struct D3D10_SHADER_DEBUG_SCOPE_INFO {
pub ScopeType: i32,
pub Name: u32,
pub uNameLen: u32,
pub uVariables: u32,
pub VariableData: u32,
}import "golang.org/x/sys/windows"
type D3D10_SHADER_DEBUG_SCOPE_INFO struct {
ScopeType int32
Name uint32
uNameLen uint32
uVariables uint32
VariableData uint32
}type
D3D10_SHADER_DEBUG_SCOPE_INFO = record
ScopeType: Integer;
Name: DWORD;
uNameLen: DWORD;
uVariables: DWORD;
VariableData: DWORD;
end;const D3D10_SHADER_DEBUG_SCOPE_INFO = extern struct {
ScopeType: i32,
Name: u32,
uNameLen: u32,
uVariables: u32,
VariableData: u32,
};type
D3D10_SHADER_DEBUG_SCOPE_INFO {.bycopy.} = object
ScopeType: int32
Name: uint32
uNameLen: uint32
uVariables: uint32
VariableData: uint32struct D3D10_SHADER_DEBUG_SCOPE_INFO
{
int ScopeType;
uint Name;
uint uNameLen;
uint uVariables;
uint VariableData;
}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_SCOPE_INFO サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; ScopeType : D3D10_SHADER_DEBUG_SCOPETYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Name : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; uNameLen : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; uVariables : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; VariableData : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D10_SHADER_DEBUG_SCOPE_INFO
#field int ScopeType
#field int Name
#field int uNameLen
#field int uVariables
#field int VariableData
#endstruct
stdim st, D3D10_SHADER_DEBUG_SCOPE_INFO ; NSTRUCT 変数を確保
st->ScopeType = 100
mes "ScopeType=" + st->ScopeType