mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
radeonsi: respect pipe_picture_desc::flush_flags
It is not always possible to assume PIPE_FLUSH_ASYNC. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28771>
This commit is contained in:
parent
08d3b93ce7
commit
ae68fa51a4
6 changed files with 7 additions and 7 deletions
|
|
@ -1194,7 +1194,7 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder, struct pipe_video_b
|
||||||
FB_BUFFER_OFFSET + dec->fb_size, RADEON_USAGE_READ, RADEON_DOMAIN_GTT);
|
FB_BUFFER_OFFSET + dec->fb_size, RADEON_USAGE_READ, RADEON_DOMAIN_GTT);
|
||||||
set_reg(dec, dec->reg.cntl, 1);
|
set_reg(dec, dec->reg.cntl, 1);
|
||||||
|
|
||||||
flush(dec, PIPE_FLUSH_ASYNC, picture->fence);
|
flush(dec, picture->flush_flags, picture->fence);
|
||||||
next_buffer(dec);
|
next_buffer(dec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ static void radeon_uvd_enc_end_frame(struct pipe_video_codec *encoder,
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
struct radeon_uvd_encoder *enc = (struct radeon_uvd_encoder *)encoder;
|
struct radeon_uvd_encoder *enc = (struct radeon_uvd_encoder *)encoder;
|
||||||
flush(enc, PIPE_FLUSH_ASYNC);
|
flush(enc, picture->flush_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void radeon_uvd_enc_destroy(struct pipe_video_codec *encoder)
|
static void radeon_uvd_enc_destroy(struct pipe_video_codec *encoder)
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ static void rvce_end_frame(struct pipe_video_codec *encoder, struct pipe_video_b
|
||||||
struct rvce_cpb_slot *slot = list_entry(enc->cpb_slots.prev, struct rvce_cpb_slot, list);
|
struct rvce_cpb_slot *slot = list_entry(enc->cpb_slots.prev, struct rvce_cpb_slot, list);
|
||||||
|
|
||||||
if (!enc->dual_inst || enc->bs_idx > 1)
|
if (!enc->dual_inst || enc->bs_idx > 1)
|
||||||
flush(enc, PIPE_FLUSH_ASYNC);
|
flush(enc, picture->flush_flags);
|
||||||
|
|
||||||
/* update the CPB backtrack with the just encoded frame */
|
/* update the CPB backtrack with the just encoded frame */
|
||||||
slot->picture_type = enc->pic.picture_type;
|
slot->picture_type = enc->pic.picture_type;
|
||||||
|
|
|
||||||
|
|
@ -2971,7 +2971,7 @@ static void radeon_dec_end_frame(struct pipe_video_codec *decoder, struct pipe_v
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dec->send_cmd(dec, target, picture);
|
dec->send_cmd(dec, target, picture);
|
||||||
flush(dec, PIPE_FLUSH_ASYNC, picture->fence);
|
flush(dec, picture->flush_flags, picture->fence);
|
||||||
if (picture->fence)
|
if (picture->fence)
|
||||||
dec->ws->fence_reference(dec->ws, &dec->prev_fence, *picture->fence);
|
dec->ws->fence_reference(dec->ws, &dec->prev_fence, *picture->fence);
|
||||||
next_buffer(dec);
|
next_buffer(dec);
|
||||||
|
|
@ -3000,7 +3000,7 @@ static void radeon_dec_jpeg_end_frame(struct pipe_video_codec *decoder, struct p
|
||||||
if (dec->jpg.crop_y + dec->jpg.crop_height > pic->picture_parameter.picture_height)
|
if (dec->jpg.crop_y + dec->jpg.crop_height > pic->picture_parameter.picture_height)
|
||||||
dec->jpg.crop_height = 0;
|
dec->jpg.crop_height = 0;
|
||||||
dec->send_cmd(dec, target, picture);
|
dec->send_cmd(dec, target, picture);
|
||||||
dec->ws->cs_flush(&dec->jcs[dec->cb_idx], PIPE_FLUSH_ASYNC, NULL);
|
dec->ws->cs_flush(&dec->jcs[dec->cb_idx], picture->flush_flags, NULL);
|
||||||
next_buffer(dec);
|
next_buffer(dec);
|
||||||
dec->cb_idx = (dec->cb_idx+1) % dec->njctx;
|
dec->cb_idx = (dec->cb_idx+1) % dec->njctx;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1249,7 +1249,7 @@ static void radeon_enc_end_frame(struct pipe_video_codec *encoder, struct pipe_v
|
||||||
struct pipe_picture_desc *picture)
|
struct pipe_picture_desc *picture)
|
||||||
{
|
{
|
||||||
struct radeon_encoder *enc = (struct radeon_encoder *)encoder;
|
struct radeon_encoder *enc = (struct radeon_encoder *)encoder;
|
||||||
flush(enc, PIPE_FLUSH_ASYNC);
|
flush(enc, picture->flush_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void radeon_enc_destroy(struct pipe_video_codec *encoder)
|
static void radeon_enc_destroy(struct pipe_video_codec *encoder)
|
||||||
|
|
|
||||||
|
|
@ -997,7 +997,7 @@ si_vpe_processor_end_frame(struct pipe_video_codec *codec,
|
||||||
struct pipe_fence_handle *process_fence = NULL;
|
struct pipe_fence_handle *process_fence = NULL;
|
||||||
assert(codec);
|
assert(codec);
|
||||||
|
|
||||||
vpeproc->ws->cs_flush(&vpeproc->cs, PIPE_FLUSH_ASYNC, &process_fence);
|
vpeproc->ws->cs_flush(&vpeproc->cs, picture->flush_flags, &process_fence);
|
||||||
next_buffer(vpeproc);
|
next_buffer(vpeproc);
|
||||||
|
|
||||||
if (picture->fence && process_fence) {
|
if (picture->fence && process_fence) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue