]> git.tdb.fi Git - libs/gl.git/commitdiff
Only use location-based offsets for the default uniform block
authorMikko Rasa <tdb@tdb.fi>
Wed, 17 Nov 2021 13:37:00 +0000 (15:37 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 17 Nov 2021 13:48:20 +0000 (15:48 +0200)
The push constant block must follow the layout specified in the shader.

source/core/uniformblock.cpp

index 256858580b9721a60663cbc0b80dd282c7a6e7db..ebaed2a6872d6067d19113fc0f9e51436bbf1045 100644 (file)
@@ -23,7 +23,7 @@ void UniformBlock::store(const ReflectData::UniformInfo &info, size_t array_size
 
        size_t store_offset;
        bool packed;
 
        size_t store_offset;
        bool packed;
-       if(info.block->bind_point<0)
+       if(info.block->bind_point==ReflectData::DEFAULT_BLOCK)
        {
                if(info.location<0)
                        return;
        {
                if(info.location<0)
                        return;