summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
authorDynamitos <dynamitos15@gmail.com>2024-08-28 21:07:49 +0200
committerGitHub <noreply@github.com>2024-08-28 12:07:49 -0700
commit7c6b71bcbd7821e251541f5dd723428d7bd5a2ed (patch)
tree8826ee68bdfc2cdf21e730a166ef44df21b6049a /source/slang/slang-ir.cpp
parent65240d074b4ddec55e56962ebf8de46207bcf5fa (diff)
Metal: Mesh Shaders (#4280)
* Metal: mesh shading skeleton * Metal: fixing mesh payload * Metal: improving mesh shader indices output * Metal: Implementing conditional mesh output set * Metal: Trying to not break other backends * Metal: trying to fix mesh output set * Metal: Fixing MeshOutputSet usages * Metal: Fixing vertex and primitive semantics * Metal: Fixing code style * Metal: Fixed hlsl indices set * Fixed HLSL mesh output set disappearing and GLSL mesh output crashing * Metal: Adjusting task test matching --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index 6a76ccce3..acc6abd57 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -5380,6 +5380,32 @@ namespace Slang
return emitSwizzle(type, base, elementCount, irElementIndices);
}
+ IRMetalSetVertex* IRBuilder::emitMetalSetVertex(
+ IRInst* index,
+ IRInst* vertex)
+ {
+ auto inst = createInst<IRMetalSetVertex>(this, kIROp_MetalSetVertex, getVoidType(), index, vertex);
+ addInst(inst);
+ return inst;
+ }
+
+ IRMetalSetPrimitive* IRBuilder::emitMetalSetPrimitive(
+ IRInst* index,
+ IRInst* primitive)
+ {
+ auto inst = createInst<IRMetalSetPrimitive>(this, kIROp_MetalSetVertex, getVoidType(), index, primitive);
+ addInst(inst);
+ return inst;
+ }
+
+ IRMetalSetIndices* IRBuilder::emitMetalSetIndices(
+ IRInst* index,
+ IRInst* indices)
+ {
+ auto inst = createInst<IRMetalSetIndices>(this, kIROp_MetalSetVertex, getVoidType(), index, indices);
+ addInst(inst);
+ return inst;
+ }
IRInst* IRBuilder::emitSwizzleSet(
IRType* type,