From 32b1e25e359f8daf5254301dca8be308e8e1e2ab Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 17 Jul 2024 17:00:05 -0700 Subject: Use slang-glslang.dll for spirv-validation (#4642) * Use slang-glslang.dll for spirv-validation This change replaces the use of "spirv-val.exe" with an API call to "spvtools::SpirvTools::Validate()". Closes #4610 --- source/slang/slang-emit-spirv.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'source/slang/slang-emit-spirv.cpp') diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index 1040017da..6b84668e3 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -6576,23 +6576,6 @@ SlangResult emitSPIRVFromIR( (uint8_t const*) context.m_words.getBuffer(), context.m_words.getCount() * Index(sizeof(context.m_words[0]))); - StringBuilder runSpirvValEnvVar; - PlatformUtil::getEnvironmentVariable(UnownedStringSlice("SLANG_RUN_SPIRV_VALIDATION"), runSpirvValEnvVar); - if (runSpirvValEnvVar.getUnownedSlice() == "1" - && !codeGenContext->shouldSkipSPIRVValidation()) - { - const auto validationResult = debugValidateSPIRV(spirvOut); - // If validation isn't available, don't say it failed, it's just a debug - // feature so we can skip - if (SLANG_FAILED(validationResult) && validationResult != SLANG_E_NOT_AVAILABLE) - { - codeGenContext->getSink()->diagnoseWithoutSourceView( - SourceLoc{}, - Diagnostics::spirvValidationFailed - ); - return validationResult; - } - } return SLANG_OK; } -- cgit v1.2.3