Mesa (master): nvc0: fixup video decoding with 2D_ARRAY

Maarten Lankhorst mlankhorst at kemper.freedesktop.org
Sat May 4 18:56:45 UTC 2013


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

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Sat May  4 20:56:02 2013 +0200

nvc0: fixup video decoding with 2D_ARRAY

Signed-off-by: Maarten Lankhorst <m.b.lankhorst at gmail.com>

---

 src/gallium/drivers/nvc0/nvc0_video.c     |    7 +++----
 src/gallium/drivers/nvc0/nvc0_video_ppp.c |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_video.c b/src/gallium/drivers/nvc0/nvc0_video.c
index 64cfa3a..3c50016 100644
--- a/src/gallium/drivers/nvc0/nvc0_video.c
+++ b/src/gallium/drivers/nvc0/nvc0_video.c
@@ -573,15 +573,14 @@ nvc0_video_buffer_create(struct pipe_context *pipe,
    buffer->base.interlaced = true;
 
    memset(&templ, 0, sizeof(templ));
-   templ.target = PIPE_TEXTURE_3D;
-   templ.depth0 = 2;
+   templ.target = PIPE_TEXTURE_2D_ARRAY;
+   templ.depth0 = 1;
    templ.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
    templ.format = PIPE_FORMAT_R8_UNORM;
    templ.width0 = buffer->base.width;
    templ.height0 = buffer->base.height/2;
    templ.flags = NVC0_RESOURCE_FLAG_VIDEO;
-   templ.last_level = 0;
-   templ.array_size = 1;
+   templ.array_size = 2;
 
    buffer->resources[0] = pipe->screen->resource_create(pipe->screen, &templ);
    if (!buffer->resources[0])
diff --git a/src/gallium/drivers/nvc0/nvc0_video_ppp.c b/src/gallium/drivers/nvc0/nvc0_video_ppp.c
index 837ec4b..35cea62 100644
--- a/src/gallium/drivers/nvc0/nvc0_video_ppp.c
+++ b/src/gallium/drivers/nvc0/nvc0_video_ppp.c
@@ -69,7 +69,7 @@ nvc0_decoder_setup_ppp(struct nvc0_decoder *dec, struct nvc0_video_buffer *targe
       struct nv50_miptree *mt = (struct nv50_miptree *)target->resources[i];
 
       PUSH_DATA (push, mt->base.address >> 8);
-      PUSH_DATA (push, (mt->base.address + mt->total_size/2/mt->base.base.array_size) >> 8);
+      PUSH_DATA (push, (mt->base.address + mt->total_size/2) >> 8);
       mt->base.status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
    }
 }




More information about the mesa-commit mailing list