mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
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: <mesa-stable@lists.freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5679>
This commit is contained in:
parent
3aeb61da49
commit
b743c9bf2d
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue