diff options
author | Brian Paul <brianp@vmware.com> | 2013-11-19 13:09:57 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2013-11-26 16:30:07 -0800 |
commit | b9990d758bef30c3e77b6f9cc117008f6cf84090 (patch) | |
tree | 245f74ee0d633a6372b5da3c382de775c83a10d3 | |
parent | ee5e7148e536c84955781ddc388c2cda29781bd3 (diff) |
st/mesa: fix GL_FEEDBACK mode inverted Y coordinate bug
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@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 15d8e05e1e98a9bfd5a365d0fda222668f24261f)
-rw-r--r-- | src/mesa/state_tracker/st_cb_feedback.c | 6 |
1 files 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 d2e4346b7e..34a16ccf93 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]; |