[Mesa-dev] [PATCH 4/5] radeonsi/nir: set FS properties only when scanning a fragment shader
Nicolai Hähnle
nhaehnle at gmail.com
Wed Apr 11 10:56:33 UTC 2018
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
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
@@ -600,21 +600,22 @@ void si_nir_scan_shader(const struct nir_shader *nir,
case TGSI_SEMANTIC_TESSOUTER:
info->reads_tessfactor_outputs = true;
break;
default:
info->reads_pervertex_outputs = true;
}
}
}
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;
}
}
info->num_outputs = num_outputs;
struct set *ubo_set = _mesa_set_create(NULL, _mesa_hash_pointer,
_mesa_key_pointer_equal);
--
2.14.1
More information about the mesa-dev
mailing list