meta: Remove the 'allocate_storage' parameter in _mesa_meta_pbo_GetTexSubImage()
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 2 Mar 2016 00:46:22 +0000 (16:46 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Wed, 2 Mar 2016 23:06:46 +0000 (15:06 -0800)
Texture is already allocated before calling this meta function. So,
the value of 'allocate_storage' passed to the function is always false.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/common/meta.h
src/mesa/drivers/common/meta_tex_subimage.c
src/mesa/drivers/dri/i965/intel_tex_image.c
src/mesa/drivers/dri/i965/intel_tex_subimage.c

index 60ae5f7577f0a17e198bcd2e402df817e92042ba..c2efa50a33d4cd82cfb4bc905c0153e8d9e01afa 100644 (file)
@@ -536,7 +536,7 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
                            int xoffset, int yoffset, int zoffset,
                            int width, int height, int depth,
                            GLenum format, GLenum type, const void *pixels,
-                           bool allocate_storage, bool create_pbo,
+                           bool create_pbo,
                            const struct gl_pixelstore_attrib *packing);
 
 extern bool
index 330289b6220662109fbb7273f32addf1ca34279f..dfd3327dd551cabd8ce84f58a268494762ab09c5 100644 (file)
@@ -175,7 +175,7 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
                            int xoffset, int yoffset, int zoffset,
                            int width, int height, int depth,
                            GLenum format, GLenum type, const void *pixels,
-                           bool allocate_storage, bool create_pbo,
+                           bool create_pbo,
                            const struct gl_pixelstore_attrib *packing)
 {
    struct gl_buffer_object *pbo = NULL;
@@ -227,9 +227,6 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
       return false;
    }
 
-   if (allocate_storage)
-      ctx->Driver.AllocTextureImageBuffer(ctx, tex_image);
-
    readFb = ctx->Driver.NewFramebuffer(ctx, 0xDEADBEEF);
    if (readFb == NULL)
       goto fail;
index e21c3ac543fd418d3229eeef5dd6bfe0f6fb0b1b..85259022c64c5b2e309ec34c50df7d37e4d07d4f 100644 (file)
@@ -111,7 +111,6 @@ intelTexImage(struct gl_context * ctx,
                                    texImage->Width, texImage->Height,
                                    texImage->Depth,
                                    format, type, pixels,
-                                   false /*allocate_storage*/,
                                    tex_busy, unpack);
    if (ok)
       return;
index 573f701acdd4d49f4d3299dda24fa52f96e69bd7..4849a4151e2bbaf64d26c554a0436c91340d4084 100644 (file)
@@ -214,7 +214,7 @@ intelTexSubImage(struct gl_context * ctx,
    ok = _mesa_meta_pbo_TexSubImage(ctx, dims, texImage,
                                    xoffset, yoffset, zoffset,
                                    width, height, depth, format, type,
-                                   pixels, false, tex_busy, packing);
+                                   pixels, tex_busy, packing);
    if (ok)
       return;