Module: Mesa
Branch: master
Commit: 54f9f34181ff3f6840472d16000e0092d12eb64d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=54f9f34181ff3f6840472d16000e0092d12eb64d

Author: Leo Liu <leo....@amd.com>
Date:   Thu Mar 23 10:29:47 2017 -0400

st/omx/enc: use PIPE_USAGE_STAGING for output buffer

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....@amd.com>
Reviewed-by: Christian König <christian.koe...@amd.com>
Reviewed-by: Marek Olšák <marek.ol...@amd.com>

---

 src/gallium/state_trackers/omx/vid_enc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/omx/vid_enc.c 
b/src/gallium/state_trackers/omx/vid_enc.c
index b58063e6e6..5274f6403b 100644
--- a/src/gallium/state_trackers/omx/vid_enc.c
+++ b/src/gallium/state_trackers/omx/vid_enc.c
@@ -1092,8 +1092,10 @@ static void enc_HandleTask(omx_base_PortType *port, 
struct encode_task *task,
    priv->s_pipe->flush(priv->s_pipe, NULL, 0);
 
    /* -------------- allocate output buffer --------- */
-   task->bitstream = pipe_buffer_create(priv->s_pipe->screen, 
PIPE_BIND_VERTEX_BUFFER,
-                                        PIPE_USAGE_STREAM, size);
+   task->bitstream = pipe_buffer_create(priv->s_pipe->screen,
+                                        PIPE_BIND_VERTEX_BUFFER,
+                                        PIPE_USAGE_STAGING, /* map for read */
+                                        size);
 
    picture.picture_type = picture_type;
    picture.pic_order_cnt = task->pic_order_cnt;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to