_mesa_delete_program( ctx, prog );
}
-
/**
* Called via ctx->Driver.ProgramStringNotify()
* Called when the program's text/code is changed. We have to free
struct gl_program *prog )
{
struct st_context *st = st_context(ctx);
- gl_shader_stage stage = _mesa_program_enum_to_shader_stage(target);
if (target == GL_FRAGMENT_PROGRAM_ARB ||
target == GL_FRAGMENT_SHADER_ATI) {
st->dirty |= stcp->affected_states;
}
- if (ST_DEBUG & DEBUG_PRECOMPILE ||
- st->shader_has_one_variant[stage])
- st_precompile_shader_variant(st, prog);
-
+ st_finalize_program(st, prog);
return GL_TRUE;
}
/**
* Compile one shader variant.
*/
-void
+static void
st_precompile_shader_variant(struct st_context *st,
struct gl_program *prog)
{
assert(0);
}
}
+
+void
+st_finalize_program(struct st_context *st, struct gl_program *prog)
+{
+ /* Create Gallium shaders now instead of on demand. */
+ if (ST_DEBUG & DEBUG_PRECOMPILE ||
+ st->shader_has_one_variant[prog->info.stage])
+ st_precompile_shader_variant(st, prog);
+}
struct st_common_program *stcp);
extern void
-st_precompile_shader_variant(struct st_context *st,
- struct gl_program *prog);
+st_finalize_program(struct st_context *st, struct gl_program *prog);
#ifdef __cplusplus
}
st_set_prog_affected_state_flags(prog);
_mesa_associate_uniform_storage(ctx, shProg, prog);
- /* Create Gallium shaders now instead of on demand. */
- if (ST_DEBUG & DEBUG_PRECOMPILE ||
- st->shader_has_one_variant[prog->info.stage])
- st_precompile_shader_variant(st, prog);
+ st_finalize_program(st, prog);
}
bool