Please add a comment into the code that PIPE_USAGE_STAGING is used
because the buffer is mapped for read. With that:

Reviewed-by: Marek Olšák <marek.ol...@amd.com>

Marek

On Thu, Mar 23, 2017 at 3:35 PM, Leo Liu <leo....@amd.com> wrote:
> 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>
> ---
>  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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to