Every draw that binds a TEXEL_BUFFER uniform causes VulkanRenderPass to create a fresh VkBufferView and queue it for deferred destruction, so a driver object and a capturing lambda are allocated per draw and retained for two submits, even when nothing about the buffer has changed. The OpenGL backend does no equivalent work, and since UniformType.TEXEL_BUFFER is public API, nothing bounds how many draws take this path.
A VkBufferView is immutable, so it cannot be re-pointed at a buffer the way the OpenGL path re-points its texture object. The view's lifetime is also owned by the render pass, which only knows about the draw it is recording, so it has no vantage point from which to notice that the same view was already built last draw, or last frame.
Moving that ownership to the buffer would give it one, since a view has to outlive the draws that reference it and be destroyed before its buffer, which is a lifetime the buffer objects already track. The two buffer implementations then diverge naturally: transient buffers get a new offset every frame and have nothing to gain from reuse, whereas buffers created through createBuffer outlive the frame and would hit on essentially every lookup.
Comments 2
Thank you for your report!
After consideration, the issue is being closed as Invalid.
This report does not describe a bug.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Can confirm.