r200: remove BindProgram
authorMarek Olšák <marek.olsak@amd.com>
Thu, 23 Mar 2017 22:54:52 +0000 (23:54 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 29 Mar 2017 13:44:00 +0000 (15:44 +0200)
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/r200/r200_vertprog.c

index 4a248d250ac77495f39b868313138ab835515092..86733a8e25cd514a90f05bebdf35d43907f42ec3 100644 (file)
@@ -2279,12 +2279,17 @@ GLboolean r200ValidateState( struct gl_context *ctx )
 
 static void r200InvalidateState( struct gl_context *ctx, GLuint new_state )
 {
+   r200ContextPtr rmesa = R200_CONTEXT(ctx);
+
    _swrast_InvalidateState( ctx, new_state );
    _swsetup_InvalidateState( ctx, new_state );
    _vbo_InvalidateState( ctx, new_state );
    _tnl_InvalidateState( ctx, new_state );
    _ae_invalidate_state( ctx, new_state );
    R200_CONTEXT(ctx)->radeon.NewGLState |= new_state;
+
+   if (new_state & _NEW_PROGRAM)
+      rmesa->curr_vp_hw = NULL;
 }
 
 /* A hack.  The r200 can actually cope just fine with materials
index 0a3e98428c604d4395ff93ae745f96d74b63c52b..100b715f9b0607706df72976062b36d7cf43b836 100644 (file)
@@ -1183,21 +1183,6 @@ void r200SetupVertexProg( struct gl_context *ctx ) {
 }
 
 
-static void
-r200BindProgram(struct gl_context *ctx, GLenum target, struct gl_program *prog)
-{
-   r200ContextPtr rmesa = R200_CONTEXT(ctx);
-
-   switch(target){
-   case GL_VERTEX_PROGRAM_ARB:
-      rmesa->curr_vp_hw = NULL;
-      break;
-   default:
-      _mesa_problem(ctx, "Target not supported yet!");
-      break;
-   }
-}
-
 static struct gl_program *
 r200NewProgram(struct gl_context *ctx, GLenum target, GLuint id,
                bool is_arb_asm)
@@ -1271,7 +1256,6 @@ r200IsProgramNative(struct gl_context *ctx, GLenum target, struct gl_program *pr
 void r200InitShaderFuncs(struct dd_function_table *functions)
 {
    functions->NewProgram = r200NewProgram;
-   functions->BindProgram = r200BindProgram;
    functions->DeleteProgram = r200DeleteProgram;
    functions->ProgramStringNotify = r200ProgramStringNotify;
    functions->IsProgramNative = r200IsProgramNative;