mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
radeonsi/vcn: Allocate session buffer in VRAM
It's never mapped so there's no reason for PIPE_USAGE_STAGING.
Improves encoding performance on dGPUs.
Tested with 7900XTX (before 1900fps => after 2100fps):
ffmpeg -hide_banner -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 \
-f lavfi -i testsrc=size=640x640,format=nv12 -vf hwupload -c:v av1_vaapi \
-f null -
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28945>
(cherry picked from commit cc0df497f0)
This commit is contained in:
parent
9ea069be85
commit
db932b6456
2 changed files with 2 additions and 2 deletions
|
|
@ -384,7 +384,7 @@
|
||||||
"description": "radeonsi/vcn: Allocate session buffer in VRAM",
|
"description": "radeonsi/vcn: Allocate session buffer in VRAM",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 0,
|
"nomination_type": 0,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null,
|
"because_sha": null,
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -1118,7 +1118,7 @@ static void radeon_enc_begin_frame(struct pipe_video_codec *encoder,
|
||||||
enc->si = CALLOC_STRUCT(rvid_buffer);
|
enc->si = CALLOC_STRUCT(rvid_buffer);
|
||||||
if (!enc->si ||
|
if (!enc->si ||
|
||||||
!enc->stream_handle ||
|
!enc->stream_handle ||
|
||||||
!si_vid_create_buffer(enc->screen, enc->si, 128 * 1024, PIPE_USAGE_STAGING)) {
|
!si_vid_create_buffer(enc->screen, enc->si, 128 * 1024, PIPE_USAGE_DEFAULT)) {
|
||||||
RVID_ERR("Can't create session buffer.\n");
|
RVID_ERR("Can't create session buffer.\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue