From dd627a3462b8243adbc15fb58aa05ab1c4d5dea9 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Sun, 5 Mar 2023 15:33:19 -0800 Subject: [PATCH] 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: 48158636bf1b ("nir: add is_gather_implicit_lod") Reviewed-by: Ian Romanick Signed-off-by: Sagar Ghuge Part-of: (cherry picked from commit 30ead72e80e5b7ba5c5dfc46261b4d249f4fa382) --- .pick_status.json | 2 +- src/compiler/nir/nir.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 218de9ed7a7..fa2a67576c2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 70d5a8a2279..00981d4a1c4 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -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; }