radv: make sure to zero-initialize image view descriptors

This prevents a regression from the next commit which would write
garbage for combined image+sampler descriptors and that might break
capture&replay.

It seems also more robust to write zeroes than garbage overall.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35455>
(cherry picked from commit 22e06d65d7)
This commit is contained in:
Samuel Pitoiset 2025-06-11 10:49:06 +02:00 committed by Eric Engestrom
parent be41f162d1
commit aaa489a1d0
2 changed files with 3 additions and 1 deletions

View file

@ -2394,7 +2394,7 @@
"description": "radv: make sure to zero-initialize image view descriptors",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -506,6 +506,8 @@ radv_image_view_init(struct radv_image_view *iview, struct radv_device *device,
bool from_client = extra_create_info && extra_create_info->from_client;
vk_image_view_init(&device->vk, &iview->vk, !from_client, pCreateInfo);
memset(&iview->descriptor, 0, sizeof(iview->descriptor));
iview->image = image;
iview->plane_id = radv_plane_from_aspect(pCreateInfo->subresourceRange.aspectMask);
iview->nbc_view.valid = false;