[1/6] wined3d: Remove dead code in shader_get_registers_used()

H. Verbeet hverbeet at gmail.com
Fri Dec 29 08:31:16 CST 2006


As spotted by Christoph Bumiller, these branches are now never
reached. Also, at least in the case of WINED3DSIO_TEXM3x3SPEC and
WINED3DSIO_TEXM3x3VSPEC the old code was not quite correct, since we
can lookup rather than guess the texture type these days.

Changelog:
  - Remove dead code in shader_get_registers_used()
-------------- next part --------------
---

 dlls/wined3d/baseshader.c |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c
index 54ebfcd..5e58721 100644
--- a/dlls/wined3d/baseshader.c
+++ b/dlls/wined3d/baseshader.c
@@ -335,23 +335,6 @@ HRESULT shader_get_registers_used(
                             reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_2D;
                     }
                 }
-
-            } else if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1 &&
-                (WINED3DSIO_TEXM3x3SPEC == curOpcode->opcode ||
-                 WINED3DSIO_TEXM3x3VSPEC == curOpcode->opcode)) {
-
-                /* 3D sampler usage, only set reserved bit and ttype
-                 * FIXME: This could be either Cube or Volume, but we wouldn't know unless
-                 * we waited to generate the shader until the textures were all bound.
-                 * For now, use Cube textures because they are more common. */
-                DWORD sampler_code = *pToken & WINED3DSP_REGNUM_MASK;
-                reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_CUBE;
-            } else if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1 &&
-                (WINED3DSIO_TEXDP3TEX == curOpcode->opcode)) {
-                
-                /* 1D Sampler usage */
-                DWORD sampler_code = *pToken & WINED3DSP_REGNUM_MASK;
-                reg_maps->samplers[sampler_code] = (0x1 << 31) | WINED3DSTT_1D;
             }
 
             /* This will loop over all the registers and try to


More information about the wine-patches mailing list