Mesa (main): vulkan: add new image types undef beta define to switch statements.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 9 05:24:57 UTC 2021
Module: Mesa
Branch: main
Commit: 40157bc2b0b534ce78fa129fdb978ab0486d87f1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=40157bc2b0b534ce78fa129fdb978ab0486d87f1
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Nov 5 09:51:39 2021 +1000
vulkan: add new image types undef beta define to switch statements.
This fixes some warnings when building with beta extensions enabled.
Reviewed-by: Emma Anholt <emma at anholt.net>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13685>
---
src/vulkan/runtime/vk_image.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/vulkan/runtime/vk_image.c b/src/vulkan/runtime/vk_image.c
index 5e6db91dc07..7ad08d23be8 100644
--- a/src/vulkan/runtime/vk_image.c
+++ b/src/vulkan/runtime/vk_image.c
@@ -489,6 +489,14 @@ vk_image_layout_is_read_only(VkImageLayout layout,
return aspect == VK_IMAGE_ASPECT_STENCIL_BIT;
case VK_IMAGE_LAYOUT_MAX_ENUM:
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ case VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR:
+#endif
unreachable("Invalid image layout.");
}
@@ -610,6 +618,14 @@ vk_image_layout_to_usage_flags(VkImageLayout layout,
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
case VK_IMAGE_LAYOUT_MAX_ENUM:
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+ case VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR:
+ case VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR:
+#endif
unreachable("Invalid image layout.");
}
More information about the mesa-commit
mailing list