Skip to content

nir: Add lowering of txl and txb with shadow lookup to txd

Gert Wollny requested to merge gerddie/mesa:nir-txb-txl-to-txd into master

On some hardware (like r600), texture operations with shadow comparison and explicit LOD or BIAS are not directly supported by the hardware when we have to deal with a texture array or a cube map. In these cases lower these two operations to txd and some math.

Note that his conflicts with the option lower_txd.

On my experimental r600/nir branch this fixes piglits that don't pass at all with the TGSI backend

  • tex-miplevel-selection texturelod 1darrayshadow
  • tex-miplevel-selection texturelodoffset 1darrayshadow

Some errors remain with

  • tex-miplevel-selection textureoffset(bias) 1darrayshadow Summary: 1633/1683 passed
  • tex-miplevel-selection texture(bias) 1darrayshadow Summary: 57176/58212 passed
  • tex-miplevel-selection texture(bias) cubeshadow Summary: 47291/48510 passed

so maybe I'm doing something wrong when adding the bias.

Thanks for any pointers and reviews.

Edited by Gert Wollny

Merge request reports