forked from KhronosGroup/Vulkan-Loader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor instance level objects to not use icd_index
The previous way per-ICD instance level objects were accessed was using the ICD's index into an array that was allocated with the object. This solution worked while the indexes were static, but with the recent change to remove unused ICD's that is no longer the case. This commit replaces an array per object with object arrays, one for each type (surface, debug messenger, & debug report) and per ICD. That flips where the index comes from, with the instance storing an array indication which indices are used and which are free. Whenever an instance level object is created, the loader checks if there is a free index available, reusing it if available. Otherwise it resizes its own store as well as each ICD's array for that object.
- Loading branch information
1 parent
c2bbc84
commit 6d3a915
Showing
12 changed files
with
669 additions
and
638 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
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
Oops, something went wrong.