mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Force uninitialized variables to be zero for shader compiler on D3D12
The shader with uninitialized variables will fail to compile on D3D12 backend. SPIRV-Cross has added an option for supporting forcefully zero-initialized variables in latest version. Bug: dawn:347 Change-Id: Id02fa486317c583ee11cfe3bc382816dc34121fb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18680 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
27dcffcc02
commit
be73a51136
@@ -33,6 +33,7 @@ namespace {
|
||||
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.SetForceZeroInitializedVariables(true);
|
||||
options.SetHLSLShaderModel(51);
|
||||
// TODO (hao.x.li@intel.com): The HLSLPointCoordCompat and HLSLPointSizeCompat are
|
||||
// required temporarily for https://bugs.chromium.org/p/dawn/issues/detail?id=146,
|
||||
|
||||
Reference in New Issue
Block a user