ConfettiFX / The-Forge

The Forge Cross-Platform Rendering Framework PC Windows, Steamdeck (native), Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Apache License 2.0
4.72k stars 495 forks source link

cmdBindDescriptors performance issue (DX12) #112

Closed jdswebb closed 5 years ago

jdswebb commented 5 years ago

I've been updating from an older version of TF to the latest one it seems there is a performance issue with the new DescriptorBinder system. The line in the screenshot now dominates runtime, and my CPU frame latency has increased from 0.8ms to 9ms.

image

I am calling cmdBindDescriptors thousands of times per frame, but I think this should be within the bounds of expected use.

I can try and dig into what's going on myself if it would be helpful.

wolfgangfengel commented 5 years ago

Just to make sure: did you read the description how the descriptor system works? It is on the Wiki page.

When you compare 0.8 ms to 9 ms did you compare the old and the new TF version? I assume you didn't change the shaders because there are four different update frequencies for descriptors and they were the same?

Let me ask Jesus to check this out ... do you have a repo case in case we need one?

wolfgangfengel commented 5 years ago

This is btw. really an interesting issue. In case we overlooked something we really need to fix that.

On a separate note: we have an internal support channel in which all the developers of this framework are and a number of users. I believe there are currently > 30 people. If you send me your skype id I would like to add you to this. We would value your feedback and fix things before they are on GitHub. Also if you need changes for your integration we could discuss them there.

jdswebb commented 5 years ago

Thanks, I've emailed you my Skype IDs.

I have read about the new descriptor system and I'm hopefully using it correctly! I've attached a hacked version of the 01_Transformations example that demonstrates the hotspot: 01_Transformations.zip

image

Hope this helps!