summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2016-04-19 09:49:40 +0200
committerSamuel Iglesias Gonsálvez <[email protected]>2016-05-10 11:25:09 +0200
commit75ada43a3af88835de6a83ed453d4ed512df0412 (patch)
treedf648fbf69e82438d20a7499241d40d0c834a58f /src
parent03687ab77fea7893f8786ce407d6f4d108b28012 (diff)
i965/fs: take into account doubles when calculating read_size for MOV_INDIRECT
v2: - Fix assert's line width (Topi). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index c4e1068756d..c2274ba1fdc 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -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,