Skip to content

Commit 59ba259

Browse files
authored
Fix SpvExecutionModeOutputLinesEXT. (#5740)
1 parent 5450a49 commit 59ba259

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/slang/slang-check-decl.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -8789,7 +8789,8 @@ void SemanticsDeclHeaderVisitor::checkMeshOutputDecl(VarDeclBase* varDecl)
87898789
nullptr,
87908790
ConstantFoldingKind::LinkTime,
87918791
getSink());
8792-
8792+
if (!index)
8793+
return;
87938794
Type* d = m_astBuilder->getMeshOutputTypeFromModifier(modifier, base, index);
87948795
varDecl->type.type = d;
87958796
}

source/slang/slang-emit-spirv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4467,7 +4467,7 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex
44674467
if (t == "triangle")
44684468
m = SpvExecutionModeOutputTrianglesEXT;
44694469
else if (t == "line")
4470-
m = SpvExecutionModeOutputTrianglesEXT;
4470+
m = SpvExecutionModeOutputLinesEXT;
44714471
else if (t == "point")
44724472
m = SpvExecutionModeOutputPoints;
44734473
}

0 commit comments

Comments
 (0)