Mesa (gallium-0.1): gallium: replace assertion with conditional/ recovery code

Brian Paul brianp at kemper.freedesktop.org
Tue Oct 7 00:34:16 UTC 2008


Module: Mesa
Branch: gallium-0.1
Commit: f7ee3c979261b4a2b77365b47c7147f69fbfd606
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7ee3c979261b4a2b77365b47c7147f69fbfd606

Author: Brian <brian.paul at tungstengraphics.com>
Date:   Mon Oct  6 18:31:56 2008 -0600

gallium: replace assertion with conditional/recovery code

The assertion failed when we ran out of exec memory.
Found with conform texcombine test.

---

 src/gallium/auxiliary/rtasm/rtasm_x86sse.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index dd26d4d..ad9d8f8 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
@@ -370,7 +370,11 @@ void x86_jcc( struct x86_function *p,
    DUMP_I(cc);
    
    if (offset < 0) {
-      assert(p->csr - p->store > -offset);
+      /*assert(p->csr - p->store > -offset);*/
+      if (p->csr - p->store <= -offset) {
+         /* probably out of memory (using the error_overflow buffer) */
+         return;
+      }
    }
 
    if (offset <= 127 && offset >= -128) {




More information about the mesa-commit mailing list