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