From fa4da581c6854fbceed8f7c58b69b628c53180e6 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 28 Jan 2026 15:53:30 +0100 Subject: [PATCH] radv: zero-initialize image view objects Mostly to make sure that color/depth descriptors are zero-initialized in case applications are missing the usage flags. In this case, they will be considerd as null descriptors. This hides the issue in https://gitlab.freedesktop.org/mesa/mesa/-/issues/14637 but the real fix has to be in the Steam Overlay. Cc: mesa-stable Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_image_view.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_image_view.c b/src/amd/vulkan/radv_image_view.c index f9114a7fad5..61a25f2dfc9 100644 --- a/src/amd/vulkan/radv_image_view.c +++ b/src/amd/vulkan/radv_image_view.c @@ -500,9 +500,9 @@ radv_image_view_init(struct radv_image_view *iview, struct radv_device *device, if (!extra_create_info || !extra_create_info->from_client) assert(pCreateInfo->flags & VK_IMAGE_VIEW_CREATE_DRIVER_INTERNAL_BIT_MESA); - vk_image_view_init(&device->vk, &iview->vk, pCreateInfo); - memset(&iview->descriptor, 0, sizeof(iview->descriptor)); + memset(iview, 0, sizeof(*iview)); + vk_image_view_init(&device->vk, &iview->vk, pCreateInfo); iview->image = image; iview->plane_id = radv_plane_from_aspect(pCreateInfo->subresourceRange.aspectMask); @@ -664,13 +664,13 @@ radv_hiz_image_view_init(struct radv_image_view *iview, struct radv_device *devi VK_FROM_HANDLE(radv_image, image, pCreateInfo->image); assert(pCreateInfo->flags & VK_IMAGE_VIEW_CREATE_DRIVER_INTERNAL_BIT_MESA); + + memset(iview, 0, sizeof(*iview)); vk_image_view_init(&device->vk, &iview->vk, pCreateInfo); assert(vk_format_has_depth(image->vk.format) && vk_format_has_stencil(image->vk.format)); assert(iview->vk.aspects == VK_IMAGE_ASPECT_DEPTH_BIT); - memset(&iview->descriptor, 0, sizeof(iview->descriptor)); - iview->image = image; const uint32_t type =