[Mesa-dev] [PATCH] st/omx/enc: use PIPE_USAGE_STAGING for output buffer

Leo Liu leo.liu at amd.com
Thu Mar 23 14:35:31 UTC 2017


Workaround an unknown bug with inside the transfer_map for certain
ASIC, also tested with un-affected ASICs, the performance actually
improved slightly.

Signed-off-by: Leo Liu <leo.liu at amd.com>
---
 src/gallium/state_trackers/omx/vid_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c
index b58063e..d40f54e 100644
--- a/src/gallium/state_trackers/omx/vid_enc.c
+++ b/src/gallium/state_trackers/omx/vid_enc.c
@@ -1093,7 +1093,7 @@ static void enc_HandleTask(omx_base_PortType *port, struct encode_task *task,
 
    /* -------------- allocate output buffer --------- */
    task->bitstream = pipe_buffer_create(priv->s_pipe->screen, PIPE_BIND_VERTEX_BUFFER,
-                                        PIPE_USAGE_STREAM, size);
+                                        PIPE_USAGE_STAGING, size);
 
    picture.picture_type = picture_type;
    picture.pic_order_cnt = task->pic_order_cnt;
-- 
2.9.3



More information about the mesa-dev mailing list