]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/module.cpp
Add support for storage images in Renderer and PipelineState
[libs/gl.git] / source / core / module.cpp
index f42a0da76a17d75f30c2da746fcf35f061a8e1ae..0870c4782c9f90d620b8ecda500d985f8bd363ab 100644 (file)
@@ -313,7 +313,7 @@ SpirVModule *SpirVModule::specialize(const map<string, int> &spec_values) const
                                unsigned func_id = *(op+2);
                                new_code.push_back(func_id);
 
-                               unsigned i=3;
+                               unsigned i = 3;
                                while(i<word_count)
                                {
                                        unsigned word = *(op+i++);
@@ -623,11 +623,13 @@ void SpirVModule::Reflection::reflect_matrix_type(CodeIterator op)
 void SpirVModule::Reflection::reflect_image_type(CodeIterator op)
 {
        TypeInfo &type = types[*(op+1)];
-       DataType sample = types[*(op+2)].type;
+       DataType sample_type = types[*(op+2)].type;
        unsigned dimensions = *(op+3);
        bool depth = *(op+4)==1;
        bool array = *(op+5);
-       type.type = static_cast<DataType>((depth*0x200000) | (array*0x80000) | ((dimensions+1)<<16) | sample);
+       bool sampled = *(op+7)==1;
+       type.type = static_cast<DataType>((depth*0x200000) | (sampled*0x100000) | (array*0x80000) |
+               ((dimensions+1)<<16) | sample_type);
 }
 
 void SpirVModule::Reflection::reflect_sampled_image_type(CodeIterator op)