Commit 7832577a authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dcompiler: Add debug helper for shader variable type.

parent 525dee07
......@@ -42,6 +42,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;
const char *debug_d3dcompiler_shader_variable_type(D3D_SHADER_VARIABLE_TYPE t) DECLSPEC_HIDDEN;
/* ID3DBlob */
struct d3dcompiler_blob
......
......@@ -1212,7 +1212,8 @@ static HRESULT d3dcompiler_parse_type(struct d3dcompiler_shader_reflection_type
read_dword(&ptr, &temp);
desc->Class = temp & 0xffff;
desc->Type = temp >> 16;
TRACE("Class %s, Type %x\n", debug_d3dcompiler_shader_variable_class(desc->Class), desc->Type);
TRACE("Class %s, Type %s\n", debug_d3dcompiler_shader_variable_class(desc->Class),
debug_d3dcompiler_shader_variable_type(desc->Type));
read_dword(&ptr, &temp);
desc->Rows = temp & 0xffff;
......
......@@ -47,6 +47,62 @@ const char *debug_d3dcompiler_shader_variable_class(D3D_SHADER_VARIABLE_CLASS c)
}
}
const char *debug_d3dcompiler_shader_variable_type(D3D_SHADER_VARIABLE_TYPE t)
{
switch (t)
{
WINE_D3DCOMPILER_TO_STR(D3D_SVT_VOID);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_BOOL);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_INT);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_FLOAT);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_STRING);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE1D);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE2D);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE3D);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURECUBE);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_SAMPLER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_PIXELSHADER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_VERTEXSHADER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_UINT);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_UINT8);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_GEOMETRYSHADER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RASTERIZER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_DEPTHSTENCIL);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_BLEND);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_BUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_CBUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TBUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE1DARRAY);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE2DARRAY);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RENDERTARGETVIEW);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_DEPTHSTENCILVIEW);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE2DMS);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE2DMSARRAY);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURECUBEARRAY);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_HULLSHADER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_DOMAINSHADER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_INTERFACE_POINTER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_COMPUTESHADER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_DOUBLE);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE1D);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE1DARRAY);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE2D);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE2DARRAY);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE3D);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWBUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_BYTEADDRESS_BUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWBYTEADDRESS_BUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_STRUCTURED_BUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWSTRUCTURED_BUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_APPEND_STRUCTURED_BUFFER);
WINE_D3DCOMPILER_TO_STR(D3D_SVT_CONSUME_STRUCTURED_BUFFER);
default:
FIXME("Unrecognized D3D_SHADER_VARIABLE_TYPE %#x.\n", t);
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