diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-31 15:02:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-31 15:02:16 -0700 |
| commit | b7d19330c2d42937835d674758a05af3891e025b (patch) | |
| tree | 13281b5fcc7b0b30d7e3a32088d74f5ad2187c40 /source | |
| parent | cc412af89e54b04ead508ca84825a18d001b92d0 (diff) | |
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 <yhe@nvidia.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-inline.cpp | 2 | ||||
| -rw-r--r-- | source/slang/slang-ir-specialize-resources.cpp | 9 |
2 files changed, 6 insertions, 5 deletions
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<IRSamplerStateTypeBase>(type)) return true; - if(as<IRHitObjectType>(type)) - return true; - if(as<IRRayQueryType>(type)) - return true; - // TODO: more cases here? return false; @@ -1233,6 +1228,10 @@ bool isIllegalGLSLParameterType(IRType* type) } if (as<IRMeshOutputType>(type)) return true; + if (as<IRRayQueryType>(type)) + return true; + if (as<IRHitObjectType>(type)) + return true; return false; } |
