Commit 525dee07 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dcompiler: Add debug helper for shader variable class.

parent e71a2350
......@@ -41,6 +41,7 @@
/* TRACE helper functions */
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;
/* ID3DBlob */
struct d3dcompiler_blob
......
......@@ -1212,7 +1212,7 @@ static HRESULT d3dcompiler_parse_type(struct d3dcompiler_shader_reflection_type
read_dword(&ptr, &temp);
desc->Class = temp & 0xffff;
desc->Type = temp >> 16;
TRACE("Class %x, Type %x\n", desc->Class, desc->Type);
TRACE("Class %s, Type %x\n", debug_d3dcompiler_shader_variable_class(desc->Class), desc->Type);
read_dword(&ptr, &temp);
desc->Rows = temp & 0xffff;
......
......@@ -29,6 +29,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);
#define WINE_D3DCOMPILER_TO_STR(x) case x: return #x
const char *debug_d3dcompiler_shader_variable_class(D3D_SHADER_VARIABLE_CLASS c)
{
switch (c)
{
WINE_D3DCOMPILER_TO_STR(D3D_SVC_SCALAR);
WINE_D3DCOMPILER_TO_STR(D3D_SVC_VECTOR);
WINE_D3DCOMPILER_TO_STR(D3D_SVC_MATRIX_ROWS);
WINE_D3DCOMPILER_TO_STR(D3D_SVC_MATRIX_COLUMNS);
WINE_D3DCOMPILER_TO_STR(D3D_SVC_OBJECT);
WINE_D3DCOMPILER_TO_STR(D3D_SVC_STRUCT);
WINE_D3DCOMPILER_TO_STR(D3D_SVC_INTERFACE_CLASS);
WINE_D3DCOMPILER_TO_STR(D3D_SVC_INTERFACE_POINTER);
default:
FIXME("Unrecognized D3D_SHADER_VARIABLE_CLASS %#x.\n", c);
return "unrecognized";
}
}
const char *debug_d3dcompiler_d3d_blob_part(D3D_BLOB_PART part)
{
switch(part)
......
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