Henri Verbeet : wined3d: Get the framebuffer height from the view in shader_glsl_load_constants().

Alexandre Julliard julliard at wine.codeweavers.com
Thu Mar 24 11:04:00 CDT 2016


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Mar 23 17:58:21 2016 +0100

wined3d: Get the framebuffer height from the view in shader_glsl_load_constants().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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)




More information about the wine-cvs mailing list