[Mesa-dev] [PATCH] i965: Disallow PixelTransfer operations for tiled-memcpy TexImage/ReadPixels

Kenneth Graunke kenneth at whitecape.org
Fri Sep 4 11:59:01 PDT 2015


On Friday, September 04, 2015 07:47:31 PM Chris Wilson wrote:
> On Fri, Sep 04, 2015 at 11:34:29AM -0700, Kenneth Graunke wrote:
> > 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)."
> 
> In a much older version:
> 
> glPixelTransfer sets pixel transfer modes that affect the operation of
> subsequent commands:
> 	glCopyPixels,
> 	glCopyTexImage1D,
> 	glCopyTexImage2D,
> 	glCopyTexSubImage1D,
> 	glCopyTexSubImage2D,
> 	glCopyTexSubImage3D,
> 	glDrawPixels,
> 	glReadPixels,
> 	glTexImage1D,
> 	glTexImage2D,
> 	glTexImage3D,
> 	glTexSubImage1D,
> 	glTexSubImage2D,
> 	glTexSubImage3D

Ah, that's from the man page.  Ilia noted that the spec says "The
selected groups are processed exactly as for DrawPixels", and it does
talk about applying convolution...so I think you're right.

Thanks for fixing this.

Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

> Plus glPixelTransferf is used by tests/general/teximage-scale-bias.c to
> affect the result of a glTexImage2D command.
> -Chris
> 
> 
-------------- 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/74dc504a/attachment.sig>


More information about the mesa-dev mailing list