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

APPLE: ICB for multidrawindirect on macOS #1945

Merged
merged 2 commits into from
Sep 28, 2022

Conversation

creijon
Copy link
Contributor

@creijon creijon commented Jul 11, 2022

Description of Change(s)

Implementation of Indirect Command Buffers (ICBs) to improve performance of multidraw indirect on the Metal implementation of the Storm renderer.

This brings significant savings on CPU time for complex scenes.

ICBs are encoded in a transform-feedback shader which is run as part of the Prepare phase of the PipelineDrawBatch. This generates a command state, held in the HgiMetalIndirectCommands structure, which contains the ICB, argument buffers, graphics pipeline and resource bindings necessary to execute the commands in the ExecuteDraw phase of the draw batch.

The implementation add a manager to HGI, the IndirectCommandEncoder. This is responsible for the lifetime of the transform feedback shaders, interfacing with the underlying Metal API and holding a pool of buffers to optimise the creation of the ICBs.

Known Issues(s)

On Apple Silicon machines running macOS before 12.3, a driver issue causes validation failure when the supportIndirectCommandBuffers flag is set. Therefore ICBs are not supported on these versions of macOS on Apple Silicon.

Fixes Issue(s)

CPU performance on Metal for complex scenes.
[X] I have submitted a signed Contributor License Agreement

@sunyab
Copy link
Contributor

sunyab commented Jul 11, 2022

Filed as internal issue #USD-7484

@creijon creijon force-pushed the jon/dev/icb_pr branch 3 times, most recently from 9eddc5e to 88b8fff Compare July 18, 2022 15:14
@creijon creijon changed the title ICB for multidrawindirect on macOS [APPLE] ICB for multidrawindirect on macOS Jul 22, 2022
@creijon creijon changed the title [APPLE] ICB for multidrawindirect on macOS APPLE: ICB for multidrawindirect on macOS Jul 22, 2022
@creijon creijon force-pushed the jon/dev/icb_pr branch 3 times, most recently from c92df12 to acde581 Compare August 4, 2022 15:37
@creijon creijon force-pushed the jon/dev/icb_pr branch 5 times, most recently from 33b2596 to 48979b5 Compare August 16, 2022 05:19
@creijon creijon force-pushed the jon/dev/icb_pr branch 7 times, most recently from d7f8506 to be07af9 Compare September 5, 2022 14:31
@creijon creijon force-pushed the jon/dev/icb_pr branch 3 times, most recently from 5fe4b10 to 29ceeac Compare September 12, 2022 12:25
@pixar-oss pixar-oss merged commit 329cab4 into PixarAnimationStudios:dev Sep 28, 2022
@creijon creijon deleted the jon/dev/icb_pr branch September 30, 2022 10:54
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

Successfully merging this pull request may close these issues.

3 participants