From be81812a4bc351a23a60f0af0d17c2f0b2b284ce Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 17 Mar 2024 13:24:35 -0400 Subject: [PATCH] agx: inline sampler states to avoid regresisng code gen next commit Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_optimizer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/asahi/compiler/agx_optimizer.c b/src/asahi/compiler/agx_optimizer.c index 60250c75f3f..6bd087540e2 100644 --- a/src/asahi/compiler/agx_optimizer.c +++ b/src/asahi/compiler/agx_optimizer.c @@ -151,6 +151,8 @@ agx_optimizer_inline_imm(agx_instr **defs, agx_instr *I) continue; if (I->op == AGX_OPCODE_ZS_EMIT && s != 0) continue; + if (I->op == AGX_OPCODE_TEXTURE_SAMPLE && s != 4) + continue; if ((I->op == AGX_OPCODE_DEVICE_STORE || I->op == AGX_OPCODE_LOCAL_STORE || I->op == AGX_OPCODE_ATOMIC || I->op == AGX_OPCODE_LOCAL_ATOMIC) && @@ -444,8 +446,8 @@ agx_optimizer_forward(agx_context *ctx) agx_optimizer_fmov(defs, I); /* Inline immediates if we can. TODO: systematic */ - if (I->op != AGX_OPCODE_COLLECT && I->op != AGX_OPCODE_TEXTURE_SAMPLE && - I->op != AGX_OPCODE_IMAGE_LOAD && I->op != AGX_OPCODE_TEXTURE_LOAD && + if (I->op != AGX_OPCODE_COLLECT && I->op != AGX_OPCODE_IMAGE_LOAD && + I->op != AGX_OPCODE_TEXTURE_LOAD && I->op != AGX_OPCODE_UNIFORM_STORE && I->op != AGX_OPCODE_BLOCK_IMAGE_STORE) agx_optimizer_inline_imm(defs, I);