[Mesa-dev] [PATCH 04/38] ac/nir: fix 16-bit ssbo stores
Rhys Perry
pendingchaos02 at gmail.com
Fri Dec 7 17:21:57 UTC 2018
Signed-off-by: Rhys Perry <pendingchaos02 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 31fb77290c..535a47d790 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1559,6 +1559,8 @@ static void visit_store_ssbo(struct ac_nir_context *ctx,
} else 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,
--
2.19.2
More information about the mesa-dev
mailing list