From 552bc37c6f6314e3d644d0dbd7ce6891e7f8dea8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Mon, 2 Apr 2018 13:20:02 +0200 Subject: [PATCH] radeonsi/nir: set FS properties only when scanning a fragment shader Reviewed-by: Timothy Arceri --- src/gallium/drivers/radeonsi/si_shader_nir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index c0e08c79a56..b4fba8b8812 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -607,7 +607,8 @@ void si_nir_scan_shader(const struct nir_shader *nir, } unsigned loc = variable->data.location; - if (loc == FRAG_RESULT_COLOR && + if (nir->info.stage == MESA_SHADER_FRAGMENT && + loc == FRAG_RESULT_COLOR && nir->info.outputs_written & (1ull << loc)) { assert(attrib_count == 1); info->properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] = true; -- 2.30.2