mesa: fix issues causing warnings on Windows
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Jul 2008 23:27:22 +0000 (17:27 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Jul 2008 23:27:22 +0000 (17:27 -0600)
src/mesa/main/texstore.c
src/mesa/shader/shader_api.c

index 89774291f2fb2c27da9f357d606e6e0c308747ad..853205ac957cfffa2aa74346c2f7e3efc30d89d5 100644 (file)
@@ -368,11 +368,13 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
             dst += srcWidth * 4;
          }
 
+         /* size after optional convolution */
+         convWidth = srcWidth;
+         convHeight = srcHeight;
+
          /* do convolution */
          {
             GLfloat *src = tempImage + img * (srcWidth * srcHeight * 4);
-            convWidth = srcWidth;
-            convHeight = srcHeight;
             if (dims == 1) {
                ASSERT(ctx->Pixel.Convolution1DEnabled);
                _mesa_convolve_1d_image(ctx, &convWidth, src, convImage);
index a401803c3e9d09e7b688a6b558f8f3c500b077a9..feb8363f503ed9b7de6628014789cda9d7b6d22d 100644 (file)
@@ -509,7 +509,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
    struct gl_shader_program *shProg;
    const GLint size = -1; /* unknown size */
    GLint i, oldIndex;
-   GLenum datatype;
+   GLenum datatype = GL_FLOAT_VEC4;
 
    shProg = _mesa_lookup_shader_program_err(ctx, program,
                                             "glBindAttribLocation");
@@ -543,6 +543,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
    i = _mesa_add_attribute(shProg->Attributes, name, size, datatype, index);
    if (i < 0) {
       _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation");
+      return;
    }
 
    if (shProg->VertexProgram && oldIndex >= 0 && oldIndex != index) {