tu: WFI after PC_TESSFACTOR_ADDR update

Updating PC_TESSFACTOR_ADDR could race with the next draw which uses it.

Fixes GL CTS tests running via Zink:
 KHR-Single-GL46.enhanced_layouts.glsl_contant_values
 KHR-GLES32.core.tessellation_shader.tessellation_shader_point_mode.point_rendering
 KHR-GLES32.core.tessellation_shader.winding.quads_cw
 KHR-GLES32.core.tessellation_shader.winding.triangles_cw

And probably more.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6815

Suggested-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17833>
This commit is contained in:
Danylo Piliaiev 2022-08-01 15:36:43 +03:00 committed by Marge Bot
parent 8c9dd9e783
commit 18573e4058
2 changed files with 2 additions and 6 deletions

View file

@ -77,6 +77,8 @@ tu6_lazy_emit_tessfactor_addr(struct tu_cmd_buffer *cmd)
return;
tu_cs_emit_regs(&cmd->cs, A6XX_PC_TESSFACTOR_ADDR(.qword = cmd->device->tess_bo->iova));
/* Updating PC_TESSFACTOR_ADDR could race with the next draw which uses it. */
cmd->state.cache.flush_bits |= TU_CMD_FLAG_WAIT_FOR_IDLE;
cmd->state.tessfactor_addr_set = true;
}

View file

@ -30,11 +30,5 @@ KHR-GL46.gpu_shader_fp64.builtin.mod_dvec4,Fail
KHR-GL46.copy_image.functional,Fail
KHR-GL46.texture_view.view_classes,Fail
# WFI is likely required after PC_TESSFACTOR_ADDR update,
# otherwise GPU may use not updated address.
KHR-GLES32.core.tessellation_shader.tessellation_shader_point_mode.point_rendering,Fail
KHR-GLES32.core.tessellation_shader.winding.quads_cw,Fail
KHR-GLES32.core.tessellation_shader.winding.triangles_cw,Fail
# https://gerrit.khronos.org/c/vk-gl-cts/+/9891/
KHR-GLES31.core.polygon_offset_clamp.PolygonOffsetClampMinMax,Fail