radv: Change radv_vcn_write_event to a write memory func
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36772>
This commit is contained in:
@@ -14422,15 +14422,15 @@ write_event(struct radv_cmd_buffer *cmd_buffer, struct radv_event *event, VkPipe
|
||||
struct radv_cmd_stream *cs = cmd_buffer->cs;
|
||||
uint64_t va = radv_buffer_get_va(event->bo);
|
||||
|
||||
radv_cs_add_buffer(device->ws, cs->b, event->bo);
|
||||
|
||||
if (cmd_buffer->qf == RADV_QUEUE_VIDEO_DEC || cmd_buffer->qf == RADV_QUEUE_VIDEO_ENC) {
|
||||
radv_vcn_write_event(cmd_buffer, event, value);
|
||||
radv_vcn_write_memory(cmd_buffer, va, value);
|
||||
return;
|
||||
}
|
||||
|
||||
radv_emit_cache_flush(cmd_buffer);
|
||||
|
||||
radv_cs_add_buffer(device->ws, cs->b, event->bo);
|
||||
|
||||
ASSERTED unsigned cdw_max = radeon_check_space(device->ws, cs->b, 28);
|
||||
|
||||
if (stageMask & (VK_PIPELINE_STAGE_2_COPY_BIT | VK_PIPELINE_STAGE_2_RESOLVE_BIT | VK_PIPELINE_STAGE_2_BLIT_BIT |
|
||||
|
||||
@@ -143,7 +143,7 @@ radv_vcn_sq_tail(struct radv_cmd_stream *cs, struct rvcn_sq_var *sq)
|
||||
}
|
||||
|
||||
void
|
||||
radv_vcn_write_event(struct radv_cmd_buffer *cmd_buffer, struct radv_event *event, unsigned value)
|
||||
radv_vcn_write_memory(struct radv_cmd_buffer *cmd_buffer, uint64_t va, unsigned value)
|
||||
{
|
||||
struct radv_device *device = radv_cmd_buffer_device(cmd_buffer);
|
||||
struct radv_physical_device *pdev = radv_device_physical(device);
|
||||
@@ -154,9 +154,6 @@ radv_vcn_write_event(struct radv_cmd_buffer *cmd_buffer, struct radv_event *even
|
||||
if (pdev->vid_decode_ip == AMD_IP_UVD)
|
||||
return;
|
||||
|
||||
radv_cs_add_buffer(device->ws, cs->b, event->bo);
|
||||
uint64_t va = radv_buffer_get_va(event->bo);
|
||||
|
||||
bool separate_queue = pdev->vid_decode_ip != AMD_IP_VCN_UNIFIED;
|
||||
if (cmd_buffer->qf == RADV_QUEUE_VIDEO_DEC && separate_queue && pdev->vid_dec_reg.data2) {
|
||||
radeon_check_space(device->ws, cs->b, 8);
|
||||
|
||||
@@ -80,7 +80,7 @@ void radv_video_get_profile_alignments(struct radv_physical_device *pdev, const
|
||||
|
||||
void radv_vcn_sq_header(struct radv_cmd_stream *cs, struct rvcn_sq_var *sq, unsigned type, bool skip_signature);
|
||||
void radv_vcn_sq_tail(struct radv_cmd_stream *cs, struct rvcn_sq_var *sq);
|
||||
void radv_vcn_write_event(struct radv_cmd_buffer *cmd_buffer, struct radv_event *event, unsigned value);
|
||||
void radv_vcn_write_memory(struct radv_cmd_buffer *cmd_buffer, uint64_t va, unsigned value);
|
||||
|
||||
void radv_init_physical_device_encoder(struct radv_physical_device *pdevice);
|
||||
void radv_probe_video_decode(struct radv_physical_device *pdev);
|
||||
|
||||
Reference in New Issue
Block a user