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

RenderPass Drop seem to lock on each other in multithread #2395

Closed
kunos opened this issue Jan 15, 2022 · 2 comments
Closed

RenderPass Drop seem to lock on each other in multithread #2395

kunos opened this issue Jan 15, 2022 · 2 comments
Labels
area: performance How fast things go type: bug Something isn't working

Comments

@kunos
Copy link

kunos commented Jan 15, 2022

Description
Trying to fill up 4 shadow passes in parallel, the time taken by the 4 passes is the same regardless if they are ran in parallel or on a single thread.
After a discussion on Discord this seems to be the source of some kind of internal lock:
https://github.com/gfx-rs/wgpu/blob/master/wgpu-core/src/command/render.rs#L1042

In general the Drop implementation of RenderPass is pretty slow which is the main reason why I had to try to run things in parallel.
As a reference, I am pushing around 3000 draw calls some and seeing times of 1-2ms for the RenderPass to complete the Drop resulting in a scenario that for a typical engine with 4 shadomap passes + 1 main render passes of being totally CPU bound at around 100fps with GPU usage around 30%.... DirectX11 version of the engine running exactly the same content runs at 270fps maxing out GPU usage.

Platform
WGPU 0.12

@kvark
Copy link
Member

kvark commented Jan 16, 2022

Right. The Drop is where all the real recording happens, so it's expected to be slow.
It's definitely not the plan to make it lock the other threads away from recording.
Should have been addressed by #2272, but it got stuck in flight...

@cwfitzgerald
Copy link
Member

Obsoleted by #2710

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: performance How fast things go type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants