Add runtime toggle for using SPVC
This will be used in the future to choose between Dawn directly accessing spirv-cross, and using spvc to mediate that interation. This also adds in the spvc library as a dependency. This is what cause the rollback last time, but that issue should be resolved. BUG=dawn:281 Change-Id: Ic0b02d136ca05e2fa71844ebc85586b8866d5712 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14122 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
22e73a5b28
commit
0625ae2167
1
BUILD.gn
1
BUILD.gn
|
@ -134,6 +134,7 @@ source_set("libdawn_native_sources") {
|
|||
":libdawn_native_headers",
|
||||
":libdawn_native_utils_gen",
|
||||
"${dawn_root}/src/common",
|
||||
"${dawn_shaderc_dir}:libshaderc_spvc",
|
||||
"${dawn_shaderc_dir}:spirv_cross",
|
||||
"${dawn_spirv_tools_dir}:spvtools_val",
|
||||
]
|
||||
|
|
|
@ -82,7 +82,11 @@ namespace dawn_native {
|
|||
"versions of Windows prior to build 1809, or when this toggle is turned off, Dawn "
|
||||
"will emulate a render pass."}},
|
||||
{Toggle::SkipValidation,
|
||||
{"skip_validation", "Skip expensive validation of Dawn commands."}}}};
|
||||
{"skip_validation", "Skip expensive validation of Dawn commands."}},
|
||||
{Toggle::UseSpvc,
|
||||
{"use_spvc",
|
||||
"Enable use of spvc for shader compilation, instead of accessing spirv_cross "
|
||||
"directly."}}}};
|
||||
} // anonymous namespace
|
||||
|
||||
void TogglesSet::SetToggle(Toggle toggle, bool enabled) {
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace dawn_native {
|
|||
UseD3D12ResourceHeapTier2,
|
||||
UseD3D12RenderPass,
|
||||
SkipValidation,
|
||||
UseSpvc,
|
||||
|
||||
EnumCount,
|
||||
InvalidEnum = EnumCount,
|
||||
|
|
Loading…
Reference in New Issue