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 | |
parent | cc738e004f083566f3e1723f72623ef9875f72ec (diff) |
Clean-up FEATURE_ARB_shader_objects #ifdefs. Bug 7492.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.c | 6 | ||||
-rw-r--r-- | src/mesa/main/getstring.c | 5 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 10 |
3 files changed, 20 insertions, 1 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b30d5523623..afe6048c802 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -704,7 +704,9 @@ alloc_shared_state( GLcontext *ctx ) ss->ArrayObjects = _mesa_NewHashTable(); +#if FEATURE_ARB_shader_objects ss->GL2Objects = _mesa_NewHashTable (); +#endif ss->Default1D = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_1D); if (!ss->Default1D) @@ -775,8 +777,10 @@ alloc_shared_state( GLcontext *ctx ) if (ss->ArrayObjects) _mesa_DeleteHashTable (ss->ArrayObjects); +#if FEATURE_ARB_shader_objects if (ss->GL2Objects) _mesa_DeleteHashTable (ss->GL2Objects); +#endif #if FEATURE_EXT_framebuffer_object if (ss->FrameBuffers) @@ -929,7 +933,9 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) _mesa_HashDeleteAll(ss->ArrayObjects, delete_arrayobj_cb, ctx); _mesa_DeleteHashTable(ss->ArrayObjects); +#if FEATURE_ARB_shader_objects _mesa_DeleteHashTable(ss->GL2Objects); +#endif #if FEATURE_EXT_framebuffer_object _mesa_DeleteHashTable(ss->FrameBuffers); diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index a741f8310be..fba8e1634f4 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -55,7 +55,10 @@ _mesa_GetString( GLenum name ) static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING; static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING; static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING;/*XXX FIX*/ + +#if FEATURE_ARB_shading_language_100 static const char *sl_version_110 = "1.10 Mesa " MESA_VERSION_STRING; +#endif ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL); @@ -144,7 +147,9 @@ _mesa_GetString( GLenum name ) } /* FALL-THROUGH */ #endif +#if FEATURE_ARB_shading_language_100 error: +#endif default: _mesa_error( ctx, GL_INVALID_ENUM, "glGetString" ); return (const GLubyte *) 0; 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 { |