From: Mikko Rasa Date: Sun, 21 Nov 2021 12:59:38 +0000 (+0200) Subject: Update all descriptor sets when the used shader changes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=02cc42fc113bcc17a28ff9d93a9e4b3f26fbb91f;p=libs%2Fgl.git Update all descriptor sets when the used shader changes --- diff --git a/source/backends/vulkan/pipelinestate_backend.cpp b/source/backends/vulkan/pipelinestate_backend.cpp index aa44ba08..32672ec4 100644 --- a/source/backends/vulkan/pipelinestate_backend.cpp +++ b/source/backends/vulkan/pipelinestate_backend.cpp @@ -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) {