[WINED3D] Clean up some dead code
Ivan Gyurdiev
ivg2 at cornell.edu
Sat Apr 29 23:27:00 CDT 2006
Remove some unused variables and dead code whose only purpose is to
cause confusion. If you're wondering why the GLSL FIXME is being
removed, it's because it's unreachable [ there's another one earlier ].
In fact, the one left behind should probably be removed too, since it's
misleading - most of the things marked as requring GLSL are just
unimplemented and don't require GLSL.
-------------- next part --------------
---
dlls/wined3d/pixelshader.c | 27 ++++++++++-----------------
dlls/wined3d/vertexshader.c | 17 ++++++++---------
2 files changed, 18 insertions(+), 26 deletions(-)
7d2b904d3b8ee08408d454b32ed54ca482666989
diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c
index f3ebe10..0a8f568 100644
--- a/dlls/wined3d/pixelshader.c
+++ b/dlls/wined3d/pixelshader.c
@@ -1169,12 +1169,8 @@ inline static VOID IWineD3DPixelShaderIm
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 @@ #endif
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 @@ #endif
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 ff725e5..d31ab0d 100644
--- a/dlls/wined3d/vertexshader.c
+++ b/dlls/wined3d/vertexshader.c
@@ -1116,18 +1116,22 @@ #endif
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) {
@@ -1262,12 +1266,7 @@ #endif
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;
}
}
--
1.3.0
More information about the wine-patches
mailing list