From 87fbb0eab03c8348f74ca1f4b3489e89e89f691f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 28 Oct 2021 09:53:02 -0400 Subject: [PATCH] zink: be more permissive for injecting LOD into texture() instructions there's other variants of implicit lod sampling, and none of them are valid outside fragment stage Fixes: 3ad06b69490 ("zink: always use explicit lod for texture() when legal in non-fragment stages") Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 6a5865d9399..c09e346bf66 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -2976,7 +2976,7 @@ emit_tex(struct ntv_context *ctx, nir_tex_instr *tex) if (!tex_instr_is_lod_allowed(tex)) lod = 0; else if (ctx->stage != MESA_SHADER_FRAGMENT && - tex->op == nir_texop_tex && ctx->explicit_lod && !lod && !proj && !bias && !dref && !dx && !dy) + tex->op == nir_texop_tex && ctx->explicit_lod && !lod) lod = emit_float_const(ctx, 32, 0.0); if (tex->op == nir_texop_txs) { SpvId image = spirv_builder_emit_image(&ctx->builder, image_type, load);