mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 04:20:18 +01:00
vk/meta: Pass depth/stencil attachments only when a clear is requested
If we pass both, and only one of them is cleared, the other aspect might be disturbed if the format contains both aspects. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32379>
This commit is contained in:
parent
63b99fde38
commit
ccced641b5
1 changed files with 2 additions and 2 deletions
|
|
@ -494,12 +494,12 @@ clear_image_level_layers(struct vk_command_buffer *cmd,
|
|||
VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
|
||||
}
|
||||
|
||||
if (image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
|
||||
if (aspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
|
||||
vk_render.pDepthAttachment = &vk_att;
|
||||
meta_render.depth_attachment_format = format;
|
||||
}
|
||||
|
||||
if (image->aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
|
||||
if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
|
||||
vk_render.pStencilAttachment = &vk_att;
|
||||
meta_render.stencil_attachment_format = format;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue