wined3d: We only care is a sampler is sampled at all in device_map_vsamplers(), not...
authorHenri Verbeet <hverbeet@codeweavers.com>
Fri, 12 Dec 2008 08:33:51 +0000 (09:33 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 12 Dec 2008 10:40:26 +0000 (11:40 +0100)
dlls/wined3d/device.c
dlls/wined3d/pixelshader.c
dlls/wined3d/wined3d_private.h

index 0541c59c8c3a4be695668a75c237aa06952049fd..2a55feb61be964f9e6b7e20d25a795b1c3106acf 100644 (file)
@@ -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;
     }
 
index 200a2bc9a1316be90cc3951052c0100848cd513d..5857ce7f496a9b015dbdcaaccaf36e89aee84074 100644 (file)
@@ -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;
index 8cb8ceac1931fbc25d84f0965d6abfec66c09628..60646c94d2df0b8fa7c9f5a49c3932021b346623 100644 (file)
@@ -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;