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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user