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

Performance #2

Closed
ghost opened this issue Nov 15, 2021 · 1 comment
Closed

Performance #2

ghost opened this issue Nov 15, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 15, 2021

i use your code from this commit c907711 and added fps counter and I was getting about 2600 fps but i was getting about 5400 fps with gfx-hal. i am currently working on a game engine with wgpu-hal as backend and with some multithreading i was able to get more than 7500 fps my application was drawing a simple red triangle with multisampling and depth testing enable
backend was set to vulkan when testing

@TomSimpsonNZ
Copy link
Owner

Yeah that performance does seem pretty poor doesn’t it…

I can maybe think of a few reasons why this might be the case (but idk if this is actually right because I don’t know you gfx/wgpu-Hal code), for such a simple example such as this, every function call would matter. By braking everything up into their own modules there will probably be a bunch of overhead that is really noticeable when we are only drawing one triangle. I would like to see how this code compares to gfx-Hal for more complicated examples though!

But yeah, the purpose of this repository was to translate/port a specific C++ vulkan tutorial as closely as possible, so it could be that this design/layout sacrifices raw performance for better usability. At the end of the day, I am still new to rust and vulkan/ash so have no doubt made a bunch of silly mistakes, but that’s the fun of learning!

@ghost ghost closed this as completed Nov 15, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant