From 9187af41b866306f16a669cee176d9b6942f7b29 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 7 Apr 2022 14:49:59 -0400 Subject: [PATCH] zink: allow lod for RECT sampler types the RECT is a lie, so this is fine Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 4 +++- 1 file changed, 3 insertions(+), 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 a1ac110bebd..a4677be4a57 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 @@ -3124,7 +3124,9 @@ tex_instr_is_lod_allowed(nir_tex_instr *tex) return (tex->sampler_dim == GLSL_SAMPLER_DIM_1D || tex->sampler_dim == GLSL_SAMPLER_DIM_2D || tex->sampler_dim == GLSL_SAMPLER_DIM_3D || - tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE); + tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE || + /* RECT will always become 2D, so this is fine */ + tex->sampler_dim == GLSL_SAMPLER_DIM_RECT); } static void