d3d10: Add a debug function for D3D10_SHADER_VARIABLE_TYPE.

This commit is contained in:
Henri Verbeet 2009-09-09 18:12:39 +02:00 committed by Alexandre Julliard
parent 7f617f3d2e
commit ecc6a9519f
3 changed files with 41 additions and 1 deletions

View File

@ -32,6 +32,7 @@
/* TRACE helper functions */
const char *debug_d3d10_driver_type(D3D10_DRIVER_TYPE driver_type);
const char *debug_d3d10_shader_variable_class(D3D10_SHADER_VARIABLE_CLASS c);
const char *debug_d3d10_shader_variable_type(D3D10_SHADER_VARIABLE_TYPE t);
void *d3d10_rb_alloc(size_t size);
void *d3d10_rb_realloc(void *ptr, size_t size);

View File

@ -486,7 +486,7 @@ static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, con
TRACE("Type description: %#x.\n", tmp);
TRACE("\tcolumns: %u.\n", t->column_count);
TRACE("\trows: %u.\n", t->row_count);
TRACE("\tbasetype: %#x.\n", t->basetype);
TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
TRACE("\tunknown bits: %#x.\n", tmp & ~(D3D10_FX10_TYPE_COLUMN_MASK | D3D10_FX10_TYPE_ROW_MASK
| D3D10_FX10_TYPE_BASETYPE_MASK | D3D10_FX10_TYPE_CLASS_MASK));

View File

@ -56,6 +56,45 @@ const char *debug_d3d10_shader_variable_class(D3D10_SHADER_VARIABLE_CLASS c)
}
}
const char *debug_d3d10_shader_variable_type(D3D10_SHADER_VARIABLE_TYPE t)
{
switch (t)
{
WINE_D3D10_TO_STR(D3D10_SVT_VOID);
WINE_D3D10_TO_STR(D3D10_SVT_BOOL);
WINE_D3D10_TO_STR(D3D10_SVT_INT);
WINE_D3D10_TO_STR(D3D10_SVT_FLOAT);
WINE_D3D10_TO_STR(D3D10_SVT_STRING);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURE);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURE1D);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURE2D);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURE3D);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURECUBE);
WINE_D3D10_TO_STR(D3D10_SVT_SAMPLER);
WINE_D3D10_TO_STR(D3D10_SVT_PIXELSHADER);
WINE_D3D10_TO_STR(D3D10_SVT_VERTEXSHADER);
WINE_D3D10_TO_STR(D3D10_SVT_UINT);
WINE_D3D10_TO_STR(D3D10_SVT_UINT8);
WINE_D3D10_TO_STR(D3D10_SVT_GEOMETRYSHADER);
WINE_D3D10_TO_STR(D3D10_SVT_RASTERIZER);
WINE_D3D10_TO_STR(D3D10_SVT_DEPTHSTENCIL);
WINE_D3D10_TO_STR(D3D10_SVT_BLEND);
WINE_D3D10_TO_STR(D3D10_SVT_BUFFER);
WINE_D3D10_TO_STR(D3D10_SVT_CBUFFER);
WINE_D3D10_TO_STR(D3D10_SVT_TBUFFER);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURE1DARRAY);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURE2DARRAY);
WINE_D3D10_TO_STR(D3D10_SVT_RENDERTARGETVIEW);
WINE_D3D10_TO_STR(D3D10_SVT_DEPTHSTENCILVIEW);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURE2DMS);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURE2DMSARRAY);
WINE_D3D10_TO_STR(D3D10_SVT_TEXTURECUBEARRAY);
default:
FIXME("Unrecognized D3D10_SHADER_VARIABLE_TYPE %#x.\n", t);
return "unrecognized";
}
}
#undef WINE_D3D10_TO_STR
void *d3d10_rb_alloc(size_t size)