aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs.cpp
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2016-04-20 09:59:11 +0200
committerSamuel Iglesias Gonsálvez <[email protected]>2016-05-10 11:25:09 +0200
commit4c9006f95796e67cf2cac98795627c31b15b0371 (patch)
tree1ab9902d1cbfa8fd08de1c20e069de22a84b3047 /src/mesa/drivers/dri/i965/brw_fs.cpp
parent75ada43a3af88835de6a83ed453d4ed512df0412 (diff)
i965/fs: fix MOV_INDIRECT exec_size for doubles
In that case, the writes need two times the size of a 32-bit value. We need to adjust the exec_size, so it is not breaking any hardware rule. v2: - Add an assert to verify type size is not less than 4 bytes (Jordan). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index e105f4084fe..b479684fc67 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -4682,7 +4682,15 @@ get_lowered_simd_width(const struct brw_device_info *devinfo,
case SHADER_OPCODE_MOV_INDIRECT:
/* Prior to Broadwell, we only have 8 address subregisters */
- return devinfo->gen < 8 ? 8 : MIN2(inst->exec_size, 16);
+ if (devinfo->gen < 8)
+ return 8;
+
+ if (inst->exec_size < 16) {
+ return inst->exec_size;
+ } else {
+ assert(type_sz(inst->dst.type) >= 4);
+ return MIN2(inst->exec_size / (type_sz(inst->dst.type) / 4), 16);
+ }
default:
return inst->exec_size;