Fixes INSTR_INVALID_ENC
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4396>
}
}
+ /* When port 3 isn't used, we have to set it to port 2, and vice versa,
+ * or we an INSTR_INVALID_ENC is raised. The reason is unknown. */
+
+ if (!regs.port[3])
+ regs.port[3] = regs.port[2];
+
+ if (!regs.port[2])
+ regs.port[2] = regs.port[3];
+
s.reg3 = regs.port[3];
s.reg2 = regs.port[2];
s.uniform_const = regs.uniform_constant;