From cb876cdb97df011b87c527550a5129cac63631c9 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 23 Oct 2012 21:01:04 +0200 Subject: [PATCH] d3d10: Implement D3D10DisassembleShader(). --- dlls/d3d10/d3d10.spec | 2 +- dlls/d3d10/shader.c | 9 +++++++++ include/d3d10shader.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/d3d10/d3d10.spec b/dlls/d3d10/d3d10.spec index 9f6210be578..1e6eb3611c0 100644 --- a/dlls/d3d10/d3d10.spec +++ b/dlls/d3d10/d3d10.spec @@ -7,7 +7,7 @@ @ stub D3D10CreateEffectPoolFromMemory @ stdcall D3D10CreateStateBlock(ptr ptr ptr) @ stub D3D10DisassembleEffect -@ stub D3D10DisassembleShader +@ stdcall D3D10DisassembleShader(ptr long long ptr ptr) @ stdcall D3D10GetGeometryShaderProfile(ptr) @ stdcall D3D10GetInputAndOutputSignatureBlob(ptr long ptr) d3dcompiler_43.D3DGetInputAndOutputSignatureBlob @ stdcall D3D10GetInputSignatureBlob(ptr long ptr) d3dcompiler_43.D3DGetInputSignatureBlob diff --git a/dlls/d3d10/shader.c b/dlls/d3d10/shader.c index 499da12e08f..864f21f31ce 100644 --- a/dlls/d3d10/shader.c +++ b/dlls/d3d10/shader.c @@ -147,3 +147,12 @@ HRESULT WINAPI D3D10CompileShader(const char *data, SIZE_T data_size, const char return D3DCompile(data, data_size, filename, defines, include, entrypoint, profile, flags, 0, shader, error_messages); } + +HRESULT WINAPI D3D10DisassembleShader(const void *data, SIZE_T data_size, + BOOL color_code, const char *comments, ID3D10Blob **disassembly) +{ + TRACE("data %p, data_size %#lx, color_code %#x, comments %p, disassembly %p.\n", + data, data_size, color_code, comments, disassembly); + + return D3DDisassemble(data, data_size, color_code ? D3D_DISASM_ENABLE_COLOR_CODE : 0, comments, disassembly); +} diff --git a/include/d3d10shader.h b/include/d3d10shader.h index af325391a49..06b4c3ea2e8 100644 --- a/include/d3d10shader.h +++ b/include/d3d10shader.h @@ -214,6 +214,8 @@ extern "C" { HRESULT WINAPI D3D10CompileShader(LPCSTR data, SIZE_T data_size, LPCSTR filename, const D3D10_SHADER_MACRO *defines, ID3D10Include *include, LPCSTR entrypoint, LPCSTR profile, UINT flags, ID3D10Blob **shader, ID3D10Blob **error_messages); +HRESULT WINAPI D3D10DisassembleShader(const void *data, SIZE_T data_size, + BOOL color_code, const char *comments, ID3D10Blob **disassembly); LPCSTR WINAPI D3D10GetVertexShaderProfile(ID3D10Device *device); LPCSTR WINAPI D3D10GetGeometryShaderProfile(ID3D10Device *device); LPCSTR WINAPI D3D10GetPixelShaderProfile(ID3D10Device *device);