Enable robust buffer access pass if robustness on
Turns on SPVC buffer access pass if robustness is also enabled.
Bug: dawn:480
Change-Id: Ib4d74e177f4f65139219f3ce8662566370f4a108
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26741
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp
index fbbe114..40ed372 100644
--- a/src/dawn_native/ShaderModule.cpp
+++ b/src/dawn_native/ShaderModule.cpp
@@ -1097,6 +1097,7 @@
shaderc_spvc::CompileOptions ShaderModuleBase::GetCompileOptions() const {
shaderc_spvc::CompileOptions options;
options.SetValidate(GetDevice()->IsValidationEnabled());
+ options.SetRobustBufferAccessPass(GetDevice()->IsRobustnessEnabled());
return options;
}