frontends/omx: use pipe buffer map instead of texture map

Fixes: eb74f9776 ("gallium: split transfer_(un)map into buffer_(un)map and texture_(un)map")

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11233>
This commit is contained in:
Boyuan Zhang 2021-06-07 20:33:43 -04:00 committed by Marge Bot
parent b8574cdaa8
commit a4472e90eb
3 changed files with 4 additions and 4 deletions

View file

@ -737,7 +737,7 @@ static OMX_ERRORTYPE vid_enc_FreeOutBuffer(omx_base_PortType *port, OMX_U32 idx,
if (buf->pOutputPortPrivate) {
struct output_buf_private *outp = buf->pOutputPortPrivate;
if (outp->transfer)
pipe_texture_unmap(priv->t_pipe, outp->transfer);
pipe_buffer_unmap(priv->t_pipe, outp->transfer);
pipe_resource_reference(&outp->bitstream, NULL);
FREE(outp);
buf->pOutputPortPrivate = NULL;

View file

@ -84,7 +84,7 @@ static OMX_ERRORTYPE h264e_outport_FreeBuffer(const void * ap_obj, OMX_HANDLETYP
if (outp) {
if (outp->transfer)
pipe_texture_unmap(priv->t_pipe, outp->transfer);
pipe_buffer_unmap(priv->t_pipe, outp->transfer);
pipe_resource_reference(&outp->bitstream, NULL);
FREE(outp);
buf->pOutputPortPrivate = NULL;

View file

@ -147,7 +147,7 @@ void vid_enc_BufferEncoded_common(vid_enc_PrivateType * priv, OMX_BUFFERHEADERTY
/* ------------- map result buffer ----------------- */
if (outp->transfer)
pipe_texture_unmap(priv->t_pipe, outp->transfer);
pipe_buffer_unmap(priv->t_pipe, outp->transfer);
pipe_resource_reference(&outp->bitstream, task->bitstream);
pipe_resource_reference(&task->bitstream, NULL);
@ -156,7 +156,7 @@ void vid_enc_BufferEncoded_common(vid_enc_PrivateType * priv, OMX_BUFFERHEADERTY
box.height = outp->bitstream->height0;
box.depth = outp->bitstream->depth0;
output->pBuffer = priv->t_pipe->texture_map(priv->t_pipe, outp->bitstream, 0,
output->pBuffer = priv->t_pipe->buffer_map(priv->t_pipe, outp->bitstream, 0,
PIPE_MAP_READ_WRITE,
&box, &outp->transfer);