dawn/native: Fix a bunch of GCC warnings
GCC is warning that the switch cases do not have a 'default' clause, and so control flow can reach the end of the function, which does not have a return. Change-Id: I45465e7f9547d683ea7eb5f356b80a77e6d95d73 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88310 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
27f480b7e6
commit
ad0602fbf2
|
@ -657,8 +657,9 @@ namespace dawn::native {
|
|||
case wgpu::BufferBindingType::ReadOnlyStorage:
|
||||
return true;
|
||||
case wgpu::BufferBindingType::Undefined:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
std::string BindGroupLayoutBase::EntriesToString() const {
|
||||
|
|
|
@ -85,6 +85,8 @@ namespace dawn::native {
|
|||
return extent.width == copySize.width && extent.height == copySize.height &&
|
||||
extent.depthOrArrayLayers == copySize.depthOrArrayLayers;
|
||||
}
|
||||
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
SubresourceRange GetSubresourcesAffectedByCopy(const TextureCopy& copy,
|
||||
|
@ -100,6 +102,8 @@ namespace dawn::native {
|
|||
case wgpu::TextureDimension::e3D:
|
||||
return {copy.aspect, {0, 1}, {copy.mipLevel, 1}};
|
||||
}
|
||||
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
void LazyClearRenderPassAttachments(BeginRenderPassCmd* renderPass) {
|
||||
|
|
|
@ -156,8 +156,9 @@ namespace dawn::native {
|
|||
return wgpu::FeatureName::DawnNative;
|
||||
|
||||
case Feature::EnumCount:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
|
@ -111,8 +111,9 @@ namespace dawn::native {
|
|||
return textureDimension == wgpu::TextureDimension::e1D;
|
||||
|
||||
case wgpu::TextureViewDimension::Undefined:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
bool IsArrayLayerValidForTextureViewDimension(
|
||||
|
@ -132,8 +133,9 @@ namespace dawn::native {
|
|||
return textureViewArrayLayer == 1u;
|
||||
|
||||
case wgpu::TextureViewDimension::Undefined:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
MaybeError ValidateSampleCount(const TextureDescriptor* descriptor,
|
||||
|
|
|
@ -54,8 +54,9 @@ namespace dawn::native::vulkan {
|
|||
return VK_IMAGE_VIEW_TYPE_3D;
|
||||
|
||||
case wgpu::TextureViewDimension::Undefined:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
// Computes which vulkan access type could be required for the given Dawn usage.
|
||||
|
|
Loading…
Reference in New Issue