diff options
author | Michal Krol <[email protected]> | 2006-08-01 20:07:31 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2006-08-01 20:07:31 +0000 |
commit | 365582dd6f632aafbc1c817aa57926d679bb2efc (patch) | |
tree | 75f3184e471793c06cd16ef1bdd3e10629f2a28a /src/mesa/main/texstate.c | |
parent | cc738e004f083566f3e1723f72623ef9875f72ec (diff) |
Clean-up FEATURE_ARB_shader_objects #ifdefs. Bug 7492.
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r-- | src/mesa/main/texstate.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index ea3873c3804..0687e5760c9 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -2894,8 +2894,11 @@ static void update_texture_state( GLcontext *ctx ) { GLuint unit; + +#if FEATURE_ARB_fragment_shader struct gl2_program_intf **prog = ctx->ShaderObjects.CurrentProgram; GLbitfield progteximageusage[MAX_TEXTURE_IMAGE_UNITS]; +#endif ctx->NewState |= _NEW_TEXTURE; /* TODO: only set this if there are * actual changes. @@ -2906,6 +2909,7 @@ update_texture_state( GLcontext *ctx ) ctx->Texture._TexMatEnabled = 0; ctx->Texture._TexGenEnabled = 0; +#if FEATURE_ARB_fragment_shader /* * Grab texture image usage state from shader program. It must be * grabbed every time uniform sampler changes, so maybe there is a @@ -2914,6 +2918,7 @@ update_texture_state( GLcontext *ctx ) if (ctx->ShaderObjects._FragmentShaderPresent) { (**prog).GetTextureImageUsage (prog, progteximageusage); } +#endif /* FEATURE_ARB_fragment_shader */ /* * Update texture unit state. @@ -2927,10 +2932,13 @@ update_texture_state( GLcontext *ctx ) texUnit->_GenFlags = 0; /* Get the bitmask of texture enables */ +#if FEATURE_ARB_fragment_shader if (ctx->ShaderObjects._FragmentShaderPresent) { enableBits = progteximageusage[unit]; } - else if (ctx->FragmentProgram._Enabled) { + else +#endif + if (ctx->FragmentProgram._Enabled) { enableBits = ctx->FragmentProgram.Current->TexturesUsed[unit]; } else { |