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)

76ee91e126..f4cf10c66f

$ 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 <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Ryan Harrison 2019-11-11 18:39:08 +00:00 committed by Commit Bot service account
parent 3c086a0c2e
commit 59b2987b20
4 changed files with 7 additions and 4 deletions

2
DEPS
View File

@ -68,7 +68,7 @@ deps = {
'condition': 'dawn_standalone', 'condition': 'dawn_standalone',
}, },
'third_party/shaderc': { 'third_party/shaderc': {
'url': '{chromium_git}/external/github.com/google/shaderc@76ee91e12642e2be731aac3f0f21401b0e7d9d16', 'url': '{chromium_git}/external/github.com/google/shaderc@f4cf10c66fbfeeba95e71d672d33b83da9ec95aa',
'condition': 'dawn_standalone', 'condition': 'dawn_standalone',
}, },

View File

@ -26,6 +26,7 @@ namespace {
} }
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() { DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() {
shaderc_spvc::CompilationResult result;
shaderc_spvc::CompileOptions options; shaderc_spvc::CompileOptions options;
options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu); options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu);
options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); 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 // Using the options that are used by Dawn, they appear in ShaderModuleGL.cpp
options.SetGLSLLanguageVersion(440); options.SetGLSLLanguageVersion(440);
options.SetFixupClipspace(true); options.SetFixupClipspace(true);
context.CompileSpvToGlsl(input.data(), input.size(), options); context.CompileSpvToGlsl(input.data(), input.size(), options, &result);
}); });
return 0; return 0;

View File

@ -27,6 +27,7 @@ namespace {
} }
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() { DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() {
shaderc_spvc::CompilationResult result;
shaderc_spvc::CompileOptions options; shaderc_spvc::CompileOptions options;
options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu); options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu);
options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); 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 // See https://github.com/gpuweb/gpuweb/issues/332
options.SetHLSLPointCoordCompat(true); options.SetHLSLPointCoordCompat(true);
options.SetHLSLPointSizeCompat(true); options.SetHLSLPointSizeCompat(true);
context.CompileSpvToHlsl(input.data(), input.size(), options); context.CompileSpvToHlsl(input.data(), input.size(), options, &result);
}); });
return 0; return 0;

View File

@ -27,12 +27,13 @@ namespace {
} }
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() { DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&context, &input]() {
shaderc_spvc::CompilationResult result;
shaderc_spvc::CompileOptions options; shaderc_spvc::CompileOptions options;
options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu); options.SetSourceEnvironment(shaderc_target_env_webgpu, shaderc_env_version_webgpu);
options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); 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 // 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; return 0;