mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 20:00:10 +01:00
gallium: in clear_with_quad() check fb orientation, invert Y if needed
This commit is contained in:
parent
9fa88fb3c5
commit
c2044eaca9
1 changed files with 10 additions and 2 deletions
|
|
@ -165,9 +165,17 @@ clear_with_quad(GLcontext *ctx,
|
||||||
struct st_context *st = ctx->st;
|
struct st_context *st = ctx->st;
|
||||||
struct pipe_context *pipe = st->pipe;
|
struct pipe_context *pipe = st->pipe;
|
||||||
const GLfloat x0 = ctx->DrawBuffer->_Xmin;
|
const GLfloat x0 = ctx->DrawBuffer->_Xmin;
|
||||||
const GLfloat y0 = ctx->DrawBuffer->_Ymin;
|
|
||||||
const GLfloat x1 = ctx->DrawBuffer->_Xmax;
|
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__,
|
printf("%s %s%s%s %f,%f %f,%f\n", __FUNCTION__,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue