From: Mikko Rasa Date: Mon, 11 Apr 2022 11:24:07 +0000 (+0300) Subject: Use the sampled image type for OpImageQueryLod X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=bbfd3d1a389acb6e41b62766426de3cef4df0fa0;p=libs%2Fgl.git Use the sampled image type for OpImageQueryLod --- 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]);