zink: clamp out min_lod operands for explicit lod ops

this is illegal (and nonsensical)

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16456>
This commit is contained in:
Mike Blumenkrantz 2022-05-11 16:02:51 -04:00 committed by Marge Bot
parent 88912b3111
commit 63dc39ac90
1 changed files with 2 additions and 0 deletions

View File

@ -3460,6 +3460,8 @@ emit_tex(struct ntv_context *ctx, nir_tex_instr *tex)
result = spirv_builder_emit_image_fetch(&ctx->builder, actual_dest_type,
image, coord, lod, sample, const_offset, offset, tex->is_sparse);
} else {
if (tex->op == nir_texop_txl)
min_lod = 0;
result = spirv_builder_emit_image_sample(&ctx->builder,
actual_dest_type, load,
coord,