diff options
author | Brian <[email protected]> | 2007-10-29 09:24:29 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-29 09:25:00 -0600 |
commit | cc0b55c242e9f53a8e45c5d4392f964af44f396e (patch) | |
tree | 51ff2194b5083244b08881e2af94e2ac64e56a8e /src/mesa/state_tracker/st_atom_sampler.c | |
parent | 2a3f3679eba802dcb4b46f90c66326c9195cdbcb (diff) |
simplify code which access the current vertex/fragment shaders
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_sampler.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 80b8cae013e..bdc60244776 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -113,24 +113,6 @@ gl_filter_to_img_filter(GLenum filter) } -static struct gl_fragment_program * -current_fragment_program(GLcontext *ctx) -{ - struct gl_fragment_program *f; - - if (ctx->Shader.CurrentProgram && - ctx->Shader.CurrentProgram->LinkStatus && - ctx->Shader.CurrentProgram->FragmentProgram) { - f = ctx->Shader.CurrentProgram->FragmentProgram; - } - else { - f = ctx->FragmentProgram._Current; - assert(f); - } - return f; -} - - static void update_samplers(struct st_context *st) { @@ -186,8 +168,7 @@ update_samplers(struct st_context *st) /* mapping from sampler vars to texture units */ { - struct gl_fragment_program *fprog = current_fragment_program(st->ctx); - const GLubyte *samplerUnits = fprog->Base.SamplerUnits; + struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; uint sample_units[PIPE_MAX_SAMPLERS]; uint s; for (s = 0; s < PIPE_MAX_SAMPLERS; s++) { |