llvmpipe: fix 8/16 bit global stores

Fixes:
CL vstore_half-float-global*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
This commit is contained in:
Dave Airlie 2020-10-08 12:47:06 +10:00
parent d1ea49d924
commit 842a53913c
1 changed files with 6 additions and 0 deletions

View File

@ -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;