diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-21 17:07:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-21 17:07:34 -0700 |
| commit | bd6dbaf7c3ea720b4ed39904fe08878f9dcbd947 (patch) | |
| tree | 9e8c436e0888d192c462f75e4655a63b51f41648 /source/slang/slang-emit.cpp | |
| parent | f94b2f7a328a898c5e3dc1389d08e0b7ce6e092e (diff) | |
Compile append and consume structured buffers to glsl. (#3142)
* Compile append and consume structured buffers to glsl.
* Fix.
* Update CI config.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 6521b05ba..03d62b540 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -31,6 +31,7 @@ #include "slang-ir-legalize-varying-params.h" #include "slang-ir-link.h" #include "slang-ir-com-interface.h" +#include "slang-ir-lower-append-consume-structured-buffer.h" #include "slang-ir-lower-binding-query.h" #include "slang-ir-lower-generics.h" #include "slang-ir-lower-tuple-types.h" @@ -494,6 +495,14 @@ Result linkAndOptimizeIR( validateIRModuleIfEnabled(codeGenContext, irModule); + // On non-HLSL targets, there isn't an implementation of `AppendStructuredBuffer` + // and `ConsumeStructuredBuffer` types, so we lower them into normal struct types + // of `RWStructuredBuffer` typed fields now. + if (target != CodeGenTarget::HLSL) + { + lowerAppendConsumeStructuredBuffers(targetRequest, irModule, sink); + } + // We don't need the legalize pass for C/C++ based types if(options.shouldLegalizeExistentialAndResourceTypes ) { |
