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>
diff --git a/src/gallium/frontends/omx/bellagio/vid_enc.c b/src/gallium/frontends/omx/bellagio/vid_enc.c
index 2069654..19e5ab0 100644
--- a/src/gallium/frontends/omx/bellagio/vid_enc.c
+++ b/src/gallium/frontends/omx/bellagio/vid_enc.c
@@ -737,7 +737,7 @@
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 c40be51..88bdace 100644
--- a/src/gallium/frontends/omx/tizonia/h264eoutport.c
+++ b/src/gallium/frontends/omx/tizonia/h264eoutport.c
@@ -84,7 +84,7 @@
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 6035e99..ceffb33 100644
--- a/src/gallium/frontends/omx/vid_enc_common.c
+++ b/src/gallium/frontends/omx/vid_enc_common.c
@@ -147,7 +147,7 @@
/* ------------- 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 @@
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);