From 80ff45f095db5a08db264921fda2db210788d529 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 3 Dec 2021 09:46:08 -0500 Subject: Improvements to repro diagnostics (#2039) * #include an absolute path didn't work - because paths were taken to always be relative. * Improvements to repro diagnostics. * Fix typo. --- source/slang/slang-api.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-api.cpp') diff --git a/source/slang/slang-api.cpp b/source/slang/slang-api.cpp index 5ee384e4a..e8e9b602d 100644 --- a/source/slang/slang-api.cpp +++ b/source/slang/slang-api.cpp @@ -777,10 +777,13 @@ SLANG_API SlangResult spExtractRepro(SlangSession* session, const void* reproDat using namespace Slang; SLANG_UNUSED(session); + DiagnosticSink sink; + sink.init(nullptr, nullptr); + List buffer; { MemoryStreamBase memoryStream(FileAccess::Read, reproData, reproDataSize); - SLANG_RETURN_ON_FAIL(ReproUtil::loadState(&memoryStream, buffer)); + SLANG_RETURN_ON_FAIL(ReproUtil::loadState(&memoryStream, &sink, buffer)); } MemoryOffsetBase base; @@ -801,10 +804,13 @@ SLANG_API SlangResult spLoadReproAsFileSystem( SLANG_UNUSED(session); + DiagnosticSink sink; + sink.init(nullptr, nullptr); + MemoryStreamBase stream(FileAccess::Read, reproData, reproDataSize); List buffer; - SLANG_RETURN_ON_FAIL(ReproUtil::loadState(&stream, buffer)); + SLANG_RETURN_ON_FAIL(ReproUtil::loadState(&stream, &sink, buffer)); auto requestState = ReproUtil::getRequest(buffer); MemoryOffsetBase base; -- cgit v1.2.3