]> git.tdb.fi Git - libs/gl.git/commitdiff
Update all descriptor sets when the used shader changes
authorMikko Rasa <tdb@tdb.fi>
Sun, 21 Nov 2021 12:59:38 +0000 (14:59 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 21 Nov 2021 23:44:36 +0000 (01:44 +0200)
source/backends/vulkan/pipelinestate_backend.cpp

index aa44ba08569a463f4ae1fa1ae629c484732a8602..32672ec42970b2a5599409375eb9ffcb48c88d4b 100644 (file)
@@ -40,9 +40,9 @@ void VulkanPipelineState::update() const
        if(self.changes&pipeline_mask)
                handle = device.get_pipeline_cache().get_pipeline(self);
 
-       if(self.changes&(PipelineState::UNIFORMS|PipelineState::TEXTURES))
+       if(self.changes&(PipelineState::SHPROG|PipelineState::UNIFORMS|PipelineState::TEXTURES))
        {
-               unsigned changed_sets = 0;
+               unsigned changed_sets = (self.changes&PipelineState::SHPROG ? ~0U : 0U);
                for(const PipelineState::BoundUniformBlock &u: self.uniform_blocks)
                        if(u.changed && u.binding>=0)
                        {