summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2016-05-09 10:14:18 +0200
committerSamuel Iglesias Gonsálvez <[email protected]>2016-05-16 09:55:33 +0200
commit3cce67aff09a4c248e9a69a8b05a63ac6b3e4878 (patch)
tree4c9feb5c972314d106d0fcbbd36f2febcd440efb /src/mesa
parent0297f1021a962314cf6ebafcc16c0ff048e23171 (diff)
i965/fs: fix number of output components for doubles
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index d0ffff233a7..c21c9c5db90 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -103,10 +103,15 @@ fs_visitor::nir_setup_single_output_varying(fs_reg *reg,
}
} else {
assert(type->is_scalar() || type->is_vector());
- this->outputs[*location] = *reg;
- this->output_components[*location] = type->vector_elements;
- *reg = offset(*reg, bld, 4);
- (*location)++;
+ unsigned num_elements = type->vector_elements;
+ if (type->is_double())
+ num_elements *= 2;
+ for (unsigned count = 0; count < num_elements; count += 4) {
+ this->outputs[*location] = *reg;
+ this->output_components[*location] = MIN2(4, num_elements - count);
+ *reg = offset(*reg, bld, 4);
+ (*location)++;
+ }
}
}