pvr: Fix seg fault on unused ds attachment
Fixes:
dEQP-VK.renderpass.suballocation.formats.r16g16_sint.input
.dont_care.dont_care.self_dep_clear
Signed-off-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>
This commit is contained in:
parent
2e5fb91090
commit
fbe975e738
1 changed files with 4 additions and 3 deletions
|
|
@ -7252,15 +7252,16 @@ static bool pvr_is_stencil_store_load_needed(
|
|||
|
||||
hw_render_idx = state->current_sub_cmd->gfx.hw_render_idx;
|
||||
hw_render = &pass->hw_setup->renders[hw_render_idx];
|
||||
|
||||
if (hw_render->ds_attach_idx == VK_ATTACHMENT_UNUSED)
|
||||
return false;
|
||||
|
||||
attachment = attachments[hw_render->ds_attach_idx];
|
||||
|
||||
if (!(vk_src_stage_mask & fragment_test_stages) &&
|
||||
vk_dst_stage_mask & VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT)
|
||||
return false;
|
||||
|
||||
if (hw_render->ds_attach_idx == VK_ATTACHMENT_UNUSED)
|
||||
return false;
|
||||
|
||||
for (uint32_t i = 0; i < memory_barrier_count; i++) {
|
||||
const uint32_t stencil_write_bit =
|
||||
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue