diff options
author | Aapo Tahkola <aet@rasterburn.org> | 2005-02-19 16:30:56 +0000 |
---|---|---|
committer | Aapo Tahkola <aet@rasterburn.org> | 2005-02-19 16:30:56 +0000 |
commit | 35bc4ac68062afeae17f96b8f4173a599cfc7f05 (patch) | |
tree | 6dd0824d71cd13a8bbad916259435fcafa141286 /src/mesa/drivers/dri/r300/r300_context.h | |
parent | ff3ce3dd96376d61e245cb5c34d320128b8f95a8 (diff) |
Minor fix to border and blend color.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_context.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 18dc9d1910..ae9711d551 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -716,6 +716,19 @@ struct r300_context { #define R300_CONTEXT(ctx) ((r300ContextPtr)(ctx->DriverCtx)) +static __inline GLuint r300PackColor( GLuint cpp, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + switch ( cpp ) { + case 2: + return PACK_COLOR_565( r, g, b ); + case 4: + return PACK_COLOR_8888( r, g, b, a ); + default: + return 0; + } +} extern void r300DestroyContext(__DRIcontextPrivate * driContextPriv); extern GLboolean r300CreateContext(const __GLcontextModes * glVisual, __DRIcontextPrivate * driContextPriv, |