mesa: Fix compilation errors and warnings when features are disabled.
authorChia-I Wu <olvaffe@gmail.com>
Fri, 2 Oct 2009 07:32:04 +0000 (15:32 +0800)
committerBrian Paul <brianp@vmware.com>
Thu, 29 Oct 2009 13:52:58 +0000 (07:52 -0600)
Some of the fixes are cherry-picked from opengl-es branch.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
src/mesa/main/fbobject.c
src/mesa/main/texparam.c
src/mesa/main/texstore.c
src/mesa/state_tracker/st_cb_blit.c

index 1d6ccf7fdd88df25061fcc8b7114d9076cbe3300..4c6528bcf787cb2679530793c6ca3479e91f2639 100644 (file)
@@ -650,6 +650,8 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
          return;
       }
    }
+#else
+   (void) j;
 #endif
 
    if (numImages == 0) {
index 42584760921b085276cf4473ffd66906aa5e2c55..79298e867a0c929fc404319aa7eae4c6cee229a5 100644 (file)
@@ -600,7 +600,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
          iparams[1] = (GLint) params[1];
          iparams[2] = (GLint) params[2];
          iparams[3] = (GLint) params[3];
-         need_update = set_tex_parameteri(ctx, target, iparams);
+         need_update = set_tex_parameteri(ctx, texObj, pname, iparams);
       }
       break;
 #endif
index 01fea476aeef7af429cffda97cbbac5abb75baab..7b449d03bea97b2c908acb1f07a01f128db512e3 100644 (file)
@@ -277,16 +277,6 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat,
 }
 
 
-#if !FEATURE_convolve
-static void
-_mesa_adjust_image_for_convolution(GLcontext *ctx, GLuint dims,
-                                   GLsizei *srcWidth, GLsizei *srcHeight)
-{
-   /* no-op */
-}
-#endif
-
-
 /**
  * Make a temporary (color) texture image with GLfloat components.
  * Apply all needed pixel unpacking and pixel transfer operations.
@@ -353,7 +343,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
       const GLuint postConvTransferOps
          = (transferOps & IMAGE_POST_CONVOLUTION_BITS) | IMAGE_CLAMP_BIT;
       GLint img, row;
-      GLint convWidth, convHeight;
+      GLint convWidth = srcWidth, convHeight = srcHeight;
       GLfloat *convImage;
 
       /* pre-convolution image buffer (3D) */
@@ -3004,6 +2994,15 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS)
    return k;
 }
 
+#else
+
+/* these are used only in texstore_funcs[] below */
+#define _mesa_texstore_srgb8 NULL
+#define _mesa_texstore_srgba8 NULL
+#define _mesa_texstore_sargb8 NULL
+#define _mesa_texstore_sl8 NULL
+#define _mesa_texstore_sla8 NULL
+
 #endif /* FEATURE_EXT_texture_sRGB */
 
 
index 5626e25323e89d0ace01e80eda92e328687374ae..563615ed0d10b9b982ba2e3cbabc78f749011d10 100644 (file)
@@ -64,6 +64,7 @@ st_destroy_blit(struct st_context *st)
 }
 
 
+#if FEATURE_EXT_framebuffer_blit
 static void
 st_BlitFramebuffer(GLcontext *ctx,
                    GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
@@ -206,6 +207,7 @@ st_BlitFramebuffer(GLcontext *ctx,
       }
    }
 }
+#endif /* FEATURE_EXT_framebuffer_blit */