From b7d19330c2d42937835d674758a05af3891e025b Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 31 Aug 2023 15:02:16 -0700 Subject: Inline all RayQuery/HitObject typed functions when targeting GLSL. (#3172) * Inline all RayQuery/HitObject typed functions when targeting GLSL. * update test. --------- Co-authored-by: Yong He --- source/slang/slang-ir-inline.cpp | 2 ++ source/slang/slang-ir-specialize-resources.cpp | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/slang/slang-ir-inline.cpp b/source/slang/slang-ir-inline.cpp index 5479a98ff..fd9ec495b 100644 --- a/source/slang/slang-ir-inline.cpp +++ b/source/slang/slang-ir-inline.cpp @@ -861,6 +861,8 @@ struct GLSLResourceReturnFunctionInliningPass : InliningPassBase auto outValueType = outType->getValueType(); if (isResourceType(outValueType)) return true; + if (isIllegalGLSLParameterType(outValueType)) + return true; } return false; } diff --git a/source/slang/slang-ir-specialize-resources.cpp b/source/slang/slang-ir-specialize-resources.cpp index 1a96389cb..839e5e08e 100644 --- a/source/slang/slang-ir-specialize-resources.cpp +++ b/source/slang/slang-ir-specialize-resources.cpp @@ -355,11 +355,6 @@ struct ResourceOutputSpecializationPass if(as(type)) return true; - if(as(type)) - return true; - if(as(type)) - return true; - // TODO: more cases here? return false; @@ -1233,6 +1228,10 @@ bool isIllegalGLSLParameterType(IRType* type) } if (as(type)) return true; + if (as(type)) + return true; + if (as(type)) + return true; return false; } -- cgit v1.2.3