nir: Allow nir_texop_tg4 in implicit derivative

This allow us to invoke the quad helper.

v2: (Georg)
- Add check for is_gather_implicit_lod

Fixes: 48158636bf ("nir: add is_gather_implicit_lod")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
(cherry picked from commit 30ead72e80e5b7ba5c5dfc46261b4d249f4fa382)
This commit is contained in:
Sagar Ghuge 2023-03-05 15:33:19 -08:00 committed by Eric Engestrom
parent f22f1117bd
commit dd627a3462
2 changed files with 3 additions and 1 deletions

View file

@ -874,7 +874,7 @@
"description": "nir: Allow nir_texop_tg4 in implicit derivative",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "48158636bf1b0e62ebab4835e1f474866a34c6fe",
"notes": null

View file

@ -3133,6 +3133,8 @@ nir_tex_instr_has_implicit_derivative(const nir_tex_instr *instr)
case nir_texop_txb:
case nir_texop_lod:
return true;
case nir_texop_tg4:
return instr->is_gather_implicit_lod;
default:
return false;
}