Fixes a numer of draw buffers piglit tests.
---
 src/gallium/drivers/radeonsi/si_shader_nir.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c 
b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 4eda3f3c18..d42ed5edcc 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 & ((uint64_t)1 << loc)) {
+                       
info->properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] = true;
+               }
        }
 
        info->num_outputs = num_outputs;
-- 
2.14.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to