i965/fs: take into account doubles when calculating read_size for MOV_INDIRECT
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 19 Apr 2016 07:49:40 +0000 (09:49 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 10 May 2016 09:25:09 +0000 (11:25 +0200)
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>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

index c4e1068756d32fd039aa1d911ab6bd272143b522..c2274ba1fdc8c380730ec68ab7b92d46f3dcf06e 100644 (file)
@@ -3286,9 +3286,10 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
           * 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,