[PATCH 3/6] wined3d: Get the framebuffer height from the view in shader_glsl_load_constants().

Henri Verbeet hverbeet at codeweavers.com
Wed Mar 23 11:58:21 CDT 2016


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/wined3d/glsl_shader.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 11f103e..8892d49 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1430,16 +1430,16 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
 
     if (update_mask & WINED3D_SHADER_CONST_PS_Y_CORR)
     {
-        float correction_params[] =
+        const struct wined3d_vec4 correction_params =
         {
-            /* position is window relative, not viewport relative */
-            context->render_offscreen ? 0.0f : (float)context->current_rt->resource.height,
+            /* Position is relative to the framebuffer, not the viewport. */
+            context->render_offscreen ? 0.0f : (float)state->fb->render_targets[0]->height,
             context->render_offscreen ? 1.0f : -1.0f,
             0.0f,
             0.0f,
         };
 
-        GL_EXTCALL(glUniform4fv(prog->ps.ycorrection_location, 1, correction_params));
+        GL_EXTCALL(glUniform4fv(prog->ps.ycorrection_location, 1, &correction_params.x));
     }
 
     if (update_mask & WINED3D_SHADER_CONST_PS_NP2_FIXUP)
-- 
2.1.4




More information about the wine-patches mailing list