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

Bad Vulkan performance due to weak index/vertex buffer management #3225

Open
d-s-h opened this issue Dec 17, 2023 · 1 comment
Open

Bad Vulkan performance due to weak index/vertex buffer management #3225

d-s-h opened this issue Dec 17, 2023 · 1 comment
Labels

Comments

@d-s-h
Copy link
Contributor

d-s-h commented Dec 17, 2023

Describe the bug
I noticed that the Vulkan version of bgfx has a performance bottleneck comparing to D3D11 in my app.
During a short investigation I found out the same issue is applicable even for the bgfx helloworld example. On my notebook the frame time can jump up to 25ms using Vulkan, while it's stable less than 1ms when using D3D11.
I identified that the bottleneck goes to the following profile scope:

BGFX_PROFILER_SCOPE("bgfx/Update transient index buffer", kColorResource);

I'll add my dirty fix with some hardcode for reference, but it should be remade.

To Reproduce
Steps to reproduce the behavior:

  1. Run HelloWorld example using Vulkan.
  2. See the frametime. It's inadequate high and not stable.

Expected behavior
Smooth as butter and fast as light.

Screenshots
Screenshot 2023-12-05 191444

Additional context
Checked on Windows 11 and Android 13 platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants