i965/vec4: Add a brw->gen >= 6 assertion in three-source emitters.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Feb 2014 00:08:56 +0000 (16:08 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 26 Feb 2014 10:16:34 +0000 (02:16 -0800)
Three source instructions didn't exist until Gen6.  vec4_generator has
assertions to catch this, but catching it in the visitor provides a
nicer backtrace.

Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index a2f79228da0645ab6753ef2e0420236925e0c077..95e00640d82753a8f4433ea2fe4e50b327ce2796 100644 (file)
@@ -128,6 +128,7 @@ vec4_visitor::emit(enum opcode opcode)
    vec4_instruction *                                                  \
    vec4_visitor::op(dst_reg dst, src_reg src0, src_reg src1, src_reg src2)\
    {                                                                   \
+      assert(brw->gen >= 6);                                           \
       return new(mem_ctx) vec4_instruction(this, BRW_OPCODE_##op, dst, \
                                           src0, src1, src2);           \
    }