check hardware type and use SETUP_SNAP if needed
This commit is contained in:
@@ -400,9 +400,13 @@ fxMesaCreateContext(GLuint win,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pixel tables are use during pixel read-back
|
* Pixel tables are used during pixel read-back
|
||||||
* Either initialize them for RGB or BGR order.
|
* Either initialize them for RGB or BGR order.
|
||||||
|
* Also determine if we need vertex snapping.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
fxMesa->snapVertices = GL_TRUE; /* play it safe */
|
||||||
|
|
||||||
#ifdef FXMESA_USE_ARGB
|
#ifdef FXMESA_USE_ARGB
|
||||||
useBGR = GL_FALSE; /* Force RGB pixel order */
|
useBGR = GL_FALSE; /* Force RGB pixel order */
|
||||||
system = "FXMESA_USE_ARGB";
|
system = "FXMESA_USE_ARGB";
|
||||||
@@ -432,6 +436,7 @@ fxMesaCreateContext(GLuint win,
|
|||||||
/* Voodoo 2 */
|
/* Voodoo 2 */
|
||||||
useBGR = GL_TRUE;
|
useBGR = GL_TRUE;
|
||||||
system = "Voodoo2";
|
system = "Voodoo2";
|
||||||
|
fxMesa->snapVertices = GL_FALSE;
|
||||||
}
|
}
|
||||||
else if (voodoo->nTexelfx == 2 &&
|
else if (voodoo->nTexelfx == 2 &&
|
||||||
voodoo->fbiRev == 2 &&
|
voodoo->fbiRev == 2 &&
|
||||||
@@ -457,22 +462,27 @@ fxMesaCreateContext(GLuint win,
|
|||||||
/* Presumed Voodoo3 */
|
/* Presumed Voodoo3 */
|
||||||
useBGR = GL_FALSE;
|
useBGR = GL_FALSE;
|
||||||
system = "Voodoo3";
|
system = "Voodoo3";
|
||||||
|
fxMesa->snapVertices = GL_FALSE;
|
||||||
}
|
}
|
||||||
if (getenv("MESA_FX_INFO")) {
|
if (verbose) {
|
||||||
printf
|
fprintf(stderr,
|
||||||
("Voodoo: Texelfx: %d / FBI Rev.: %d / TMU Rev.: %d / TMU RAM: %d\n",
|
"Voodoo: Texelfx: %d / FBI Rev.: %d / TMU Rev.: %d / TMU RAM: %d\n",
|
||||||
voodoo->nTexelfx, voodoo->fbiRev, voodoo->tmuConfig[0].tmuRev,
|
voodoo->nTexelfx, voodoo->fbiRev, voodoo->tmuConfig[0].tmuRev,
|
||||||
voodoo->tmuConfig[0].tmuRam);
|
voodoo->tmuConfig[0].tmuRam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
useBGR = GL_FALSE; /* use RGB pixel order otherwise */
|
useBGR = GL_FALSE; /* use RGB pixel order otherwise */
|
||||||
system = "non-voodoo";
|
system = "non-voodoo";
|
||||||
|
fxMesa->snapVertices = GL_FALSE;
|
||||||
}
|
}
|
||||||
#endif /*FXMESA_USE_ARGB */
|
#endif /*FXMESA_USE_ARGB */
|
||||||
|
|
||||||
if (getenv("MESA_FX_INFO"))
|
if (verbose) {
|
||||||
printf("Voodoo pixel order: %s (%s)\n", useBGR ? "BGR" : "RGB", system);
|
fprintf(stderr, "Voodoo pixel order: %s (%s)\n",
|
||||||
|
useBGR ? "BGR" : "RGB", system);
|
||||||
|
fprintf(stderr, "Vertex snapping: %d\n", fxMesa->snapVertices);
|
||||||
|
}
|
||||||
|
|
||||||
fxInitPixelTables(fxMesa, useBGR);
|
fxInitPixelTables(fxMesa, useBGR);
|
||||||
|
|
||||||
|
@@ -439,7 +439,7 @@ struct tfxMesaContext
|
|||||||
GLuint setup_gone; /* for multipass */
|
GLuint setup_gone; /* for multipass */
|
||||||
GLuint stw_hint_state; /* for grHints */
|
GLuint stw_hint_state; /* for grHints */
|
||||||
fxVertex *verts;
|
fxVertex *verts;
|
||||||
|
GLboolean snapVertices; /* needed for older Voodoo hardware */
|
||||||
|
|
||||||
/* Rasterization:
|
/* Rasterization:
|
||||||
*/
|
*/
|
||||||
|
@@ -298,10 +298,8 @@ fx_validate_BuildProjVerts(GLcontext * ctx, GLuint start, GLuint count,
|
|||||||
else {
|
else {
|
||||||
GLuint setupindex = SETUP_XYZW;
|
GLuint setupindex = SETUP_XYZW;
|
||||||
|
|
||||||
#if 0
|
if (fxMesa->snapVertices)
|
||||||
if (is_voodoo_graphics)
|
setupindex |= SETUP_SNAP;
|
||||||
setupindex |= SETUP_SNAP;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
fxMesa->tmu_source[0] = 0;
|
fxMesa->tmu_source[0] = 0;
|
||||||
fxMesa->tmu_source[1] = 1;
|
fxMesa->tmu_source[1] = 1;
|
||||||
|
Reference in New Issue
Block a user