Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a single vk.Buffer #70

Open
tiawl opened this issue Jun 24, 2023 · 0 comments
Open

Use a single vk.Buffer #70

tiawl opened this issue Jun 24, 2023 · 0 comments
Labels
generator Related to the generator
Milestone

Comments

@tiawl
Copy link
Owner

tiawl commented Jun 24, 2023

https://vulkan-tutorial.com/en/Vertex_buffers/Index_buffer#page_Using-an-index-buffer specifies

[Driver developers recommend](https://developer.nvidia.com/vulkan-memory-management) that you also store multiple buffers, like the vertex and index buffer, into a single [VkBuffer](https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkBuffer.html) and use offsets in commands like [vkCmdBindVertexBuffers](https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindVertexBuffers.html). The advantage is that your data is more cache friendly in that case, because it's closer together. It is even possible to reuse the same chunk of memory for multiple resources if they are not used during the same render operations, provided that their data is refreshed, of course. This is known as aliasing and some Vulkan functions have explicit flags to specify that you want to do this.
@tiawl tiawl added stage generator Related to the generator labels Jun 24, 2023
@tiawl tiawl added this to the 0.1.0 milestone Jun 24, 2023
@tiawl tiawl removed the stage label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generator Related to the generator
Projects
None yet
Development

No branches or pull requests

1 participant