radv: zero-initialize image view objects
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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 <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39585>
This commit is contained in:
Samuel Pitoiset 2026-01-28 15:53:30 +01:00 committed by Marge Bot
parent 260908cecb
commit fa4da581c6

View file

@ -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 =