[Mesa-dev] [PATCH] intel: Fix intel_texsubimage_tiled_memcpy to skip GL_EXT_unpack_subimage case

Eric Anholt eric at anholt.net
Thu Oct 4 13:58:07 PDT 2012


Rob Bradford <rob at robster.org.uk> writes:

> From: Rob Bradford <rob at linux.intel.com>
>
> 413c49141 added an optimisation to improve the performance of teximage under a
> limited set of circumstances. If GL_EXT_unpack_subimage has been used then we
> we must also skip this optimisation since the optimised codepath does not
> take the packing values into consideration.
>
> Signed-off-by: Rob Bradford <rob at linux.intel.com>
> Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
> ---
>  src/mesa/drivers/dri/intel/intel_tex_subimage.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
> index 55d0bae..ba6267a 100644
> --- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
> +++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
> @@ -205,7 +205,10 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
>         texImage->TexObject->Target != GL_TEXTURE_2D ||
>         texImage->Level != 0 ||
>         pixels == NULL ||
> -       packing->Alignment > 4)
> +       packing->Alignment > 4 ||
> +       packing->SkipPixels > 0 ||
> +       packing->SkipRows > 0 ||
> +       packing->RowLength != width)
>        return false;

Looks like packing->Invert should also skip this fast path.

Other than that,

Reviewed-by: Eric Anholt <eric at anholt.net>

In other news, it looks like this code also tries to read *pixels even
if it's an offset within a PBO.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121004/ad579023/attachment.pgp>


More information about the mesa-dev mailing list