mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-19 23:10:47 +02:00
r600/sfn: fix cube to array lowering for LOD
Makes piglits related to texturequerylod and samplercubearray pass.
Fixes: 79ca456b48 ("r600/sfn: rewrite NIR backend")
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22883>
This commit is contained in:
parent
05a3eba094
commit
1ae09f3eff
1 changed files with 1 additions and 1 deletions
|
|
@ -274,7 +274,7 @@ r600_nir_lower_cube_to_2darray_impl(nir_builder *b, nir_instr *instr, void *_opt
|
|||
nir_imm_float(b, 1.5));
|
||||
|
||||
nir_ssa_def *z = nir_channel(b, cubed, 3);
|
||||
if (tex->is_array) {
|
||||
if (tex->is_array && tex->op != nir_texop_lod) {
|
||||
auto slice = nir_fround_even(b, nir_channel(b, tex->src[coord_idx].src.ssa, 3));
|
||||
z =
|
||||
nir_fmad(b, nir_fmax(b, slice, nir_imm_float(b, 0.0)), nir_imm_float(b, 8.0), z);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue