mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-21 03:10:35 +01:00
gallivm: handle u8/u16 const loads properly on big-endian.
Turns out just putting the u32 in doesn't work on big endian, so put the proper u8/u16 values in. Got a report that since the loop limiter got removed, a gtk4 blur shader was looping forever on s390x. Turns out it was using a 16-bit loop variable (because why wouldn't you), and the loop counter was just staying at 0 all the time. Cc: mesa-stable Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37593>
This commit is contained in:
parent
f90e0f0797
commit
e28cfb2bad
1 changed files with 4 additions and 2 deletions
|
|
@ -1267,8 +1267,10 @@ emit_load_const(struct lp_build_nir_soa_context *bld,
|
||||||
|
|
||||||
for (unsigned i = 0; i < instr->def.num_components; i++) {
|
for (unsigned i = 0; i < instr->def.num_components; i++) {
|
||||||
outval[i] = lp_build_const_int_vec(bld->base.gallivm, int_bld->type,
|
outval[i] = lp_build_const_int_vec(bld->base.gallivm, int_bld->type,
|
||||||
bits == 32 ? instr->value[i].u32
|
bits == 8 ? instr->value[i].u8 :
|
||||||
: instr->value[i].u64);
|
bits == 16 ? instr->value[i].u32 :
|
||||||
|
bits == 32 ? instr->value[i].u32 :
|
||||||
|
instr->value[i].u64);
|
||||||
}
|
}
|
||||||
for (unsigned i = instr->def.num_components; i < NIR_MAX_VEC_COMPONENTS; i++) {
|
for (unsigned i = instr->def.num_components; i < NIR_MAX_VEC_COMPONENTS; i++) {
|
||||||
outval[i] = NULL;
|
outval[i] = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue