Skip to content

Commit 94fa9b7

Browse files
committed
Handle null descriptor set layouts gracefully
You can't use partial pipeline layouts for drawing, so the *which descriptor sets do I need to rebind* use case doesn't apply, but the *is this partial layout compatible with another (potentially partial) layout* use case is sensible, so I made nulls count as compatible with anything.
1 parent b5f6194 commit 94fa9b7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/vsg/state/PipelineLayout.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ std::pair<bool, uint32_t> vsg::PipelineLayout::computeCompatibility(const Pipeli
5656
#endif
5757
for (result.second = 0; result.second < std::min(setLayouts.size(), other.setLayouts.size()); ++result.second)
5858
{
59+
// if this is a partial layout for a graphics pipeline library, it may be made compatible later
60+
if (!setLayouts[result.second] || !other.setLayouts[result.second])
61+
continue;
5962
if (compare_value_container(setLayouts[result.second]->bindings, other.setLayouts[result.second]->bindings) != 0)
6063
break;
6164
}

0 commit comments

Comments
 (0)