Fix bug #4681.
[mesa.git] / src / mesa / main / state.c
index 784757e91f9eedd6ba14ad3f776e7e59edc74159..7dbcf8ad97d7376a753e274fd1de6e017ba700fc 100644 (file)
@@ -70,7 +70,7 @@
 #include "lines.h"
 #include "macros.h"
 #include "matrix.h"
-#if FEATURE_ARB_occlusion_query
+#if FEATURE_ARB_occlusion_query || FEATURE_EXT_timer_query
 #include "occlude.h"
 #endif
 #include "pixel.h"
@@ -304,7 +304,6 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    SET_GenTextures(exec, _mesa_GenTextures);
 #if _HAVE_FULL_GL
    SET_AreTexturesResident(exec, _mesa_AreTexturesResident);
-   SET_AreTexturesResidentEXT(exec, _mesa_AreTexturesResident);
    SET_ColorPointer(exec, _mesa_ColorPointer);
    SET_CopyTexImage1D(exec, _mesa_CopyTexImage1D);
    SET_CopyTexImage2D(exec, _mesa_CopyTexImage2D);
@@ -313,12 +312,10 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    SET_DisableClientState(exec, _mesa_DisableClientState);
    SET_EdgeFlagPointer(exec, _mesa_EdgeFlagPointer);
    SET_EnableClientState(exec, _mesa_EnableClientState);
-   SET_GenTexturesEXT(exec, _mesa_GenTextures);
    SET_GetPointerv(exec, _mesa_GetPointerv);
    SET_IndexPointer(exec, _mesa_IndexPointer);
    SET_InterleavedArrays(exec, _mesa_InterleavedArrays);
    SET_IsTexture(exec, _mesa_IsTexture);
-   SET_IsTextureEXT(exec, _mesa_IsTexture);
    SET_NormalPointer(exec, _mesa_NormalPointer);
    SET_PopClientAttrib(exec, _mesa_PopClientAttrib);
    SET_PrioritizeTextures(exec, _mesa_PrioritizeTextures);
@@ -356,31 +353,18 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    SET_CopyConvolutionFilter1D(exec, _mesa_CopyConvolutionFilter1D);
    SET_CopyConvolutionFilter2D(exec, _mesa_CopyConvolutionFilter2D);
    SET_GetColorTable(exec, _mesa_GetColorTable);
-   SET_GetColorTableEXT(exec, _mesa_GetColorTable);
    SET_GetColorTableParameterfv(exec, _mesa_GetColorTableParameterfv);
-   SET_GetColorTableParameterfvEXT(exec, _mesa_GetColorTableParameterfv);
    SET_GetColorTableParameteriv(exec, _mesa_GetColorTableParameteriv);
-   SET_GetColorTableParameterivEXT(exec, _mesa_GetColorTableParameteriv);
    SET_GetConvolutionFilter(exec, _mesa_GetConvolutionFilter);
-   SET_GetConvolutionFilterEXT(exec, _mesa_GetConvolutionFilter);
    SET_GetConvolutionParameterfv(exec, _mesa_GetConvolutionParameterfv);
-   SET_GetConvolutionParameterfvEXT(exec, _mesa_GetConvolutionParameterfv);
    SET_GetConvolutionParameteriv(exec, _mesa_GetConvolutionParameteriv);
-   SET_GetConvolutionParameterivEXT(exec, _mesa_GetConvolutionParameteriv);
    SET_GetHistogram(exec, _mesa_GetHistogram);
-   SET_GetHistogramEXT(exec, _mesa_GetHistogram);
    SET_GetHistogramParameterfv(exec, _mesa_GetHistogramParameterfv);
-   SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv);
    SET_GetHistogramParameteriv(exec, _mesa_GetHistogramParameteriv);
-   SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv);
    SET_GetMinmax(exec, _mesa_GetMinmax);
-   SET_GetMinmaxEXT(exec, _mesa_GetMinmax);
    SET_GetMinmaxParameterfv(exec, _mesa_GetMinmaxParameterfv);
