[Mesa-dev] [PATCH 40/53] i965/drm: Rewrite relocation handling.

Kenneth Graunke kenneth at whitecape.org
Thu Apr 6 22:25:38 UTC 2017


On Thursday, April 6, 2017 3:52:06 AM PDT Chris Wilson wrote:
> On Wed, Apr 05, 2017 at 04:56:42PM -0700, Kenneth Graunke wrote:
> > On Wednesday, April 5, 2017 4:46:27 AM PDT Chris Wilson wrote:
> > > On Tue, Apr 04, 2017 at 05:10:30PM -0700, Kenneth Graunke wrote:
[snip]
> > > > +   batch->reloc_count = 0;
> > > > +   batch->reloc_array_size = 768;
> > > 
> > > Wowser!
> > 
> > I ran a couple of programs when trying to decide how big to make these
> > arrays.  The Unreal Elemental demo had 749 relocations in a draw, and
> > 200 BOs used by a batch.  Other simpler games had 264 relocations and
> > 55 BOs.
> 
> I had 100 obj, 300 relocs as my idea of typical GL, with most of those
> relocs being vertex/index buffers.

That seems about right.  I collected data from 45 apitraces today, and
found that Elemental's 749 is really an outlier.  The average was 77
objects and 233 relocations.  Median was 76 objects and 225 relocations.

I think 100 objects and 250 relocations should be fine.  That covers 66%
of the apps I examined out of the box.  Growing the relocation array a
single time would cover all but 1 app.

I'll change that locally.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170406/07333754/attachment.sig>


More information about the mesa-dev mailing list