mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 09:30:36 +02:00
tu: Zero MSRTSS temporary image before creating it
In the dynamic rendering case, the images are allocated statically out
of the command buffer and may be reused, so we have to make they are
zeroed to match the normal tu_CreateImage() path. Otherwise we may get
garbage from previous usages of the image.
Fixes: f6c7f16322 ("tu: Implement VK_EXT_multisampled_render_to_single_sampled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38032>
This commit is contained in:
parent
c0b5c04b84
commit
f58b24467a
1 changed files with 10 additions and 0 deletions
|
|
@ -3767,7 +3767,17 @@ tu_init_msrtss_attachments(struct tu_device *device,
|
|||
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT),
|
||||
};
|
||||
|
||||
/* In case we're using dynamic rendering, reset the image struct from
|
||||
* the last use.
|
||||
*/
|
||||
memset(&images[i], 0, sizeof(images[i]));
|
||||
|
||||
/* Note: we don't need a corresponding vk_image_finish() when destroying
|
||||
* the framebuffer or finishing the render pass because the object is
|
||||
* internal and we never attach private data or a name to it.
|
||||
*/
|
||||
vk_image_init(&device->vk, &images[i].vk, &image_info);
|
||||
|
||||
tu_image_init(device, &images[i], &image_info);
|
||||
TU_CALLX(device, tu_image_update_layout)(device, &images[i], DRM_FORMAT_MOD_INVALID, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue