mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 04:00:32 +01:00
vk/render_pass: don't deref null resolve attachments
Fixes: d2990b6599 ("vulkan: hook up VK_EXT_multisampled_render_to_single_sampled")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18134>
This commit is contained in:
parent
93f69e0452
commit
9474ff72dd
1 changed files with 8 additions and 6 deletions
|
|
@ -1839,22 +1839,24 @@ begin_subpass(struct vk_command_buffer *cmd_buffer,
|
|||
|
||||
if (depth_resolve_mode != VK_RESOLVE_MODE_NONE) {
|
||||
depth_attachment.resolveMode = depth_resolve_mode;
|
||||
if (sp_att->resolve)
|
||||
if (sp_att->resolve) {
|
||||
depth_attachment.resolveImageView =
|
||||
vk_image_view_to_handle(res_att_state->image_view);
|
||||
depth_attachment.resolveImageLayout =
|
||||
sp_att->resolve->layout;
|
||||
depth_attachment.resolveImageLayout =
|
||||
sp_att->resolve->layout;
|
||||
}
|
||||
|
||||
resolved_aspects |= VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
}
|
||||
|
||||
if (stencil_resolve_mode != VK_RESOLVE_MODE_NONE) {
|
||||
stencil_attachment.resolveMode = stencil_resolve_mode;
|
||||
if (sp_att->resolve)
|
||||
if (sp_att->resolve) {
|
||||
stencil_attachment.resolveImageView =
|
||||
vk_image_view_to_handle(res_att_state->image_view);
|
||||
stencil_attachment.resolveImageLayout =
|
||||
sp_att->resolve->stencil_layout;
|
||||
stencil_attachment.resolveImageLayout =
|
||||
sp_att->resolve->stencil_layout;
|
||||
}
|
||||
|
||||
resolved_aspects |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue