diff options
| author | Yong He <yonghe@outlook.com> | 2023-10-02 03:33:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-02 18:33:58 +0800 |
| commit | ccf2611c024ab12dcccd978f3f501d4ee9fc52bc (patch) | |
| tree | f4df843e3b46886005d6bfbae34dc3bcc6fb8321 /source/slang/slang-spirv-val.cpp | |
| parent | 6138de5f084cafdc98381237c2d8bed7c8804f1c (diff) | |
Add SPIRV intrinsics for ShaderExecutionReordering and RW/Buffer. (#3252)
* Add SPIRV intrinsics for ShaderExecutionReordering.
* Add intrinsics for `Buffer` and `RWBuffer`.
* Various spirv fixes.
* Marshal bool vector type.
* Inline global constants + OpFOrdNotEqual->OpFUnordNotEqual.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-spirv-val.cpp')
| -rw-r--r-- | source/slang/slang-spirv-val.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/source/slang/slang-spirv-val.cpp b/source/slang/slang-spirv-val.cpp index b5a02f3fe..c03102d9f 100644 --- a/source/slang/slang-spirv-val.cpp +++ b/source/slang/slang-spirv-val.cpp @@ -18,20 +18,10 @@ static SlangResult disassembleSPIRV(const List<uint8_t>& spirv, String& outErr, const auto out = p->getStream(StdStreamType::Out); const auto err = p->getStream(StdStreamType::ErrorOut); - // Write the assembly - SLANG_RETURN_ON_FAIL(in->write(spirv.getBuffer(), spirv.getCount())); - in->close(); - - // Wait for it to finish List<Byte> outData; List<Byte> outErrData; - while (!out->isEnd() || !err->isEnd()) - { - if (!out->isEnd()) - StreamUtil::readAll(out, 0, outData); - if (!err->isEnd()) - StreamUtil::readAll(err, 0, outErrData); - } + SLANG_RETURN_ON_FAIL(StreamUtil::readAndWrite(in, spirv.getArrayView(), out, outData, err, outErrData)); + SLANG_RETURN_ON_FAIL(p->waitForTermination(10)); outDis = String( |
