Skip to content

Commit

Permalink
Remove asserts blocking pipeline derivatives
Browse files Browse the repository at this point in the history
* 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 <chrisforbes@google.com>
Tested-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
  • Loading branch information
chrisforbes committed Mar 27, 2019
1 parent e43cda5 commit 4c9f4a9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Vulkan/VkPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 4c9f4a9

Please sign in to comment.