ac/llvm: support implicit LOD for nir_texop_tg4

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22315>
This commit is contained in:
Rhys Perry
2023-03-31 19:44:34 +01:00
committed by Marge Bot
parent 25b1974e1b
commit d291f368a0
+3 -1
View File
@@ -1601,8 +1601,10 @@ static LLVMValueRef build_tex_intrinsic(struct ac_nir_context *ctx, const nir_te
break;
case nir_texop_tg4:
args->opcode = ac_image_gather4;
if (!args->lod && !args->bias)
if (!args->lod && !instr->is_gather_implicit_lod)
args->level_zero = true;
/* GFX11 supports implicit LOD, but the extension is unsupported. */
assert(args->level_zero || ctx->ac.gfx_level < GFX11);
break;
case nir_texop_lod:
args->opcode = ac_image_get_lod;