diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2025-06-10 17:33:38 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-10 17:33:38 +0800 |
| commit | 405d438bf176411247bfd2937fcbb8c0684b0ed7 (patch) | |
| tree | a4769d4d8e5e39b58b5ce388be5245b4f45c1781 /source/slang/slang-ir.cpp | |
| parent | d70da65a90ccd73439895a43b3958c0ea1441f35 (diff) | |
Legalise out parameters for vertex shaders on metal (#6943)
* Handle pointer types when getting type cast style
Closes https://github.com/shader-slang/slang/issues/6025
* Move vertex shader out parameters to return type for Metal
Closes https://github.com/shader-slang/slang/issues/6025
* More asserts
* Make struct instead of tuple
* More layout preservation
* Handle same function result
* more layout
* remove layout
* a
* more debug code
* more debug code
* a
* layout working
* refactored
* more tests
* more tests
* fuse loops
* remove unused comments
* Correct filecheck usage
* debug code
* correct name and order of filecheck vars
* simplify
* Address review comments
fix warning
* simplify handling of simple vertex shaders
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 89d7a666e..bf332aaf7 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -4156,7 +4156,10 @@ static TypeCastStyle _getTypeStyleId(IRType* type) { return _getTypeStyleId(matrixType->getElementType()); } + // Try to simplify style if we can, otherwise just handle it unsimplified auto style = getTypeStyle(type->getOp()); + if (style == kIROp_Invalid) + style = type->getOp(); switch (style) { case kIROp_IntType: |
