mesa: Move _mesa_all_buffers_are_unmapped to arrayobj.c.
[mesa.git] / src / mesa / main / texstorage.c
index f4a076028fbcb58a4323bf51b5624349344607b7..ab8324f176ec2bcd22dfa61d915889f629d87ae7 100644 (file)
@@ -179,9 +179,7 @@ clear_texture_fields(struct gl_context *ctx,
             return;
         }
 
-         _mesa_init_teximage_fields(ctx, texImage,
-                                    0, 0, 0, 0, /* w, h, d, border */
-                                    GL_NONE, MESA_FORMAT_NONE);
+         _mesa_clear_texture_image(ctx, texImage);
       }
    }
 }
@@ -398,8 +396,8 @@ _mesa_texture_storage(struct gl_context *ctx, GLuint dims,
    dimensionsOK = _mesa_legal_texture_dimensions(ctx, target, 0,
                                                   width, height, depth, 0);
 
-   sizeOK = ctx->Driver.TestProxyTexImage(ctx, target, 0, texFormat,
-                                          width, height, depth, 0);
+   sizeOK = ctx->Driver.TestProxyTexImage(ctx, target, levels, 0, texFormat,
+                                          1, width, height, depth);
 
    if (_mesa_is_proxy_texture(target)) {
       if (dimensionsOK && sizeOK) {