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 <siglesias@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
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;