From 7f617f3d2e94e8b673b27f302c6612cf99e8c40b Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 9 Sep 2009 18:12:38 +0200 Subject: [PATCH] d3d10: Add a debug function for D3D10_SHADER_VARIABLE_CLASS. --- dlls/d3d10/d3d10_private.h | 1 + dlls/d3d10/effect.c | 2 +- dlls/d3d10/utils.c | 18 +++++++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h index bbcbef01642..2ba0d1183e7 100644 --- a/dlls/d3d10/d3d10_private.h +++ b/dlls/d3d10/d3d10_private.h @@ -31,6 +31,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); void *d3d10_rb_alloc(size_t size); void *d3d10_rb_realloc(void *ptr, size_t size); diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 4ce26db69fd..3ec3a38c2d3 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -487,7 +487,7 @@ static HRESULT parse_fx10_type(struct d3d10_effect_type *t, const char *ptr, con TRACE("\tcolumns: %u.\n", t->column_count); TRACE("\trows: %u.\n", t->row_count); TRACE("\tbasetype: %#x.\n", t->basetype); - TRACE("\tclass: %#x.\n", t->type_class); + 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)); } diff --git a/dlls/d3d10/utils.c b/dlls/d3d10/utils.c index 2424557a4cc..7ee851211e8 100644 --- a/dlls/d3d10/utils.c +++ b/dlls/d3d10/utils.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Henri Verbeet for CodeWeavers + * Copyright 2008-2009 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -40,6 +40,22 @@ const char *debug_d3d10_driver_type(D3D10_DRIVER_TYPE driver_type) } } +const char *debug_d3d10_shader_variable_class(D3D10_SHADER_VARIABLE_CLASS c) +{ + switch (c) + { + WINE_D3D10_TO_STR(D3D10_SVC_SCALAR); + WINE_D3D10_TO_STR(D3D10_SVC_VECTOR); + WINE_D3D10_TO_STR(D3D10_SVC_MATRIX_ROWS); + WINE_D3D10_TO_STR(D3D10_SVC_MATRIX_COLUMNS); + WINE_D3D10_TO_STR(D3D10_SVC_OBJECT); + WINE_D3D10_TO_STR(D3D10_SVC_STRUCT); + default: + FIXME("Unrecognized D3D10_SHADER_VARIABLE_CLASS %#x.\n", c); + return "unrecognized"; + } +} + #undef WINE_D3D10_TO_STR void *d3d10_rb_alloc(size_t size)