Module: wine Branch: master Commit: 845cd590d23649d523ecb9af2509c37ae5c421e9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=845cd590d23649d523ecb9af25...
Author: H. Verbeet hverbeet@gmail.com Date: Fri Dec 29 15:31:16 2006 +0100
wined3d: Remove dead code in shader_get_registers_used().
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.
---
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