[Mesa-dev] [PATCH 2/7] intel: Remove the pbo zero-copy code.

Eric Anholt eric at anholt.net
Thu Sep 22 10:25:20 PDT 2011


On Thu, 22 Sep 2011 09:54:43 -0700, Ian Romanick <idr at freedesktop.org> wrote:
> On 09/21/2011 10:15 AM, Eric Anholt wrote:
> > There were notes about the possibility of slowdowns due to zcopy from
> > a PBO due to thrashing around of the region.  Slowdowns are even more
> > likely now that textures are generally tiled, which a zcopy wouldn't
> > get.  Additionally, there were no checks on the buffer size to ensure
> > that the hardware-required rounding was present, which could result in
> > GPU hangs on large zcopy PBOs.
> > ---
> >   src/mesa/drivers/dri/intel/intel_buffer_objects.c |   45 --------
> >   src/mesa/drivers/dri/intel/intel_buffer_objects.h |   12 --
> >   src/mesa/drivers/dri/intel/intel_regions.c        |  119 ---------------------
> >   src/mesa/drivers/dri/intel/intel_regions.h        |   11 --
> >   src/mesa/drivers/dri/intel/intel_tex_image.c      |   60 -----------
> >   5 files changed, 0 insertions(+), 247 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
> > index d35a50e..4df2d76 100644
> > --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
> > +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
> > -void
> > -intel_region_cow(struct intel_context *intel, struct intel_region *region)
> > -{
> > -   struct intel_buffer_object *pbo = region->pbo;
> > -   GLboolean ok;
> > -
> > -   intel_region_release_pbo(intel, region);
> > -
> > -   assert(region->cpp * region->pitch * region->height == pbo->Base.Size);
> > -
> > -   _DBG("%s %p (%d bytes)\n", __FUNCTION__, region, (int)pbo->Base.Size);
> > -
> > -   /* Now blit from the texture buffer to the new buffer:
> > -    */
> > -
> > -   intel_prepare_render(intel);
> > -   ok = intelEmitCopyBlit(intel,
> > -                          region->cpp,
> > -                          region->pitch, pbo->buffer, 0, region->tiling,
> > -                          region->pitch, region->buffer, 0, region->tiling,
> > -                          0, 0, 0, 0,
> > -                          region->pitch, region->height,
> > -                          GL_COPY);
> > -   assert(ok);
> > -}
> > -
> >   drm_intel_bo *
> >   intel_region_buffer(struct intel_context *intel,
> >                       struct intel_region *region, GLuint flag)
> 
> Does this function need to exist?  If so, can it lose the intel and flag 
> parameters?

Yeah, it deserves to die I think.  I was going to do it in another patch
at some point.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110922/970a66ac/attachment.pgp>


More information about the mesa-dev mailing list