Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Overlay layer gets vkCreateDevice pointer illegally #308

Open
lenny-lunarg opened this issue Nov 6, 2020 · 2 comments
Open

Overlay layer gets vkCreateDevice pointer illegally #308

lenny-lunarg opened this issue Nov 6, 2020 · 2 comments

Comments

@lenny-lunarg
Copy link
Contributor

Inside vkCreateDevice the overlay layer gets a pointer to the next layer like:

PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(NULL, "vkCreateDevice");

The Vulkan spec here states that calling vkGetInstanceProcAddr with a NULL instance must return NULL for all but a few functions listed out in the spec. As such, a conforming implementation is required to return null here (though no implementation actually does).

The fix is to look up the correct VkInstance handle associate with the VkPhysicalDevice handle that is passed by this function and to pass that instance handle to vkGetInstanceProcAddr.

@lenny-lunarg
Copy link
Contributor Author

The overlay layer doesn't seem to actually build anymore, so the best solution to this issue is probably to just remove the overlay from this repo since it isn't being maintained.

@KarenGhavam-lunarG
Copy link
Contributor

@Tony-LunarG If there are samples that aren't being built anymore, we should deprecate/remove them from the repository They are also being included in the SDK and developers could be referencing the sample code for a layer. Issue #1373 has revealed the negative impacts of layers not following the specification and we are working on finding ways to discourage new layers exhibiting this behavior. Hence why we should remove the layer sample that isn't following the convention from the samples repository to ensure it isn't being referenced during layer development.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants