diff --git a/src/dawn_native/Texture.cpp b/src/dawn_native/Texture.cpp index 8d6bc55398..ebbabb7197 100644 --- a/src/dawn_native/Texture.cpp +++ b/src/dawn_native/Texture.cpp @@ -390,7 +390,9 @@ namespace dawn_native { desc.arrayLayerCount = texture->GetArrayLayers() - desc.baseArrayLayer; break; default: - UNREACHABLE(); + // We don't put UNREACHABLE() here because we validate enums only after this + // function sets default values. Otherwise, the UNREACHABLE() will be hit. + break; } } if (desc.mipLevelCount == 0) {