i965: Drop brwBindProgram driver hook.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 26 Sep 2014 18:12:34 +0000 (11:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 1 Oct 2014 08:05:41 +0000 (01:05 -0700)
This function flagged BRW_NEW_*_PROGRAM

When ctx->{Vertex,Geometry,Fragment}Program._Current changes, core Mesa
calls the BindProgram driver hook, which flagged BRW_NEW_*_PROGRAM.

However, brw_upload_state also checks for that changing, sets the same
flags, and also updates brw->fragment_program and so on.  So, this looks
to be entirely redundant.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_program.c

index d782b4fdafb17baf9062312e6d91452716153f7f..b37da4ead6254ed21928a9a78abccdc74a1db31f 100644 (file)
@@ -54,25 +54,6 @@ get_new_program_id(struct intel_screen *screen)
    return id;
 }
 
-static void brwBindProgram( struct gl_context *ctx,
-                           GLenum target,
-                           struct gl_program *prog )
-{
-   struct brw_context *brw = brw_context(ctx);
-
-   switch (target) {
-   case GL_VERTEX_PROGRAM_ARB:
-      brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM;
-      break;
-   case MESA_GEOMETRY_PROGRAM:
-      brw->state.dirty.brw |= BRW_NEW_GEOMETRY_PROGRAM;
-      break;
-   case GL_FRAGMENT_PROGRAM_ARB:
-      brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM;
-      break;
-   }
-}
-
 static struct gl_program *brwNewProgram( struct gl_context *ctx,
                                      GLenum target,
                                      GLuint id )
@@ -250,7 +231,6 @@ void brwInitFragProgFuncs( struct dd_function_table *functions )
 {
    assert(functions->ProgramStringNotify == _tnl_program_string);
 
-   functions->BindProgram = brwBindProgram;
    functions->NewProgram = brwNewProgram;
    functions->DeleteProgram = brwDeleteProgram;
    functions->IsProgramNative = brwIsProgramNative;