summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-core-module-textures.cpp3
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)
{