summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-06-01 15:01:04 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-06-01 16:00:44 -0700
commit1205999c229b8e67af39fb9875bd87bc0a1404eb (patch)
tree9c2728008b24316624b6730daa50ea5a936a79e6 /src/mesa/drivers/dri/i965/brw_fs.cpp
parent8d4f4adfbd5b2f23cb2a6a1f77f79a23d3f2b035 (diff)
downloadexternal_mesa3d-1205999c229b8e67af39fb9875bd87bc0a1404eb.zip
external_mesa3d-1205999c229b8e67af39fb9875bd87bc0a1404eb.tar.gz
external_mesa3d-1205999c229b8e67af39fb9875bd87bc0a1404eb.tar.bz2
i965/fs: Copy the offset when lowering logical pull constant sends
This fixes 64 Vulkan CTS tests per gen Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96299 Reviewed-by: Francisco Jerez <currojerez@riseup.net> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 00d937e..bd026de 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -4448,6 +4448,14 @@ lower_varying_pull_constant_logical_send(const fs_builder &bld, fs_inst *inst)
const brw_device_info *devinfo = bld.shader->devinfo;
if (devinfo->gen >= 7) {
+ /* We are switching the instruction from an ALU-like instruction to a
+ * send-from-grf instruction. Since sends can't handle strides or
+ * source modifiers, we have to make a copy of the offset source.
+ */
+ fs_reg tmp = bld.vgrf(BRW_REGISTER_TYPE_UD);
+ bld.MOV(tmp, inst->src[1]);
+ inst->src[1] = tmp;
+
inst->opcode = FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN7;
} else {