Mesa (master): ac/nir: fix 16-bit ssbo stores
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Mar 12 15:12:31 UTC 2019
Module: Mesa
Branch: master
Commit: 0f025bbccc236140101bc03ce9fa9d7a5bdb843b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f025bbccc236140101bc03ce9fa9d7a5bdb843b
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Thu Dec 6 14:58:50 2018 +0000
ac/nir: fix 16-bit ssbo stores
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/common/ac_nir_to_llvm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 4598eeccb20..5fb5c8da609 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1576,6 +1576,8 @@ static void visit_store_ssbo(struct ac_nir_context *ctx,
if (num_bytes == 2) {
store_name = "llvm.amdgcn.tbuffer.store.i32";
data_type = ctx->ac.i32;
+ data = LLVMBuildBitCast(ctx->ac.builder, data, ctx->ac.i16, "");
+ data = LLVMBuildZExt(ctx->ac.builder, data, data_type, "");
LLVMValueRef tbuffer_params[] = {
data,
rsrc,
More information about the mesa-commit
mailing list