KhronosGroup / Vulkan-Loader

Vulkan Loader
https://vulkan.lunarg.com/doc/sdk/latest/linux/LoaderInterfaceArchitecture.html
Other
505 stars 273 forks source link

Remove unused VkIcdSurface struct members #1534

Closed charles-lunarg closed 1 week ago

charles-lunarg commented 1 month ago

All of the VkIcdSurface members, as well as the *_size & offset members are unused by the codebase. And drivers do not have access to this struct, as it is internal to the loader - no common definition exists elsewhere for drivers to use either.

ci-tester-lunarg commented 1 month ago

CI Vulkan-Loader build queued with queue ID 235438.

ci-tester-lunarg commented 1 month ago

CI Vulkan-Loader build # 2663 running.

ci-tester-lunarg commented 1 month ago

CI Vulkan-Loader build # 2663 passed.

jjulianoatnv commented 1 month ago

The changes look good to me.

I wondered if it is common for the loader to cache the app's *CreateInfo struct when the loader creates an instance-level object that wraps the ICD's own objects. vk.xml contains only four objects tagged with parent="VkInstance". They are:

Probably these objects should all follow a similar pattern, with the exception that physical device is way more complicated.

None of these objects cache the *CreateInfo except VkIcdSurface. Removing the cached createInfo from VkIcdSurface makes sense.

I checked another WSI object's factory: terminator_CreateDisplayModeKHR(). This one does not have a similar pattern to VkSurfaceKHR, and that makes sense because the parent of VkDisplayModeKHR is VkPhysicalDevice, not VkInstance.

charles-lunarg commented 1 week ago

Lack of response to me indicates that this isn't a controversial PR to make - I'll go ahead and merge. If this does become an issue, it can be reverted.