[PATCH] WineD3D: Don't enable texture dimensions with shaders=0A=
Stefan Doesinger
stefan at codeweavers.com
Tue Aug 12 12:46:54 CDT 2008
=0A=
ARB and GLSL don't need that. If a shader backend like atifs or=0A=
nvts need it in the future, the shader backend should deal with=0A=
that rather than the ffp pipeline=0A=
---=0A=
dlls/wined3d/state.c | 13 +------------=0A=
1 files changed, 1 insertions(+), 12 deletions(-)=0A=
=0A=
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c=0A=
index 84be28b..5b92420 100644=0A=
--- a/dlls/wined3d/state.c=0A=
+++ b/dlls/wined3d/state.c=0A=
@@ -3528,18 +3528,7 @@ static void sampler(DWORD state, =
IWineD3DStateBlockImpl *stateblock, WineD3DCont=0A=
checkGLcall("glTexEnvi(GL_TEXTURE_LOD_BIAS_EXT, ...)");=0A=
}=0A=
=0A=
- if (stateblock->wineD3DDevice->ps_selected_mode !=3D =
SHADER_NONE && stateblock->pixelShader &&=0A=
- ((IWineD3DPixelShaderImpl =
*)stateblock->pixelShader)->baseShader.function) {=0A=
- /* Using a pixel shader? Verify the sampler types */=0A=
-=0A=
- /* Make sure that the texture dimensions are enabled. I =
don't have to disable the other=0A=
- * dimensions because the shader knows from which texture =
type to sample from. For the sake of=0A=
- * debugging all dimensions could be enabled and a texture =
with some ugly pink bound to the unused=0A=
- * dimensions. This should make wrong sampling sources =
visible :-)=0A=
- */=0A=
- glEnable(stateblock->textureDimensions[sampler]);=0A=
- =
checkGLcall("glEnable(stateblock->textureDimensions[sampler])");=0A=
- } else if(sampler < stateblock->lowest_disabled_stage) {=0A=
+ if(!use_ps(stateblock->wineD3DDevice) && sampler < =
stateblock->lowest_disabled_stage) {=0A=
if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && =
sampler =3D=3D 0) {=0A=
/* If color keying is enabled update the alpha test, it =
depends on the existence=0A=
* of a color key in stage 0=0A=
-- =0A=
1.5.4.5=0A=
=0A=
------=_NextPart_000_005D_01C902BC.9DAB3480--
More information about the wine-patches
mailing list