Skip to content

loader_gpa_instance_terminator doesn't handle known device functions #2029

Description

@charles-lunarg

Describe the bug
The implementation of loader_gpa_instance_terminator searches the list of known instance functions before resorting to using the unknown physical device/device function handling. This is fine for a few functions, but if the entire list of device functions are queried, the loader runs out of space in the unknown function handling. This was discovered by @PancakeTAS whose layer uses Vulkan-Hpp which uses vkGetInstanceProcAddr to query device functions initially. Since there are well over 250 device functions in the API, the loader runs out of room.

Solution:
Add device terminator functions that can be returned by loader_gpa_instance_terminator so layers can query device functions with vkGetInstanceProcAddr and get a function that can dispatch it correctly.

Alternatively, if a layer is hitting this out in the wild, they can switch to exclusively using vkGetDeviceProcAddr for device functions. Plus, its more performant because function calls don't have to dispatch through the loader.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions