-
Notifications
You must be signed in to change notification settings - Fork 123
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
Fix vulkan_struct_deep_copy edge-cases #1738
Merged
fabian-lunarg
merged 3 commits into
LunarG:dev
from
fabian-lunarg:fabian_fix_deep_copy_opaque_handles
Sep 25, 2024
Merged
Fix vulkan_struct_deep_copy edge-cases #1738
fabian-lunarg
merged 3 commits into
LunarG:dev
from
fabian-lunarg:fabian_fix_deep_copy_opaque_handles
Sep 25, 2024
Conversation
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
- do not copy 'external'-object-handles - do not generate overload for VkPushDescriptorSetWithTemplateInfoKHR - based on fix provided by Dustin Graves When making deep copies of structures, avoid attempting to copy the values referenced by opaque handles and opaque pointers. These are generally pointers to a single value with the void* type, which cannot be safely copied because the size of the referenced value is unknown. For most cases, the referenced value is unneeded because capture treats the address stored in these handles/pointers as external object IDs that are encoded as 64-bit integer values. Additionally omit VkPushDescriptorSetWithTemplateInfoKHR from code-gen, as it requires knowledge about the template's layout, which is not available in the routine's scope.
CI gfxreconstruct build queued with queue ID 255418. |
CI gfxreconstruct build # 4823 running. |
CI gfxreconstruct build # 4823 passed. |
- fixes cases like VkInstanceCreateInfo with array-of-pointer members
CI gfxreconstruct build queued with queue ID 261979. |
CI gfxreconstruct build # 4882 running. |
fabian-lunarg
changed the title
Avoid opaque pointer copies in vulkan_struct_deep_copy routine
Fix vulkan_struct_deep_copy edge-cases
Sep 23, 2024
CI gfxreconstruct build # 4882 passed. |
CI gfxreconstruct build queued with queue ID 262090. |
CI gfxreconstruct build # 4883 running. |
CI gfxreconstruct build # 4883 passed. |
MarkY-LunarG
approved these changes
Sep 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
part 1:
VkSurfaceFullScreenExclusiveWin32InfoEXT
VkPushDescriptorSetWithTemplateInfoKHR
When making deep copies of structures, avoid attempting to copy the values referenced by opaque handles and opaque pointers. These are generally pointers to a single value with the void* type, which cannot be safely copied because the size of the referenced value is unknown. For most cases, the referenced value is unneeded because capture treats the address stored in these handles/pointers as external object IDs that are encoded as 64-bit integer values.
Additionally omits
VkPushDescriptorSetWithTemplateInfoKHR
from code-gen, as it requires knowledge about the template's layout, which is not available in the routine's scope.many thanks @dgraves for reporting and already providing this fix!
part 2:
pp
), only 6 cases total, e.g. inVkInstanceCreateInfo
,VkDeviceCreateInfo
,VkMicromapBuildInfoEXT