gallium: replace assertion with conditional/recovery code
authorBrian <brian.paul@tungstengraphics.com>
Tue, 7 Oct 2008 00:31:56 +0000 (18:31 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 7 Oct 2008 00:31:56 +0000 (18:31 -0600)
The assertion failed when we ran out of exec memory.
Found with conform texcombine test.

src/gallium/auxiliary/rtasm/rtasm_x86sse.c

index dd26d4d9ed2971078869f02848245a2af3e3e748..ad9d8f8ced9206302da249bf6335c1f1f4403413 100644 (file)
@@ -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) {