Modify testing to only record validation pass/fail
* Changed unit tests to only record known the validation pass/fail status * errors are output as part of the failure message if the result is unexpected * can turn off validation for each test individually * Moved some SPV_KHR_vulkan_memory_model tests to be compiled for Vulkan 1.1
This commit is contained in:
parent
0bb930fc0f
commit
ed777b0fbd
79 changed files with 120 additions and 341 deletions
|
|
@ -77,17 +77,16 @@ TEST_P(LinkTestVulkan, FromFile)
|
|||
if (success && (controls & EShMsgSpvRules)) {
|
||||
spv::SpvBuildLogger logger;
|
||||
std::vector<uint32_t> spirv_binary;
|
||||
glslang::SpvOptions options;
|
||||
options.disableOptimizer = true;
|
||||
options.validate = true;
|
||||
options().disableOptimizer = true;
|
||||
glslang::GlslangToSpv(*program.getIntermediate(shaders.front()->getStage()),
|
||||
spirv_binary, &logger, &options);
|
||||
spirv_binary, &logger, &options());
|
||||
|
||||
std::ostringstream disassembly_stream;
|
||||
spv::Parameterize();
|
||||
spv::Disassemble(disassembly_stream, spirv_binary);
|
||||
result.spirvWarningsErrors = logger.getAllMessages();
|
||||
result.spirv = disassembly_stream.str();
|
||||
result.validationResult = !options().validate || logger.getAllMessages().empty();
|
||||
}
|
||||
|
||||
std::ostringstream stream;
|
||||
|
|
@ -99,7 +98,8 @@ TEST_P(LinkTestVulkan, FromFile)
|
|||
std::string expectedOutput;
|
||||
tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
|
||||
|
||||
checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname);
|
||||
checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname,
|
||||
result.spirvWarningsErrors);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue