Add runtime toggle to select IR generation path in SPVC

BUG=dawn:281

Change-Id: I3102fece31289d1b511a13536aaf29254501d7c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
Ryan Harrison 2019-11-29 15:28:26 +00:00 committed by Commit Bot service account
parent 77f6db7a0b
commit fd12e1b746
2 changed files with 7 additions and 1 deletions

View File

@ -86,7 +86,12 @@ namespace dawn_native {
{Toggle::UseSpvc,
{"use_spvc",
"Enable use of spvc for shader compilation, instead of accessing spirv_cross "
"directly."}}}};
"directly."}},
{Toggle::UseSpvcIRGen,
{"use_spvc_ir_gen",
"Enable usage of spvc's internal parsing and IR generation code, instead of "
"spirv_cross's."}}}};
} // anonymous namespace
void TogglesSet::SetToggle(Toggle toggle, bool enabled) {

View File

@ -34,6 +34,7 @@ namespace dawn_native {
UseD3D12RenderPass,
SkipValidation,
UseSpvc,
UseSpvcIRGen,
EnumCount,
InvalidEnum = EnumCount,