summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-stdlib.cpp38
1 files changed, 28 insertions, 10 deletions
diff --git a/source/slang/slang-stdlib.cpp b/source/slang/slang-stdlib.cpp
index e44b7131b..7643b3b85 100644
--- a/source/slang/slang-stdlib.cpp
+++ b/source/slang/slang-stdlib.cpp
@@ -1385,6 +1385,11 @@ namespace Slang
sb << ", " << t << "elements";
}
+ if(isMultisample)
+ {
+ sb << ", " << t << "sampleCount";
+ }
+
if(includeMipInfo)
sb << ", " << t << "numberOfLevels";
@@ -1401,22 +1406,35 @@ namespace Slang
if( kBaseTextureTypes[tt].coordCount + isArray < 4 )
{
+ int loadCoordCount = kBaseTextureTypes[tt].coordCount + isArray + (isMultisample?0:1);
+
sb << "T Load(";
- sb << "int" << kBaseTextureTypes[tt].coordCount + isArray + 1 << " location);\n";
+ sb << "int" << loadCoordCount << " location";
+ if(isMultisample)
+ {
+ sb << ", int sampleIndex";
+ }
+ sb << ");\n";
- if( !isMultisample )
+ sb << "T Load(";
+ sb << "int" << loadCoordCount << " location";
+ if(isMultisample)
{
- sb << "T Load(";
- sb << "int" << kBaseTextureTypes[tt].coordCount + isArray + 1 << " location, ";
- sb << "int" << kBaseTextureTypes[tt].coordCount << " offset);\n";
+ sb << ", int sampleIndex";
}
- else
+ sb << ", int" << loadCoordCount << " offset";
+ sb << ");\n";
+
+
+ sb << "T Load(";
+ sb << "int" << loadCoordCount << " location";
+ if(isMultisample)
{
- sb << "T Load(";
- sb << "int" << kBaseTextureTypes[tt].coordCount + isArray + 1 << " location, ";
- sb << "int sampleIndex, ";
- sb << "int" << kBaseTextureTypes[tt].coordCount << " offset);\n";
+ sb << ", int sampleIndex";
}
+ sb << ", int" << kBaseTextureTypes[tt].coordCount << " offset";
+ sb << ", out uint status";
+ sb << ");\n";
}
if(baseShape != TextureType::ShapeCube)