aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2018-04-02 13:20:02 +0200
committerNicolai Hähnle <[email protected]>2018-04-20 09:21:47 +0200
commit552bc37c6f6314e3d644d0dbd7ce6891e7f8dea8 (patch)
treed089a77af9a0745375fa0b6b2453f6fefec9e474 /src
parenta807a9b215d1a6db7fc51478a6bf8fa873f51f58 (diff)
radeonsi/nir: set FS properties only when scanning a fragment shader
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c3
1 files changed, 2 insertions, 1 deletions
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;