]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/pipelinestate_backend.cpp
Keep track of the buffers of bound uniform blocks
[libs/gl.git] / source / backends / vulkan / pipelinestate_backend.cpp
index a1a03d3d8fcb31d2646027036bb4936a237d4194..a6c9d8ce6754ce28d24002900b47511f21a16a33 100644 (file)
@@ -275,6 +275,7 @@ uint64_t VulkanPipelineState::compute_descriptor_set_hash(unsigned index) const
                {
                        result = hash_update<64>(result, b.binding);
                        result = hash_update<64>(result, reinterpret_cast<uintptr_t>(b.block));
+                       result = hash_update<64>(result, reinterpret_cast<uintptr_t>(b.buffer));
                }
        for(const PipelineState::BoundTexture &t: self.textures)
                if(t.used && (t.binding>>20)==index)
@@ -319,7 +320,7 @@ unsigned VulkanPipelineState::fill_descriptor_writes(unsigned index, vector<char
        for(const PipelineState::BoundUniformBlock &u: self.uniform_blocks)
                if(u.used && u.binding>=0 && static_cast<unsigned>(u.binding>>20)==index)
                {
-                       buffer_ptr->buffer = handle_cast<::VkBuffer>(u.block->get_buffer()->handle);
+                       buffer_ptr->buffer = handle_cast<::VkBuffer>(u.buffer->handle);
                        buffer_ptr->offset = u.block->get_offset();
                        buffer_ptr->range = u.block->get_data_size();