[Mesa-dev] [PATCH 4/5] i965/tex: Remove the for_glTexImage parameter from texsubimage_tiled_memcpy
Kenneth Graunke
kenneth at whitecape.org
Fri Sep 15 03:10:49 UTC 2017
From: Jason Ekstrand <jason.ekstrand at intel.com>
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 <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/intel_tex_image.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
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;
--
2.14.1
More information about the mesa-dev
mailing list