]> git.tdb.fi Git - libs/gl.git/commitdiff
Use the sampled image type for OpImageQueryLod
authorMikko Rasa <tdb@tdb.fi>
Mon, 11 Apr 2022 11:24:07 +0000 (14:24 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 11 Apr 2022 11:37:30 +0000 (14:37 +0300)
source/glsl/spirv.cpp

index 61e2d594e6c641105379dfd6c671a82b1991f5fa..f8b36b26dbe03885f2f6bfb6b3259d4cc0511dc5 100644 (file)
@@ -1304,7 +1304,7 @@ void SpirVGenerator::visit_builtin_texture_query(FunctionCall &call, const vecto
        ImageTypeDeclaration &image_arg0 = dynamic_cast<ImageTypeDeclaration &>(*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]);