Add a NotifyInputChanges() callback so that drivers (particularly tnl
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 1 Nov 2005 17:29:46 +0000 (17:29 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 1 Nov 2005 17:29:46 +0000 (17:29 +0000)
drivers) can track when the sizes or strides of incoming VB->AttribPtr
arrays have changed.

src/mesa/tnl/t_context.h
src/mesa/tnl/t_pipeline.c

index f7a29f9e7e8fdd39ae2a7e15b8c7bc0c011c603e..9eaff95b73d85cb78fae366d3da3b3adc041f587 100644 (file)
@@ -643,6 +643,11 @@ struct tnl_device_driver
    /* Alert tnl-aware drivers of changes to material.
     */
 
+   void (*NotifyInputChanges)(GLcontext *ctx, GLuint bitmask);
+   /* Alert tnl-aware drivers of changes to size and stride of input
+    * arrays.
+    */
+
    GLboolean (*NotifyBegin)(GLcontext *ctx, GLenum p);
    /* Allow drivers to hook in optimized begin/end engines.
     * Return value:  GL_TRUE - driver handled the begin
index 61bfed290e9ed717b5a7ecf8b194f1cb520b14d8..2a87f950ce23fc0859d304e75ad795edd9ddd37f 100644 (file)
@@ -90,6 +90,10 @@ static GLuint check_input_changes( GLcontext *ctx )
       }
    }
 
+   if (tnl->pipeline.input_changes &&
+      tnl->Driver.NotifyInputChanges) 
+      tnl->Driver.NotifyInputChanges( ctx, tnl->pipeline.input_changes );
+
    return tnl->pipeline.input_changes;
 }