radv: add a helper to emit PM4 commands to a CS
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
This commit is contained in:
committed by
Marge Bot
parent
498fc42fa9
commit
8032f628ad
@@ -290,4 +290,10 @@ void radv_emit_cond_exec(const struct radv_device *device, struct radeon_cmdbuf
|
||||
|
||||
void radv_cs_write_data_imm(struct radeon_cmdbuf *cs, unsigned engine_sel, uint64_t va, uint32_t imm);
|
||||
|
||||
static inline void
|
||||
radv_emit_pm4_commands(struct radeon_cmdbuf *cs, const struct ac_pm4_state *pm4)
|
||||
{
|
||||
radeon_emit_array(cs, pm4->pm4, pm4->ndw);
|
||||
}
|
||||
|
||||
#endif /* RADV_CS_H */
|
||||
|
||||
@@ -716,9 +716,7 @@ radv_emit_compute(struct radv_device *device, struct radeon_cmdbuf *cs, bool is_
|
||||
S_00B8BC_INTERLEAVE_1D(preamble_state.gfx11.compute_dispatch_interleave));
|
||||
|
||||
ac_pm4_finalize(pm4);
|
||||
|
||||
radeon_emit_array(cs, pm4->pm4, pm4->ndw);
|
||||
|
||||
radv_emit_pm4_commands(cs, pm4);
|
||||
ac_pm4_free_state(pm4);
|
||||
}
|
||||
|
||||
@@ -889,7 +887,7 @@ radv_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs)
|
||||
}
|
||||
|
||||
ac_pm4_finalize(pm4);
|
||||
radeon_emit_array(cs, pm4->pm4, pm4->ndw);
|
||||
radv_emit_pm4_commands(cs, pm4);
|
||||
ac_pm4_free_state(pm4);
|
||||
|
||||
radv_emit_compute(device, cs, false);
|
||||
|
||||
@@ -76,7 +76,7 @@ radv_emit_sqtt_start(const struct radv_device *device, struct radeon_cmdbuf *cs,
|
||||
ac_pm4_finalize(pm4);
|
||||
|
||||
radeon_check_space(device->ws, cs, pm4->ndw);
|
||||
radeon_emit_array(cs, pm4->pm4, pm4->ndw);
|
||||
radv_emit_pm4_commands(cs, pm4);
|
||||
|
||||
ac_pm4_free_state(pm4);
|
||||
}
|
||||
@@ -96,7 +96,7 @@ radv_emit_sqtt_stop(const struct radv_device *device, struct radeon_cmdbuf *cs,
|
||||
ac_pm4_finalize(pm4);
|
||||
|
||||
radeon_check_space(device->ws, cs, pm4->ndw);
|
||||
radeon_emit_array(cs, pm4->pm4, pm4->ndw);
|
||||
radv_emit_pm4_commands(cs, pm4);
|
||||
|
||||
ac_pm4_clear_state(pm4, &pdev->info, false, is_compute_queue);
|
||||
|
||||
@@ -109,7 +109,7 @@ radv_emit_sqtt_stop(const struct radv_device *device, struct radeon_cmdbuf *cs,
|
||||
ac_pm4_finalize(pm4);
|
||||
|
||||
radeon_check_space(device->ws, cs, pm4->ndw);
|
||||
radeon_emit_array(cs, pm4->pm4, pm4->ndw);
|
||||
radv_emit_pm4_commands(cs, pm4);
|
||||
|
||||
ac_pm4_free_state(pm4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user