summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-spirv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-spirv.cpp')
-rw-r--r--source/slang/slang-emit-spirv.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp
index 3b8e5e1d1..d43af8ac2 100644
--- a/source/slang/slang-emit-spirv.cpp
+++ b/source/slang/slang-emit-spirv.cpp
@@ -4,6 +4,7 @@
#include "slang-compiler.h"
#include "slang-emit-base.h"
#include "slang-ir-call-graph.h"
+#include "slang-ir-entry-point-decorations.h"
#include "slang-ir-insts.h"
#include "slang-ir-layout.h"
#include "slang-ir-redundancy-removal.h"
@@ -4684,7 +4685,7 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex
entryPoint ? entryPoint->findDecoration<IREntryPointDecoration>() : nullptr;
const auto o = cast<IROutputTopologyDecoration>(decoration);
- const auto t = o->getTopology()->getStringSlice();
+ const auto topologyType = OutputTopologyType(o->getTopologyType());
SpvExecutionMode m = SpvExecutionModeMax;
if (entryPointDecor)
@@ -4693,20 +4694,20 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex
{
case Stage::Domain:
case Stage::Hull:
- if (t == "triangle_cw")
+ if (topologyType == OutputTopologyType::TriangleCW)
m = SpvExecutionModeVertexOrderCw;
- else if (t == "triangle_ccw")
+ else if (topologyType == OutputTopologyType::TriangleCCW)
m = SpvExecutionModeVertexOrderCcw;
break;
}
}
if (m == SpvExecutionModeMax)
{
- if (t == "triangle")
+ if (topologyType == OutputTopologyType::Triangle)
m = SpvExecutionModeOutputTrianglesEXT;
- else if (t == "line")
+ else if (topologyType == OutputTopologyType::Line)
m = SpvExecutionModeOutputLinesEXT;
- else if (t == "point")
+ else if (topologyType == OutputTopologyType::Point)
m = SpvExecutionModeOutputPoints;
}