diff options
author | Eric Anholt <[email protected]> | 2018-07-16 16:44:58 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-07-20 11:11:29 -0700 |
commit | 5d11094db15d6a418e58eeed9695186ac9f5f5a9 (patch) | |
tree | ddbdb900deb2421cf3a976b82ee4ef4fab7d9c0e /src/gallium/drivers/v3d/v3dx_state.c | |
parent | c6737756addee6c1ed80c042ba91ede87f50732a (diff) |
v3d: 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
Diffstat (limited to 'src/gallium/drivers/v3d/v3dx_state.c')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index a092b1fb9e1..4bb90f1a98b 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -768,7 +768,9 @@ v3d_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, */ tex.texture_base_pointer = cl_address(NULL, rsc->bo->offset + - rsc->slices[0].offset), + rsc->slices[0].offset + + cso->u.tex.first_layer * + rsc->cube_map_stride), tex.swizzle_r = translate_swizzle(so->swizzle[0]); tex.swizzle_g = translate_swizzle(so->swizzle[1]); |