Inline GetPhysicalDeviceProperties2 into QueryPresentationProperties
In general, we implement the 1.1 instance / physical device API as preferring to call the native 1.1 function if available; otherwise falling back to calling the equivalent GPDP2 function. If the underlying driver supports *neither* then any caller of that function has already invoked UB by calling it and so falling over is acceptable. Unfortunately, the loader itself does call vkGetPhysicalDeviceProperties2 in one case, regardless of what the driver may support, in order to determine whether the platform's swapchain implementation should expose some features. On a 1.0 driver without the GPDP2 extension, this caused trouble. As a slight further wrinkle, vkGetPhysicalDeviceProperties2 "cannot fail", making propagating a failure back up through the loader annoying. As a workaround, inline the calls to GetPhysicalDeviceProperties2 and GetPhysicalDeviceProperties2KHR into QueryPresentationProperties, where we can handle our one special case of both function pointers being missing but behavior being defined. Bug: b/192130684 Bug: 208682099 Test: TH Change-Id: Iff2bae98b7931bed80fafd895cf57061becabd8d Merged-In: Iff2bae98b7931bed80fafd895cf57061becabd8d
Loading
Please register or sign in to comment