Stefan Dösinger : wined3d: Don' t enable texture dimensions with shaders.

Alexandre Julliard julliard at winehq.org
Thu Aug 21 10:02:46 CDT 2008


Module: wine
Branch: master
Commit: ec94c2ea99763d5dc4805d2da981828120ad8ba6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ec94c2ea99763d5dc4805d2da981828120ad8ba6

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Aug 12 12:46:54 2008 -0500

wined3d: Don't enable texture dimensions with shaders.

ARB and GLSL don't need that. If a shader backend like atifs or nvts
need it in the future, the shader backend should deal with that rather
than the ffp pipeline.

---

 dlls/wined3d/state.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 84be28b..5b92420 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3528,18 +3528,7 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont
             checkGLcall("glTexEnvi(GL_TEXTURE_LOD_BIAS_EXT, ...)");
         }
 
-        if (stateblock->wineD3DDevice->ps_selected_mode != SHADER_NONE && stateblock->pixelShader &&
-            ((IWineD3DPixelShaderImpl *)stateblock->pixelShader)->baseShader.function) {
-            /* Using a pixel shader? Verify the sampler types */
-
-            /* Make sure that the texture dimensions are enabled. I don't have to disable the other
-             * dimensions because the shader knows from which texture type to sample from. For the sake of
-             * debugging all dimensions could be enabled and a texture with some ugly pink bound to the unused
-             * dimensions. This should make wrong sampling sources visible :-)
-             */
-            glEnable(stateblock->textureDimensions[sampler]);
-            checkGLcall("glEnable(stateblock->textureDimensions[sampler])");
-        } else if(sampler < stateblock->lowest_disabled_stage) {
+        if(!use_ps(stateblock->wineD3DDevice) && sampler < stateblock->lowest_disabled_stage) {
             if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && sampler == 0) {
                 /* If color keying is enabled update the alpha test, it depends on the existence
                  * of a color key in stage 0




More information about the wine-cvs mailing list