diff --git a/gtests/GlslMapIO.FromFile.cpp b/gtests/GlslMapIO.FromFile.cpp index 1ad9e0296f..855a2af25a 100644 --- a/gtests/GlslMapIO.FromFile.cpp +++ b/gtests/GlslMapIO.FromFile.cpp @@ -285,19 +285,21 @@ TEST_P(GlslMapIOTest, FromFile) result.linkingOutput = program.getInfoLog(); result.linkingError = program.getInfoDebugLog(); - unsigned int stage = 0; - glslang::TIntermediate* firstIntermediate = nullptr; - while (!program.getIntermediate((EShLanguage)stage) && stage < EShLangCount) { stage++; } - firstIntermediate = program.getIntermediate((EShLanguage)stage); - - glslang::TDefaultGlslIoResolver resolver(*firstIntermediate); - glslang::TGlslIoMapper ioMapper; + glslang::TIoMapResolver *resolver; + for (unsigned stage = 0; stage < EShLangCount; stage++) { + resolver = program.getGlslIoResolver((EShLanguage)stage); + if (resolver) + break; + } + glslang::TIoMapper *ioMapper = glslang::GetGlslIoMapper(); if (success) { - success &= program.mapIO(&resolver, &ioMapper); + success &= program.mapIO(resolver, ioMapper); result.linkingOutput = program.getInfoLog(); result.linkingError = program.getInfoDebugLog(); } + delete ioMapper; + delete resolver; success &= verifyIOMapping(result.linkingError, program); result.validationResult = success; diff --git a/gtests/VkRelaxed.FromFile.cpp b/gtests/VkRelaxed.FromFile.cpp index 6e31974aae..8b8a628aa8 100644 --- a/gtests/VkRelaxed.FromFile.cpp +++ b/gtests/VkRelaxed.FromFile.cpp @@ -237,19 +237,21 @@ TEST_P(VulkanRelaxedTest, FromFile) shaders[i]->setResourceSetBinding(resourceSetBindings[i]); } - unsigned int stage = 0; - glslang::TIntermediate* firstIntermediate = nullptr; - while (!program.getIntermediate((EShLanguage)stage) && stage < EShLangCount) { stage++; } - firstIntermediate = program.getIntermediate((EShLanguage)stage); - - glslang::TDefaultGlslIoResolver resolver(*firstIntermediate); - glslang::TGlslIoMapper ioMapper; + glslang::TIoMapResolver *resolver; + for (unsigned stage = 0; stage < EShLangCount; stage++) { + resolver = program.getGlslIoResolver((EShLanguage)stage); + if (resolver) + break; + } + glslang::TIoMapper *ioMapper = glslang::GetGlslIoMapper(); if (success) { - success &= program.mapIO(&resolver, &ioMapper); + success &= program.mapIO(resolver, ioMapper); result.linkingOutput = program.getInfoLog(); result.linkingError = program.getInfoDebugLog(); } + delete ioMapper; + delete resolver; success &= verifyIOMapping(result.linkingError, program); result.validationResult = success;