From: Keith Whitwell Date: Tue, 1 Nov 2005 17:29:46 +0000 (+0000) Subject: Add a NotifyInputChanges() callback so that drivers (particularly tnl X-Git-Tag: 062012170305~21768 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4fbda35b001aac22342596f4beafd9539f2ebb9;p=profile%2Fivi%2Fmesa.git Add a NotifyInputChanges() callback so that drivers (particularly tnl drivers) can track when the sizes or strides of incoming VB->AttribPtr arrays have changed. --- diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index f7a29f9..9eaff95 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -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 diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index 61bfed2..2a87f95 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -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; }