Minor fix to build with MSVC: Removes switch with only default case

Fixes warning C4065: switch statement contains 'default' but no 'case' labels

Change-Id: If9a8f20eaeb2499f71bc25a69e545b3e8b21be4d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36081
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
This commit is contained in:
Carl Woffenden 2021-01-12 08:55:27 +00:00 committed by Commit Bot service account
parent 4c5ab90452
commit ede229f313
1 changed files with 8 additions and 4 deletions

View File

@ -91,8 +91,8 @@ namespace dawn_native { namespace vulkan {
#endif // DAWN_PLATFORM_LINUX
WGPUTexture WrapVulkanImage(WGPUDevice cDevice, const ExternalImageDescriptorVk* descriptor) {
switch (descriptor->type) {
#if defined(DAWN_PLATFORM_LINUX)
switch (descriptor->type) {
case ExternalImageType::OpaqueFD:
case ExternalImageType::DmaBuf: {
const ExternalImageDescriptorFD* fdDescriptor =
@ -102,10 +102,12 @@ namespace dawn_native { namespace vulkan {
fdDescriptor, fdDescriptor->memoryFD, fdDescriptor->waitFDs);
return reinterpret_cast<WGPUTexture>(texture);
}
#endif // DAWN_PLATFORM_LINUX
default:
return nullptr;
}
#else
return nullptr;
#endif // DAWN_PLATFORM_LINUX
}
bool ExportVulkanImage(WGPUTexture cTexture,
@ -114,8 +116,8 @@ namespace dawn_native { namespace vulkan {
if (cTexture == nullptr) {
return false;
}
switch (info->type) {
#if defined(DAWN_PLATFORM_LINUX)
switch (info->type) {
case ExternalImageType::OpaqueFD:
case ExternalImageType::DmaBuf: {
Texture* texture = reinterpret_cast<Texture*>(cTexture);
@ -124,10 +126,12 @@ namespace dawn_native { namespace vulkan {
return device->SignalAndExportExternalTexture(texture, desiredLayout, fdInfo,
&fdInfo->semaphoreHandles);
}
#endif // DAWN_PLATFORM_LINUX
default:
return false;
}
#else
return false;
#endif // DAWN_PLATFORM_LINUX
}
}} // namespace dawn_native::vulkan