-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HdSt] Improve draw item batching in Hydra GL
Improve batching performance in Hydra GL, adding to PR #528. Thanks to Yoojin Jang for the initial idea. The draw item "key" used in the map accounts for the geometric shader, buffer array versions and material params. Two draw items sharing the same "key" could use resources that don't aggregate. This checks happens in HdSt_DrawBatch::Append. So, a "key" effectively maps to several batches. - Use a vector of batches as the value type in the map, instead of a single batch. - Keep track of the previous draw item's key and batch. If the current draw item's key matches the last one, attempt to append it to the batch. If that fails, create a new batch and append it to the key's batch. If the key doesn't match, create a new entry into the map. This should reduce the number of HdSt_DrawBatch's created to the necessary minimum, and improve GPU performance since more draw item's are bucketed into a batch than was the case earlier. (Internal change: 1987160)
- Loading branch information
Showing
1 changed file
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters