From bbfd3d1a389acb6e41b62766426de3cef4df0fa0 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 11 Apr 2022 14:24:07 +0300 Subject: [PATCH] Use the sampled image type for OpImageQueryLod --- source/glsl/spirv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glsl/spirv.cpp b/source/glsl/spirv.cpp index 61e2d594..f8b36b26 100644 --- a/source/glsl/spirv.cpp +++ b/source/glsl/spirv.cpp @@ -1304,7 +1304,7 @@ void SpirVGenerator::visit_builtin_texture_query(FunctionCall &call, const vecto ImageTypeDeclaration &image_arg0 = dynamic_cast(*call.arguments[0]->type); Id image_id; - if(image_arg0.sampled) + if(image_arg0.sampled && opcode!=OP_IMAGE_QUERY_LOD) { Id image_type_id = get_item(image_type_ids, get_id(image_arg0)); image_id = write_expression(OP_IMAGE, image_type_id, argument_ids[0]); -- 2.45.2