From a8ca786ba69f6af0120a24f473b2ae7e6a41495d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 30 Sep 2011 08:15:30 -0600 Subject: meta: fix GetTexImage() for luminance, l/a, intensity formats The GL spec says that luminance values are returned as (l, 0, 0, 1), L/A values as (l, 0, 0, a) and intensity values as (i, 0, 0, 1). Use the pixel transfer scale controls to implement that. This fixes a few failures in the new piglit getteximage-formats test when getting a compressed L or L/A image. --- src/mesa/main/pixel.c | 2 +- src/mesa/main/pixel.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index c87f5e0e9f7..e73c5a49a4a 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -506,7 +506,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values ) * Implements glPixelTransfer[fi] whether called immediately or from a * display list. */ -static void GLAPIENTRY +void GLAPIENTRY _mesa_PixelTransferf( GLenum pname, GLfloat param ) { GET_CURRENT_CONTEXT(ctx); diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h index 6f04eb62724..558b106d78c 100644 --- a/src/mesa/main/pixel.h +++ b/src/mesa/main/pixel.h @@ -43,6 +43,9 @@ struct gl_context; #if FEATURE_pixel_transfer +extern void GLAPIENTRY +_mesa_PixelTransferf(GLenum pname, GLfloat param); + extern void _mesa_update_pixel( struct gl_context *ctx, GLuint newstate ); @@ -51,6 +54,12 @@ _mesa_init_pixel_dispatch( struct _glapi_table * disp ); #else /* FEATURE_pixel_transfer */ +static inline void GLAPIENTRY +_mesa_PixelTransferf(GLenum pname, GLfloat param) +{ +} + + static INLINE void _mesa_update_pixel(struct gl_context *ctx, GLuint newstate) { -- cgit v1.2.3