From: Marek Olšák <marek.ol...@amd.com> The same thing is done in i915_update_program called by i915InvalidateState. Why do it twice. --- src/mesa/drivers/dri/i915/i915_fragprog.c | 25 ------------------------- 1 file changed, 25 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index fce649d..0fad2c3 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -1112,44 +1112,20 @@ track_params(struct i915_fragment_program *p) for (i = 0; i < p->nr_params; i++) { GLint reg = p->param[i].reg; COPY_4V(p->constant[reg], p->param[i].values); } p->params_uptodate = 1; p->on_hardware = 0; /* overkill */ } - -static void -i915BindProgram(struct gl_context * ctx, GLenum target, struct gl_program *prog) -{ - if (target == GL_FRAGMENT_PROGRAM_ARB) { - struct i915_context *i915 = I915_CONTEXT(ctx); - struct i915_fragment_program *p = (struct i915_fragment_program *) prog; - - if (i915->current_program == p) - return; - - if (i915->current_program) { - i915->current_program->on_hardware = 0; - i915->current_program->params_uptodate = 0; - } - - i915->current_program = p; - - assert(p->on_hardware == 0); - assert(p->params_uptodate == 0); - - } -} - static struct gl_program * i915NewProgram(struct gl_context * ctx, GLenum target, GLuint id, bool is_arb_asm) { switch (target) { case GL_VERTEX_PROGRAM_ARB: { struct gl_program *prog = rzalloc(NULL, struct gl_program); return _mesa_init_gl_program(prog, target, id, is_arb_asm); } @@ -1365,17 +1341,16 @@ i915ValidateFragmentProgram(struct i915_context *i915) if (INTEL_DEBUG & DEBUG_WM) { printf("i915:\n"); i915_disassemble_program(i915->state.Program, i915->state.ProgramSize); } } void i915InitFragProgFuncs(struct dd_function_table *functions) { - functions->BindProgram = i915BindProgram; functions->NewProgram = i915NewProgram; functions->DeleteProgram = i915DeleteProgram; functions->IsProgramNative = i915IsProgramNative; functions->ProgramStringNotify = i915ProgramStringNotify; functions->SamplerUniformChange = i915SamplerUniformChange; } -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev