Mesa (master): vc4: Don't forget to set up the offset for render targets.

Eric Anholt anholt at kemper.freedesktop.org
Mon Aug 18 22:28:04 UTC 2014


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

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Aug 18 10:24:29 2014 -0700

vc4: Don't forget to set up the offset for render targets.

This almost fixes fbo-generatemipmap rendering, except that the 1x1 level
isn't getting rendered.

---

 src/gallium/drivers/vc4/vc4_resource.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index e0c0c7b..349837e 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -239,6 +239,7 @@ vc4_create_surface(struct pipe_context *pctx,
                    const struct pipe_surface *surf_tmpl)
 {
         struct vc4_surface *surface = CALLOC_STRUCT(vc4_surface);
+        struct vc4_resource *rsc = vc4_resource(ptex);
 
         if (!surface)
                 return NULL;
@@ -258,6 +259,7 @@ vc4_create_surface(struct pipe_context *pctx,
         psurf->u.tex.level = level;
         psurf->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
         psurf->u.tex.last_layer = surf_tmpl->u.tex.last_layer;
+        surface->offset = rsc->slices[level].offset;
 
         return &surface->base;
 }




More information about the mesa-commit mailing list