On Thu, Dec 22, 2016 at 03:22:51PM -0800, Anuj Phogat wrote: > On Tue, Dec 20, 2016 at 6:45 AM, Topi Pohjolainen > <topi.pohjolai...@gmail.com> wrote: > > > > Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> > > --- > > src/mesa/drivers/dri/i965/intel_tex_image.c | 24 > > +++++++----------------- > > src/mesa/drivers/dri/i965/intel_tex_subimage.c | 19 +++++-------------- > > 2 files changed, 12 insertions(+), 31 deletions(-) > > > > diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c > > b/src/mesa/drivers/dri/i965/intel_tex_image.c > > index 67f83db..e503043 100644 > > --- a/src/mesa/drivers/dri/i965/intel_tex_image.c > > +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c > > @@ -127,7 +127,6 @@ intelTexImage(struct gl_context * ctx, > > { > > struct brw_context *brw = brw_context(ctx); > > struct intel_texture_image *intelImage = intel_texture_image(texImage); > > - bool ok; > > > > bool tex_busy = intelImage->mt && drm_intel_bo_busy(intelImage->mt->bo); > > > > @@ -156,22 +155,13 @@ intelTexImage(struct gl_context * ctx, > > format, type, pixels, unpack)) > > return; > > > > - if (brw->gen < 6 && > > - _mesa_meta_pbo_TexSubImage(ctx, dims, texImage, 0, 0, 0, > > - texImage->Width, texImage->Height, > > - texImage->Depth, > > - format, type, pixels, > > - tex_busy, unpack)) > > - return; > > - > > - ok = intel_texsubimage_tiled_memcpy(ctx, dims, texImage, > > - 0, 0, 0, /*x,y,z offsets*/ > > - texImage->Width, > > - texImage->Height, > > - texImage->Depth, > > - format, type, pixels, unpack, > > - false /*allocate_storage*/); > > - if (ok) > > + if (intel_texsubimage_tiled_memcpy(ctx, dims, texImage, > > + 0, 0, 0, /*x,y,z offsets*/ > > + texImage->Width, > > + texImage->Height, > > + texImage->Depth, > > + format, type, pixels, unpack, > > + false /*allocate_storage*/)) > > return; > > > > DBG("%s: upload image %dx%dx%d pixels %p\n", > > diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c > > b/src/mesa/drivers/dri/i965/intel_tex_subimage.c > > index 741637a..60dc862 100644 > > --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c > > +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c > > @@ -395,7 +395,6 @@ intelTexSubImage(struct gl_context * ctx, > > { > > struct brw_context *brw = brw_context(ctx); > > struct intel_mipmap_tree *mt = intel_texture_image(texImage)->mt; > > - bool ok; > > > > bool tex_busy = mt && drm_intel_bo_busy(mt->bo); > > > > @@ -416,19 +415,11 @@ intelTexSubImage(struct gl_context * ctx, > > format, type, pixels, packing)) > > return; > > > > - ok = _mesa_meta_pbo_TexSubImage(ctx, dims, texImage, > > - xoffset, yoffset, zoffset, > > - width, height, depth, format, type, > > - pixels, tex_busy, packing); > > - if (ok) > > - return; > > - > > - ok = intel_texsubimage_tiled_memcpy(ctx, dims, texImage, > > - xoffset, yoffset, zoffset, > > - width, height, depth, > > - format, type, pixels, packing, > > - false /*for_glTexImage*/); > > - if (ok) > > + if (intel_texsubimage_tiled_memcpy(ctx, dims, texImage, > > + xoffset, yoffset, zoffset, > > + width, height, depth, > > + format, type, pixels, packing, > > + false /*for_glTexImage*/)) > > return; > > > > _mesa_store_texsubimage(ctx, dims, texImage, > > -- > > 2.5.5 > > > > _______________________________________________ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > > It'll be useful if you can add a commit message explaning why it is > okay to drop the meta path on pre-gen6 platforms.
Right, it is missing the rational altogether. Like I mentioned in the cover letter this is more RFC style patch. I was a little worried how well the meta path will be maintained once it is only used for ILK and older. I also wanted to highlight that there is no functional regression in jenkins if it gets dropped also for gen < 6. It is pure optimization for cases where the source is buffer object or gpu is already busy with the target texture. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev