mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 08:20:29 +01:00
llvmpipe: Fix crash when using nir_tex_src_min_lod
Calculating lod does not always happen with the same vector size as
the vector size of the coords, which led to a crash when using the
new minLod feature. Use same repacking as with explicit lod.
Fixes: a8b104d9bd
Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34906>
This commit is contained in:
parent
338273dedd
commit
5006d7f1f1
1 changed files with 7 additions and 1 deletions
|
|
@ -1001,8 +1001,14 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
|
|||
lod = lp_build_max(lodf_bld, lod, desc_min_lod);
|
||||
}
|
||||
|
||||
if (min_lod)
|
||||
if (min_lod) {
|
||||
if (bld->num_lods != bld->coord_type.length) {
|
||||
min_lod = lp_build_pack_aos_scalars(bld->gallivm, bld->coord_bld.type,
|
||||
lodf_bld->type, min_lod, 0);
|
||||
}
|
||||
|
||||
lod = lp_build_max(lodf_bld, lod, min_lod);
|
||||
}
|
||||
|
||||
if (is_lodq) {
|
||||
*out_lod_fpart = lod;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue