From: Jason Ekstrand Date: Wed, 31 May 2017 20:43:54 +0000 (-0700) Subject: i965/tex: Remove the for_glTexImage parameter from texsubimage_tiled_memcpy X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb811fa8282a0117e81354ab6ac91deb1c37d2ed;p=mesa.git i965/tex: Remove the for_glTexImage parameter from texsubimage_tiled_memcpy It is set to false in both callers. It isn't needed for glTexImage because intelTexImage calls AllocTextureImageBuffer before calling texsubimage_tiled_memcpy. Reviewed-by: Kenneth Graunke Reviewed-by: Iago Toral Quiroga --- diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index cb1550bf639..29a49840d81 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -131,8 +131,6 @@ intel_miptree_create_for_teximage(struct brw_context *brw, /** * \brief A fast path for glTexImage and glTexSubImage. * - * \param for_glTexImage Was this called from glTexImage or glTexSubImage? - * * This fast path is taken when the texture format is BGRA, RGBA, * A or L and when the texture memory is X- or Y-tiled. It uploads * the texture data by mapping the texture memory without a GTT fence, thus @@ -161,8 +159,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - bool for_glTexImage) + const struct gl_pixelstore_attrib *packing) { struct brw_context *brw = brw_context(ctx); const struct gen_device_info *devinfo = &brw->screen->devinfo; @@ -210,9 +207,6 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx, if (texImage->TexObject->MinLayer) return false; - if (for_glTexImage) - ctx->Driver.AllocTextureImageBuffer(ctx, texImage); - if (!image->mt || (image->mt->surf.tiling != ISL_TILING_X && image->mt->surf.tiling != ISL_TILING_Y0)) { @@ -261,12 +255,11 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx, */ DBG("%s: level=%d offset=(%d,%d) (w,h)=(%d,%d) format=0x%x type=0x%x " "mesa_format=0x%x tiling=%d " - "packing=(alignment=%d row_length=%d skip_pixels=%d skip_rows=%d) " - "for_glTexImage=%d\n", + "packing=(alignment=%d row_length=%d skip_pixels=%d skip_rows=%d) ", __func__, texImage->Level, xoffset, yoffset, width, height, format, type, texImage->TexFormat, image->mt->surf.tiling, packing->Alignment, packing->RowLength, packing->SkipPixels, - packing->SkipRows, for_glTexImage); + packing->SkipRows); /* Adjust x and y offset based on miplevel */ unsigned level_x, level_y; @@ -332,8 +325,7 @@ intelTexImage(struct gl_context * ctx, texImage->Width, texImage->Height, texImage->Depth, - format, type, pixels, unpack, - false /*allocate_storage*/); + format, type, pixels, unpack); if (ok) return; @@ -380,8 +372,7 @@ intelTexSubImage(struct gl_context * ctx, ok = intel_texsubimage_tiled_memcpy(ctx, dims, texImage, xoffset, yoffset, zoffset, width, height, depth, - format, type, pixels, packing, - false /*for_glTexImage*/); + format, type, pixels, packing); if (ok) return;