mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-06 22:53:35 +00:00
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:
|
case wgpu::BufferBindingType::ReadOnlyStorage:
|
||||||
return true;
|
return true;
|
||||||
case wgpu::BufferBindingType::Undefined:
|
case wgpu::BufferBindingType::Undefined:
|
||||||
UNREACHABLE();
|
break;
|
||||||
}
|
}
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string BindGroupLayoutBase::EntriesToString() const {
|
std::string BindGroupLayoutBase::EntriesToString() const {
|
||||||
|
@ -85,6 +85,8 @@ namespace dawn::native {
|
|||||||
return extent.width == copySize.width && extent.height == copySize.height &&
|
return extent.width == copySize.width && extent.height == copySize.height &&
|
||||||
extent.depthOrArrayLayers == copySize.depthOrArrayLayers;
|
extent.depthOrArrayLayers == copySize.depthOrArrayLayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
SubresourceRange GetSubresourcesAffectedByCopy(const TextureCopy& copy,
|
SubresourceRange GetSubresourcesAffectedByCopy(const TextureCopy& copy,
|
||||||
@ -100,6 +102,8 @@ namespace dawn::native {
|
|||||||
case wgpu::TextureDimension::e3D:
|
case wgpu::TextureDimension::e3D:
|
||||||
return {copy.aspect, {0, 1}, {copy.mipLevel, 1}};
|
return {copy.aspect, {0, 1}, {copy.mipLevel, 1}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LazyClearRenderPassAttachments(BeginRenderPassCmd* renderPass) {
|
void LazyClearRenderPassAttachments(BeginRenderPassCmd* renderPass) {
|
||||||
|
@ -156,8 +156,9 @@ namespace dawn::native {
|
|||||||
return wgpu::FeatureName::DawnNative;
|
return wgpu::FeatureName::DawnNative;
|
||||||
|
|
||||||
case Feature::EnumCount:
|
case Feature::EnumCount:
|
||||||
UNREACHABLE();
|
break;
|
||||||
}
|
}
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -111,8 +111,9 @@ namespace dawn::native {
|
|||||||
return textureDimension == wgpu::TextureDimension::e1D;
|
return textureDimension == wgpu::TextureDimension::e1D;
|
||||||
|
|
||||||
case wgpu::TextureViewDimension::Undefined:
|
case wgpu::TextureViewDimension::Undefined:
|
||||||
UNREACHABLE();
|
break;
|
||||||
}
|
}
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsArrayLayerValidForTextureViewDimension(
|
bool IsArrayLayerValidForTextureViewDimension(
|
||||||
@ -132,8 +133,9 @@ namespace dawn::native {
|
|||||||
return textureViewArrayLayer == 1u;
|
return textureViewArrayLayer == 1u;
|
||||||
|
|
||||||
case wgpu::TextureViewDimension::Undefined:
|
case wgpu::TextureViewDimension::Undefined:
|
||||||
UNREACHABLE();
|
break;
|
||||||
}
|
}
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
MaybeError ValidateSampleCount(const TextureDescriptor* descriptor,
|
MaybeError ValidateSampleCount(const TextureDescriptor* descriptor,
|
||||||
|
@ -54,8 +54,9 @@ namespace dawn::native::vulkan {
|
|||||||
return VK_IMAGE_VIEW_TYPE_3D;
|
return VK_IMAGE_VIEW_TYPE_3D;
|
||||||
|
|
||||||
case wgpu::TextureViewDimension::Undefined:
|
case wgpu::TextureViewDimension::Undefined:
|
||||||
UNREACHABLE();
|
break;
|
||||||
}
|
}
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Computes which vulkan access type could be required for the given Dawn usage.
|
// Computes which vulkan access type could be required for the given Dawn usage.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user