radv: Support VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 17 May 2020 00:36:44 +0000 (02:36 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 18:40:04 +0000 (18:40 +0000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5072>

src/amd/vulkan/radv_pipeline.c

index 4b3a1af89cdd29e3a433b08703cebabc83ede49f..738a9b1372d1b7908cbebea7c2434f3886a3f429 100644 (file)
@@ -5312,9 +5312,15 @@ VkResult radv_CreateGraphicsPipelines(
                if (r != VK_SUCCESS) {
                        result = r;
                        pPipelines[i] = VK_NULL_HANDLE;
+
+                       if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT)
+                               break;
                }
        }
 
+       for (; i < count; ++i)
+               pPipelines[i] = VK_NULL_HANDLE;
+
        return result;
 }
 
@@ -5487,9 +5493,15 @@ VkResult radv_CreateComputePipelines(
                if (r != VK_SUCCESS) {
                        result = r;
                        pPipelines[i] = VK_NULL_HANDLE;
+
+                       if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT)
+                               break;
                }
        }
 
+       for (; i < count; ++i)
+               pPipelines[i] = VK_NULL_HANDLE;
+
        return result;
 }