summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-10-04 01:59:33 -0700
committerKenneth Graunke <[email protected]>2016-11-22 00:29:24 -0800
commitb63f7671a3eafa4ab293a13f45f58837bd840a46 (patch)
treeae0ffffdc2257f9f175751f685113dc23cb5ba85
parent536af43fe3fafc728a8a790692be197c38213721 (diff)
i965/fs: Handle compact outputs.
We need to calculate the number of vec4 slots correctly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index e770502b723..82e22c27310 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -55,7 +55,9 @@ fs_visitor::nir_setup_outputs()
return;
nir_foreach_variable(var, &nir->outputs) {
- const unsigned vec4s = type_size_vec4(var->type);
+ const unsigned vec4s =
+ var->data.compact ? DIV_ROUND_UP(glsl_get_length(var->type), 4)
+ : type_size_vec4(var->type);
fs_reg reg = bld.vgrf(BRW_REGISTER_TYPE_F, 4 * vec4s);
for (unsigned i = 0; i < vec4s; i++) {
if (outputs[var->data.driver_location + i].file == BAD_FILE)