Mesa (staging/18.2): ac: Fix loading a dvec3 from an SSBO

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 24 09:00:25 UTC 2018


Module: Mesa
Branch: staging/18.2
Commit: cd914013c0fc67fcd6be508074a3e6a69d1bdd67
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd914013c0fc67fcd6be508074a3e6a69d1bdd67

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Thu Oct 18 15:39:13 2018 +0200

ac: Fix loading a dvec3 from an SSBO

The comment was wrong, since the loop above casts to a type with the
correct bitsize already.

Fixes: 7e7ee82698247d8f93fe37775b99f4838b0247dd ("ac: add support for 16bit buffer loads")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit 27fe3f5b5a18c7ae404ac933dae6a9adcb2d5f7b)

---

 src/amd/common/ac_nir_to_llvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index b00f3c85a0..2cb08be2b3 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1687,8 +1687,8 @@ static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx,
 		};
 
 		if (num_bytes > 16 && num_components == 3) {
-			/* we end up with a v4f32 and v2f32 but shuffle fails on that */
-			results[1] = ac_build_expand_to_vec4(&ctx->ac, results[1], 2);
+			/* we end up with a v2i64 and i64 but shuffle fails on that */
+			results[1] = ac_build_expand(&ctx->ac, results[1], 1, 2);
 		}
 
 		LLVMValueRef swizzle = LLVMConstVector(masks, num_components);




More information about the mesa-commit mailing list