aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_feedback.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_feedback.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_feedback.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_feedback.c b/mesalib/src/mesa/state_tracker/st_cb_feedback.c
index d2e4346b7..34a16ccf9 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_feedback.c
+++ b/mesalib/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];