From 842a53913c0d5d11f1062ffcf4fb8dbeec33102a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 8 Oct 2020 12:47:06 +1000 Subject: [PATCH] llvmpipe: fix 8/16 bit global stores Fixes: CL vstore_half-float-global* Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index 501f01faa53..0df4f6bfb32 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -834,6 +834,12 @@ static void emit_store_global(struct lp_build_nir_context *bld_base, loop_state.counter, ""); addr_ptr = global_addr_to_ptr(gallivm, addr_ptr, bit_size); switch (bit_size) { + case 8: + value_ptr = LLVMBuildBitCast(builder, value_ptr, LLVMInt8TypeInContext(gallivm->context), ""); + break; + case 16: + value_ptr = LLVMBuildBitCast(builder, value_ptr, LLVMInt16TypeInContext(gallivm->context), ""); + break; case 32: value_ptr = LLVMBuildBitCast(builder, value_ptr, LLVMInt32TypeInContext(gallivm->context), ""); break;