summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-02-09 20:34:53 +1100
committerTimothy Arceri <[email protected]>2018-02-10 10:46:28 +1100
commit6a8efbe652c328c2367476069ff1435c358e6f78 (patch)
tree2e8647a11b3e3ee493fb61258387f86099734378 /src
parentef8082baf860cb19cbb8c6435e9144ff16b3429f (diff)
radeonsi/nir: add FRAG_RESULT_COLOR to scan pass
Fixes a number of draw buffers piglit tests. Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index dd1de6c851b..04d07381f5d 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -517,6 +517,12 @@ void si_nir_scan_shader(const struct nir_shader *nir,
info->reads_pervertex_outputs = true;
}
}
+
+ unsigned loc = variable->data.location;
+ if (loc == FRAG_RESULT_COLOR &&
+ nir->info.outputs_written & (1ull << loc)) {
+ info->properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] = true;
+ }
}
info->num_outputs = num_outputs;