mesa/src/intel
Jason Ekstrand 74ec2b12be nir/lower_tex: Rework invalid implicit LOD lowering
Only fragment and some compute shaders support implicit derivatives.
They're totally meaningless without helper invocations and some
understanding of the dispatch pattern.  We've got code to lower
nir_texop_tex in these shader stages to use an explicit derivative of 0
but it was pretty badly broken:

 1. It only handled nir_texop_tex, not nir_texop_txb or nir_texop_lod.

 2. It didn't take min_lod into account

 3. It was conflated with adding a missing LOD parameter to opcodes
    which expect one such as nir_texop_txf.  While not really a bug,
    this does make it way harder to reason about the code.

 4. Unless you set a flag (which most drivers don't), it left the
    opcode nir_texop_tex instead of nir_texop_txl which it should have
    been.

This reworks it to go through roughly the same path as other LOD
lowering only with a constant lod of 0 instead of calling out to
nir_texop_lod.  We also get rid of the lower_tex_without_implicit_lod
flag because most drivers set it and those that don't are probably
subtly broken.  If someone really wants to get nir_texop_tex in their
vertex shaders, they can write a new patch to add the flag back in.

Fixes: e382890e25 "nir: set default lod to texture opcodes that..."
Fixes: d5ac5d6e83 "nir: Add option to lower tex to txl when..."
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11775>
2021-07-23 15:53:57 +00:00
..
blorp intel/blorp: Use nir_texop_txl 2021-07-23 15:53:57 +00:00
common intel/tools/aubinator_error_decode: tag hanging instruction 2021-07-21 08:20:06 +00:00
compiler nir/lower_tex: Rework invalid implicit LOD lowering 2021-07-23 15:53:57 +00:00
dev intel/dev: Use intel_i915_query_alloc in query_topology 2021-07-16 14:19:20 +00:00
ds pps: fix a missing include in Intel pps driver 2021-05-21 22:03:16 +00:00
genxml anv: fix some multisample lines_wide CTS tests 2021-07-15 17:07:35 +00:00
isl intel/isl: Add more cases to isl_surf_get_uncompressed_surf 2021-07-06 19:29:42 +00:00
nullhw-layer intel/nullhw: fix build 2021-03-26 20:12:40 +00:00
perf intel/perf: Use intel_i915_query_flags instead of hand-rolling it 2021-07-16 14:19:20 +00:00
tools intel/tools/aubinator_error_decode: tag hanging instruction 2021-07-21 08:20:06 +00:00
vulkan anv: Advertise support for VK_EXT_shader_atomic_float2 2021-07-21 20:15:21 +00:00
Makefile.perf.am intel: Rename GEN_PERF prefix to INTEL_PERF in build files 2021-04-20 20:06:34 +00:00
meson.build pps: Intel pps driver 2021-05-18 14:28:48 +00:00