d3dcompiler: Move blob and strip functions to blob.c.
This commit is contained in:
parent
c4530c56d1
commit
5c999d650f
|
@ -220,7 +220,7 @@ static BOOL check_blob_part(DWORD tag, D3D_BLOB_PART part)
|
|||
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;
|
||||
HRESULT hr;
|
||||
|
@ -361,7 +361,7 @@ static BOOL check_blob_strip(DWORD tag, UINT flags)
|
|||
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;
|
||||
HRESULT hr;
|
||||
|
@ -423,3 +423,46 @@ HRESULT d3dcompiler_strip_shader(const void *data, SIZE_T data_size, UINT flags,
|
|||
|
||||
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 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "d3dcompiler_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
switch (reason)
|
||||
|
@ -45,46 +42,3 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
|
|||
}
|
||||
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;
|
|||
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;
|
||||
|
||||
/* 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 */
|
||||
typedef enum _shader_type {
|
||||
ST_VERTEX,
|
||||
|
|
Loading…
Reference in New Issue