From: Brian Date: Mon, 29 Oct 2007 18:25:46 +0000 (-0600) Subject: Remove ctx field from texenvprog_cache X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93fef22d05d0fb6f011d48d2fde533555c1695a2;p=mesa.git Remove ctx field from texenvprog_cache --- diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 817071d4e85..d360fa35c02 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -413,9 +413,9 @@ static struct ureg get_tex_temp( struct texenv_fragment_program *p ) } -static void release_temps( struct texenv_fragment_program *p ) +static void release_temps(GLcontext *ctx, struct texenv_fragment_program *p ) { - GLuint max_temp = p->ctx->Const.FragmentProgram.MaxTemps; + GLuint max_temp = ctx->Const.FragmentProgram.MaxTemps; /* KW: To support tex_env_crossbar, don't release the registers in * temps_output. @@ -1053,7 +1053,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, p.one = undef; p.last_tex_stage = 0; - release_temps(&p); + release_temps(ctx, &p); if (key->enabled_units) { /* First pass - to support texture_env_crossbar, first identify @@ -1071,7 +1071,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, for (unit = 0 ; unit < ctx->Const.MaxTextureUnits; unit++) if (key->enabled_units & (1<