[Mesa-dev] [PATCH 10/12] i965/fs: Assert on unsupported opcodes rather than failing.

Kenneth Graunke kenneth at whitecape.org
Tue Nov 20 21:40:18 PST 2012


Final code generation should never fail.  This is a bug, and there
should be no user-triggerable cases where this could occur.

Also, we're not going to have a fail() method in a moment.
---
 src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
index 4a1700b..900f909 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
@@ -1012,7 +1012,7 @@ fs_visitor::generate_code()
 	 } else {
 	    _mesa_problem(ctx, "Unsupported opcode %d in FS", inst->opcode);
 	 }
-	 fail("unsupported opcode in FS\n");
+	 assert(!"unsupported opcode in FS\n");
       }
 
       if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
-- 
1.8.0



More information about the mesa-dev mailing list