summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-05-17 16:10:38 -0700
committerFrancisco Jerez <[email protected]>2016-05-27 23:19:22 -0700
commitdea9c1df89cf58591cce83b67d3d905a28f0c101 (patch)
treebf7b23293525122321d677a029484e52c5615d2e /src
parent122e0315480704a7c6777b994c42448d360e6774 (diff)
i965/fs: Calculate maximum execution size of MOV_INDIRECT correctly.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index df72fda49c2..22c4d345f5a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -4901,15 +4901,9 @@ get_lowered_simd_width(const struct brw_device_info *devinfo,
case SHADER_OPCODE_MOV_INDIRECT:
/* Prior to Broadwell, we only have 8 address subregisters */
- 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);
- }
+ return MIN3(devinfo->gen >= 8 ? 16 : 8,
+ 2 * REG_SIZE / (inst->dst.stride * type_sz(inst->dst.type)),
+ inst->exec_size);
default:
return inst->exec_size;