From 71a8a77cf9af7c3aecae2a7c853d1ba2df677235 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 4 Dec 2008 17:41:31 +0100 Subject: [PATCH] wined3d: Explicitly pass the shader version to shader_dump_decl_usage(). --- dlls/wined3d/baseshader.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c index 5cc992f82bb..87a70228bde 100644 --- a/dlls/wined3d/baseshader.c +++ b/dlls/wined3d/baseshader.c @@ -491,11 +491,8 @@ HRESULT shader_get_registers_used( return WINED3D_OK; } -static void shader_dump_decl_usage( - IWineD3DBaseShaderImpl* This, - DWORD decl, - DWORD param) { - +static void shader_dump_decl_usage(DWORD decl, DWORD param, DWORD shader_version) +{ DWORD regtype = shader_get_regtype(param); TRACE("dcl"); @@ -516,8 +513,7 @@ static void shader_dump_decl_usage( DWORD idx = (decl & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT; /* Pixel shaders 3.0 don't have usage semantics */ - char pshader = shader_is_pshader_version(This->baseShader.hex_version); - if (pshader && This->baseShader.hex_version < WINED3DPS_VERSION(3,0)) + if (shader_is_pshader_version(shader_version) && shader_version < WINED3DPS_VERSION(3,0)) return; else TRACE("_"); @@ -1027,7 +1023,7 @@ void shader_trace_init( DWORD usage = *pToken; DWORD param = *(pToken + 1); - shader_dump_decl_usage(This, usage, param); + shader_dump_decl_usage(usage, param, This->baseShader.hex_version); shader_dump_ins_modifiers(param); TRACE(" "); shader_dump_param(iface, param, 0, 0);