OSDN Git Service

Remove driver workaround
authorCourtney Goeltzenleuchter <courtneygo@google.com>
Mon, 3 Apr 2017 22:11:30 +0000 (16:11 -0600)
committerCourtney Goeltzenleuchter <courtneygo@google.com>
Mon, 3 Apr 2017 22:57:32 +0000 (16:57 -0600)
Appears that the workaround for bug #34177594 is no longer
necessary, so removing.
Bug: 34177594
Test: Run Vulkan app

Change-Id: Id574760bdea775ac7541a9657b5a8124eb9064ef

vulkan/libvulkan/swapchain.cpp

index 2fee8a5..3b785e6 100644 (file)
@@ -981,25 +981,9 @@ VkResult CreateSwapchainKHR(VkDevice device,
     int gralloc_usage = 0;
     if (dispatch.GetSwapchainGrallocUsage2ANDROID) {
         uint64_t consumer_usage, producer_usage;
-        if (GetData(device).driver_version == 256587285) {
-            // HACK workaround for loader/driver mismatch during transition to
-            // vkGetSwapchainGrallocUsage2ANDROID.
-            typedef VkResult(VKAPI_PTR *
-                             PFN_vkGetSwapchainGrallocUsage2ANDROID_HACK)(
-                VkDevice device, VkFormat format, VkImageUsageFlags imageUsage,
-                uint64_t * grallocConsumerUsage,
-                uint64_t * grallocProducerUsage);
-            auto get_swapchain_gralloc_usage =
-                reinterpret_cast<PFN_vkGetSwapchainGrallocUsage2ANDROID_HACK>(
-                    dispatch.GetSwapchainGrallocUsage2ANDROID);
-            result = get_swapchain_gralloc_usage(
-                device, create_info->imageFormat, create_info->imageUsage,
-                &consumer_usage, &producer_usage);
-        } else {
-            result = dispatch.GetSwapchainGrallocUsage2ANDROID(
-                device, create_info->imageFormat, create_info->imageUsage,
-                swapchain_image_usage, &consumer_usage, &producer_usage);
-        }
+        result = dispatch.GetSwapchainGrallocUsage2ANDROID(
+            device, create_info->imageFormat, create_info->imageUsage,
+            swapchain_image_usage, &consumer_usage, &producer_usage);
         if (result != VK_SUCCESS) {
             ALOGE("vkGetSwapchainGrallocUsage2ANDROID failed: %d", result);
             return VK_ERROR_SURFACE_LOST_KHR;