mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-08 16:30:27 +01:00
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 <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39585>
This commit is contained in:
parent
260908cecb
commit
fa4da581c6
1 changed files with 4 additions and 4 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue