From 955fb95eb6f927458b29ef74f0b183c5195a8d5d Mon Sep 17 00:00:00 2001 From: "H. Verbeet" Date: Wed, 17 Jan 2007 21:41:46 +0100 Subject: [PATCH] wined3d: Give shader constants their own debug channel. --- dlls/wined3d/arb_program_shader.c | 7 ++++--- dlls/wined3d/glsl_shader.c | 15 ++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 073a3ad3821..f76e4c71d6d 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -33,6 +33,7 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader); +WINE_DECLARE_DEBUG_CHANNEL(d3d_constants); #define GLINFO_LOCATION (*gl_info) @@ -56,7 +57,7 @@ static void shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_ if (!constant_list) { if (TRACE_ON(d3d_shader)) { for (i = 0; i < max_constants; ++i) { - TRACE("Loading constants %i: %f, %f, %f, %f\n", i, + TRACE_(d3d_constants)("Loading constants %i: %f, %f, %f, %f\n", i, constants[i * 4 + 0], constants[i * 4 + 1], constants[i * 4 + 2], constants[i * 4 + 3]); } @@ -69,7 +70,7 @@ static void shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_ if (TRACE_ON(d3d_shader)) { LIST_FOR_EACH_ENTRY(constant, constant_list, constant_entry, entry) { i = constant->idx; - TRACE("Loading constants %i: %f, %f, %f, %f\n", i, + TRACE_(d3d_constants)("Loading constants %i: %f, %f, %f, %f\n", i, constants[i * 4 + 0], constants[i * 4 + 1], constants[i * 4 + 2], constants[i * 4 + 3]); } @@ -85,7 +86,7 @@ static void shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_ if (TRACE_ON(d3d_shader)) { LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { GLfloat* values = (GLfloat*)lconst->value; - TRACE("Loading local constants %i: %f, %f, %f, %f\n", lconst->idx, + TRACE_(d3d_constants)("Loading local constants %i: %f, %f, %f, %f\n", lconst->idx, values[0], values[1], values[2], values[3]); } } diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 4bc4e21d506..9a11b5b97d9 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -32,6 +32,7 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader); +WINE_DECLARE_DEBUG_CHANNEL(d3d_constants); #define GLINFO_LOCATION (*gl_info) @@ -113,7 +114,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL for (i = 0; i < max_constants; ++i) { tmp_loc = constant_locations[i]; if (tmp_loc != -1) { - TRACE("Loading constants %i: %f, %f, %f, %f\n", i, + TRACE_(d3d_constants)("Loading constants %i: %f, %f, %f, %f\n", i, constants[i * 4 + 0], constants[i * 4 + 1], constants[i * 4 + 2], constants[i * 4 + 3]); } @@ -134,7 +135,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL i = constant->idx; tmp_loc = constant_locations[i]; if (tmp_loc != -1) { - TRACE("Loading constants %i: %f, %f, %f, %f\n", i, + TRACE_(d3d_constants)("Loading constants %i: %f, %f, %f, %f\n", i, constants[i * 4 + 0], constants[i * 4 + 1], constants[i * 4 + 2], constants[i * 4 + 3]); } @@ -157,7 +158,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL tmp_loc = constant_locations[lconst->idx]; if (tmp_loc != -1) { GLfloat* values = (GLfloat*)lconst->value; - TRACE("Loading local constants %i: %f, %f, %f, %f\n", lconst->idx, + TRACE_(d3d_constants)("Loading local constants %i: %f, %f, %f, %f\n", lconst->idx, values[0], values[1], values[2], values[3]); } } @@ -194,7 +195,7 @@ void shader_glsl_load_constantsI( for (i=0; iidx; GLint* values = (GLint*) lconst->value; - TRACE("Loading local constants %i: %i, %i, %i, %i\n", idx, + TRACE_(d3d_constants)("Loading local constants %i: %i, %i, %i, %i\n", idx, values[0], values[1], values[2], values[3]); snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, idx); @@ -252,7 +253,7 @@ void shader_glsl_load_constantsB( for (i=0; iidx; GLint* values = (GLint*) lconst->value; - TRACE("Loading local constants %i: %i\n", idx, values[0]); + TRACE_(d3d_constants)("Loading local constants %i: %i\n", idx, values[0]); snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, idx); tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name));