[Mesa-dev] [PATCH] st/mesa: fix GL_FEEDBACK mode inverted Y coordinate bug

Marek Olšák maraeo at gmail.com
Tue Nov 19 12:16:30 PST 2013


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Nov 19, 2013 at 9:11 PM, Brian Paul <brianp at vmware.com> wrote:
> We need to check the drawbuffer's orientation before inverting Y
> coordinates.  Fixes piglit feedback tests when running with the
> -fbo option.
>
> Cc: "9.2" "10.0" <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/state_tracker/st_cb_feedback.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
> index d2e4346..34a16cc 100644
> --- a/src/mesa/state_tracker/st_cb_feedback.c
> +++ b/src/mesa/state_tracker/st_cb_feedback.c
> @@ -85,9 +85,11 @@ feedback_vertex(struct gl_context *ctx, const struct draw_context *draw,
>     const GLfloat *color, *texcoord;
>     GLuint slot;
>
> -   /* Recall that Y=0=Top of window for Gallium wincoords */
>     win[0] = v->data[0][0];
> -   win[1] = ctx->DrawBuffer->Height - v->data[0][1];
> +   if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP)
> +      win[1] = ctx->DrawBuffer->Height - v->data[0][1];
> +   else
> +      win[1] = v->data[0][1];
>     win[2] = v->data[0][2];
>     win[3] = 1.0F / v->data[0][3];
>
> --
> 1.7.10.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list