[Mesa-dev] [PATCH] meta: Remove the 'allocate_storage' parameter in _mesa_meta_pbo_GetTexSubImage()
Pohjolainen, Topi
topi.pohjolainen at intel.com
Wed Mar 2 05:55:32 UTC 2016
On Tue, Mar 01, 2016 at 05:01:47PM -0800, Anuj Phogat wrote:
> 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 at gmail.com>
Thanks, I've been wondering why it was left there.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/mesa/drivers/common/meta.h | 2 +-
> src/mesa/drivers/common/meta_tex_subimage.c | 5 +----
> src/mesa/drivers/dri/i965/intel_tex_image.c | 1 -
> src/mesa/drivers/dri/i965/intel_tex_subimage.c | 2 +-
> 4 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
> index 60ae5f7..c2efa50 100644
> --- a/src/mesa/drivers/common/meta.h
> +++ b/src/mesa/drivers/common/meta.h
> @@ -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
> diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c
> index 330289b..dfd3327 100644
> --- a/src/mesa/drivers/common/meta_tex_subimage.c
> +++ b/src/mesa/drivers/common/meta_tex_subimage.c
> @@ -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;
> diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
> index e21c3ac..8525902 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex_image.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
> @@ -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;
> diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> index 573f701..4849a41 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> @@ -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;
>
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list