mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
added fxMesaContext arg to fxInitPixelTables()
This commit is contained in:
parent
4049cd35d8
commit
113edcc755
3 changed files with 9 additions and 6 deletions
|
|
@ -973,7 +973,7 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,
|
|||
|
||||
/* Pixel tables are use during pixel read-back */
|
||||
#if FXMESA_USE_ARGB
|
||||
fxInitPixelTables(GL_FALSE); /* Force RGB pixel order */
|
||||
fxInitPixelTables(fxMesa, GL_FALSE); /* Force RGB pixel order */
|
||||
#else
|
||||
if (glbHWConfig.SSTs[glbCurrentBoard].type == GR_SSTTYPE_VOODOO) {
|
||||
/* jk991130 - GROSS HACK!!! - Voodoo 3s don't use BGR!!
|
||||
|
|
@ -983,14 +983,14 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,
|
|||
* Thanks to Joseph Kain for that one
|
||||
*/
|
||||
if (glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.nTexelfx == 2) {
|
||||
fxInitPixelTables(GL_FALSE); /* use RGB pixel order (Voodoo3) */
|
||||
fxInitPixelTables(fxMesa, GL_FALSE); /* use RGB pixel order (Voodoo3) */
|
||||
}
|
||||
else {
|
||||
fxInitPixelTables(GL_TRUE); /* use BGR pixel order on Voodoo1/2 */
|
||||
fxInitPixelTables(fxMesa, GL_TRUE); /* use BGR pixel order on Voodoo1/2 */
|
||||
}
|
||||
}
|
||||
else {
|
||||
fxInitPixelTables(GL_FALSE); /* use RGB pixel order otherwise */
|
||||
fxInitPixelTables(fxMesa, GL_FALSE); /* use RGB pixel order otherwise */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -70,9 +70,11 @@ GLubyte FX_PixelToB[0x10000];
|
|||
* Initialize the FX_PixelTo{RGB} arrays.
|
||||
* Input: bgrOrder - if TRUE, pixels are in BGR order, else RGB order.
|
||||
*/
|
||||
void fxInitPixelTables(GLboolean bgrOrder)
|
||||
void fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder)
|
||||
{
|
||||
GLuint pixel;
|
||||
|
||||
fxMesa->bgrOrder=bgrOrder;
|
||||
for (pixel = 0; pixel <= 0xffff; pixel++) {
|
||||
GLuint r, g, b;
|
||||
if (bgrOrder) {
|
||||
|
|
|
|||
|
|
@ -438,6 +438,7 @@ struct tfxMesaContext {
|
|||
|
||||
GrBuffer_t currentFB;
|
||||
|
||||
GLboolean bgrOrder;
|
||||
GrColor_t color;
|
||||
GrColor_t clearC;
|
||||
GrAlpha_t clearA;
|
||||
|
|
@ -672,6 +673,6 @@ extern void fxTMMoveInTM_NoLock(fxMesaContext fxMesa,
|
|||
extern void fxSetupTexture_NoLock(GLcontext *ctx);
|
||||
extern void fxSetupTexture(GLcontext *ctx);
|
||||
|
||||
extern void fxInitPixelTables(GLboolean bgrOrder);
|
||||
extern void fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue