Skip to content

Commit

Permalink
Merge pull request #2250 from billhollings/fix-tess-crash
Browse files Browse the repository at this point in the history
Fix crash when VkPipelineShaderStageCreateInfo::pTessellationState is null.
  • Loading branch information
billhollings committed Jun 6, 2024
2 parents 100747d + 2ca935d commit e6b7806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ static MTLVertexFormat mvkAdjustFormatVectorToSize(MTLVertexFormat format, uint3
const VkPipelineTessellationStateCreateInfo* pTS) {

VkPipelineTessellationDomainOriginStateCreateInfo* pTessDomainOriginState = nullptr;
if (reflectData.patchKind == spv::ExecutionModeTriangles) {
if (pTS && reflectData.patchKind == spv::ExecutionModeTriangles) {
for (const auto* next = (VkBaseInStructure*)pTS->pNext; next; next = next->pNext) {
switch (next->sType) {
case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO:
Expand Down

0 comments on commit e6b7806

Please sign in to comment.