Mesa (master): i965: Don' t try to emit code if we failed register allocation.

Eric Anholt anholt at kemper.freedesktop.org
Sat Oct 2 00:38:13 UTC 2010


Module: Mesa
Branch: master
Commit: 64a9fc3fc15603a8e25d0e1146fe5da5a5bde55b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=64a9fc3fc15603a8e25d0e1146fe5da5a5bde55b

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Oct  1 17:18:07 2010 -0700

i965: Don't try to emit code if we failed register allocation.

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ddf96ca..dd2af2b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2808,7 +2808,8 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
 	 v.assign_regs();
    }
 
-   v.generate_code();
+   if (!v.fail)
+      v.generate_code();
 
    assert(!v.fail); /* FINISHME: Cleanly fail, tested at link time, etc. */
 




More information about the mesa-commit mailing list