From 122e6abdd4cf2e6813147da79d6a975d5a780184 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Wed, 19 May 2021 17:35:26 +0000 Subject: [PATCH] ShaderModule: Add default case to ResourceType switch `kExternalTexture` was recently added in tint, and now the compiler warns / errors that this isn't handled by the switch. Add a default that is `UNREACHABLE()`. Will fix one of the issues preventing a tint -> dawn roll. Bug: dawn:728 Change-Id: I510526af46e1f1981a7434f615aa8ed5e56534cd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51362 Auto-Submit: Ben Clayton Reviewed-by: Corentin Wallez Reviewed-by: Austin Eng Commit-Queue: Ben Clayton --- src/dawn_native/ShaderModule.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp index a0dc713e78..285afcf72a 100644 --- a/src/dawn_native/ShaderModule.cpp +++ b/src/dawn_native/ShaderModule.cpp @@ -193,6 +193,10 @@ namespace dawn_native { case tint::inspector::ResourceBinding::ResourceType::kReadOnlyStorageTexture: case tint::inspector::ResourceBinding::ResourceType::kWriteOnlyStorageTexture: return BindingInfoType::StorageTexture; + + default: + UNREACHABLE(); + return BindingInfoType::Buffer; } }