From 9d4960bfcb927644503861ae627cb79b9aceb81c Mon Sep 17 00:00:00 2001 From: Ivan Gyurdiev Date: Tue, 9 May 2006 18:09:12 -0400 Subject: [PATCH] wined3d: Clean up some dead code. --- dlls/wined3d/pixelshader.c | 27 ++++++++++----------------- dlls/wined3d/vertexshader.c | 17 ++++++++--------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 417546cd0af..e00eebfacb5 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -1169,12 +1169,8 @@ inline static VOID IWineD3DPixelShaderImpl_GenerateProgramArbHW(IWineD3DPixelSha IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface; const DWORD *pToken = pFunction; const SHADER_OPCODE *curOpcode = NULL; - const DWORD *pInstr; DWORD i; char tmpLine[255]; -#if 0 /* TODO: loop register (just another address register ) */ - BOOL hasLoops = FALSE; -#endif SHADER_BUFFER buffer; int row = 0; /* not sure, something to do with macros? */ @@ -1261,21 +1257,23 @@ inline static VOID IWineD3DPixelShaderImpl_GenerateProgramArbHW(IWineD3DPixelSha pToken += comment_len; continue; } -#if 0 /* Not sure what these are here for, they're not required for vshaders */ - code = *pToken; -#endif - pInstr = pToken; + + /* Read opcode */ curOpcode = shader_get_opcode((IWineD3DBaseShader*) This, *pToken); ++pToken; + + /* Unknown opcode and its parameters */ if (NULL == curOpcode) { - /* unknown current opcode ... (shouldn't be any!) */ while (*pToken & 0x80000000) { /* TODO: Think of a sensible name for 0x80000000 */ FIXME("unrecognized opcode: %08lx\n", *pToken); ++pToken; } + + /* Unhandled opcode */ } else if (GLNAME_REQUIRE_GLSL == curOpcode->glname) { - /* if the token isn't supported by this cross compiler then skip it and its parameters */ - FIXME("Token %s requires greater functionality than Fragment_Progarm_ARB supports\n", curOpcode->name); + + FIXME("Token %s requires greater functionality than " + "Fragment_Progarm_ARB supports\n", curOpcode->name); pToken += curOpcode->num_params; } else if (D3DSIO_DEF == curOpcode->opcode) { @@ -1420,13 +1418,8 @@ inline static VOID IWineD3DPixelShaderImpl_GenerateProgramArbHW(IWineD3DPixelSha break; default: - if (curOpcode->glname == GLNAME_REQUIRE_GLSL) { - FIXME("Opcode %s requires Gl Shader languange 1.0\n", curOpcode->name); - } else { - FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name); - } + FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name); pToken += curOpcode->num_params; - continue; } } } diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index 3e50eed87db..770242cde8e 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -1190,18 +1190,22 @@ inline static VOID IWineD3DVertexShaderImpl_GenerateProgramArbHW(IWineD3DVertexS continue; } + /* Read opcode */ curOpcode = shader_get_opcode((IWineD3DBaseShader*) This, *pToken); ++pToken; + + /* Unknown opcode and its parameters */ if (NULL == curOpcode) { - /* unknown current opcode ... (shouldn't be any!) */ while (*pToken & 0x80000000) { FIXME("unrecognized opcode: %08lx\n", *pToken); ++pToken; } + + /* Unhandled opcode */ } else if (GLNAME_REQUIRE_GLSL == curOpcode->glname) { - /* if the token isn't supported by this cross compiler then skip it and its parameters */ - FIXME("Token %s requires greater functionality than Vertex_Progarm_ARB supports\n", curOpcode->name); + FIXME("Token %s requires greater functionality than " + "Vertex_Program_ARB supports\n", curOpcode->name); pToken += curOpcode->num_params; } else if (D3DSIO_DEF == curOpcode->opcode) { @@ -1336,12 +1340,7 @@ inline static VOID IWineD3DVertexShaderImpl_GenerateProgramArbHW(IWineD3DVertexS break; default: - if (curOpcode->glname == GLNAME_REQUIRE_GLSL) { - FIXME("Opcode %s requires Gl Shader languange 1.0\n", curOpcode->name); - } else { - FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name); - } - + FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name); pToken += curOpcode->num_params; } } -- 2.11.4.GIT