[Mesa-dev] [PATCH] i965: Disallow PixelTransfer operations for tiled-memcpy TexImage/ReadPixels
Kenneth Graunke
kenneth at whitecape.org
Fri Sep 4 11:34:29 PDT 2015
On Friday, September 04, 2015 07:24:54 PM Chris Wilson wrote:
> The tiled memcpy fast paths perform a simple blit (with only a couple of
> trivial pixel conversion routines) and do not accommodate PixelTransfer
> operations. Therefore if any are set, fallback to the regular routines.
> Note that PixelTransfer only applies to TexImage and ReadPixels, not to
> GetTexImage.
Hmm, do they really apply to TexImage?
From the OpenGL 3.0 spec, 3.7.3, Pixel Transfer Modes
"Pixel transfer modes affect the operation of DrawPixels (section 3.7.4),
ReadPixels (section 4.3.2), and CopyPixels (section 4.3.3) at the time
when one of these commands is executed (which may differ from the time
the command is issued)."
I don't see any indication that they apply to TexImage. Of course, I
might just be missing something...
The first hunk definitely makes sense to me.
Also, the final patch should probably be CC'd to mesa-stable.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/drivers/dri/i965/intel_pixel_read.c | 4 ++++
> src/mesa/drivers/dri/i965/intel_tex_subimage.c | 4 ++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
> index 3fe506e..eb366cd 100644
> --- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
> +++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
> @@ -109,6 +109,10 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx,
> pack->Invert)
> return false;
>
> + /* Only a simple blit, no scale, bias or other mapping. */
> + if (ctx->_ImageTransferState)
> + return false;
> +
> /* This renderbuffer can come from a texture. In this case, we impose
> * some of the same restrictions we have for textures and adjust for
> * miplevels.
> diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> index 31e511f..44921e5 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> @@ -118,6 +118,10 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
> packing->Invert)
> return false;
>
> + /* Only a simple blit, no scale, bias or other mapping. */
> + if (ctx->_ImageTransferState)
> + return false;
> +
> if (!intel_get_memcpy(texImage->TexFormat, format, type, &mem_copy, &cpp,
> INTEL_UPLOAD))
> return false;
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150904/a77f0b53/attachment-0001.sig>
More information about the mesa-dev
mailing list