From 1037e0a84f61f4b1815093bcfd548d4b58ca106f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 10 Sep 2015 16:19:42 -0700 Subject: [PATCH] i965/vec4: Don't reswizzle hardware registers Cc: "11.0 10.6" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91719 Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index c4da1a11be8..9d863c273e9 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -954,6 +954,14 @@ vec4_instruction::can_reswizzle(int dst_writemask, if (mlen > 0) return false; + /* We can't use swizzles on the accumulator and that's really the only + * HW_REG we would care to reswizzle so just disallow them all. + */ + for (int i = 0; i < 3; i++) { + if (src[i].file == HW_REG) + return false; + } + return true; } -- 2.30.2