Commit 5c999d65 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dcompiler: Move blob and strip functions to blob.c.

parent c4530c56
...@@ -220,7 +220,7 @@ static BOOL check_blob_part(DWORD tag, D3D_BLOB_PART part) ...@@ -220,7 +220,7 @@ static BOOL check_blob_part(DWORD tag, D3D_BLOB_PART part)
return add; return add;
} }
HRESULT d3dcompiler_get_blob_part(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob) static HRESULT d3dcompiler_get_blob_part(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob)
{ {
struct dxbc src_dxbc, dst_dxbc; struct dxbc src_dxbc, dst_dxbc;
HRESULT hr; HRESULT hr;
...@@ -361,7 +361,7 @@ static BOOL check_blob_strip(DWORD tag, UINT flags) ...@@ -361,7 +361,7 @@ static BOOL check_blob_strip(DWORD tag, UINT flags)
return add; return add;
} }
HRESULT d3dcompiler_strip_shader(const void *data, SIZE_T data_size, UINT flags, ID3DBlob **blob) static HRESULT d3dcompiler_strip_shader(const void *data, SIZE_T data_size, UINT flags, ID3DBlob **blob)
{ {
struct dxbc src_dxbc, dst_dxbc; struct dxbc src_dxbc, dst_dxbc;
HRESULT hr; HRESULT hr;
...@@ -423,3 +423,46 @@ HRESULT d3dcompiler_strip_shader(const void *data, SIZE_T data_size, UINT flags, ...@@ -423,3 +423,46 @@ HRESULT d3dcompiler_strip_shader(const void *data, SIZE_T data_size, UINT flags,
return hr; return hr;
} }
HRESULT WINAPI D3DGetBlobPart(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, part %s, flags %#x, blob %p\n", data,
data_size, debug_d3dcompiler_d3d_blob_part(part), flags, blob);
return d3dcompiler_get_blob_part(data, data_size, part, flags, blob);
}
HRESULT WINAPI D3DGetInputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob);
return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_INPUT_SIGNATURE_BLOB, 0, blob);
}
HRESULT WINAPI D3DGetOutputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob);
return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_OUTPUT_SIGNATURE_BLOB, 0, blob);
}
HRESULT WINAPI D3DGetInputAndOutputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob);
return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, 0, blob);
}
HRESULT WINAPI D3DGetDebugInfo(const void *data, SIZE_T data_size, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob);
return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_DEBUG_INFO, 0, blob);
}
HRESULT WINAPI D3DStripShader(const void *data, SIZE_T data_size, UINT flags, ID3D10Blob **blob)
{
TRACE("data %p, data_size %lu, flags %#x, blob %p\n", data, data_size, flags, blob);
return d3dcompiler_strip_shader(data, data_size, flags, blob);
}
...@@ -25,12 +25,9 @@ ...@@ -25,12 +25,9 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "wine/debug.h"
#include "d3dcompiler_private.h" #include "d3dcompiler_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
{ {
switch (reason) switch (reason)
...@@ -45,46 +42,3 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) ...@@ -45,46 +42,3 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
} }
return TRUE; return TRUE;
} }
HRESULT WINAPI D3DGetBlobPart(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, part %s, flags %#x, blob %p\n", data,
data_size, debug_d3dcompiler_d3d_blob_part(part), flags, blob);
return d3dcompiler_get_blob_part(data, data_size, part, flags, blob);
}
HRESULT WINAPI D3DGetInputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob);
return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_INPUT_SIGNATURE_BLOB, 0, blob);
}
HRESULT WINAPI D3DGetOutputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob);
return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_OUTPUT_SIGNATURE_BLOB, 0, blob);
}
HRESULT WINAPI D3DGetInputAndOutputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob);
return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, 0, blob);
}
HRESULT WINAPI D3DGetDebugInfo(const void *data, SIZE_T data_size, ID3DBlob **blob)
{
TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob);
return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_DEBUG_INFO, 0, blob);
}
HRESULT WINAPI D3DStripShader(const void *data, SIZE_T data_size, UINT flags, ID3D10Blob **blob)
{
TRACE("data %p, data_size %lu, flags %#x, blob %p\n", data, data_size, flags, blob);
return d3dcompiler_strip_shader(data, data_size, flags, blob);
}
...@@ -44,10 +44,6 @@ const char *debug_d3dcompiler_d3d_blob_part(D3D_BLOB_PART part) DECLSPEC_HIDDEN; ...@@ -44,10 +44,6 @@ const char *debug_d3dcompiler_d3d_blob_part(D3D_BLOB_PART part) DECLSPEC_HIDDEN;
const char *debug_d3dcompiler_shader_variable_class(D3D_SHADER_VARIABLE_CLASS c) DECLSPEC_HIDDEN; const char *debug_d3dcompiler_shader_variable_class(D3D_SHADER_VARIABLE_CLASS c) DECLSPEC_HIDDEN;
const char *debug_d3dcompiler_shader_variable_type(D3D_SHADER_VARIABLE_TYPE t) DECLSPEC_HIDDEN; const char *debug_d3dcompiler_shader_variable_type(D3D_SHADER_VARIABLE_TYPE t) DECLSPEC_HIDDEN;
/* blob handling */
HRESULT d3dcompiler_get_blob_part(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob) DECLSPEC_HIDDEN;
HRESULT d3dcompiler_strip_shader(const void *data, SIZE_T data_size, UINT flags, ID3DBlob **blob) DECLSPEC_HIDDEN;
/* Shader assembler definitions */ /* Shader assembler definitions */
typedef enum _shader_type { typedef enum _shader_type {
ST_VERTEX, ST_VERTEX,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment