]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix reflection of image types from Spir-V modules
authorMikko Rasa <tdb@tdb.fi>
Wed, 17 Nov 2021 13:21:35 +0000 (15:21 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 17 Nov 2021 13:28:32 +0000 (15:28 +0200)
source/core/module.cpp

index 4eefc0347494ecadb077e8b0bc8a984688b08464..dee124619f1c8a2ec3db7109b77d992a9109d158 100644 (file)
@@ -376,7 +376,7 @@ void SpirVModule::Reflection::reflect_image_type(CodeIterator op)
        unsigned dimensions = *(op+3);
        bool depth = *(op+4)==1;
        bool array = *(op+5);
-       type.type = static_cast<DataType>((depth*0x200000) | (array*0x80000) | (dimensions+1) | sample);
+       type.type = static_cast<DataType>((depth*0x200000) | (array*0x80000) | ((dimensions+1)<<16) | sample);
 }
 
 void SpirVModule::Reflection::reflect_sampled_image_type(CodeIterator op)