Skip to content
Snippets Groups Projects
Commit d1a2ba57 authored by Samuel Pitoiset's avatar Samuel Pitoiset Committed by Marge Bot
Browse files

radv: fix a GPU hang with inherited rendering and HiZ/HiS on GFX1201


With secondary command buffers, inherited rendering can be used but
it's basically impossible to know if the depth/stencil attachment
enabled HiZ/HiS. But it's required to disable WALK_ALIGN8 to avoid
GPU hangs.

This assumes that HiZ/HiS is enabled for inherited rendering as long
as a depth/stencil attachment is used. It's not the most optimal
approach but it's not supposed to hurt either.

This fixes a GPU hang with
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_cmdbuffers
and friends.

GFX1200 isn't affected because it doesn't support HiZ/HiS.

Cc: mesa-stable
Signed-off-by: default avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <!33986>
parent c34c7b1f
No related branches found
No related tags found
No related merge requests found
......@@ -3625,6 +3625,7 @@ radv_emit_rasterization_samples(struct radv_cmd_buffer *cmd_buffer)
{
struct radv_device *device = radv_cmd_buffer_device(cmd_buffer);
const struct radv_physical_device *pdev = radv_device_physical(device);
const struct radv_instance *instance = radv_physical_device_instance(pdev);
unsigned rasterization_samples = radv_get_rasterization_samples(cmd_buffer);
unsigned ps_iter_samples = radv_get_ps_iter_samples(cmd_buffer);
const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic;
......@@ -3639,6 +3640,12 @@ radv_emit_rasterization_samples(struct radv_cmd_buffer *cmd_buffer)
if (render->ds_att.iview) {
const struct radeon_surf *surf = &render->ds_att.iview->image->planes[0].surface;
has_hiz_his = surf->u.gfx9.zs.hiz.offset || surf->u.gfx9.zs.his.offset;
} else if (render->ds_att.format && !(instance->debug_flags & RADV_DEBUG_NO_HIZ)) {
/* For inherited rendering with secondary commands buffers, assume HiZ/HiS is enabled if
* there is a depth/stencil attachment. This shouldn't hurt and it's required to disable
* WALK_ALIGN8 to avoid GPU hangs.
*/
has_hiz_his = true;
}
 
walk_align8 = !has_hiz_his && !cmd_buffer->state.uses_vrs_attachment;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment