summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-07-11 20:25:09 +0200
committerMichel Dänzer <[email protected]>2009-07-11 20:25:09 +0200
commit65059606e9a0039fc962869857c5f00a11d6b7cc (patch)
tree7d596f03f813a652ee9e1222bdb47ce6d8479c02
parentdb618427abab44939189c688e58ea7eca52f1795 (diff)
radeon: Fix scissor rectangle calculation when rendering to FBO.
fgl_glxgears -fbo runs, though the gears don't look right yet.
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 42922732ecd..e9559cc25a6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -221,7 +221,7 @@ void radeonUpdateScissor( GLcontext *ctx )
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
- if ( radeon_get_drawable(rmesa) ) {
+ if ( !ctx->DrawBuffer->Name ) {
__DRIdrawablePrivate *dPriv = radeon_get_drawable(rmesa);
int x = ctx->Scissor.X;
@@ -233,9 +233,14 @@ void radeonUpdateScissor( GLcontext *ctx )
rmesa->state.scissor.rect.y1 = y + dPriv->y;
rmesa->state.scissor.rect.x2 = w + dPriv->x + 1;
rmesa->state.scissor.rect.y2 = h + dPriv->y + 1;
-
- radeonRecalcScissorRects( rmesa );
+ } else {
+ rmesa->state.scissor.rect.x1 = ctx->Scissor.X;
+ rmesa->state.scissor.rect.y1 = ctx->Scissor.Y;
+ rmesa->state.scissor.rect.x2 = ctx->Scissor.X + ctx->Scissor.Width;
+ rmesa->state.scissor.rect.y2 = ctx->Scissor.Y + ctx->Scissor.Height;
}
+
+ radeonRecalcScissorRects( rmesa );
}
/* =============================================================