cause a vtxfmt fallback directly when hitting NewList for radeon and r200 drivers...
authorRoland Scheidegger <rscheidegger@gmx.ch>
Fri, 8 Sep 2006 00:54:55 +0000 (00:54 +0000)
committerRoland Scheidegger <rscheidegger@gmx.ch>
Fri, 8 Sep 2006 00:54:55 +0000 (00:54 +0000)
src/mesa/drivers/dri/r200/r200_vtxfmt.c
src/mesa/drivers/dri/radeon/radeon_vtxfmt.c

index 8480ce7..d73fbba 100644 (file)
@@ -57,6 +57,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "tnl/tnl.h"
 #include "tnl/t_context.h"
 #include "tnl/t_array_api.h"
+#include "tnl/t_save_api.h"
 
 #include "dispatch.h"
 
@@ -106,6 +107,12 @@ static void count_funcs( r200ContextPtr rmesa )
    count_func( "FogCoordfvEXT", &rmesa->vb.dfn_cache.FogCoordfvEXT );*/
 }
 
+static void r200NewList( GLcontext *ctx, GLuint list, GLenum mode )
+{
+   VFMT_FALLBACK( __FUNCTION__ );
+   _tnl_NewList( ctx, list, mode );
+   return;
+}
 
 void r200_copy_to_current( GLcontext *ctx ) 
 {
@@ -395,6 +402,7 @@ static void VFMT_FALLBACK_OUTSIDE_BEGIN_END( const char *caller )
 
    _tnl_wakeup_exec( ctx );
    ctx->Driver.FlushVertices = r200FlushVertices;
+   ctx->Driver.NewList = _tnl_NewList;
 
    assert( rmesa->dma.flush == 0 );
    rmesa->vb.fell_back = GL_TRUE;
@@ -853,6 +861,7 @@ static void r200VtxfmtValidate( GLcontext *ctx )
 
         _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );
         ctx->Driver.FlushVertices = r200VtxFmtFlushVertices;
+        ctx->Driver.NewList = r200NewList;
         rmesa->vb.installed = GL_TRUE;
       }
       else if (R200_DEBUG & DEBUG_VFMT)
@@ -867,6 +876,7 @@ static void r200VtxfmtValidate( GLcontext *ctx )
            rmesa->dma.flush( rmesa );
         _tnl_wakeup_exec( ctx );
         ctx->Driver.FlushVertices = r200FlushVertices;
+        ctx->Driver.NewList =_tnl_NewList;
         rmesa->vb.installed = GL_FALSE;
       }
    }      
index e9a76dc..a5a9eb1 100644 (file)
@@ -48,6 +48,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "tnl/tnl.h"
 #include "tnl/t_context.h"
 #include "tnl/t_array_api.h"
+#include "tnl/t_save_api.h"
 
 #include "radeon_context.h"
 #include "radeon_state.h"
@@ -343,6 +344,7 @@ static void VFMT_FALLBACK_OUTSIDE_BEGIN_END( const char *caller )
 
    _tnl_wakeup_exec( ctx );
    ctx->Driver.FlushVertices = radeonFlushVertices;
+   ctx->Driver.NewList =_tnl_NewList;
 
    assert( rmesa->dma.flush == 0 );
    rmesa->vb.fell_back = GL_TRUE;
@@ -464,6 +466,12 @@ static void VFMT_FALLBACK( const char *caller )
    }
 }
 
+static void radeonNewList( GLcontext *ctx, GLuint list, GLenum mode )
+{
+   VFMT_FALLBACK( __FUNCTION__ );
+   _tnl_NewList( ctx, list, mode );
+   return;
+}
 
 
 static void wrap_buffer( void )
@@ -717,6 +725,7 @@ static void radeonVtxfmtValidate( GLcontext *ctx )
 
         _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );
         ctx->Driver.FlushVertices = radeonVtxfmtFlushVertices;
+        ctx->Driver.NewList = radeonNewList;
         rmesa->vb.installed = GL_TRUE;
       }
       else if (RADEON_DEBUG & DEBUG_VFMT)
@@ -731,6 +740,7 @@ static void radeonVtxfmtValidate( GLcontext *ctx )
            rmesa->dma.flush( rmesa );
         _tnl_wakeup_exec( ctx );
         ctx->Driver.FlushVertices = radeonFlushVertices;
+        ctx->Driver.NewList =_tnl_NewList;
         rmesa->vb.installed = GL_FALSE;
       }
    }