diff options
author | Brian <[email protected]> | 2008-03-20 14:17:06 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-20 15:04:08 -0600 |
commit | c2044eaca96abfae153651ec609b5af2fd0b6fb0 (patch) | |
tree | 657a4ef081979e14a615fc12915affbe67c05afd | |
parent | 9fa88fb3c57f6868dc169b692528cf23ceced76c (diff) |
gallium: in clear_with_quad() check fb orientation, invert Y if needed
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index dc0d87acd38..5ca15df602a 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -165,9 +165,17 @@ clear_with_quad(GLcontext *ctx, struct st_context *st = ctx->st; struct pipe_context *pipe = st->pipe; const GLfloat x0 = ctx->DrawBuffer->_Xmin; - const GLfloat y0 = ctx->DrawBuffer->_Ymin; const GLfloat x1 = ctx->DrawBuffer->_Xmax; - const GLfloat y1 = ctx->DrawBuffer->_Ymax; + GLfloat y0, y1; + + if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) { + y0 = ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymax; + y1 = ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymin; + } + else { + y0 = ctx->DrawBuffer->_Ymin; + y1 = ctx->DrawBuffer->_Ymax; + } /* printf("%s %s%s%s %f,%f %f,%f\n", __FUNCTION__, |