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)

0a260d789f..76ee91e126

$ 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>
This commit is contained in:
Ryan Harrison 2019-11-07 17:02:57 +00:00 committed by Commit Bot service account
parent 252d1eb47f
commit c3284fa40e
4 changed files with 13 additions and 13 deletions

2
DEPS
View File

@ -68,7 +68,7 @@ deps = {
'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',
},

View File

@ -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 @@ namespace {
// 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;

View File

@ -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 @@ namespace {
// 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;

View File

@ -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;