diff options
author | Dave Airlie <[email protected]> | 2020-06-29 15:57:14 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2020-07-01 09:52:56 +1000 |
commit | b743c9bf2d5c987c97a22e725a56a2b641b58ae4 (patch) | |
tree | cf2c3143ad1af22258a7419a131abc60ee64a4ec /src/gallium | |
parent | 3aeb61da49cf0e141759c23d4790ad5dd96bcf52 (diff) |
llvmpipe: fix occlusion queries on big-endian.
Casting to u8 arrays and picking the lowest byte is fairly LE specific
grab the other byte.
Cc: <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5679>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_depth.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c index ed28d212df3..64cf72ae101 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c @@ -469,7 +469,11 @@ lp_build_occlusion_count(struct gallivm_state *gallivm, countv = LLVMBuildBitCast(builder, countv, i8vntype, ""); for (i = 0; i < type.length; i++) { +#if UTIL_ARCH_LITTLE_ENDIAN shuffles[i] = lp_build_const_int32(gallivm, 4*i); +#else + shuffles[i] = lp_build_const_int32(gallivm, (4*i) + 3); +#endif } shufflev = LLVMConstVector(shuffles, type.length); |