Module: Mesa Branch: staging/18.1 Commit: ec7f550e17dec76f8b91f3a3e0817d30de518d3e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec7f550e17dec76f8b91f3a3e0817d30de518d3e
Author: Eric Anholt <[email protected]> Date: Tue Aug 7 12:59:14 2018 -0700 vc4: Respect a sampler view's first_layer field. Fixes texturing from EGL images created from cubemap faces, as in dEQP-EGL.functional.image.create.gles2_cubemap_negative_x_rgba_texture Cc: [email protected] (cherry picked from commit 9ab6912a00ec29f5d1d9cebc7d3e32ae235419e8) --- src/gallium/drivers/vc4/vc4_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index f8c3781849..40670041a8 100644 --- a/src/gallium/drivers/vc4/vc4_state.c +++ b/src/gallium/drivers/vc4/vc4_state.c @@ -624,7 +624,9 @@ vc4_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, } so->texture_p0 = - (VC4_SET_FIELD(rsc->slices[0].offset >> 12, VC4_TEX_P0_OFFSET) | + (VC4_SET_FIELD((rsc->slices[0].offset + + cso->u.tex.first_layer * + rsc->cube_map_stride) >> 12, VC4_TEX_P0_OFFSET) | VC4_SET_FIELD(rsc->vc4_format & 15, VC4_TEX_P0_TYPE) | VC4_SET_FIELD(so->force_first_level ? cso->u.tex.last_level : _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
