diff options
author | keithw <keithw> | 2002-07-08 22:25:14 +0000 |
---|---|---|
committer | keithw <keithw> | 2002-07-08 22:25:14 +0000 |
commit | 1a658f72ffebf459e944f7a419618ec7b340d691 (patch) | |
tree | 27f90511938025d95379703590a106955debb7cd | |
parent | c6cbec431e89bc6a6d36b79fe79d13a3e01c6fa8 (diff) |
Couple of tcl fixes. Still pretty broken & disabled by default.r200-0-1-20020714-freeze
- Always upload inverse modelview when not lighting (why?)
- Disable HW quads -- vertices seem to be in wrong order??
- Fix for fog & not lighting
-rw-r--r-- | xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c | 2 | ||||
-rw-r--r-- | xc/lib/GL/mesa/src/drv/r200/r200_state.c | 5 | ||||
-rw-r--r-- | xc/lib/GL/mesa/src/drv/r200/r200_state_init.c | 12 | ||||
-rw-r--r-- | xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c | 2 | ||||
-rw-r--r-- | xc/lib/GL/mesa/src/drv/r200/r200_tcl.c | 36 |
5 files changed, 26 insertions, 31 deletions
diff --git a/xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c b/xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c index 733d8d59e..9002fde79 100644 --- a/xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c +++ b/xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c @@ -420,7 +420,7 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs ) GLuint vfmt0 = 0, vfmt1 = 0; GLuint count = VB->Count; -/* if (R200_DEBUG & DEBUG_VERTS) */ + if (R200_DEBUG & DEBUG_VERTS) _tnl_print_vert_flags( __FUNCTION__, inputs ); if (1) { diff --git a/xc/lib/GL/mesa/src/drv/r200/r200_state.c b/xc/lib/GL/mesa/src/drv/r200/r200_state.c index dbb50c52e..8cb94cbdf 100644 --- a/xc/lib/GL/mesa/src/drv/r200/r200_state.c +++ b/xc/lib/GL/mesa/src/drv/r200/r200_state.c @@ -742,8 +742,9 @@ static void r200UpdateSpecular( GLcontext *ctx ) rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_LIGHTING_ENABLE; } else { rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] |= - ((R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT)); - rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_LIGHTING_ENABLE; + ((R200_VTX_FP_RGBA << R200_VTX_COLOR_1_SHIFT)); + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] |= R200_OUTPUT_COLOR_1; +/* rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_LIGHTING_ENABLE; */ } } else if (ctx->Light.Enabled) { diff --git a/xc/lib/GL/mesa/src/drv/r200/r200_state_init.c b/xc/lib/GL/mesa/src/drv/r200/r200_state_init.c index 4de899ae0..52405b7c0 100644 --- a/xc/lib/GL/mesa/src/drv/r200/r200_state_init.c +++ b/xc/lib/GL/mesa/src/drv/r200/r200_state_init.c @@ -255,7 +255,9 @@ void r200InitState( r200ContextPtr rmesa ) ALLOC_STATE( eye, tcl_lighting, EYE_STATE_SIZE, "EYE/eye-vector", 0 ); ALLOC_STATE( mat[0], tcl, MAT_STATE_SIZE, "MAT/modelproject", 0 ); ALLOC_STATE( mat[1], tcl_eyespace_or_fog, MAT_STATE_SIZE, "MAT/modelview", 0 ); - ALLOC_STATE( mat[2], tcl_eyespace_or_lighting, MAT_STATE_SIZE, "MAT/it-modelview", 0 ); + + /* *** Need it-modelview when lighting disabled??? */ + ALLOC_STATE( mat[2], tcl, MAT_STATE_SIZE, "MAT/it-modelview", 0 ); ALLOC_STATE( mat[3], tcl_tex, MAT_STATE_SIZE, "MAT/texmat0", 0 ); ALLOC_STATE( mat[4], tcl_tex, MAT_STATE_SIZE, "MAT/texmat1", 1 ); ALLOC_STATE( ucp[0], tcl_ucp, UCP_STATE_SIZE, "UCP/userclip-0", 0 ); @@ -662,14 +664,6 @@ void r200InitState( r200ContextPtr rmesa ) ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color ); ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, 0 ); - /* Set up vector and scalar state commands: - */ -/* upload_matrix( rmesa, ctx->ModelView.m, MODEL ); */ -/* upload_matrix_t( rmesa, ctx->ModelView.inv, MODEL_IT ); */ -/* upload_matrix( rmesa, ctx->TextureMatrix[0].m, TEXMAT_0 ); */ -/* upload_matrix( rmesa, ctx->TextureMatrix[1].m, TEXMAT_1 ); */ -/* upload_matrix( rmesa, ctx->_ModelProjectMatrix.m, TEXMAT_2 ); */ - rmesa->hw.grd.cmd[GRD_VERT_GUARD_CLIP_ADJ] = IEEE_ONE; rmesa->hw.grd.cmd[GRD_VERT_GUARD_DISCARD_ADJ] = IEEE_ONE; rmesa->hw.grd.cmd[GRD_HORZ_GUARD_CLIP_ADJ] = IEEE_ONE; diff --git a/xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c b/xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c index 865e5ac90..e75135c26 100644 --- a/xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c +++ b/xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c @@ -751,8 +751,6 @@ static const GLuint reduced_hw_prim[GL_POLYGON+1] = { R200_VF_PRIM_TRIANGLES, R200_VF_PRIM_TRIANGLES, R200_VF_PRIM_TRIANGLES, -/* R200_VF_PRIM_QUADS, */ -/* R200_VF_PRIM_QUADS, */ R200_VF_PRIM_TRIANGLES }; diff --git a/xc/lib/GL/mesa/src/drv/r200/r200_tcl.c b/xc/lib/GL/mesa/src/drv/r200/r200_tcl.c index 1a04940f2..a0346a90a 100644 --- a/xc/lib/GL/mesa/src/drv/r200/r200_tcl.c +++ b/xc/lib/GL/mesa/src/drv/r200/r200_tcl.c @@ -60,7 +60,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define HAVE_TRI_STRIPS 1 #define HAVE_TRI_STRIP_1 0 #define HAVE_TRI_FANS 1 -#define HAVE_QUADS 1 +#define HAVE_QUADS 0 /* hw quad verts in wrong order??? */ #define HAVE_QUAD_STRIPS 1 #define HAVE_POLYGONS 1 #define HAVE_ELTS 1 @@ -80,21 +80,22 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static GLboolean discreet_prim[0x10] = { - 0, /* none */ - 1, /* points */ - 1, /* lines */ - 0, /* line_strip */ - 1, /* tri_list */ - 0, /* tri_fan */ - 0, /* tri_type_2 */ - 1, /* rect list (unused) */ - 1, /* 3 vert point */ - 1, /* 3 vert line */ - 0, /* point sprite */ - 0, /* line loop */ - 1, /* quads */ - 0, /* quad strip */ - 0, /* polygon */ + 0, /* 0 none */ + 1, /* 1 points */ + 1, /* 2 lines */ + 0, /* 3 line_strip */ + 1, /* 4 tri_list */ + 0, /* 5 tri_fan */ + 0, /* 6 tri_strip */ + 0, /* 7 tri_w_flags */ + 1, /* 8 rect list (unused) */ + 1, /* 9 3vert point */ + 1, /* a 3vert line */ + 0, /* b point sprite */ + 0, /* c line loop */ + 1, /* d quads */ + 0, /* e quad strip */ + 0, /* f polygon */ }; @@ -279,7 +280,8 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx, if (rmesa->TclFallback) return GL_TRUE; /* fallback to software t&l */ - fprintf(stderr, "%s\n", __FUNCTION__); + if (R200_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s\n", __FUNCTION__); if (VB->Count == 0) return GL_FALSE; |