[Mesa-dev] [PATCH 02/13] meta: add offset, width, height parameters to decompress_texture_image()

Ilia Mirkin imirkin at alum.mit.edu
Tue Jul 14 09:31:56 PDT 2015


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Mon, Jul 13, 2015 at 9:21 PM, Brian Paul <brianp at vmware.com> wrote:
> In preparation for decompressing texture sub images.
> ---
>  src/mesa/drivers/common/meta.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index 54c3d5a..34a8e4b 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -2966,15 +2966,14 @@ static bool
>  decompress_texture_image(struct gl_context *ctx,
>                           struct gl_texture_image *texImage,
>                           GLuint slice,
> +                         GLint xoffset, GLint yoffset,
> +                         GLsizei width, GLsizei height,
>                           GLenum destFormat, GLenum destType,
>                           GLvoid *dest)
>  {
>     struct decompress_state *decompress = &ctx->Meta->Decompress;
>     struct decompress_fbo_state *decompress_fbo;
>     struct gl_texture_object *texObj = texImage->TexObject;
> -   const GLint width = texImage->Width;
> -   const GLint height = texImage->Height;
> -   const GLint depth = texImage->Height;
>     const GLenum target = texObj->Target;
>     GLenum rbFormat;
>     GLenum faceTarget;
> @@ -3093,7 +3092,7 @@ decompress_texture_image(struct gl_context *ctx,
>     memset(verts, 0, sizeof(verts));
>
>     _mesa_meta_setup_texture_coords(faceTarget, slice,
> -                                   0, 0, width, height,
> +                                   xoffset, yoffset, width, height,
>                                     texImage->Width, texImage->Height,
>                                     texImage->Depth,
>                                     verts[0].tex,
> @@ -3224,7 +3223,8 @@ _mesa_meta_GetTexImage(struct gl_context *ctx,
>           else {
>              dst = pixels;
>           }
> -         result = decompress_texture_image(ctx, texImage, slice,
> +         result = decompress_texture_image(ctx, texImage, slice, 0, 0,
> +                                           texImage->Width, texImage->Height,
>                                             format, type, dst);
>           if (!result)
>              break;
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list