diff options
author | Eric Anholt <[email protected]> | 2018-08-07 12:59:14 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-08-07 17:00:22 -0700 |
commit | 9ab6912a00ec29f5d1d9cebc7d3e32ae235419e8 (patch) | |
tree | 86066ba81ecabcd5be7cbc43c62235f8237f591f /src/gallium/drivers | |
parent | fe0a3a45bb4875e6c17916b5f2a6652e1691e129 (diff) |
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]
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index 408a9e0af2a..1e4657a7922 100644 --- a/src/gallium/drivers/vc4/vc4_state.c +++ b/src/gallium/drivers/vc4/vc4_state.c @@ -614,7 +614,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 : |