[Mesa-dev] [PATCH 07/10] radeonsi: don't try to eliminate trivial VS outputs for PS and CS
Marek Olšák
maraeo at gmail.com
Mon Nov 28 11:17:00 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
PS and CS don't have any param exports, so it's a no-op.
---
src/gallium/drivers/radeonsi/si_shader.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 6228a68..20f4a1d 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -6480,21 +6480,24 @@ struct si_vs_exports {
static void si_eliminate_const_vs_outputs(struct si_shader_context *ctx)
{
struct si_shader *shader = ctx->shader;
struct tgsi_shader_info *info = &shader->selector->info;
LLVMBasicBlockRef bb;
struct si_vs_exports exports;
bool removed_any = false;
exports.num = 0;
- if (shader->key.as_es || shader->key.as_ls)
+ if (ctx->type == PIPE_SHADER_FRAGMENT ||
+ ctx->type == PIPE_SHADER_COMPUTE ||
+ shader->key.as_es ||
+ shader->key.as_ls)
return;
/* Process all LLVM instructions. */
bb = LLVMGetFirstBasicBlock(ctx->main_fn);
while (bb) {
LLVMValueRef inst = LLVMGetFirstInstruction(bb);
while (inst) {
LLVMValueRef cur = inst;
inst = LLVMGetNextInstruction(inst);
--
2.7.4
More information about the mesa-dev
mailing list