ホーム › Graphics.Direct3D11 › D3D11_PIXEL_SHADER_TRACE_DESC
D3D11_PIXEL_SHADER_TRACE_DESC
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Invocation | ULONGLONG | 8 | +0 | +0 | トレース対象とするピクセルシェーダー呼び出し。 |
| X | INT | 4 | +8 | +8 | トレース対象ピクセルのX座標。 |
| Y | INT | 4 | +12 | +12 | トレース対象ピクセルのY座標。 |
| SampleMask | ULONGLONG | 8 | +16 | +16 | トレース対象とするサンプルを示すサンプルマスク。 |
各言語での定義
#include <windows.h>
// D3D11_PIXEL_SHADER_TRACE_DESC (x64 24 / x86 24 バイト)
typedef struct D3D11_PIXEL_SHADER_TRACE_DESC {
ULONGLONG Invocation;
INT X;
INT Y;
ULONGLONG SampleMask;
} D3D11_PIXEL_SHADER_TRACE_DESC;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D11_PIXEL_SHADER_TRACE_DESC
{
public ulong Invocation;
public int X;
public int Y;
public ulong SampleMask;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D11_PIXEL_SHADER_TRACE_DESC
Public Invocation As ULong
Public X As Integer
Public Y As Integer
Public SampleMask As ULong
End Structureimport ctypes
from ctypes import wintypes
class D3D11_PIXEL_SHADER_TRACE_DESC(ctypes.Structure):
_fields_ = [
("Invocation", ctypes.c_ulonglong),
("X", ctypes.c_int),
("Y", ctypes.c_int),
("SampleMask", ctypes.c_ulonglong),
]#[repr(C)]
pub struct D3D11_PIXEL_SHADER_TRACE_DESC {
pub Invocation: u64,
pub X: i32,
pub Y: i32,
pub SampleMask: u64,
}import "golang.org/x/sys/windows"
type D3D11_PIXEL_SHADER_TRACE_DESC struct {
Invocation uint64
X int32
Y int32
SampleMask uint64
}type
D3D11_PIXEL_SHADER_TRACE_DESC = record
Invocation: UInt64;
X: Integer;
Y: Integer;
SampleMask: UInt64;
end;const D3D11_PIXEL_SHADER_TRACE_DESC = extern struct {
Invocation: u64,
X: i32,
Y: i32,
SampleMask: u64,
};type
D3D11_PIXEL_SHADER_TRACE_DESC {.bycopy.} = object
Invocation: uint64
X: int32
Y: int32
SampleMask: uint64struct D3D11_PIXEL_SHADER_TRACE_DESC
{
ulong Invocation;
int X;
int Y;
ulong SampleMask;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D11_PIXEL_SHADER_TRACE_DESC サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; Invocation : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; X : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Y : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; SampleMask : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D11_PIXEL_SHADER_TRACE_DESC
#field int64 Invocation
#field int X
#field int Y
#field int64 SampleMask
#endstruct
stdim st, D3D11_PIXEL_SHADER_TRACE_DESC ; NSTRUCT 変数を確保
st->Invocation = 100
mes "Invocation=" + st->Invocation