mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-05 12:46:11 +00:00
Use UNREACHABLE in more places
This commit is contained in:
parent
96acaef95e
commit
8fca4a21b7
@ -477,7 +477,7 @@ namespace backend {
|
||||
case nxt::BindingType::UniformBuffer:
|
||||
case nxt::BindingType::StorageBuffer:
|
||||
{
|
||||
nxt::BufferUsageBit requiredUsage;
|
||||
nxt::BufferUsageBit requiredUsage = nxt::BufferUsageBit::None;
|
||||
switch (type) {
|
||||
case nxt::BindingType::UniformBuffer:
|
||||
requiredUsage = nxt::BufferUsageBit::Uniform;
|
||||
|
@ -43,8 +43,7 @@ namespace backend {
|
||||
executionModel = nxt::ShaderStage::Compute;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
break;
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
// Extract push constants
|
||||
|
@ -92,7 +92,7 @@ namespace d3d12 {
|
||||
compileTarget = "ps_5_1";
|
||||
break;
|
||||
case nxt::ShaderStage::Compute:
|
||||
ASSERT(false);
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace d3d12 {
|
||||
heapProperties = &kReadbackHeapProperties;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
ComPtr<ID3D12Resource> resource;
|
||||
|
@ -63,8 +63,7 @@ namespace metal {
|
||||
descriptor.fragmentFunction = function;
|
||||
break;
|
||||
case nxt::ShaderStage::Compute:
|
||||
ASSERT(false);
|
||||
break;
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,8 +174,7 @@ namespace opengl {
|
||||
glVertexAttribDivisor(location, 1);
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
break;
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,8 +32,7 @@ namespace {
|
||||
case VulkanBackend:
|
||||
return utils::BackendType::Vulkan;
|
||||
default:
|
||||
NXT_ASSERT(false);
|
||||
return utils::BackendType::Null;
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,8 +47,7 @@ namespace {
|
||||
case VulkanBackend:
|
||||
return "Vulkan";
|
||||
default:
|
||||
NXT_ASSERT(false);
|
||||
return "";
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user