Mesa (main): frontends/omx: use pipe buffer map instead of texture map

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 8 14:27:27 UTC 2021


Module: Mesa
Branch: main
Commit: a4472e90ebc235f70655e504f7a310364adf2074
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a4472e90ebc235f70655e504f7a310364adf2074

Author: Boyuan Zhang <boyuan.zhang at amd.com>
Date:   Mon Jun  7 20:33:43 2021 -0400

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 at amd.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11233>

---

 src/gallium/frontends/omx/bellagio/vid_enc.c     | 2 +-
 src/gallium/frontends/omx/tizonia/h264eoutport.c | 2 +-
 src/gallium/frontends/omx/vid_enc_common.c       | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/frontends/omx/bellagio/vid_enc.c b/src/gallium/frontends/omx/bellagio/vid_enc.c
index 20696540d58..19e5ab0796e 100644
--- a/src/gallium/frontends/omx/bellagio/vid_enc.c
+++ b/src/gallium/frontends/omx/bellagio/vid_enc.c
@@ -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;
diff --git a/src/gallium/frontends/omx/tizonia/h264eoutport.c b/src/gallium/frontends/omx/tizonia/h264eoutport.c
index c40be512beb..88bdace0768 100644
--- a/src/gallium/frontends/omx/tizonia/h264eoutport.c
+++ b/src/gallium/frontends/omx/tizonia/h264eoutport.c
@@ -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;
diff --git a/src/gallium/frontends/omx/vid_enc_common.c b/src/gallium/frontends/omx/vid_enc_common.c
index 6035e99a2c7..ceffb3352a5 100644
--- a/src/gallium/frontends/omx/vid_enc_common.c
+++ b/src/gallium/frontends/omx/vid_enc_common.c
@@ -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);
 



More information about the mesa-commit mailing list