diff options
author | Dave Airlie <[email protected]> | 2009-07-14 01:22:17 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-07-14 01:23:24 +1000 |
commit | bb4c70358778f28f644ae493b5d8163e76e9fddb (patch) | |
tree | 84e7e1da4cc8cd44478451b10382f8f289263866 /src/mesa/drivers/dri/radeon/radeon_common.c | |
parent | 504d01b275169f019d375b4a8b5e935b9fd108d3 (diff) |
radeon: port more front fixes from intel.
Port fixes to read buffer from front.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_common.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index 3b8541a74a4..08535180b8c 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -823,6 +823,17 @@ void radeonDrawBuffer( GLcontext *ctx, GLenum mode ) void radeonReadBuffer( GLcontext *ctx, GLenum mode ) { + if ((ctx->DrawBuffer != NULL) && (ctx->DrawBuffer->Name == 0)) { + struct radeon_context *const rmesa = RADEON_CONTEXT(ctx); + const GLboolean was_front_buffer_reading = rmesa->is_front_buffer_reading; + rmesa->is_front_buffer_reading = (mode == GL_FRONT_LEFT) + || (mode == GL_FRONT); + + if (!was_front_buffer_reading && rmesa->is_front_buffer_reading) { + radeon_update_renderbuffers(rmesa->dri.context, + rmesa->dri.context->driReadablePriv); + } + } /* nothing, until we implement h/w glRead/CopyPixels or CopyTexImage */ if (ctx->ReadBuffer == ctx->DrawBuffer) { /* This will update FBO completeness status. |