diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2021-07-09 11:34:23 -0500 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2021-07-26 12:16:50 -0700 |
commit | 5bd5f23579200a4b7f71c8b8f14a89d782cb5202 (patch) | |
tree | 2e620ee80bd472fd881af22176062f61496ba098 /.pick_status.json | |
parent | a7bf3f526217fcd68702561f02cabde37b88fea5 (diff) |
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: e382890e25c0 "nir: set default lod to texture opcodes that..."
Fixes: d5ac5d6e836f "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>
(cherry picked from commit 74ec2b12be17a7796186b3100a5a6b208be45b23)
Diffstat (limited to '.pick_status.json')
-rw-r--r-- | .pick_status.json | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json index 2789f614d5c..14f6c93e382 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -625,7 +625,7 @@ "description": "nir/lower_tex: Rework invalid implicit LOD lowering", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "e382890e25c0d95b0765ec00126f27dacc0e1da9" }, |