Only run the BoundArrayAccessors transform when robustness is on.

Bug: None
Change-Id: I40b94eb2a900a7d60529edb4ffa8f707e603a50d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49965
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Corentin Wallez 2021-05-06 13:55:34 +00:00 committed by Commit Bot service account
parent 9dad30d926
commit de5bd3fe28
3 changed files with 9 additions and 3 deletions

View File

@ -245,7 +245,9 @@ namespace dawn_native { namespace d3d12 {
tint::transform::Manager transformManager; tint::transform::Manager transformManager;
tint::transform::DataMap transformInputs; tint::transform::DataMap transformInputs;
transformManager.Add<tint::transform::BoundArrayAccessors>(); if (GetDevice()->IsRobustnessEnabled()) {
transformManager.Add<tint::transform::BoundArrayAccessors>();
}
if (stage == SingleShaderStage::Vertex) { if (stage == SingleShaderStage::Vertex) {
transformManager.Add<tint::transform::FirstIndexOffset>(); transformManager.Add<tint::transform::FirstIndexOffset>();
transformInputs.Add<tint::transform::FirstIndexOffset::BindingPoint>( transformInputs.Add<tint::transform::FirstIndexOffset::BindingPoint>(

View File

@ -85,7 +85,9 @@ namespace dawn_native { namespace metal {
// this MSL buffer index. // this MSL buffer index.
} }
} }
transformManager.Add<tint::transform::BoundArrayAccessors>(); if (GetDevice()->IsRobustnessEnabled()) {
transformManager.Add<tint::transform::BoundArrayAccessors>();
}
transformManager.Add<tint::transform::Renamer>(); transformManager.Add<tint::transform::Renamer>();
transformManager.Add<tint::transform::Msl>(); transformManager.Add<tint::transform::Msl>();

View File

@ -55,7 +55,9 @@ namespace dawn_native { namespace vulkan {
errorStream << "Tint SPIR-V writer failure:" << std::endl; errorStream << "Tint SPIR-V writer failure:" << std::endl;
tint::transform::Manager transformManager; tint::transform::Manager transformManager;
transformManager.Add<tint::transform::BoundArrayAccessors>(); if (GetDevice()->IsRobustnessEnabled()) {
transformManager.Add<tint::transform::BoundArrayAccessors>();
}
transformManager.Add<tint::transform::EmitVertexPointSize>(); transformManager.Add<tint::transform::EmitVertexPointSize>();
transformManager.Add<tint::transform::Spirv>(); transformManager.Add<tint::transform::Spirv>();