v2:
- Fix assert's line width (Topi).
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* component from running past, we subtract off the size of all but
* one component of the vector.
*/
- assert(instr->const_index[1] >= instr->num_components * 4);
+ assert(instr->const_index[1] >=
+ instr->num_components * (int) type_sz(dest.type));
unsigned read_size = instr->const_index[1] -
- (instr->num_components - 1) * 4;
+ (instr->num_components - 1) * type_sz(dest.type);
for (unsigned j = 0; j < instr->num_components; j++) {
bld.emit(SHADER_OPCODE_MOV_INDIRECT,