mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
Fixed two small problems in the vertex setup.
- make sure that vertex setup is initialized - Savage seems to need the W coordinate for smooth shading
This commit is contained in:
parent
2c8dacea5f
commit
2cd815b660
2 changed files with 11 additions and 3 deletions
|
|
@ -408,6 +408,11 @@ savageCreateContext( const __GLcontextModes *mesaVis,
|
||||||
imesa->depth_scale = (imesa->savageScreen->zpp == 2) ?
|
imesa->depth_scale = (imesa->savageScreen->zpp == 2) ?
|
||||||
(1.0F/0x10000):(1.0F/0x1000000);
|
(1.0F/0x10000):(1.0F/0x1000000);
|
||||||
|
|
||||||
|
/* Uninitialized vertex format. Force setting the vertex state in
|
||||||
|
* savageRenderStart.
|
||||||
|
*/
|
||||||
|
imesa->vertex_size = 0;
|
||||||
|
|
||||||
/* Utah stuff
|
/* Utah stuff
|
||||||
*/
|
*/
|
||||||
imesa->new_state = ~0;
|
imesa->new_state = ~0;
|
||||||
|
|
|
||||||
|
|
@ -760,7 +760,7 @@ static void savageRenderStart( GLcontext *ctx )
|
||||||
/* EMIT_ATTR's must be in order as they tell t_vertex.c how to
|
/* EMIT_ATTR's must be in order as they tell t_vertex.c how to
|
||||||
* build up a hardware vertex.
|
* build up a hardware vertex.
|
||||||
*/
|
*/
|
||||||
if (index & _TNL_BITS_TEX_ANY) {
|
if ((index & _TNL_BITS_TEX_ANY) || !(ctx->_TriangleCaps & DD_FLATSHADE)) {
|
||||||
EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, SAVAGE_HW_NO_W );
|
EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, SAVAGE_HW_NO_W );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -797,9 +797,12 @@ static void savageRenderStart( GLcontext *ctx )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only need to change the vertex emit code if there has been a
|
/* Only need to change the vertex emit code if there has been a
|
||||||
* statechange to a new hardware vertex format:
|
* statechange to a new hardware vertex format and also when the
|
||||||
|
* vertex format is set for the first time. This is indicated by
|
||||||
|
* imesa->vertex_size == 0.
|
||||||
*/
|
*/
|
||||||
if (drawCmd != (imesa->DrawPrimitiveCmd & SAVAGE_HW_SKIPFLAGS)) {
|
if (drawCmd != (imesa->DrawPrimitiveCmd & SAVAGE_HW_SKIPFLAGS) ||
|
||||||
|
imesa->vertex_size == 0) {
|
||||||
imesa->vertex_size =
|
imesa->vertex_size =
|
||||||
_tnl_install_attrs( ctx,
|
_tnl_install_attrs( ctx,
|
||||||
imesa->vertex_attrs,
|
imesa->vertex_attrs,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue