diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-08-28 10:26:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-28 10:26:48 -0400 |
| commit | fecfb36e61c3bdb133b57713c2b6d27ff7924a9b (patch) | |
| tree | 5f43a27053f23d7552a396c610fd732ce9022266 /tools/render-test/render-test-main.cpp | |
| parent | 6c6be3c26335644bb65913a4db03388ec6ff4aab (diff) | |
Use getElementStride in toIndex. (#1039)
Make toIndex and toField methods of Location.
Diffstat (limited to 'tools/render-test/render-test-main.cpp')
| -rw-r--r-- | tools/render-test/render-test-main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp index a1768cdb2..ef3613240 100644 --- a/tools/render-test/render-test-main.cpp +++ b/tools/render-test/render-test-main.cpp @@ -496,7 +496,7 @@ static SlangResult _doCPUCompute(SlangSession* session, const String& sourcePath int index = parser.ReadInt(); SLANG_ASSERT(index >= 0); - location = binding.toIndex(location, index); + location = location.toIndex(index); if (location.isInvalid()) { outStream.print("Unable to find entry in '%d' in '%s'\n", index, entry.name.getBuffer()); @@ -509,7 +509,7 @@ static SlangResult _doCPUCompute(SlangSession* session, const String& sourcePath parser.ReadToken(); Token identifierToken = parser.ReadMatchingToken(TokenType::Identifier); - location = binding.toField(location, identifierToken.Content.getBuffer()); + location = location.toField(identifierToken.Content.getBuffer()); if (location.isInvalid()) { outStream.print("Unable to find field '%s' in '%s'\n", identifierToken.Content.getBuffer(), entry.name.getBuffer()); @@ -529,7 +529,7 @@ static SlangResult _doCPUCompute(SlangSession* session, const String& sourcePath auto& srcEntry = layout.entries[entryIndex]; - auto typeLayout = location.m_typeLayout; + auto typeLayout = location.getTypeLayout(); const auto kind = typeLayout->getKind(); switch (kind) { @@ -593,7 +593,7 @@ static SlangResult _doCPUCompute(SlangSession* session, const String& sourcePath break; case SLANG_TEXTURE_2D: { - slang::TypeReflection* typeReflection = location.m_typeLayout->getResourceResultType(); + slang::TypeReflection* typeReflection = location.getTypeLayout()->getResourceResultType(); int count = 1; if (typeReflection->getKind() == slang::TypeReflection::Kind::Vector) |
