diff options
-rw-r--r-- | src/gallium/drivers/vc4/vc4_resource.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index e0c0c7bdd42..349837e9824 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; } |