[Mesa-dev] Gallium optimization: add the user pointer into pipe_vertex_buffer and pipe_index_buffer
Jose Fonseca
jfonseca at vmware.com
Mon Apr 16 08:02:35 PDT 2012
----- Original Message -----
> Hi,
>
> does lack of feedback mean that this idea is still off the table
> despite the performance increase, or that nobody is opposed to it
> anymore?
Hi Marek,
Sorry for the delayed silence. The lack of my feedback just means I'm busy...
> In other words, may I start adapting the other drivers and send
> patches?
I don't oppose this direction, but before we do this I'd prefer that you make user buffers completely optional (you already have patches to make VB user buffers optional, so it's just a matter of making IB optional as well).
This way, drivers that can't or don't want to benefit from user buffers can opt out of them completely, and you won't need to update these drivers for this interface change. And, with what you propose below, the drivers that do wan't user buffers, can get them with least overhead.
Jose
> Thanks,
> Marek
>
> On Thu, Apr 12, 2012 at 8:08 PM, Marek Olšák <maraeo at gmail.com>
> wrote:
> > Hi,
> >
> > In parallel with my other work, I have been looking for ways to
> > decrease our draw-call overhead and tried adding the user buffer
> > pointer into pipe_vertex_buffer and pipe_index_buffer, which led to
> > a
> > removal of a lot of code from st_draw.c. With that change, I have
> > tested r300g with torcs and ipers and got surprising results.
> >
> > Pros:
> > - 9% performance increase in torcs (open source game)
> > - 6% performance increase in ipers (from Mesa demos)
> > - Besides that, a little over 110 lines of code was removed from
> > st_draw.c.
> >
> > Cons:
> > - The user buffer contents are fully mutable between draw calls,
> > however drivers should be ready for that now.
> >
> > I know this was brought up long ago and it was NAK'd, but you know,
> > it's really hard to resist this framerate-increasing "cleanup". I
> > guess many people would agree.
> >
> > Here's the proof-of-concept implementation (2 commits):
> > http://cgit.freedesktop.org/~mareko/mesa/commit/?h=gallium-user-ptr-in-states&id=21cf1414df5e24942fe4f0fdab008c9b3bc63802
> > http://cgit.freedesktop.org/~mareko/mesa/commit/?h=gallium-user-ptr-in-states&id=a582f05b56b89e8c2e1345b6c2b6eb9663919eba
> >
> > Here are the exact benchmark results:
> >
> > Torcs before:
> > libGL: FPS = 22.3
> > libGL: FPS = 21.6
> > libGL: FPS = 20.5
> > libGL: FPS = 20.4
> >
> > Torcs after:
> > libGL: FPS = 24.4
> > libGL: FPS = 23.7
> > libGL: FPS = 22.2
> > libGL: FPS = 22.0
> >
> > Ipers before:
> > Frame rate: 30.212976
> > Frame rate: 30.183079
> > Frame rate: 30.183079
> > Frame rate: 30.257936
> >
> > Ipers after:
> > Frame rate: 31.761785
> > Frame rate: 32.000000
> > Frame rate: 32.082922
> > Frame rate: 32.146389
> >
> > Comments welcome.
> >
> > Thanks,
> > Marek
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list