[Mesa-dev] [PATCH v2] meta/GetTexSubImage: Account for GL_PACK_SKIP_IMAGES on compressed textures
Edward O'Callaghan
funfunctor at folklore1984.net
Mon Nov 14 11:01:19 UTC 2016
V2 is Acked-by: Edward O'Callaghan <funfunctor at folklore1984.net>
On 11/14/2016 09:32 PM, Eduardo Lima Mitev wrote:
> This option is currently ignored when packing compressed textures.
>
> Fixes CTS test (on gen8+):
> * GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pixelstore
> ---
> src/mesa/drivers/common/meta.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index 5ab1e6c..9437357 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -3255,9 +3255,12 @@ _mesa_meta_GetTexSubImage(struct gl_context *ctx,
> packing.SkipRows = 0;
> dst = _mesa_image_address3d(&packing, pixels, width, height,
> format, type, slice, 0, 0);
> - }
> - else {
> - dst = pixels;
> + } else {
> + /* Account for PACK_SKIP_IMAGES option, if supported */
> + GLint imageStride =
> + _mesa_image_image_stride(&ctx->Pack,width,height,
> + format, type);
> + dst = (GLubyte *) pixels + imageStride * ctx->Pack.SkipImages;
> }
> result = decompress_texture_image(ctx, texImage, slice,
> xoffset, yoffset, width, height,
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161114/0991408d/attachment.sig>
More information about the mesa-dev
mailing list