From 4c9f4a97ffe38cecfb7b9b9694f777e99fd004c5 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 21 Mar 2019 18:08:08 -0700 Subject: [PATCH] Remove asserts blocking pipeline derivatives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Implementations must ignore basePipelineIndex & basePipelineHandle if VK_PIPELINE_CREATE_DERIVATIVE_BIT is not specified. * We choose to ignore the pipeline derivative controls entirely. This is consistent with other implementations. * Also remove assert blocking pipeline construction for subpasses other than 0. This works fine. Test: dEQP-VK.pipeline.derivative.compute.* Change-Id: Ia03508b33397c60a3de5caf8536f7d75058738f6 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27828 Presubmit-Ready: Chris Forbes Tested-by: Chris Forbes Reviewed-by: Alexis Hétu --- src/Vulkan/VkPipeline.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Vulkan/VkPipeline.cpp b/src/Vulkan/VkPipeline.cpp index d3ec02b2e564f..e90f96fdf4609 100644 --- a/src/Vulkan/VkPipeline.cpp +++ b/src/Vulkan/VkPipeline.cpp @@ -254,13 +254,10 @@ Pipeline::Pipeline(PipelineLayout const *layout) : layout(layout) {} GraphicsPipeline::GraphicsPipeline(const VkGraphicsPipelineCreateInfo* pCreateInfo, void* mem) : Pipeline(Cast(pCreateInfo->layout)) { - if((pCreateInfo->flags != 0) || + if(((pCreateInfo->flags & ~(VK_PIPELINE_CREATE_DERIVATIVE_BIT | VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT)) != 0) || (pCreateInfo->stageCount != 2) || (pCreateInfo->pTessellationState != nullptr) || - (pCreateInfo->pDynamicState != nullptr) || - (pCreateInfo->subpass != 0) || - (pCreateInfo->basePipelineHandle != VK_NULL_HANDLE) || - (pCreateInfo->basePipelineIndex != 0)) + (pCreateInfo->pDynamicState != nullptr)) { UNIMPLEMENTED("pCreateInfo settings"); }