mesa: Branch 'master' - 2 commits
Michel Daenzer
daenzer at kemper.freedesktop.org
Sun Apr 29 11:56:45 UTC 2007
src/mesa/drivers/dri/r300/r300_ioctl.c | 2 +-
src/mesa/drivers/dri/r300/radeon_context.c | 8 ++------
src/mesa/drivers/dri/r300/radeon_lock.c | 3 ++-
src/mesa/drivers/dri/r300/radeon_lock.h | 1 +
src/mesa/drivers/dri/r300/radeon_state.c | 3 ++-
5 files changed, 8 insertions(+), 9 deletions(-)
New commits:
diff-tree c409dbcae3607e6f83f50a28d9bbb51f5ad51be4 (from cbf280dc26efa2ad6a8514cd110dcdfcb7c20bd9)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Thu Mar 29 09:42:37 2007 +0200
r300: Page flipping fixes.
Mostly making sure the page flipping state is respected when necessary.
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index 90ac988..c4dc97b 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -370,7 +370,7 @@ static void r300Clear(GLcontext * ctx, G
_swrast_Clear(ctx, mask);
}
- swapped = r300->radeon.doPageFlip && (r300->radeon.sarea->pfCurrentPage == 1);
+ swapped = r300->radeon.sarea->pfCurrentPage == 1;
/* Make sure it fits there. */
r300EnsureCmdBufSpace(r300, 421*3, __FUNCTION__);
diff --git a/src/mesa/drivers/dri/r300/radeon_context.c b/src/mesa/drivers/dri/r300/radeon_context.c
index ef1f25d..9b3f890 100644
--- a/src/mesa/drivers/dri/r300/radeon_context.c
+++ b/src/mesa/drivers/dri/r300/radeon_context.c
@@ -293,6 +293,8 @@ GLboolean radeonMakeCurrent(__DRIcontext
driverPrivate);
_mesa_update_state(radeon->glCtx);
+
+ radeonUpdatePageFlipping(radeon);
} else {
if (RADEON_DEBUG & DEBUG_DRI)
fprintf(stderr, "%s ctx is null\n", __FUNCTION__);
diff --git a/src/mesa/drivers/dri/r300/radeon_lock.c b/src/mesa/drivers/dri/r300/radeon_lock.c
index ec501c3..84181e2 100644
--- a/src/mesa/drivers/dri/r300/radeon_lock.c
+++ b/src/mesa/drivers/dri/r300/radeon_lock.c
@@ -50,13 +50,14 @@ int prevLockLine = 0;
/* Turn on/off page flipping according to the flags in the sarea:
*/
-static void radeonUpdatePageFlipping(radeonContextPtr radeon)
+void radeonUpdatePageFlipping(radeonContextPtr radeon)
{
int use_back;
radeon->doPageFlip = radeon->sarea->pfState;
if (radeon->glCtx->WinSysDrawBuffer) {
driFlipRenderbuffers(radeon->glCtx->WinSysDrawBuffer, radeon->sarea->pfCurrentPage);
+ r300UpdateDrawBuffer(radeon->glCtx);
}
use_back = (radeon->glCtx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_BACK_LEFT);
diff --git a/src/mesa/drivers/dri/r300/radeon_lock.h b/src/mesa/drivers/dri/r300/radeon_lock.h
index 632329f..b11ddf0 100644
--- a/src/mesa/drivers/dri/r300/radeon_lock.h
+++ b/src/mesa/drivers/dri/r300/radeon_lock.h
@@ -41,6 +41,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
#include "radeon_context.h"
extern void radeonGetLock(radeonContextPtr radeon, GLuint flags);
+extern void radeonUpdatePageFlipping(radeonContextPtr radeon);
/* Turn DEBUG_LOCKING on to find locking conflicts.
*/
diff --git a/src/mesa/drivers/dri/r300/radeon_state.c b/src/mesa/drivers/dri/r300/radeon_state.c
index 902e958..82bfd95 100644
--- a/src/mesa/drivers/dri/r300/radeon_state.c
+++ b/src/mesa/drivers/dri/r300/radeon_state.c
@@ -154,7 +154,8 @@ void radeonSetCliprects(radeonContextPtr
if (draw_fb->_ColorDrawBufferMask[0] == BUFFER_BIT_BACK_LEFT) {
/* Can't ignore 2d windows if we are page flipping. */
- if (drawable->numBackClipRects == 0 || radeon->doPageFlip) {
+ if (drawable->numBackClipRects == 0 || radeon->doPageFlip ||
+ radeon->sarea->pfCurrentPage == 1) {
radeon->numClipRects = drawable->numClipRects;
radeon->pClipRects = drawable->pClipRects;
} else {
diff-tree cbf280dc26efa2ad6a8514cd110dcdfcb7c20bd9 (from af0ae93863b4c876e70efa4e7406f04a3409f135)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Sun Apr 29 13:52:11 2007 +0200
r300: radeonMakeCurrent cleanups.
r300UpdateWindow is superfluous or even possibly wrong here; _mesa_make_current
will set the viewport when necessary. So the conditional _mesa_set_viewport call
can go as well.
diff --git a/src/mesa/drivers/dri/r300/radeon_context.c b/src/mesa/drivers/dri/r300/radeon_context.c
index 22f943e..ef1f25d 100644
--- a/src/mesa/drivers/dri/r300/radeon_context.c
+++ b/src/mesa/drivers/dri/r300/radeon_context.c
@@ -283,7 +283,6 @@ GLboolean radeonMakeCurrent(__DRIcontext
radeon->dri.drawable = driDrawPriv;
radeonSetCliprects(radeon);
- r300UpdateWindow(radeon->glCtx);
r300UpdateViewportOffset(radeon->glCtx);
}
@@ -293,11 +292,6 @@ GLboolean radeonMakeCurrent(__DRIcontext
(GLframebuffer *) driReadPriv->
driverPrivate);
- if (!radeon->glCtx->Viewport.Width) {
- _mesa_set_viewport(radeon->glCtx, 0, 0,
- driDrawPriv->w, driDrawPriv->h);
- }
-
_mesa_update_state(radeon->glCtx);
} else {
if (RADEON_DEBUG & DEBUG_DRI)
More information about the mesa-commit
mailing list