ホーム › Graphics.Direct3D.Fxc › D3DGetDebugInfo
D3DGetDebugInfo
関数コンパイル済みシェーダーのデバッグ情報を取得する。
シグネチャ
// D3DCOMPILER_47.dll
#include <windows.h>
HRESULT D3DGetDebugInfo(
const void* pSrcData,
UINT_PTR SrcDataSize,
ID3DBlob** ppDebugInfo
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pSrcData | void* | in |
| SrcDataSize | UINT_PTR | in |
| ppDebugInfo | ID3DBlob** | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// D3DCOMPILER_47.dll
#include <windows.h>
HRESULT D3DGetDebugInfo(
const void* pSrcData,
UINT_PTR SrcDataSize,
ID3DBlob** ppDebugInfo
);[DllImport("D3DCOMPILER_47.dll", ExactSpelling = true)]
static extern int D3DGetDebugInfo(
IntPtr pSrcData, // void*
UIntPtr SrcDataSize, // UINT_PTR
IntPtr ppDebugInfo // ID3DBlob** out
);<DllImport("D3DCOMPILER_47.dll", ExactSpelling:=True)>
Public Shared Function D3DGetDebugInfo(
pSrcData As IntPtr, ' void*
SrcDataSize As UIntPtr, ' UINT_PTR
ppDebugInfo As IntPtr ' ID3DBlob** out
) As Integer
End Function' pSrcData : void*
' SrcDataSize : UINT_PTR
' ppDebugInfo : ID3DBlob** out
Declare PtrSafe Function D3DGetDebugInfo Lib "d3dcompiler_47" ( _
ByVal pSrcData As LongPtr, _
ByVal SrcDataSize As LongPtr, _
ByVal ppDebugInfo As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
D3DGetDebugInfo = ctypes.windll.d3dcompiler_47.D3DGetDebugInfo
D3DGetDebugInfo.restype = ctypes.c_int
D3DGetDebugInfo.argtypes = [
ctypes.POINTER(None), # pSrcData : void*
ctypes.c_size_t, # SrcDataSize : UINT_PTR
ctypes.c_void_p, # ppDebugInfo : ID3DBlob** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('D3DCOMPILER_47.dll')
D3DGetDebugInfo = Fiddle::Function.new(
lib['D3DGetDebugInfo'],
[
Fiddle::TYPE_VOIDP, # pSrcData : void*
Fiddle::TYPE_UINTPTR_T, # SrcDataSize : UINT_PTR
Fiddle::TYPE_VOIDP, # ppDebugInfo : ID3DBlob** out
],
Fiddle::TYPE_INT)#[link(name = "d3dcompiler_47")]
extern "system" {
fn D3DGetDebugInfo(
pSrcData: *const (), // void*
SrcDataSize: usize, // UINT_PTR
ppDebugInfo: *mut *mut core::ffi::c_void // ID3DBlob** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("D3DCOMPILER_47.dll")]
public static extern int D3DGetDebugInfo(IntPtr pSrcData, UIntPtr SrcDataSize, IntPtr ppDebugInfo);
"@
$api = Add-Type -MemberDefinition $sig -Name 'D3DCOMPILER_47_D3DGetDebugInfo' -Namespace Win32 -PassThru
# $api::D3DGetDebugInfo(pSrcData, SrcDataSize, ppDebugInfo)#uselib "D3DCOMPILER_47.dll"
#func global D3DGetDebugInfo "D3DGetDebugInfo" sptr, sptr, sptr
; D3DGetDebugInfo pSrcData, SrcDataSize, ppDebugInfo ; 戻り値は stat
; pSrcData : void* -> "sptr"
; SrcDataSize : UINT_PTR -> "sptr"
; ppDebugInfo : ID3DBlob** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "D3DCOMPILER_47.dll"
#cfunc global D3DGetDebugInfo "D3DGetDebugInfo" sptr, sptr, sptr
; res = D3DGetDebugInfo(pSrcData, SrcDataSize, ppDebugInfo)
; pSrcData : void* -> "sptr"
; SrcDataSize : UINT_PTR -> "sptr"
; ppDebugInfo : ID3DBlob** out -> "sptr"; HRESULT D3DGetDebugInfo(void* pSrcData, UINT_PTR SrcDataSize, ID3DBlob** ppDebugInfo)
#uselib "D3DCOMPILER_47.dll"
#cfunc global D3DGetDebugInfo "D3DGetDebugInfo" intptr, intptr, intptr
; res = D3DGetDebugInfo(pSrcData, SrcDataSize, ppDebugInfo)
; pSrcData : void* -> "intptr"
; SrcDataSize : UINT_PTR -> "intptr"
; ppDebugInfo : ID3DBlob** out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
d3dcompiler_47 = windows.NewLazySystemDLL("D3DCOMPILER_47.dll")
procD3DGetDebugInfo = d3dcompiler_47.NewProc("D3DGetDebugInfo")
)
// pSrcData (void*), SrcDataSize (UINT_PTR), ppDebugInfo (ID3DBlob** out)
r1, _, err := procD3DGetDebugInfo.Call(
uintptr(pSrcData),
uintptr(SrcDataSize),
uintptr(ppDebugInfo),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction D3DGetDebugInfo(
pSrcData: Pointer; // void*
SrcDataSize: NativeUInt; // UINT_PTR
ppDebugInfo: Pointer // ID3DBlob** out
): Integer; stdcall;
external 'D3DCOMPILER_47.dll' name 'D3DGetDebugInfo';result := DllCall("D3DCOMPILER_47\D3DGetDebugInfo"
, "Ptr", pSrcData ; void*
, "UPtr", SrcDataSize ; UINT_PTR
, "Ptr", ppDebugInfo ; ID3DBlob** out
, "Int") ; return: HRESULT●D3DGetDebugInfo(pSrcData, SrcDataSize, ppDebugInfo) = DLL("D3DCOMPILER_47.dll", "int D3DGetDebugInfo(void*, int, void*)")
# 呼び出し: D3DGetDebugInfo(pSrcData, SrcDataSize, ppDebugInfo)
# pSrcData : void* -> "void*"
# SrcDataSize : UINT_PTR -> "int"
# ppDebugInfo : ID3DBlob** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。