-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Closed
Description
Description
Using the webgpu-dev-extension and checking "show redundant state settings" (version 0.0.35) shows that three.js sometimes calls setPipeline with the same pipeline it previously set. That's not an error, but depending on the number for redundant calls it can add up to at least a few percent of JS perf at least.
For example:
at 795 redundant calls at 120fps that's 93400 calls per second to setPipeline that weren't needed.
Solution
In the WebGPURenderer, when encoding a pass encoder, track the last pipeline set and don't set it again if the next thing uses the same pipeline.
Alternatives
Ignore and lose perf
Additional context
Mugen87