-   SET_GetMinmaxParameterfvEXT(exec, _mesa_GetMinmaxParameterfv);
    SET_GetMinmaxParameteriv(exec, _mesa_GetMinmaxParameteriv);
-   SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv);
    SET_GetSeparableFilter(exec, _mesa_GetSeparableFilter);
-   SET_GetSeparableFilterEXT(exec, _mesa_GetSeparableFilter);
    SET_Histogram(exec, _mesa_Histogram);
    SET_Minmax(exec, _mesa_Minmax);
    SET_ResetHistogram(exec, _mesa_ResetHistogram);
@@ -411,7 +395,7 @@ _mesa_init_exec_table(struct _glapi_table *exec)
 #endif
 
    /* 11. GL_EXT_histogram */
-#if _HAVE_FULL_GL
+#if 0
    SET_GetHistogramEXT(exec, _mesa_GetHistogram);
    SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv);
    SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv);
@@ -420,6 +404,15 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv);
 #endif
 
+   /* 14. SGI_color_table */
+#if 0
+   SET_ColorTableSGI(exec, _mesa_ColorTable);
+   SET_ColorSubTableSGI(exec, _mesa_ColorSubTable);
+   SET_GetColorTableSGI(exec, _mesa_GetColorTable);
+   SET_GetColorTableParameterfvSGI(exec, _mesa_GetColorTableParameterfv);
+   SET_GetColorTableParameterivSGI(exec, _mesa_GetColorTableParameteriv);
+#endif
+
    /* 30. GL_EXT_vertex_array */
 #if _HAVE_FULL_GL
    SET_ColorPointerEXT(exec, _mesa_ColorPointerEXT);
@@ -441,17 +434,6 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    SET_PointParameterfvEXT(exec, _mesa_PointParameterfvEXT);
 #endif
 
-   /* 78. GL_EXT_paletted_texture */
-#if 0
-   SET_ColorTableEXT(exec, _mesa_ColorTableEXT);
-   SET_ColorSubTableEXT(exec, _mesa_ColorSubTableEXT);
-#endif
-#if _HAVE_FULL_GL
-   SET_GetColorTableEXT(exec, _mesa_GetColorTable);
-   SET_GetColorTableParameterfvEXT(exec, _mesa_GetColorTableParameterfv);
-   SET_GetColorTableParameterivEXT(exec, _mesa_GetColorTableParameteriv);
-#endif
-
    /* 97. GL_EXT_compiled_vertex_array */
 #if _HAVE_FULL_GL
    SET_LockArraysEXT(exec, _mesa_LockArraysEXT);
@@ -790,13 +772,20 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT);
 #endif
 
-   /* GL_EXT_timer_query */
+#if FEATURE_EXT_timer_query
    SET_GetQueryObjecti64vEXT(exec, _mesa_GetQueryObjecti64vEXT);
    SET_GetQueryObjectui64vEXT(exec, _mesa_GetQueryObjectui64vEXT);
+#endif
 
 #if FEATURE_EXT_framebuffer_blit
    SET_BlitFramebufferEXT(exec, _mesa_BlitFramebufferEXT);
 #endif
+
+   /* GL_EXT_gpu_program_parameters */
+#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
+   SET_ProgramEnvParameters4fvEXT(exec, _mesa_ProgramEnvParameters4fvEXT);
+   SET_ProgramLocalParameters4fvEXT(exec, _mesa_ProgramLocalParameters4fvEXT);
+#endif
 }
 
 
@@ -955,7 +944,7 @@ update_program(GLcontext *ctx)
    if (ctx->_MaintainTexEnvProgram && !ctx->FragmentProgram._Enabled) {
 #if 0
       if (!ctx->_TexEnvProgram)
-        ctx->_TexEnvProgram = (struct fragment_program *)
+        ctx->_TexEnvProgram = (struct gl_fragment_program *)
            ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
       ctx->FragmentProgram._Current = ctx->_TexEnvProgram;
 #endif