diff options
-rw-r--r-- | src/gallium/drivers/vc4/vc4_resource.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index 050941c3e6f..a360e192b3f 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -607,7 +607,8 @@ 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; + surface->offset = (rsc->slices[level].offset + + psurf->u.tex.first_layer * rsc->cube_map_stride); surface->tiling = rsc->slices[level].tiling; return &surface->base; |