mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-13 05:08:20 +02: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> (cherry picked from commit9474ff72dd)
This commit is contained in:
parent
8dd736aa04
commit
caaab9f5e3
2 changed files with 9 additions and 7 deletions
|
|
@ -76,7 +76,7 @@
|
|||
"description": "vk/render_pass: don't deref null resolve attachments",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d2990b659978c2cce6668ee6ceb2570592c81f32"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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