diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-01-30 00:59:49 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-30 00:59:49 -0800 |
| commit | ba9b2785c69c1b8c6d2b4103267b5281815f9f23 (patch) | |
| tree | e4ba4ca76c6592b90764a0a7ac32502639dc93aa /source/slang/slang-emit-glsl.cpp | |
| parent | 2ae194d51e15c064c3d905e628f7335de7504e32 (diff) | |
Support cooperative vector (#6223)
* Support cooperative vector without Vulkan-header update
Adding a Slang support for cooperative vector.
But this commit doesn't have Vulkan-header update.
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index 61457d98e..1429139f9 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -3370,6 +3370,23 @@ void GLSLSourceEmitter::emitSimpleTypeImpl(IRType* type) return; } + else if (auto specializedType = as<IRSpecialize>(type)) + { + // If a `specialize` instruction made it this far, then + // it represents an intrinsic generic type. + // + emitSimpleType((IRType*)getSpecializedValue(specializedType)); + m_writer->emit("<"); + UInt argCount = specializedType->getArgCount(); + for (UInt ii = 0; ii < argCount; ++ii) + { + if (ii != 0) + m_writer->emit(", "); + emitVal(specializedType->getArg(ii), getInfo(EmitOp::General)); + } + m_writer->emit(" >"); + return; + } auto decorated = getResolvedInstForDecorations(type); UnownedStringSlice intrinsicDef; |
