[Mesa-dev] [PATCH 14/16] i965: Enable tiled memcpy pixel read path on non-LLC
Daniel Vetter
daniel at ffwll.ch
Tue May 30 20:26:51 UTC 2017
On Tue, May 30, 2017 at 11:07:55AM -0700, Kenneth Graunke wrote:
> On Wednesday, May 24, 2017 1:04:56 PM PDT Matt Turner wrote:
> > ---
> > src/mesa/drivers/dri/i965/intel_pixel_read.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
> > index eb3f66f..5085683 100644
> > --- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
> > +++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
> > @@ -91,8 +91,7 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx,
> > * a 2D BGRA, RGBA, L8 or A8 texture. It could be generalized to support
> > * more types.
> > */
> > - if (!brw->has_llc ||
> > - !(type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) ||
> > + if (!(type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) ||
> > pixels == NULL ||
> > _mesa_is_bufferobj(pack->BufferObj) ||
> > pack->Alignment > 4 ||
> >
>
> Patches 14-15 are:
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
>
> I think these are fine because MAP_READ | MAP_RAW should cause us to use
> CPU maps, so LLC/non-LLC shouldn't matter.
>
> I forget what Chrome workload benefited hugely from this path on LLC,
> but it might be nice to quote some numbers.
Doing partial reads through cpu mmaps on non-llc isn't going to be fast
due to the clflush stuff. But since the meta stuff as fallback doesn't do
any kind of blt copy (I dont know mesa enough to be sure, but that's my
assumption at least), this shouldn't hurt. It won't make it a rocket
either otoh.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the mesa-dev
mailing list