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.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev