diff options
author | Eric Anholt <[email protected]> | 2016-04-15 15:07:49 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-04-18 10:10:44 -0700 |
commit | 48fe53bbb9cc14dd758e7a55c55616be85a3358b (patch) | |
tree | 65e008144df666fd145e915d70eb6effeaa98a33 /src/gallium/drivers | |
parent | 21a9ed620764bde2021aa7592cf2695dad8f3f74 (diff) |
vc4: Add support for rendering to cube map surfaces.
We need to fix up the offset to point at the face of the cube. Fixes
piglit fbo-cubemap, copyteximage CUBE, and glean's fbo test.
Cc: "11.1 11.2" <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-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; |