Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0869c133 authored by Chris Forbes's avatar Chris Forbes
Browse files

Dispatch properly to either GPDIFP2 or KHR variant

The KHR function pointer may not be populated. We can accept either.

Bug: b/341758459
Change-Id: Idc7f2db78dff35d6120dab35bb5f25a7fa81ccb4
parent 03a8ff5c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1174,7 +1174,8 @@ VkResult GetPhysicalDeviceSurfaceFormats2KHR(
                            pSurfaceFormat);

                    if (surfaceCompressionProps &&
                        driver.GetPhysicalDeviceImageFormatProperties2KHR) {
                        (driver.GetPhysicalDeviceImageFormatProperties2KHR ||
                         driver.GetPhysicalDeviceImageFormatProperties2)) {
                        VkPhysicalDeviceImageFormatInfo2 imageFormatInfo = {};
                        imageFormatInfo.sType =
                            VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2;
@@ -1205,7 +1206,7 @@ VkResult GetPhysicalDeviceSurfaceFormats2KHR(
                        imageFormatProps.pNext = &compressionProps;

                        VkResult compressionRes =
                            driver.GetPhysicalDeviceImageFormatProperties2KHR(
                            GetPhysicalDeviceImageFormatProperties2(
                                physicalDevice, &imageFormatInfo,
                                &imageFormatProps);
                        if (compressionRes == VK_SUCCESS) {