mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
panvk: Ensure that render_info is not null in force_fb_preload
This fixes various crashes that I saw with occlusion query tests. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Fixes:ba2c7fd00a("panvk: use force_fb_preload for unaligned preload") Fixes:c108dfc930("panvk: force_fb_preload should insert a barrier") Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32024>
This commit is contained in:
parent
f4e8849d79
commit
125223b391
1 changed files with 10 additions and 6 deletions
|
|
@ -527,12 +527,16 @@ force_fb_preload(struct panvk_cmd_buffer *cmdbuf,
|
|||
fbinfo->zs.preload.s = true;
|
||||
|
||||
if (fbinfo->zs.clear.s) {
|
||||
const VkRenderingAttachmentInfo *att = render_info->pStencilAttachment;
|
||||
if (render_info) {
|
||||
const VkRenderingAttachmentInfo *att =
|
||||
render_info->pStencilAttachment;
|
||||
|
||||
clear_atts[clear_att_count++] = (VkClearAttachment){
|
||||
.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT,
|
||||
.clearValue = att->clearValue,
|
||||
};
|
||||
}
|
||||
|
||||
clear_atts[clear_att_count++] = (VkClearAttachment){
|
||||
.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT,
|
||||
.clearValue = att->clearValue,
|
||||
};
|
||||
fbinfo->zs.clear.s = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -556,7 +560,7 @@ force_fb_preload(struct panvk_cmd_buffer *cmdbuf,
|
|||
panvk_per_arch(CmdPipelineBarrier2)(panvk_cmd_buffer_to_handle(cmdbuf),
|
||||
&dep_info);
|
||||
|
||||
if (clear_att_count) {
|
||||
if (clear_att_count && render_info) {
|
||||
VkClearRect clear_rect = {
|
||||
.rect = render_info->renderArea,
|
||||
.baseArrayLayer = 0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue