diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2005-02-07 17:16:02 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2005-02-07 17:16:02 +0000 |
commit | 70fa5d84e426e971424ccdaad5b493c0299cec04 (patch) | |
tree | 28e570c2eff404d131e868536f82b8e659149b25 | |
parent | 67823cf03359f91be6c80ca627e065e66e57daae (diff) |
Hmm - some issues with checking for idle in previous commit.
Fix them un-subtely for now.
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_fb.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_ioctl.c | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_fb.c b/src/mesa/drivers/dri/unichrome/via_fb.c index 35a19cd12c..4fcc2bfd0b 100644 --- a/src/mesa/drivers/dri/unichrome/via_fb.c +++ b/src/mesa/drivers/dri/unichrome/via_fb.c @@ -190,7 +190,7 @@ via_release_pending_textures( struct via_context *vmesa ) struct via_tex_buffer *s, *tmp; foreach_s( s, tmp, &vmesa->freed_tex_buffers ) { - if (s->lastUsed <= vmesa->lastBreadcrumbRead) { + if (s->lastUsed < vmesa->lastBreadcrumbRead) { if (VIA_DEBUG & DEBUG_TEXTURE) fprintf(stderr, "%s: release tex sz %d lastUsed %x\n",__FUNCTION__, s->size, s->lastUsed); remove_from_list(s); diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c index 6e94c6a9b9..14d870652c 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.c +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c @@ -393,6 +393,7 @@ static GLboolean viaCheckIdle( struct via_context *vmesa ) if ((vmesa->regEngineStatus[0] & 0xFFFEFFFF) == 0x00020000) { return GL_TRUE; } + fprintf(stderr, "*"); return GL_FALSE; } @@ -403,10 +404,10 @@ GLboolean viaCheckBreadcrumb( struct via_context *vmesa, GLuint value ) vmesa->lastBreadcrumbRead = *buf; if (VIA_DEBUG & DEBUG_IOCTL) - fprintf(stderr, "%s %d <= %d: %d\n", __FUNCTION__, value, vmesa->lastBreadcrumbRead, - value <= vmesa->lastBreadcrumbRead); + fprintf(stderr, "%s %d < %d: %d\n", __FUNCTION__, value, vmesa->lastBreadcrumbRead, + value < vmesa->lastBreadcrumbRead); - return value <= vmesa->lastBreadcrumbRead; + return value < vmesa->lastBreadcrumbRead; } static void viaWaitBreadcrumb( struct via_context *vmesa, GLuint value ) @@ -441,8 +442,10 @@ void viaWaitIdle( struct via_context *vmesa ) /* Need to wait? */ - if (vmesa->lastDma > vmesa->lastBreadcrumbRead) + if (vmesa->lastDma >= vmesa->lastBreadcrumbRead) viaWaitBreadcrumb( vmesa, vmesa->lastDma ); + + viaCheckIdle(vmesa); } @@ -467,7 +470,7 @@ static void viaWaitIdleVBlank( const __DRIdrawablePrivate *dPriv, assert(value < vmesa->lastBreadcrumbWrite); - if (value <= vmesa->lastBreadcrumbRead) + if (value < vmesa->lastBreadcrumbRead) return; while (!viaCheckBreadcrumb(vmesa, value)) { |