Mesa (master): i965/vec4: Add a brw->gen >= 6 assertion in three-source emitters.

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Feb 26 10:25:35 UTC 2014


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Feb 23 16:08:56 2014 -0800

i965/vec4: Add a brw->gen >= 6 assertion in three-source emitters.

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 at lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Acked-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index a2f7922..95e0064 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -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);		\
    }




More information about the mesa-commit mailing list