summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_api.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-04-12 01:41:04 +0000
committerBrian Paul <[email protected]>2005-04-12 01:41:04 +0000
commit41bddcfa7bbc65bcd2fc60ada9761d3065e71388 (patch)
treebe88ade73a1836d590915399c132b93c3ce324f0 /src/mesa/drivers/x11/xm_api.c
parent55ba0dccc92797a0411ce315328100e28f6343b7 (diff)
PF_8A8R8G8B pixel format (Dave Reveman)
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r--src/mesa/drivers/x11/xm_api.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 873d196c940..665b0bc8296 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1100,7 +1100,10 @@ static void setup_truecolor( XMesaVisual v, XMesaBuffer buffer,
&& sizeof(GLuint)==4
&& v->RedGamma==1.0 && v->GreenGamma==1.0 && v->BlueGamma==1.0) {
/* common 32 bpp config used on Linux, HP, IBM */
- v->undithered_pf = v->dithered_pf = PF_8R8G8B;
+ if (GET_VISUAL_DEPTH(v)==32)
+ v->undithered_pf = v->dithered_pf = PF_8A8R8G8B;
+ else
+ v->undithered_pf = v->dithered_pf = PF_8R8G8B;
}
else if (GET_REDMASK(v) ==0xff0000
&& GET_GREENMASK(v)==0x00ff00
@@ -1349,6 +1352,8 @@ xmesa_color_to_pixel( XMesaContext xmesa, GLubyte r, GLubyte g, GLubyte b, GLuby
}
case PF_8A8B8G8R:
return PACK_8A8B8G8R( r, g, b, a );
+ case PF_8A8R8G8B:
+ return PACK_8A8R8G8B( r, g, b, a );
case PF_8R8G8B:
/* fall through */
case PF_8R8G8B24:
@@ -2616,6 +2621,8 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y,
}
case PF_8A8B8G8R:
return PACK_8A8B8G8R( r, g, b, a );
+ case PF_8A8R8G8B:
+ return PACK_8A8R8G8B( r, g, b, a );
case PF_8R8G8B:
return PACK_8R8G8B( r, g, b );
case PF_5R6G5B: