summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-02-02 14:30:16 +0000
committerBrian Paul <[email protected]>2006-02-02 14:30:16 +0000
commit725740c7c8664cde9bb09b88674ad09956e93c49 (patch)
treea462acb3dec0cf2a03aa22ad3d16be9f2e57ada6 /src/mesa/tnl
parent5951aab8236e964aa3ebc412bf13e31da99383bf (diff)
add some assertions to check emit_func[] table validity
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vb_arbprogram_sse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram_sse.c b/src/mesa/tnl/t_vb_arbprogram_sse.c
index c5da430dd37..fc9a51e041a 100644
--- a/src/mesa/tnl/t_vb_arbprogram_sse.c
+++ b/src/mesa/tnl/t_vb_arbprogram_sse.c
@@ -43,6 +43,7 @@
#include "mtypes.h"
#include "arbprogparse.h"
#include "program.h"
+#include "program_instruction.h"
#include "math/m_matrix.h"
#include "math/m_translate.h"
#include "t_context.h"
@@ -1181,6 +1182,11 @@ _tnl_sse_codegen_vertex_program(struct tnl_compiled_program *p)
{
struct compilation cp;
+ /* sanity checks */
+ assert(emit_func[OPCODE_ABS] == emit_ABS);
+ assert(emit_func[OPCODE_MUL] == emit_MUL);
+ assert(emit_func[OPCODE_XPD] == emit_XPD);
+
_mesa_memset(&cp, 0, sizeof(cp));
cp.p = p;
cp.have_sse2 = 1;