From: Jason Ekstrand Date: Thu, 10 Sep 2015 23:19:42 +0000 (-0700) Subject: i965/vec4: Don't reswizzle hardware registers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1037e0a84f61f4b1815093bcfd548d4b58ca106f;p=mesa.git 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 --- 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; }