Mesa (openchrome-branch): Flush if a texture image updated by glTexImage is already referenced

Thomas Hellstrom thomash at kemper.freedesktop.org
Sun Jan 25 21:50:12 UTC 2009


Module: Mesa
Branch: openchrome-branch
Commit: aa1d267e2e45265b62e519fb3cd19799ac1c14dc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa1d267e2e45265b62e519fb3cd19799ac1c14dc

Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Date:   Sun Jan 25 22:35:54 2009 +0100

Flush if a texture image updated by glTexImage is already referenced
by the current command stream. This isn't strictly necessary, but is a little
nicer on graphics memory.

---

 src/mesa/drivers/dri/openchrome/via_tex.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/openchrome/via_tex.c b/src/mesa/drivers/dri/openchrome/via_tex.c
index 9cbb8c0..2dbf758 100644
--- a/src/mesa/drivers/dri/openchrome/via_tex.c
+++ b/src/mesa/drivers/dri/openchrome/via_tex.c
@@ -540,6 +540,10 @@ viaTexImage(GLcontext * ctx,
 	}
     }
 
+    if (wsbmBOOnList(viaImage->buf)) {
+	VIA_FLUSH_DMA(vmesa);
+    }
+
     ret = wsbmBOData(viaImage->buf, sizeInBytes, NULL,
 		     vmesa->viaScreen->bufferPool,
 		     (viaObj->imagesInVRAM ? WSBM_PL_FLAG_VRAM :




More information about the mesa-commit mailing list