Skip to content

nir: don't take the derivative of the array index in `nir_lower_tex`

Antonino Maniscalco requested to merge antonino/mesa:lower_tex_dxdy_fix2 into main

Previosuly when lowering to txd for sampler array the index would be derived as well, therefore the resulting derivative would have been a vec with one more component than what the txd instruction expects.

This patch truncates the coordinate vector in this case to make sure the index is not derived.

Fixes: b154a415 ("nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs")

Merge request reports