Henri Verbeet : wined3d: We only care is a sampler is sampled at all in device_map_vsamplers(), not the specific type.

Alexandre Julliard julliard at winehq.org
Fri Dec 12 07:04:11 CST 2008


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Dec 12 09:33:51 2008 +0100

wined3d: We only care is a sampler is sampled at all in device_map_vsamplers(), not the specific type.

---

 dlls/wined3d/device.c          |    5 ++---
 dlls/wined3d/pixelshader.c     |    2 +-
 dlls/wined3d/wined3d_private.h |    2 --
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0541c59..2a55feb 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3861,9 +3861,8 @@ static void device_map_vsamplers(IWineD3DDeviceImpl *This, BOOL ps) {
     if (ps) {
         IWineD3DPixelShaderImpl *pshader = (IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader;
 
-        /* Make sure the shader's reg_maps are up to date. This is only relevant for 1.x pixelshaders. */
-        pixelshader_update_samplers(&pshader->baseShader.reg_maps, This->stateBlock->textures,
-                pshader->baseShader.hex_version);
+        /* Note that we only care if a sampler is sampled or not, not the sampler's specific type.
+         * Otherwise we'd need to call shader_update_samplers() here for 1.x pixelshaders. */
         pshader_sampler_tokens = pshader->baseShader.reg_maps.samplers;
     }
 
diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c
index 200a2bc..5857ce7 100644
--- a/dlls/wined3d/pixelshader.c
+++ b/dlls/wined3d/pixelshader.c
@@ -395,7 +395,7 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *i
     return WINED3D_OK;
 }
 
-void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseTexture * const *textures,
+static void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseTexture * const *textures,
         DWORD shader_version)
 {
     DWORD *samplers = reg_maps->samplers;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8cb8cea..60646c9 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2401,8 +2401,6 @@ extern const SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[];
 extern const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl;
 GLuint find_gl_pshader(IWineD3DPixelShaderImpl *shader, const struct ps_compile_args *args);
 void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, struct ps_compile_args *args);
-void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseTexture * const *textures,
-        DWORD shader_version);
 
 /* sRGB correction constants */
 static const float srgb_cmp = 0.0031308;




More information about the wine-cvs mailing list