diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-01-18 12:09:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 12:09:31 -0500 |
| commit | 7dc5857173e3fb5884736e5de91f6b4b1cef3ef3 (patch) | |
| tree | 472846e811f263a20ab6510f2718fc5c6036e8ee /source/slang/slang-emit-spirv.cpp | |
| parent | b2f4cb118ef15cbf522be0335e4084ac6db57672 (diff) | |
Fix for issue #2069 (#2082)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Fix unused initialized variable warning.
Fixed typo found in issue 2069 causing g++11 error of access through this.
Diffstat (limited to 'source/slang/slang-emit-spirv.cpp')
| -rw-r--r-- | source/slang/slang-emit-spirv.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index 38e60649a..8995b4911 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -2510,6 +2510,8 @@ struct SPIRVEmitContext auto base = inst->getBase(); SpvWord baseId = 0; IRArrayType* baseArrayType = nullptr; + // Only used in debug build, but we don't want a warning/error for an unused initialized variable + SLANG_UNUSED(baseArrayType); if (auto ptrLikeType = as<IRPointerLikeType>(base->getDataType())) { @@ -2541,6 +2543,8 @@ struct SPIRVEmitContext auto base = inst->getBase(); SpvWord baseId = 0; IRArrayType* baseArrayType = nullptr; + // Only used in debug build, but we don't want a warning/error for an unused initialized variable + SLANG_UNUSED(baseArrayType); if (auto ptrLikeType = as<IRPointerLikeType>(base->getDataType())) { |
