ホーム › Graphics.Direct3D11 › D3D11_SHADER_DESC
D3D11_SHADER_DESC
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 | シェーダーのバージョンとタイプをエンコードした値。 |
| Creator | LPSTR | 8/4 | +8 | +4 | シェーダーをコンパイルしたコンパイラの名称文字列。 |
| Flags | DWORD | 4 | +16 | +8 | コンパイル時に指定されたシェーダーフラグ。 |
| ConstantBuffers | DWORD | 4 | +20 | +12 | シェーダーが使用する定数バッファの数。 |
| BoundResources | DWORD | 4 | +24 | +16 | シェーダーにバインドされたリソースの数。 |
| InputParameters | DWORD | 4 | +28 | +20 | 入力シグネチャのパラメータ数。 |
| OutputParameters | DWORD | 4 | +32 | +24 | 出力シグネチャのパラメータ数。 |
| InstructionCount | DWORD | 4 | +36 | +28 | シェーダー命令の総数。 |
| TempRegisterCount | DWORD | 4 | +40 | +32 | 使用される一時レジスタの数。 |
| TempArrayCount | DWORD | 4 | +44 | +36 | 使用される一時配列の数。 |
| DefCount | DWORD | 4 | +48 | +40 | 定数定義(def)命令の数。 |
| DclCount | DWORD | 4 | +52 | +44 | 宣言(dcl)命令の数。 |
| TextureNormalInstructions | DWORD | 4 | +56 | +48 | 通常のテクスチャ命令の数。 |
| TextureLoadInstructions | DWORD | 4 | +60 | +52 | テクスチャロード命令の数。 |
| TextureCompInstructions | DWORD | 4 | +64 | +56 | テクスチャ比較命令の数。 |
| TextureBiasInstructions | DWORD | 4 | +68 | +60 | バイアス付きテクスチャ命令の数。 |
| TextureGradientInstructions | DWORD | 4 | +72 | +64 | 勾配指定付きテクスチャ命令の数。 |
| FloatInstructionCount | DWORD | 4 | +76 | +68 | 浮動小数点演算命令の数。 |
| IntInstructionCount | DWORD | 4 | +80 | +72 | 符号付き整数演算命令の数。 |
| UintInstructionCount | DWORD | 4 | +84 | +76 | 符号なし整数演算命令の数。 |
| StaticFlowControlCount | DWORD | 4 | +88 | +80 | 静的フロー制御命令の数。 |
| DynamicFlowControlCount | DWORD | 4 | +92 | +84 | 動的フロー制御命令の数。 |
| MacroInstructionCount | DWORD | 4 | +96 | +88 | マクロ命令の数。 |
| ArrayInstructionCount | DWORD | 4 | +100 | +92 | 配列命令の数。 |
| CutInstructionCount | DWORD | 4 | +104 | +96 | ジオメトリシェーダーのcut命令の数。 |
| EmitInstructionCount | DWORD | 4 | +108 | +100 | ジオメトリシェーダーのemit命令の数。 |
| GSOutputTopology | D3D_PRIMITIVE_TOPOLOGY | 4 | +112 | +104 | ジオメトリシェーダー出力のプリミティブトポロジを示すD3D_PRIMITIVE_TOPOLOGY列挙値。 |
| GSMaxOutputVertexCount | DWORD | 4 | +116 | +108 | ジオメトリシェーダーが出力する最大頂点数。 |
| InputPrimitive | D3D_PRIMITIVE | 4 | +120 | +112 | 入力プリミティブの種類を示すD3D_PRIMITIVE列挙値。 |
| PatchConstantParameters | DWORD | 4 | +124 | +116 | パッチ定数シグネチャのパラメータ数。 |
| cGSInstanceCount | DWORD | 4 | +128 | +120 | ジオメトリシェーダーのインスタンス数。 |
| cControlPoints | DWORD | 4 | +132 | +124 | ハル/ドメインシェーダーの制御点数。 |
| HSOutputPrimitive | D3D_TESSELLATOR_OUTPUT_PRIMITIVE | 4 | +136 | +128 | ハルシェーダー出力プリミティブを示すD3D_TESSELLATOR_OUTPUT_PRIMITIVE列挙値。 |
| HSPartitioning | D3D_TESSELLATOR_PARTITIONING | 4 | +140 | +132 | テッセレーションの分割方式を示すD3D_TESSELLATOR_PARTITIONING列挙値。 |
| TessellatorDomain | D3D_TESSELLATOR_DOMAIN | 4 | +144 | +136 | テッセレータのドメインを示すD3D_TESSELLATOR_DOMAIN列挙値。 |
| cBarrierInstructions | DWORD | 4 | +148 | +140 | バリア命令の数。 |
| cInterlockedInstructions | DWORD | 4 | +152 | +144 | インターロック(アトミック)命令の数。 |
| cTextureStoreInstructions | DWORD | 4 | +156 | +148 | テクスチャストア命令の数。 |
各言語での定義
#include <windows.h>
// D3D11_SHADER_DESC (x64 160 / x86 152 バイト)
typedef struct D3D11_SHADER_DESC {
DWORD Version;
LPSTR Creator;
DWORD Flags;
DWORD ConstantBuffers;
DWORD BoundResources;
DWORD InputParameters;
DWORD OutputParameters;
DWORD InstructionCount;
DWORD TempRegisterCount;
DWORD TempArrayCount;
DWORD DefCount;
DWORD DclCount;
DWORD TextureNormalInstructions;
DWORD TextureLoadInstructions;
DWORD TextureCompInstructions;
DWORD TextureBiasInstructions;
DWORD TextureGradientInstructions;
DWORD FloatInstructionCount;
DWORD IntInstructionCount;
DWORD UintInstructionCount;
DWORD StaticFlowControlCount;
DWORD DynamicFlowControlCount;
DWORD MacroInstructionCount;
DWORD ArrayInstructionCount;
DWORD CutInstructionCount;
DWORD EmitInstructionCount;
D3D_PRIMITIVE_TOPOLOGY GSOutputTopology;
DWORD GSMaxOutputVertexCount;
D3D_PRIMITIVE InputPrimitive;
DWORD PatchConstantParameters;
DWORD cGSInstanceCount;
DWORD cControlPoints;
D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive;
D3D_TESSELLATOR_PARTITIONING HSPartitioning;
D3D_TESSELLATOR_DOMAIN TessellatorDomain;
DWORD cBarrierInstructions;
DWORD cInterlockedInstructions;
DWORD cTextureStoreInstructions;
} D3D11_SHADER_DESC;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D11_SHADER_DESC
{
public uint Version;
public IntPtr Creator;
public uint Flags;
public uint ConstantBuffers;
public uint BoundResources;
public uint InputParameters;
public uint OutputParameters;
public uint InstructionCount;
public uint TempRegisterCount;
public uint TempArrayCount;
public uint DefCount;
public uint DclCount;
public uint TextureNormalInstructions;
public uint TextureLoadInstructions;
public uint TextureCompInstructions;
public uint TextureBiasInstructions;
public uint TextureGradientInstructions;
public uint FloatInstructionCount;
public uint IntInstructionCount;
public uint UintInstructionCount;
public uint StaticFlowControlCount;
public uint DynamicFlowControlCount;
public uint MacroInstructionCount;
public uint ArrayInstructionCount;
public uint CutInstructionCount;
public uint EmitInstructionCount;
public int GSOutputTopology;
public uint GSMaxOutputVertexCount;
public int InputPrimitive;
public uint PatchConstantParameters;
public uint cGSInstanceCount;
public uint cControlPoints;
public int HSOutputPrimitive;
public int HSPartitioning;
public int TessellatorDomain;
public uint cBarrierInstructions;
public uint cInterlockedInstructions;
public uint cTextureStoreInstructions;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D11_SHADER_DESC
Public Version As UInteger
Public Creator As IntPtr
Public Flags As UInteger
Public ConstantBuffers As UInteger
Public BoundResources As UInteger
Public InputParameters As UInteger
Public OutputParameters As UInteger
Public InstructionCount As UInteger
Public TempRegisterCount As UInteger
Public TempArrayCount As UInteger
Public DefCount As UInteger
Public DclCount As UInteger
Public TextureNormalInstructions As UInteger
Public TextureLoadInstructions As UInteger
Public TextureCompInstructions As UInteger
Public TextureBiasInstructions As UInteger
Public TextureGradientInstructions As UInteger
Public FloatInstructionCount As UInteger
Public IntInstructionCount As UInteger
Public UintInstructionCount As UInteger
Public StaticFlowControlCount As UInteger
Public DynamicFlowControlCount As UInteger
Public MacroInstructionCount As UInteger
Public ArrayInstructionCount As UInteger
Public CutInstructionCount As UInteger
Public EmitInstructionCount As UInteger
Public GSOutputTopology As Integer
Public GSMaxOutputVertexCount As UInteger
Public InputPrimitive As Integer
Public PatchConstantParameters As UInteger
Public cGSInstanceCount As UInteger
Public cControlPoints As UInteger
Public HSOutputPrimitive As Integer
Public HSPartitioning As Integer
Public TessellatorDomain As Integer
Public cBarrierInstructions As UInteger
Public cInterlockedInstructions As UInteger
Public cTextureStoreInstructions As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D11_SHADER_DESC(ctypes.Structure):
_fields_ = [
("Version", wintypes.DWORD),
("Creator", ctypes.c_void_p),
("Flags", wintypes.DWORD),
("ConstantBuffers", wintypes.DWORD),
("BoundResources", wintypes.DWORD),
("InputParameters", wintypes.DWORD),
("OutputParameters", wintypes.DWORD),
("InstructionCount", wintypes.DWORD),
("TempRegisterCount", wintypes.DWORD),
("TempArrayCount", wintypes.DWORD),
("DefCount", wintypes.DWORD),
("DclCount", wintypes.DWORD),
("TextureNormalInstructions", wintypes.DWORD),
("TextureLoadInstructions", wintypes.DWORD),
("TextureCompInstructions", wintypes.DWORD),
("TextureBiasInstructions", wintypes.DWORD),
("TextureGradientInstructions", wintypes.DWORD),
("FloatInstructionCount", wintypes.DWORD),
("IntInstructionCount", wintypes.DWORD),
("UintInstructionCount", wintypes.DWORD),
("StaticFlowControlCount", wintypes.DWORD),
("DynamicFlowControlCount", wintypes.DWORD),
("MacroInstructionCount", wintypes.DWORD),
("ArrayInstructionCount", wintypes.DWORD),
("CutInstructionCount", wintypes.DWORD),
("EmitInstructionCount", wintypes.DWORD),
("GSOutputTopology", ctypes.c_int),
("GSMaxOutputVertexCount", wintypes.DWORD),
("InputPrimitive", ctypes.c_int),
("PatchConstantParameters", wintypes.DWORD),
("cGSInstanceCount", wintypes.DWORD),
("cControlPoints", wintypes.DWORD),
("HSOutputPrimitive", ctypes.c_int),
("HSPartitioning", ctypes.c_int),
("TessellatorDomain", ctypes.c_int),
("cBarrierInstructions", wintypes.DWORD),
("cInterlockedInstructions", wintypes.DWORD),
("cTextureStoreInstructions", wintypes.DWORD),
]#[repr(C)]
pub struct D3D11_SHADER_DESC {
pub Version: u32,
pub Creator: *mut core::ffi::c_void,
pub Flags: u32,
pub ConstantBuffers: u32,
pub BoundResources: u32,
pub InputParameters: u32,
pub OutputParameters: u32,
pub InstructionCount: u32,
pub TempRegisterCount: u32,
pub TempArrayCount: u32,
pub DefCount: u32,
pub DclCount: u32,
pub TextureNormalInstructions: u32,
pub TextureLoadInstructions: u32,
pub TextureCompInstructions: u32,
pub TextureBiasInstructions: u32,
pub TextureGradientInstructions: u32,
pub FloatInstructionCount: u32,
pub IntInstructionCount: u32,
pub UintInstructionCount: u32,
pub StaticFlowControlCount: u32,
pub DynamicFlowControlCount: u32,
pub MacroInstructionCount: u32,
pub ArrayInstructionCount: u32,
pub CutInstructionCount: u32,
pub EmitInstructionCount: u32,
pub GSOutputTopology: i32,
pub GSMaxOutputVertexCount: u32,
pub InputPrimitive: i32,
pub PatchConstantParameters: u32,
pub cGSInstanceCount: u32,
pub cControlPoints: u32,
pub HSOutputPrimitive: i32,
pub HSPartitioning: i32,
pub TessellatorDomain: i32,
pub cBarrierInstructions: u32,
pub cInterlockedInstructions: u32,
pub cTextureStoreInstructions: u32,
}import "golang.org/x/sys/windows"
type D3D11_SHADER_DESC struct {
Version uint32
Creator uintptr
Flags uint32
ConstantBuffers uint32
BoundResources uint32
InputParameters uint32
OutputParameters uint32
InstructionCount uint32
TempRegisterCount uint32
TempArrayCount uint32
DefCount uint32
DclCount uint32
TextureNormalInstructions uint32
TextureLoadInstructions uint32
TextureCompInstructions uint32
TextureBiasInstructions uint32
TextureGradientInstructions uint32
FloatInstructionCount uint32
IntInstructionCount uint32
UintInstructionCount uint32
StaticFlowControlCount uint32
DynamicFlowControlCount uint32
MacroInstructionCount uint32
ArrayInstructionCount uint32
CutInstructionCount uint32
EmitInstructionCount uint32
GSOutputTopology int32
GSMaxOutputVertexCount uint32
InputPrimitive int32
PatchConstantParameters uint32
cGSInstanceCount uint32
cControlPoints uint32
HSOutputPrimitive int32
HSPartitioning int32
TessellatorDomain int32
cBarrierInstructions uint32
cInterlockedInstructions uint32
cTextureStoreInstructions uint32
}type
D3D11_SHADER_DESC = record
Version: DWORD;
Creator: Pointer;
Flags: DWORD;
ConstantBuffers: DWORD;
BoundResources: DWORD;
InputParameters: DWORD;
OutputParameters: DWORD;
InstructionCount: DWORD;
TempRegisterCount: DWORD;
TempArrayCount: DWORD;
DefCount: DWORD;
DclCount: DWORD;
TextureNormalInstructions: DWORD;
TextureLoadInstructions: DWORD;
TextureCompInstructions: DWORD;
TextureBiasInstructions: DWORD;
TextureGradientInstructions: DWORD;
FloatInstructionCount: DWORD;
IntInstructionCount: DWORD;
UintInstructionCount: DWORD;
StaticFlowControlCount: DWORD;
DynamicFlowControlCount: DWORD;
MacroInstructionCount: DWORD;
ArrayInstructionCount: DWORD;
CutInstructionCount: DWORD;
EmitInstructionCount: DWORD;
GSOutputTopology: Integer;
GSMaxOutputVertexCount: DWORD;
InputPrimitive: Integer;
PatchConstantParameters: DWORD;
cGSInstanceCount: DWORD;
cControlPoints: DWORD;
HSOutputPrimitive: Integer;
HSPartitioning: Integer;
TessellatorDomain: Integer;
cBarrierInstructions: DWORD;
cInterlockedInstructions: DWORD;
cTextureStoreInstructions: DWORD;
end;const D3D11_SHADER_DESC = extern struct {
Version: u32,
Creator: ?*anyopaque,
Flags: u32,
ConstantBuffers: u32,
BoundResources: u32,
InputParameters: u32,
OutputParameters: u32,
InstructionCount: u32,
TempRegisterCount: u32,
TempArrayCount: u32,
DefCount: u32,
DclCount: u32,
TextureNormalInstructions: u32,
TextureLoadInstructions: u32,
TextureCompInstructions: u32,
TextureBiasInstructions: u32,
TextureGradientInstructions: u32,
FloatInstructionCount: u32,
IntInstructionCount: u32,
UintInstructionCount: u32,
StaticFlowControlCount: u32,
DynamicFlowControlCount: u32,
MacroInstructionCount: u32,
ArrayInstructionCount: u32,
CutInstructionCount: u32,
EmitInstructionCount: u32,
GSOutputTopology: i32,
GSMaxOutputVertexCount: u32,
InputPrimitive: i32,
PatchConstantParameters: u32,
cGSInstanceCount: u32,
cControlPoints: u32,
HSOutputPrimitive: i32,
HSPartitioning: i32,
TessellatorDomain: i32,
cBarrierInstructions: u32,
cInterlockedInstructions: u32,
cTextureStoreInstructions: u32,
};type
D3D11_SHADER_DESC {.bycopy.} = object
Version: uint32
Creator: pointer
Flags: uint32
ConstantBuffers: uint32
BoundResources: uint32
InputParameters: uint32
OutputParameters: uint32
InstructionCount: uint32
TempRegisterCount: uint32
TempArrayCount: uint32
DefCount: uint32
DclCount: uint32
TextureNormalInstructions: uint32
TextureLoadInstructions: uint32
TextureCompInstructions: uint32
TextureBiasInstructions: uint32
TextureGradientInstructions: uint32
FloatInstructionCount: uint32
IntInstructionCount: uint32
UintInstructionCount: uint32
StaticFlowControlCount: uint32
DynamicFlowControlCount: uint32
MacroInstructionCount: uint32
ArrayInstructionCount: uint32
CutInstructionCount: uint32
EmitInstructionCount: uint32
GSOutputTopology: int32
GSMaxOutputVertexCount: uint32
InputPrimitive: int32
PatchConstantParameters: uint32
cGSInstanceCount: uint32
cControlPoints: uint32
HSOutputPrimitive: int32
HSPartitioning: int32
TessellatorDomain: int32
cBarrierInstructions: uint32
cInterlockedInstructions: uint32
cTextureStoreInstructions: uint32struct D3D11_SHADER_DESC
{
uint Version;
void* Creator;
uint Flags;
uint ConstantBuffers;
uint BoundResources;
uint InputParameters;
uint OutputParameters;
uint InstructionCount;
uint TempRegisterCount;
uint TempArrayCount;
uint DefCount;
uint DclCount;
uint TextureNormalInstructions;
uint TextureLoadInstructions;
uint TextureCompInstructions;
uint TextureBiasInstructions;
uint TextureGradientInstructions;
uint FloatInstructionCount;
uint IntInstructionCount;
uint UintInstructionCount;
uint StaticFlowControlCount;
uint DynamicFlowControlCount;
uint MacroInstructionCount;
uint ArrayInstructionCount;
uint CutInstructionCount;
uint EmitInstructionCount;
int GSOutputTopology;
uint GSMaxOutputVertexCount;
int InputPrimitive;
uint PatchConstantParameters;
uint cGSInstanceCount;
uint cControlPoints;
int HSOutputPrimitive;
int HSPartitioning;
int TessellatorDomain;
uint cBarrierInstructions;
uint cInterlockedInstructions;
uint cTextureStoreInstructions;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; D3D11_SHADER_DESC サイズ: 152 バイト(x86)
dim st, 38 ; 4byte整数×38(構造体サイズ 152 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Creator : LPSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Flags : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ConstantBuffers : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; BoundResources : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; InputParameters : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; OutputParameters : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; InstructionCount : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; TempRegisterCount : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; TempArrayCount : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; DefCount : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; DclCount : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; TextureNormalInstructions : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; TextureLoadInstructions : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; TextureCompInstructions : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; TextureBiasInstructions : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; TextureGradientInstructions : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; FloatInstructionCount : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; IntInstructionCount : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; UintInstructionCount : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; StaticFlowControlCount : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; DynamicFlowControlCount : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; MacroInstructionCount : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; ArrayInstructionCount : DWORD (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; CutInstructionCount : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; EmitInstructionCount : DWORD (+100, 4byte) st.25 = 値 / 値 = st.25 (lpoke/lpeek も可)
; GSOutputTopology : D3D_PRIMITIVE_TOPOLOGY (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; GSMaxOutputVertexCount : DWORD (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; InputPrimitive : D3D_PRIMITIVE (+112, 4byte) st.28 = 値 / 値 = st.28 (lpoke/lpeek も可)
; PatchConstantParameters : DWORD (+116, 4byte) st.29 = 値 / 値 = st.29 (lpoke/lpeek も可)
; cGSInstanceCount : DWORD (+120, 4byte) st.30 = 値 / 値 = st.30 (lpoke/lpeek も可)
; cControlPoints : DWORD (+124, 4byte) st.31 = 値 / 値 = st.31 (lpoke/lpeek も可)
; HSOutputPrimitive : D3D_TESSELLATOR_OUTPUT_PRIMITIVE (+128, 4byte) st.32 = 値 / 値 = st.32 (lpoke/lpeek も可)
; HSPartitioning : D3D_TESSELLATOR_PARTITIONING (+132, 4byte) st.33 = 値 / 値 = st.33 (lpoke/lpeek も可)
; TessellatorDomain : D3D_TESSELLATOR_DOMAIN (+136, 4byte) st.34 = 値 / 値 = st.34 (lpoke/lpeek も可)
; cBarrierInstructions : DWORD (+140, 4byte) st.35 = 値 / 値 = st.35 (lpoke/lpeek も可)
; cInterlockedInstructions : DWORD (+144, 4byte) st.36 = 値 / 値 = st.36 (lpoke/lpeek も可)
; cTextureStoreInstructions : DWORD (+148, 4byte) st.37 = 値 / 値 = st.37 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D11_SHADER_DESC サイズ: 160 バイト(x64)
dim st, 40 ; 4byte整数×40(構造体サイズ 160 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Creator : LPSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; Flags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ConstantBuffers : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; BoundResources : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; InputParameters : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; OutputParameters : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; InstructionCount : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; TempRegisterCount : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; TempArrayCount : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; DefCount : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; DclCount : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; TextureNormalInstructions : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; TextureLoadInstructions : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; TextureCompInstructions : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; TextureBiasInstructions : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; TextureGradientInstructions : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; FloatInstructionCount : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; IntInstructionCount : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; UintInstructionCount : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; StaticFlowControlCount : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; DynamicFlowControlCount : DWORD (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; MacroInstructionCount : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; ArrayInstructionCount : DWORD (+100, 4byte) st.25 = 値 / 値 = st.25 (lpoke/lpeek も可)
; CutInstructionCount : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; EmitInstructionCount : DWORD (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; GSOutputTopology : D3D_PRIMITIVE_TOPOLOGY (+112, 4byte) st.28 = 値 / 値 = st.28 (lpoke/lpeek も可)
; GSMaxOutputVertexCount : DWORD (+116, 4byte) st.29 = 値 / 値 = st.29 (lpoke/lpeek も可)
; InputPrimitive : D3D_PRIMITIVE (+120, 4byte) st.30 = 値 / 値 = st.30 (lpoke/lpeek も可)
; PatchConstantParameters : DWORD (+124, 4byte) st.31 = 値 / 値 = st.31 (lpoke/lpeek も可)
; cGSInstanceCount : DWORD (+128, 4byte) st.32 = 値 / 値 = st.32 (lpoke/lpeek も可)
; cControlPoints : DWORD (+132, 4byte) st.33 = 値 / 値 = st.33 (lpoke/lpeek も可)
; HSOutputPrimitive : D3D_TESSELLATOR_OUTPUT_PRIMITIVE (+136, 4byte) st.34 = 値 / 値 = st.34 (lpoke/lpeek も可)
; HSPartitioning : D3D_TESSELLATOR_PARTITIONING (+140, 4byte) st.35 = 値 / 値 = st.35 (lpoke/lpeek も可)
; TessellatorDomain : D3D_TESSELLATOR_DOMAIN (+144, 4byte) st.36 = 値 / 値 = st.36 (lpoke/lpeek も可)
; cBarrierInstructions : DWORD (+148, 4byte) st.37 = 値 / 値 = st.37 (lpoke/lpeek も可)
; cInterlockedInstructions : DWORD (+152, 4byte) st.38 = 値 / 値 = st.38 (lpoke/lpeek も可)
; cTextureStoreInstructions : DWORD (+156, 4byte) st.39 = 値 / 値 = st.39 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D11_SHADER_DESC
#field int Version
#field intptr Creator
#field int Flags
#field int ConstantBuffers
#field int BoundResources
#field int InputParameters
#field int OutputParameters
#field int InstructionCount
#field int TempRegisterCount
#field int TempArrayCount
#field int DefCount
#field int DclCount
#field int TextureNormalInstructions
#field int TextureLoadInstructions
#field int TextureCompInstructions
#field int TextureBiasInstructions
#field int TextureGradientInstructions
#field int FloatInstructionCount
#field int IntInstructionCount
#field int UintInstructionCount
#field int StaticFlowControlCount
#field int DynamicFlowControlCount
#field int MacroInstructionCount
#field int ArrayInstructionCount
#field int CutInstructionCount
#field int EmitInstructionCount
#field int GSOutputTopology
#field int GSMaxOutputVertexCount
#field int InputPrimitive
#field int PatchConstantParameters
#field int cGSInstanceCount
#field int cControlPoints
#field int HSOutputPrimitive
#field int HSPartitioning
#field int TessellatorDomain
#field int cBarrierInstructions
#field int cInterlockedInstructions
#field int cTextureStoreInstructions
#endstruct
stdim st, D3D11_SHADER_DESC ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version