More work on the tcl code... still have to make my mind on a number of
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>
Fri, 14 Apr 2006 23:47:45 +0000 (23:47 +0000)
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>
Fri, 14 Apr 2006 23:47:45 +0000 (23:47 +0000)
    things

src/mesa/drivers/dri/nouveau/nouveau_context.h
src/mesa/drivers/dri/nouveau/nouveau_tris.c
src/mesa/drivers/dri/nouveau/nv10_swtcl.c
src/mesa/drivers/dri/nouveau/nv10_swtcl.h

index e09d804ccf127aa0b2252742edc8656a27714a3c..c23b633bb93747036144d3f7f5e0be863c3d7115 100644 (file)
@@ -92,6 +92,7 @@ typedef struct nouveau_context {
 
        /* Vertex state */
        GLuint vertex_size;
+       char *verts;
        struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX];
        GLuint vertex_attr_count;
 
index 53a18d2f7383fa5fd8732e9593de4aea2053b194..8622b9349cb9591292a2fb7bd631f8e5ea00416d 100644 (file)
@@ -87,7 +87,7 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode)
                        }
 
                        _swsetup_Wakeup(ctx);
-                       nmesa->renderIndex = ~0;
+                       nmesa->render_index = ~0;
                }
        }
        else {
@@ -95,14 +95,18 @@ void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode)
                if (oldfallback == bit) {
                        _swrast_flush( ctx );
 
-                       nouveauInitTriFunctions(ctx);
+                       if (nmesa->screen->card_type<NV_10) {
+                               //nv03TriInitFunctions(ctx);
+                       } else {
+                               nv10TriInitFunctions(ctx);
+                       }
 
                        _tnl_invalidate_vertex_state( ctx, ~0 );
                        _tnl_invalidate_vertices( ctx, ~0 );
                        _tnl_install_attrs( ctx, 
                                        nmesa->vertex_attrs, 
                                        nmesa->vertex_attr_count,
-                                       nmesa->ViewportMatrix.m, 0 ); 
+                                       nmesa->viewport.m, 0 ); 
                }
        }    
 }
@@ -112,8 +116,8 @@ void nouveauRunPipeline( GLcontext *ctx )
 {
        struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
 
-       if (nmesa->newState) {
-               nmesa->newRenderState |= nmesa->newState;
+       if (nmesa->new_state) {
+               nmesa->new_render_state |= nmesa->new_state;
        }
 
        _tnl_run_pipeline( ctx );
index e04a4ece5e858d8a5b3a118173a48b2dd1907076..9a1748f48ac3d124c69efe4fed38ecb6ed11b3ce 100644 (file)
@@ -593,8 +593,8 @@ static void nv10ChooseRenderState(GLcontext *ctx)
                index = NOUVEAU_MAX_TRIFUNC;    /* flat specular */
        }
 
-       if (nmesa->renderIndex != index) {
-               nmesa->renderIndex = index;
+       if (nmesa->render_index != index) {
+               nmesa->render_index = index;
 
                tnl->Driver.Render.Points = rast_tab[index].points;
                tnl->Driver.Render.Line = rast_tab[index].line;
@@ -792,7 +792,7 @@ static void nv10RenderPrimitive( GLcontext *ctx, GLuint prim )
 /*                            Initialization.                         */
 /**********************************************************************/
 
-void nouveauTriInitFunctions(GLcontext *ctx)
+void nv10TriInitFunctions(GLcontext *ctx)
 {
        struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
        TNLcontext *tnl = TNL_CONTEXT(ctx);
index fd57eeaa9581f29886413a4cf60ceb827c96543a..03338fbe1349331ae8565486fba0b0fc757154a9 100644 (file)
@@ -34,6 +34,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 extern void nv10Fallback( GLcontext *ctx, GLuint bit, GLboolean mode );
 extern void nv10FinishPrimitive(struct nouveau_context *nmesa);
 extern void nv10RenderStart(GLcontext *ctx);
+extern void nv10TriInitFunctions(GLcontext *ctx);
 #define FALLBACK( nmesa, bit, mode ) nouveauFallback( nmesa->glCtx, bit, mode )
 
 #endif /* __NV10_SWTCL_H__ */