mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
radv: Add missing radeon_check_space() in radv_cmd_buffer_after_draw()
Also adds a missing assert that cdw <= cdw_max. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20149>
This commit is contained in:
parent
d86f60d21e
commit
b49e7cb3f4
1 changed files with 6 additions and 1 deletions
|
|
@ -757,6 +757,8 @@ static void
|
|||
radv_cmd_buffer_after_draw(struct radv_cmd_buffer *cmd_buffer, enum radv_cmd_flush_bits flags)
|
||||
{
|
||||
if (unlikely(cmd_buffer->device->thread_trace.bo)) {
|
||||
radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, 2);
|
||||
|
||||
radeon_emit(cmd_buffer->cs, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
radeon_emit(cmd_buffer->cs, EVENT_TYPE(V_028A90_THREAD_TRACE_MARKER) | EVENT_INDEX(0));
|
||||
}
|
||||
|
|
@ -765,7 +767,8 @@ radv_cmd_buffer_after_draw(struct radv_cmd_buffer *cmd_buffer, enum radv_cmd_flu
|
|||
enum rgp_flush_bits sqtt_flush_bits = 0;
|
||||
assert(flags & (RADV_CMD_FLAG_PS_PARTIAL_FLUSH | RADV_CMD_FLAG_CS_PARTIAL_FLUSH));
|
||||
|
||||
radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, 4);
|
||||
ASSERTED const unsigned cdw_max =
|
||||
radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, 4);
|
||||
|
||||
/* Force wait for graphics or compute engines to be idle. */
|
||||
si_cs_emit_cache_flush(cmd_buffer->cs,
|
||||
|
|
@ -774,6 +777,8 @@ radv_cmd_buffer_after_draw(struct radv_cmd_buffer *cmd_buffer, enum radv_cmd_flu
|
|||
radv_cmd_buffer_uses_mec(cmd_buffer), flags, &sqtt_flush_bits,
|
||||
cmd_buffer->gfx9_eop_bug_va);
|
||||
|
||||
assert(cmd_buffer->cs->cdw <= cdw_max);
|
||||
|
||||
if (cmd_buffer->state.graphics_pipeline && (flags & RADV_CMD_FLAG_PS_PARTIAL_FLUSH) &&
|
||||
radv_pipeline_has_stage(cmd_buffer->state.graphics_pipeline, MESA_SHADER_TASK)) {
|
||||
/* Force wait for compute engines to be idle on the internal cmdbuf. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue