wined3d: Make use of the ps_compile_args structure in glsl_shader.
authorStefan Dösinger <stefan@codeweavers.com>
Sun, 14 Dec 2008 14:42:04 +0000 (15:42 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 19 Dec 2008 16:16:50 +0000 (17:16 +0100)
Only a first step, many more occasions need fixing. This is an easy
one though.

dlls/wined3d/glsl_shader.c

index c16e56aa4bed76d3f7a64caf7510ee1c1aa3bd08..968acbb45cfd8062e4733fefbbeca165a31a5779 100644 (file)
@@ -3663,7 +3663,7 @@ static GLuint shader_glsl_generate_pshader(IWineD3DPixelShader *iface, SHADER_BU
     } else {
         fragcolor = "gl_FragColor";
     }
-    if(((IWineD3DDeviceImpl *)This->baseShader.device)->stateBlock->renderState[WINED3DRS_SRGBWRITEENABLE]) {
+    if(args->srgb_correction) {
         shader_addline(buffer, "tmp0.xyz = pow(%s.xyz, vec3(%f, %f, %f)) * vec3(%f, %f, %f) - vec3(%f, %f, %f);\n",
                         fragcolor, srgb_pow, srgb_pow, srgb_pow, srgb_mul_high, srgb_mul_high, srgb_mul_high,
                         srgb_sub_high, srgb_sub_high, srgb_sub_high);