Closed jjulianoatnv closed 1 month ago
Looking at the code, I'm definitely inclined to agree that these fields aren't necessary anymore.
On-top of that it appears the entire struct save for the 'surface_index' field is unused - but I do not know if the VkIcdSurfaceFoo
structs are used internally by drivers. I don't know how they could, as the VkSurfaceKHR
that the driver see's is always it's own handle because the loader unwraps the VkSurfaceKHR before calling down, and stores the VkSurfaceKHR the driver returns when the surface is created.
I have a PR up which removes all of that code. It may be a prudent idea to coordinate with the SI working group in case there is a reason for their existence.
Looking at the code, I'm definitely inclined to agree that these fields aren't necessary anymore. On-top of that it appears the entire struct save for the 'surface_index' field is unused - but I do not know if the
VkIcdSurfaceFoo
structs are used internally by drivers. I don't know how they could, as theVkSurfaceKHR
that the driver see's is always it's own handle because the loader unwraps the VkSurfaceKHR before calling down, and stores the VkSurfaceKHR the driver returns when the surface is created.
I agree with this analysis.
Let's add this issue to the agenda for upcoming Vulkan SI TSG meeting. I won't be at today's meeting, but it's OK if you represent this issue in my absence. Or I'll do it at a subsequent meeting.
I did an analysis comparing the loader's behavior for this instance-level object against the other three instance level objects. The analysis is in this PR comment: https://github.com/KhronosGroup/Vulkan-Loader/pull/1534#issuecomment-2288544707
My conclusion is that the changes proposed in the PR make sense.
There are fields at the end of
struct VkIcdSurface
that appear to be write-once, never consumed. Are these dead fields that used to be meaningful, but have now become dead code?Excerpt from https://github.com/KhronosGroup/Vulkan-Loader/blob/83cd92c725987857a84c871bd8bc11b249d239b1/loader/wsi.h#L65