Explictly set the environment for the Fast fuzzers

BUG=chromium:970300

Change-Id: Ib57a2dcd92a378412588901df9cadc271cad18d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8001
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
Ryan Harrison 2019-06-11 14:38:51 +00:00 committed by Commit Bot service account
parent 05f7ad5ac8
commit 903fc2b049
3 changed files with 8 additions and 1 deletions

View File

@ -26,8 +26,11 @@ namespace {
}
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &input]() {
// Using the options that are used by Dawn, they appear in ShaderModuleGL.cpp
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 ShaderModuleGL.cpp
options.SetGLSLLanguageVersion(440);
options.SetFixupClipspace(true);
compiler.CompileSpvToGlsl(input.data(), input.size(), options);

View File

@ -28,6 +28,8 @@ namespace {
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &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 ShaderModuleD3D12.cpp
options.SetFlipVertY(true);

View File

@ -28,6 +28,8 @@ namespace {
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &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
options.SetFlipVertY(true);