Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Add unreachable for vulkan switches. #37324

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions impeller/renderer/backend/vulkan/formats_vk.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ constexpr vk::Format ToVKImageFormat(PixelFormat format) {
case PixelFormat::kR8G8UNormInt:
return vk::Format::eR8G8Unorm;
}

FML_UNREACHABLE();
}

constexpr PixelFormat ToPixelFormat(vk::Format format) {
Expand Down Expand Up @@ -254,6 +256,8 @@ constexpr vk::ShaderStageFlags ToVkShaderStage(ShaderStage stage) {
case ShaderStage::kVertex:
return vk::ShaderStageFlagBits::eVertex;
}

FML_UNREACHABLE();
}

constexpr vk::DescriptorSetLayoutBinding ToVKDescriptorSetLayoutBinding(
Expand Down Expand Up @@ -284,6 +288,8 @@ constexpr vk::AttachmentLoadOp ToVKAttachmentLoadOp(LoadAction load_action) {
case LoadAction::kDontCare:
return vk::AttachmentLoadOp::eDontCare;
}

FML_UNREACHABLE();
}

constexpr vk::AttachmentStoreOp ToVKAttachmentStoreOp(
Expand All @@ -298,6 +304,8 @@ constexpr vk::AttachmentStoreOp ToVKAttachmentStoreOp(
// TODO (kaushikiska): vulkan doesn't support multisample resolve.
return vk::AttachmentStoreOp::eDontCare;
}

FML_UNREACHABLE();
}

constexpr vk::IndexType ToVKIndexType(IndexType index_type) {
Expand All @@ -309,6 +317,8 @@ constexpr vk::IndexType ToVKIndexType(IndexType index_type) {
case IndexType::kUnknown:
return vk::IndexType::eUint32;
}

FML_UNREACHABLE();
}

constexpr vk::PrimitiveTopology ToVKPrimitiveTopology(PrimitiveType primitive) {
Expand All @@ -324,6 +334,8 @@ constexpr vk::PrimitiveTopology ToVKPrimitiveTopology(PrimitiveType primitive) {
case PrimitiveType::kPoint:
return vk::PrimitiveTopology::ePointList;
}

FML_UNREACHABLE();
}

} // namespace impeller