From 9d2de1d6d45f4dfd006a8d6d70ffdf5fb44aed84 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Tue, 7 Apr 2020 21:53:37 +0000 Subject: [PATCH] Add default to conversion utility to avoid build breakage I am about to add a new entry to the enum being used in this switch on the spvc side. Temporarily adding in a default here, so that can roll correctly, then this function can be updated to use the new entry. BUG=dawn:367 Change-Id: I9345f651e2e23604599a1b25fcd2993127062695 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19040 Commit-Queue: Ryan Harrison Reviewed-by: Kai Ninomiya --- src/dawn_native/ShaderModule.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp index 0cd9692123..be78a2e359 100644 --- a/src/dawn_native/ShaderModule.cpp +++ b/src/dawn_native/ShaderModule.cpp @@ -119,8 +119,13 @@ namespace dawn_native { return wgpu::BindingType::WriteonlyStorageTexture; case shaderc_spvc_binding_type_storage_texture: return wgpu::BindingType::StorageTexture; + default: + // This default needs to be here temporarily, to avoid + // build/dependency issues when spvc adds a new entry to the + // enum. Once the new entry is available I will land a + // second patch to remove this default. + UNREACHABLE(); } - UNREACHABLE(); } SingleShaderStage ToSingleShaderStage(shaderc_spvc_execution_model execution_model) {