Migrate away from using recently deprecated APIs
Due to a renaming/refactoring of the spvc API Dawn is currently using
a deprecated class name. Fixing this, so the deprecated APIs can be
removed.
Also including the roll to pick up the API changes.
Roll third_party/shaderc/ 0a260d789..76ee91e12 (7 commits)
https://chromium.googlesource.com/external/github.com/google/shaderc/+log/0a260d789fe9..76ee91e12642
$ git log 0a260d789..76ee91e12 --date=short --no-merges --format='%ad %ae %s'
2019-11-06 9856269+sarahM0 Fix spvc test machanism and adds unit tests for OpSource (#868)
2019-11-06 rharrison Move spirv_cross state out of result and rename opaque state handle (#865)
2019-11-05 9856269+sarahM0 Add unit test for spvcir parser (#866)
2019-11-04 rharrison Rolling 5 dependencies (#862)
2019-11-04 9856269+sarahM0 Add --emit-line-drective option (#861)
2019-11-01 9856269+sarahM0 Add spvcir unit test - OpCapability (#857)
2019-11-01 rharrison Add flag for updating invalid expecations and rewrite end logic (#856)
Created with:
roll-dep third_party/shaderc
Change-Id: I81649618da6753657ef5a7533785559c2a13c416
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13180
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/DEPS b/DEPS
index 0229c75..82bc6e2 100644
--- a/DEPS
+++ b/DEPS
@@ -68,7 +68,7 @@
'condition': 'dawn_standalone',
},
'third_party/shaderc': {
- 'url': '{chromium_git}/external/github.com/google/shaderc@f16e793858c4b438382f8483cb95f65b6b9aa3bf',
+ 'url': '{chromium_git}/external/github.com/google/shaderc@76ee91e12642e2be731aac3f0f21401b0e7d9d16',
'condition': 'dawn_standalone',
},
diff --git a/src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp b/src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp
index 1fdb4a6..1470882 100644
--- a/src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp
+++ b/src/fuzzers/DawnSPIRVCrossGLSLFastFuzzer.cpp
@@ -20,12 +20,12 @@
namespace {
int GLSLFastFuzzTask(const std::vector<uint32_t>& input) {
- shaderc_spvc::Compiler compiler;
- if (!compiler.IsValid()) {
+ shaderc_spvc::Context context;
+ if (!context.IsValid()) {
return 0;
}
- DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &input]() {
+ DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() {
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 +33,7 @@
// Using the options that are used by Dawn, they appear in ShaderModuleGL.cpp
options.SetGLSLLanguageVersion(440);
options.SetFixupClipspace(true);
- compiler.CompileSpvToGlsl(input.data(), input.size(), options);
+ context.CompileSpvToGlsl(input.data(), input.size(), options);
});
return 0;
diff --git a/src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp b/src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp
index 6ebe67d..bf10c54 100644
--- a/src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp
+++ b/src/fuzzers/DawnSPIRVCrossHLSLFastFuzzer.cpp
@@ -21,12 +21,12 @@
namespace {
int FuzzTask(const std::vector<uint32_t>& input) {
- shaderc_spvc::Compiler compiler;
- if (!compiler.IsValid()) {
+ shaderc_spvc::Context context;
+ if (!context.IsValid()) {
return 0;
}
- DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &input]() {
+ DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() {
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 +39,7 @@
// See https://github.com/gpuweb/gpuweb/issues/332
options.SetHLSLPointCoordCompat(true);
options.SetHLSLPointSizeCompat(true);
- compiler.CompileSpvToHlsl(input.data(), input.size(), options);
+ context.CompileSpvToHlsl(input.data(), input.size(), options);
});
return 0;
diff --git a/src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp b/src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp
index 36bb0c4..df68a8c 100644
--- a/src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp
+++ b/src/fuzzers/DawnSPIRVCrossMSLFastFuzzer.cpp
@@ -21,18 +21,18 @@
namespace {
int FuzzTask(const std::vector<uint32_t>& input) {
- shaderc_spvc::Compiler compiler;
- if (!compiler.IsValid()) {
+ shaderc_spvc::Context context;
+ if (!context.IsValid()) {
return 0;
}
- DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &input]() {
+ DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() {
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
- compiler.CompileSpvToMsl(input.data(), input.size(), options);
+ context.CompileSpvToMsl(input.data(), input.size(), options);
});
return 0;