Skip to content

Commit

Permalink
Assert non-empty RenderPipelineDesc::vertexInput when used with mesh …
Browse files Browse the repository at this point in the history
…shaders
  • Loading branch information
corporateshark committed Aug 19, 2024
1 parent bb22f55 commit c4e1107
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lvk/vulkan/VulkanClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3933,6 +3933,10 @@ lvk::Holder<lvk::RenderPipelineHandle> lvk::VulkanContext::createRenderPipeline(
}

if (desc.smMesh.valid()) {
if (!LVK_VERIFY(!desc.vertexInput.getNumAttributes() && !desc.vertexInput.getNumInputBindings())) {
Result::setResult(outResult, Result::Code::ArgumentOutOfRange, "Cannot have vertexInput with mesh shaders");
return {};
}
if (!LVK_VERIFY(!desc.smVert.valid())) {
Result::setResult(outResult, Result::Code::ArgumentOutOfRange, "Cannot have both vertex and mesh shaders");
return {};
Expand Down

0 comments on commit c4e1107

Please sign in to comment.