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

Make loader check if physical device function is available before calling #776

Open
charles-lunarg opened this issue Dec 13, 2021 · 3 comments
Open
Assignees
Labels
enhancement

Comments

@charles-lunarg
Copy link
Collaborator

@charles-lunarg charles-lunarg commented Dec 13, 2021

Action item from internal issue 2932

Currently, the loader only makes sure physical device functions aren't NULL before calling a drivers physical device function pointer. In some cases, the driver might return non-null for these functions but not actually support the function, causing crashes in the driver.

The loader should enumerate the list of device extensions that a physical device supports when vkEnumeratePhysicalDevices is called, then in each of the known device extension function terminator's make sure that the extension which provides the function is supported by the passed in physical device.

@charles-lunarg charles-lunarg added the enhancement label Dec 13, 2021
@charles-lunarg charles-lunarg self-assigned this Dec 13, 2021
@MarkY-LunarG
Copy link
Collaborator

@MarkY-LunarG MarkY-LunarG commented Jan 28, 2022

@charles-lunarg, is this fixed now? I thought we went through and did this with the last round of physical device function terminators.

@charles-lunarg
Copy link
Collaborator Author

@charles-lunarg charles-lunarg commented Jan 28, 2022

No, because this is an invasive change that I didn't want to try to make happen before 1.3.

The challenge is that this will require storing the list of supported device extensions for each physical device, re querying them on each enumerate of physical devices. This is so that terminators for physical device functions can check that an extension is supported before calling into the driver.

The cause for this issue is the vkGetToolingProperties function which caused crashes in mesa because the mesa infrastructure would return non-null from vkGetInstanceProcAddr but would subsequently crash if called (as the extension may not be supported by the physical device being called on it)

@charles-lunarg
Copy link
Collaborator Author

@charles-lunarg charles-lunarg commented May 25, 2022

Related issue #4

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

No branches or pull requests

2 participants