From 0460eb6a0b9e62c3145ab9c43d03751e19a49d8e Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 19 Feb 2025 20:43:00 -0800 Subject: Force inline functions that takes InputPatch and OutputPatch (#6407) This commit inlines functions that takes InputPatch and OutputPatch as the function parameter. Co-authored-by: Yong He --- source/slang/slang-ir-specialize-resources.cpp | 4 ++++ source/slang/slang-ir.cpp | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'source') diff --git a/source/slang/slang-ir-specialize-resources.cpp b/source/slang/slang-ir-specialize-resources.cpp index 2aafaaf31..871ba2c24 100644 --- a/source/slang/slang-ir-specialize-resources.cpp +++ b/source/slang/slang-ir-specialize-resources.cpp @@ -1359,6 +1359,10 @@ bool isIllegalGLSLParameterType(IRType* type) return true; if (as(type)) return true; + if (as(type)) + return true; + if (as(type)) + return true; return false; } diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 07e8b2742..cdabb1ac2 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -5259,6 +5259,11 @@ IRInst* IRBuilder::emitElementAddress(IRInst* basePtr, IRInst* index) SLANG_ASSERT(as(index)); type = (IRType*)tupleType->getOperand(getIntVal(index)); } + else if (auto hlslInputPatchType = as(valueType)) + { + type = hlslInputPatchType->getElementType(); + } + SLANG_RELEASE_ASSERT(type); auto inst = createInst( this, -- cgit v1.2.3