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

Loader edits pNext chain when handling VkDeviceGroupDeviceCreateInfoKHR #643

jeffbolznv opened this issue Aug 11, 2021 · 1 comment


Copy link

@jeffbolznv jeffbolznv commented Aug 11, 2021

There's code in loader_create_device_chain that detects a VkDeviceGroupDeviceCreateInfoKHR and replaces it with a copy that has the "unwrapped" physical device handle values. This edits members of the existing pNext chain, which may include writing to data that is "const" (and will fault), and also leaves the pNext chain corrupted after the vkCreateDevice call returns.

Copy link

@charles-lunarg charles-lunarg commented Aug 12, 2021

It indeed is bad to be editing the pNext chain in-situ like that. Though I'm not seeing a immediate solution. When we call down the chain, those VkPhysicalDevice handles need to be the next layer's handles. This means that not and getting the right one before they are used isn't possible since layers wouldn't know what the right handles are.

I can imagine creating a copy of the pNext chain and passing that down, then on the return copying the results back into original pNext chain, but that plays foul of the same const problems.

@charles-lunarg charles-lunarg self-assigned this Feb 15, 2022
@charles-lunarg charles-lunarg added the bug label Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants