diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-23 05:01:20 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-23 05:01:20 +0000 |
commit | e2a3acb64af2657b1181806818eacad061103c23 (patch) | |
tree | 7535f61f2c3f8a69404befb400ecca145be4429c /lib/mesa/src/gallium/drivers/radeon | |
parent | 1e3bb66f697283b6bd192f3a000d99d637624079 (diff) |
Import Mesa 19.0.5
Diffstat (limited to 'lib/mesa/src/gallium/drivers/radeon')
4 files changed, 15 insertions, 12 deletions
diff --git a/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc.c b/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc.c index 521d08f30..3164dbb2c 100644 --- a/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc.c +++ b/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc.c @@ -263,9 +263,9 @@ radeon_uvd_enc_get_feedback(struct pipe_video_codec *encoder, if (NULL != size) { radeon_uvd_enc_feedback_t *fb_data = - (radeon_uvd_enc_feedback_t *) enc->ws->buffer_map(fb->res->buf, - enc->cs, - PIPE_TRANSFER_READ_WRITE); + (radeon_uvd_enc_feedback_t *) enc->ws->buffer_map( + fb->res->buf, enc->cs, + PIPE_TRANSFER_READ_WRITE | RADEON_TRANSFER_TEMPORARY); if (!fb_data->status) *size = fb_data->bitstream_size; @@ -314,7 +314,7 @@ radeon_uvd_create_encoder(struct pipe_context *context, enc->screen = context->screen; enc->ws = ws; enc->cs = - ws->cs_create(sctx->ctx, RING_UVD_ENC, radeon_uvd_enc_cs_flush, enc); + ws->cs_create(sctx->ctx, RING_UVD_ENC, radeon_uvd_enc_cs_flush, enc, false); if (!enc->cs) { RVID_ERR("Can't get command submission context.\n"); diff --git a/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc.h b/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc.h index 63176d264..52e7ae3c0 100644 --- a/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc.h +++ b/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc.h @@ -464,6 +464,6 @@ struct radeon_uvd_encoder }; void radeon_uvd_enc_1_1_init(struct radeon_uvd_encoder *enc); -bool si_radeon_uvd_enc_supported(struct si_screen *rscreen); +bool si_radeon_uvd_enc_supported(struct si_screen *sscreen); #endif // _RADEON_UVD_ENC_H diff --git a/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c b/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c index ddb219792..1f41b0947 100644 --- a/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c +++ b/lib/mesa/src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c @@ -835,10 +835,10 @@ radeon_uvd_enc_slice_header_hevc(struct radeon_uvd_encoder *enc) static void radeon_uvd_enc_ctx(struct radeon_uvd_encoder *enc) { - struct si_screen *rscreen = (struct si_screen *) enc->screen; + struct si_screen *sscreen = (struct si_screen *) enc->screen; enc->enc_pic.ctx_buf.swizzle_mode = 0; - if (rscreen->info.chip_class < GFX9) { + if (sscreen->info.chip_class < GFX9) { enc->enc_pic.ctx_buf.rec_luma_pitch = (enc->luma->u.legacy.level[0].nblk_x * enc->luma->bpe); enc->enc_pic.ctx_buf.rec_chroma_pitch = @@ -950,7 +950,7 @@ radeon_uvd_enc_rc_per_pic(struct radeon_uvd_encoder *enc, static void radeon_uvd_enc_encode_params_hevc(struct radeon_uvd_encoder *enc) { - struct si_screen *rscreen = (struct si_screen *) enc->screen; + struct si_screen *sscreen = (struct si_screen *) enc->screen; switch (enc->enc_pic.picture_type) { case PIPE_H265_ENC_PICTURE_TYPE_I: case PIPE_H265_ENC_PICTURE_TYPE_IDR: @@ -970,7 +970,7 @@ radeon_uvd_enc_encode_params_hevc(struct radeon_uvd_encoder *enc) } enc->enc_pic.enc_params.allowed_max_bitstream_size = enc->bs_size; - if (rscreen->info.chip_class < GFX9) { + if (sscreen->info.chip_class < GFX9) { enc->enc_pic.enc_params.input_pic_luma_pitch = (enc->luma->u.legacy.level[0].nblk_x * enc->luma->bpe); enc->enc_pic.enc_params.input_pic_chroma_pitch = @@ -998,7 +998,7 @@ radeon_uvd_enc_encode_params_hevc(struct radeon_uvd_encoder *enc) RADEON_ENC_CS(enc->enc_pic.enc_params.pic_type); RADEON_ENC_CS(enc->enc_pic.enc_params.allowed_max_bitstream_size); - if (rscreen->info.chip_class < GFX9) { + if (sscreen->info.chip_class < GFX9) { RADEON_ENC_READ(enc->handle, RADEON_DOMAIN_VRAM, enc->luma->u.legacy.level[0].offset); RADEON_ENC_READ(enc->handle, RADEON_DOMAIN_VRAM, diff --git a/lib/mesa/src/gallium/drivers/radeon/radeon_vcn_enc.c b/lib/mesa/src/gallium/drivers/radeon/radeon_vcn_enc.c index 8f9af73c6..7d64a28a4 100644 --- a/lib/mesa/src/gallium/drivers/radeon/radeon_vcn_enc.c +++ b/lib/mesa/src/gallium/drivers/radeon/radeon_vcn_enc.c @@ -244,7 +244,9 @@ static void radeon_enc_get_feedback(struct pipe_video_codec *encoder, struct rvid_buffer *fb = feedback; if (size) { - uint32_t *ptr = enc->ws->buffer_map(fb->res->buf, enc->cs, PIPE_TRANSFER_READ_WRITE); + uint32_t *ptr = enc->ws->buffer_map( + fb->res->buf, enc->cs, + PIPE_TRANSFER_READ_WRITE | RADEON_TRANSFER_TEMPORARY); if (ptr[1]) *size = ptr[6]; else @@ -286,7 +288,8 @@ struct pipe_video_codec *radeon_create_encoder(struct pipe_context *context, enc->bits_in_shifter = 0; enc->screen = context->screen; enc->ws = ws; - enc->cs = ws->cs_create(sctx->ctx, RING_VCN_ENC, radeon_enc_cs_flush, enc); + enc->cs = ws->cs_create(sctx->ctx, RING_VCN_ENC, radeon_enc_cs_flush, + enc, false); if (!enc->cs) { RVID_ERR("Can't get command submission context.\n"); |