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