From e81ee821194fbe1fc3b4b63f74fd8a33cb7e123b Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 23 Mar 2017 23:54:52 +0100 Subject: r200: remove BindProgram MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Edward O'Callaghan Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle --- src/mesa/drivers/dri/r200/r200_state.c | 5 +++++ src/mesa/drivers/dri/r200/r200_vertprog.c | 16 ---------------- 2 files changed, 5 insertions(+), 16 deletions(-) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index 4a248d250ac..86733a8e25c 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -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 diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index 0a3e98428c6..100b715f9b0 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -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; -- cgit v1.2.3