Does this fix anything know? There is a 16-bit version of tbuffer.store, maybe we should use it?

On 2/16/19 1:21 AM, Rhys Perry wrote:
Signed-off-by: Rhys Perry <pendingchao...@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 89a78b43c6f..b260142c177 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1586,6 +1586,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,
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to