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

2017-03-23 Thread Leo Liu
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 
---
 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


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

2017-03-23 Thread Christian König

Am 23.03.2017 um 15:35 schrieb Leo Liu:

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 


Reviewed-by: Christian König 


---
  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;



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-03-23 Thread Marek Olšák
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

On Thu, Mar 23, 2017 at 3:35 PM, Leo Liu  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 
> ---
>  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