Mesa (main): aco: fix emitting stream outputs when the first component isn't zero

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 19 16:03:40 UTC 2021


Module: Mesa
Branch: main
Commit: 572a902566471b882267d0193784d2afd05ca4ba
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=572a902566471b882267d0193784d2afd05ca4ba

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Oct 19 13:27:55 2021 +0200

aco: fix emitting stream outputs when the first component isn't zero

Fixes a bunch of XFB piglit tests with Zink.

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13437>

---

 src/amd/compiler/aco_instruction_selection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index 743fed4a7d8..c9990971106 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -11174,7 +11174,7 @@ emit_stream_output(isel_context* ctx, Temp const* so_buffers, Temp const* so_wri
          aco_opcode::p_create_vector, Format::PSEUDO, count, 1)};
       for (int i = 0; i < count; ++i)
          vec->operands[i] =
-            (ctx->outputs.mask[loc] & 1 << (start + i)) ? Operand(out[start + i]) : Operand::zero();
+            (ctx->outputs.mask[loc] & 1 << (start + first_comp + i)) ? Operand(out[start + i]) : Operand::zero();
       vec->definitions[0] = Definition(write_data);
       ctx->block->instructions.emplace_back(std::move(vec));
 



More information about the mesa-commit mailing list