[Mesa-dev] [PATCH 01/10] swrast: Add LUMINANCE, INTENSITY, LUMINANCE_ALPHA to span asserts.
Ian Romanick
idr at freedesktop.org
Mon Apr 18 16:16:37 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/18/2011 01:37 PM, Eric Anholt wrote:
> Fixes ARB_texture_float/fbo-alphatest-formats.
> ---
> src/mesa/swrast/s_readpix.c | 3 +++
> src/mesa/swrast/s_span.c | 3 +++
> 2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
> index 5604c2e..a201a63 100644
> --- a/src/mesa/swrast/s_readpix.c
> +++ b/src/mesa/swrast/s_readpix.c
> @@ -195,6 +195,9 @@ fast_read_rgba_pixels( struct gl_context *ctx,
> rb->_BaseFormat == GL_RGB ||
> rb->_BaseFormat == GL_RG ||
> rb->_BaseFormat == GL_RED ||
> + rb->_BaseFormat == GL_LUMINANCE ||
> + rb->_BaseFormat == GL_INTENSITY ||
> + rb->_BaseFormat == GL_LUMINANCE_ALPHA ||
> rb->_BaseFormat == GL_ALPHA);
At this point would it be easier to just assert the formats that are not
allowed? Is there even anything that's left as a valid _BaseFormat that
isn't allowed here?
>
> /* clipping should have already been done */
> diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
> index b0f8e49..f0524e0 100644
> --- a/src/mesa/swrast/s_span.c
> +++ b/src/mesa/swrast/s_span.c
> @@ -1352,6 +1352,9 @@ _swrast_read_rgba_span( struct gl_context *ctx, struct gl_renderbuffer *rb,
> rb->_BaseFormat == GL_RGB ||
> rb->_BaseFormat == GL_RG ||
> rb->_BaseFormat == GL_RED ||
> + rb->_BaseFormat == GL_LUMINANCE ||
> + rb->_BaseFormat == GL_INTENSITY ||
> + rb->_BaseFormat == GL_LUMINANCE_ALPHA ||
> rb->_BaseFormat == GL_ALPHA);
>
> if (rb->DataType == dstType) {
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk2sxlUACgkQX1gOwKyEAw8CFQCfVFntgCi2e3E97sQvxbJfTeNg
wbcAnjxmN88BbETnE5P73CpJrhG6xsLT
=14pX
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list