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.

Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
---
 src/mesa/drivers/dri/i965/brw_fs.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp 
b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 059edc6..85d430c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -4655,7 +4655,13 @@ 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
+         return MIN2(inst->exec_size / (type_sz(inst->dst.type) / 4), 16);
 
    default:
       return inst->exec_size;
-- 
2.5.0

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to