[Mesa-dev] [RFC] Gallium constant handling speed improvements
maraeo at gmail.com
Sat Dec 4 17:23:59 PST 2010
I like the idea behind the first patch and there is a slight performance
improvement with it on r300g, so I hope we'll get it accepted soon. r300g
has no requirements on alignment of the offset but other drivers might have.
The only change that's needed for r300g in set_constant_buffer is "mapped +=
The second patch will make sense for large constant buffers (once it's
finished), e.g. nv50 has a 64kB large constant file and avoiding one
unnecessary memcpy might be a win there. Similarly for r600.
On Fri, Dec 3, 2010 at 8:47 PM, Jakob Bornecrantz <jakob at vmware.com> wrote:
> Hi all
> I have attached two patches that should help with speed on applications
> causes a lot of constant buffers to be emitted or lot of constant state as
> the case of the second patch as it eliminates a memcpy.
> The first patch just adds a offset and size argument to the
> call on the context, making it possible for the state tracker sub-allocate
> buffers out a larger buffer. For ipers this is a pretty big win. Even if we
> something similar inside the drivers various locks would have to be taken
> because since create buffer is a screen function.
> The second patch switches from a inline write to map buffer call and points
> _mesa_load_state_parameters to it directly. For ipers this is a minor loss
> for application that has a different ratio of number of constants vs number
> times the constants changes it will probably be a win.
> I have tested the patches on i915g only, unfortunately I based the i915
> of these patches on some other work I had laying around so there is no
> in sending them out since they wont apply.
> Before I go and try and change the other drivers I would like to hear some
> on these changes. So comment please, anyways have a nice weekend.
> Cheers Jakob.
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev