diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-08-06 14:54:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-06 21:54:37 +0000 |
| commit | e0b912575c1db3c6f8273b154f8dcb2462a03d2e (patch) | |
| tree | b720b096acd556779f7e2e4de53b996a17e64264 /source/slang/slang-core-module-textures.cpp | |
| parent | 352576546bf192b06e425e922d305f0a7d0845fb (diff) | |
Fix GetDimensions to use mipLevel for SPIRV (#8065)
* Fix GetDimensions to use mipLevel for SPIRV
* format code (#84)
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Diffstat (limited to 'source/slang/slang-core-module-textures.cpp')
| -rw-r--r-- | source/slang/slang-core-module-textures.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-core-module-textures.cpp b/source/slang/slang-core-module-textures.cpp index ed34ed388..f9573a15a 100644 --- a/source/slang/slang-core-module-textures.cpp +++ b/source/slang/slang-core-module-textures.cpp @@ -499,7 +499,8 @@ void TextureTypeInfo::writeGetDimensionFunctions() if (isMultisample || isRW) spirv << "OpImageQuerySize " << imageVar << ";"; else - spirv << "OpImageQuerySizeLod " << imageVar << " $0;"; + spirv << "OpImageQuerySizeLod " << imageVar + << (includeMipInfo ? " $mipLevel;" : " $0;"); auto convertAndStore = [&](UnownedStringSlice uintSourceVal, const char* destParam) { |
