Use UNREACHABLE in more places

This commit is contained in:
Corentin Wallez 2017-07-10 21:48:12 -04:00 committed by Corentin Wallez
parent 96acaef95e
commit 8fca4a21b7
7 changed files with 8 additions and 13 deletions

View File

@ -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;

View File

@ -43,8 +43,7 @@ namespace backend {
executionModel = nxt::ShaderStage::Compute;
break;
default:
ASSERT(false);
break;
UNREACHABLE();
}
// Extract push constants

View File

@ -92,7 +92,7 @@ namespace d3d12 {
compileTarget = "ps_5_1";
break;
case nxt::ShaderStage::Compute:
ASSERT(false);
UNREACHABLE();
break;
}

View File

@ -61,7 +61,7 @@ namespace d3d12 {
heapProperties = &kReadbackHeapProperties;
break;
default:
ASSERT(false);
UNREACHABLE();
}
ComPtr<ID3D12Resource> resource;

View File

@ -63,8 +63,7 @@ namespace metal {
descriptor.fragmentFunction = function;
break;
case nxt::ShaderStage::Compute:
ASSERT(false);
break;
UNREACHABLE();
}
}

View File

@ -174,8 +174,7 @@ namespace opengl {
glVertexAttribDivisor(location, 1);
break;
default:
ASSERT(false);
break;
UNREACHABLE();
}
}
}

View File

@ -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();
}
}