From 59b2987b200367aee1a07a51b54a519c243d7ffa Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 11 Nov 2019 18:39:08 +0000 Subject: [PATCH] Another spvc API migration Subtle change to how results are handled requiring another change. Rolling DEPS ahead to pick up change. Roll third_party/shaderc/ 76ee91e12..f4cf10c66 (4 commits) https://chromium.googlesource.com/external/github.com/google/shaderc/+log/76ee91e12642..f4cf10c66fbf $ git log 76ee91e12..f4cf10c66 --date=short --no-merges --format='%ad %ae %s' 2019-11-11 rharrison Correct Unicode issue with add_copyright.py (#876) 2019-11-08 rharrison Another major API rework (#871) 2019-11-07 rharrison Remove deprecated API elements (#870) 2019-11-07 9856269+sarahM0 Add support and unit test for OpTypeInt, OpTypePointer and OpConstant (#872) Created with: roll-dep third_party/shaderc Change-Id: Ic461c3ec135d2c73ebadede62fb34c90e7961eda Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13380 Commit-Queue: Corentin Wallez Reviewed-by: Corentin Wallez --- DEPS | 2 +- src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp | 3 ++- src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp | 3 ++- src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index 82bc6e2bd5..452120052d 100644 --- a/DEPS +++ b/DEPS @@ -68,7 +68,7 @@ deps = { 'condition': 'dawn_standalone', }, 'third_party/shaderc': { - 'url': '{chromium_git}/external/github.com/google/shaderc@76ee91e12642e2be731aac3f0f21401b0e7d9d16', + 'url': '{chromium_git}/external/github.com/google/shaderc@f4cf10c66fbfeeba95e71d672d33b83da9ec95aa', 'condition': 'dawn_standalone', }, diff --git a/src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp b/src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp index 1470882081..7a0afff219 100644 --- a/src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp +++ b/src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp @@ -26,6 +26,7 @@ namespace { } DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() { + shaderc_spvc::CompilationResult result; shaderc_spvc::CompileOptions options; options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu); options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); @@ -33,7 +34,7 @@ namespace { // Using the options that are used by Dawn, they appear in ShaderModuleGL.cpp options.SetGLSLLanguageVersion(440); options.SetFixupClipspace(true); - context.CompileSpvToGlsl(input.data(), input.size(), options); + context.CompileSpvToGlsl(input.data(), input.size(), options, &result); }); return 0; diff --git a/src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp b/src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp index bf10c54eb7..8acef538b1 100644 --- a/src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp +++ b/src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp @@ -27,6 +27,7 @@ namespace { } DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() { + shaderc_spvc::CompilationResult result; shaderc_spvc::CompileOptions options; options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu); options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); @@ -39,7 +40,7 @@ namespace { // See https://github.com/gpuweb/gpuweb/issues/332 options.SetHLSLPointCoordCompat(true); options.SetHLSLPointSizeCompat(true); - context.CompileSpvToHlsl(input.data(), input.size(), options); + context.CompileSpvToHlsl(input.data(), input.size(), options, &result); }); return 0; diff --git a/src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp b/src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp index df68a8c670..0909d9742a 100644 --- a/src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp +++ b/src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp @@ -27,12 +27,13 @@ namespace { } DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() { + shaderc_spvc::CompilationResult result; shaderc_spvc::CompileOptions options; options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu); options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); // Using the options that are used by Dawn, they appear in ShaderModuleMTL.mm - context.CompileSpvToMsl(input.data(), input.size(), options); + context.CompileSpvToMsl(input.data(), input.size(), options, &result); }); return 0;