ホーム › Graphics.Direct3D12 › D3D12_SET_GENERIC_PIPELINE_DESC
D3D12_SET_GENERIC_PIPELINE_DESC
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ProgramIdentifier | D3D12_PROGRAM_IDENTIFIER | 32 | +0 | +0 | 設定する汎用パイプラインプログラムの識別子。 |
各言語での定義
#include <windows.h>
// D3D12_PROGRAM_IDENTIFIER (x64 32 / x86 32 バイト)
typedef struct D3D12_PROGRAM_IDENTIFIER {
ULONGLONG OpaqueData[4];
} D3D12_PROGRAM_IDENTIFIER;
// D3D12_SET_GENERIC_PIPELINE_DESC (x64 32 / x86 32 バイト)
typedef struct D3D12_SET_GENERIC_PIPELINE_DESC {
D3D12_PROGRAM_IDENTIFIER ProgramIdentifier;
} D3D12_SET_GENERIC_PIPELINE_DESC;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_PROGRAM_IDENTIFIER
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public ulong[] OpaqueData;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_SET_GENERIC_PIPELINE_DESC
{
public D3D12_PROGRAM_IDENTIFIER ProgramIdentifier;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_PROGRAM_IDENTIFIER
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=4)> Public OpaqueData() As ULong
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_SET_GENERIC_PIPELINE_DESC
Public ProgramIdentifier As D3D12_PROGRAM_IDENTIFIER
End Structureimport ctypes
from ctypes import wintypes
class D3D12_PROGRAM_IDENTIFIER(ctypes.Structure):
_fields_ = [
("OpaqueData", ctypes.c_ulonglong * 4),
]
class D3D12_SET_GENERIC_PIPELINE_DESC(ctypes.Structure):
_fields_ = [
("ProgramIdentifier", D3D12_PROGRAM_IDENTIFIER),
]#[repr(C)]
pub struct D3D12_PROGRAM_IDENTIFIER {
pub OpaqueData: [u64; 4],
}
#[repr(C)]
pub struct D3D12_SET_GENERIC_PIPELINE_DESC {
pub ProgramIdentifier: D3D12_PROGRAM_IDENTIFIER,
}import "golang.org/x/sys/windows"
type D3D12_PROGRAM_IDENTIFIER struct {
OpaqueData [4]uint64
}
type D3D12_SET_GENERIC_PIPELINE_DESC struct {
ProgramIdentifier D3D12_PROGRAM_IDENTIFIER
}type
D3D12_PROGRAM_IDENTIFIER = record
OpaqueData: array[0..3] of UInt64;
end;
D3D12_SET_GENERIC_PIPELINE_DESC = record
ProgramIdentifier: D3D12_PROGRAM_IDENTIFIER;
end;const D3D12_PROGRAM_IDENTIFIER = extern struct {
OpaqueData: [4]u64,
};
const D3D12_SET_GENERIC_PIPELINE_DESC = extern struct {
ProgramIdentifier: D3D12_PROGRAM_IDENTIFIER,
};type
D3D12_PROGRAM_IDENTIFIER {.bycopy.} = object
OpaqueData: array[4, uint64]
D3D12_SET_GENERIC_PIPELINE_DESC {.bycopy.} = object
ProgramIdentifier: D3D12_PROGRAM_IDENTIFIERstruct D3D12_PROGRAM_IDENTIFIER
{
ulong[4] OpaqueData;
}
struct D3D12_SET_GENERIC_PIPELINE_DESC
{
D3D12_PROGRAM_IDENTIFIER ProgramIdentifier;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_SET_GENERIC_PIPELINE_DESC サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; ProgramIdentifier : D3D12_PROGRAM_IDENTIFIER (+0, 32byte) varptr(st)+0 を基点に操作(32byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global D3D12_PROGRAM_IDENTIFIER
#field int64 OpaqueData 4
#endstruct
#defstruct global D3D12_SET_GENERIC_PIPELINE_DESC
#field D3D12_PROGRAM_IDENTIFIER ProgramIdentifier
#endstruct
stdim st, D3D12_SET_GENERIC_PIPELINE_DESC ; NSTRUCT 変数を確保