Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-07 Thread Siavash Eliasi
On 11/07/2014 07:31 PM, Ian Romanick wrote: On 11/07/2014 06:09 AM, Siavash Eliasi wrote: On 11/07/2014 03:14 PM, Steven Newbury wrote: On Thu, 2014-11-06 at 21:00 -0800, Matt Turner wrote: On Thu, Nov 6, 2014 at 8:56 PM, Siavash Eliasi < siavashser...@gmail.com> wrote: Then I do recommend r

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-07 Thread Siavash Eliasi
Then I do recommend removing the "if (cpu_has_sse4_1)" from this patch and similar places, because there is no runtime CPU dispatching happening for SSE optimized code paths in action and just adds extra overhead (unnecessary branches) to the generated code. Same must be applied to these patch

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-07 Thread Ian Romanick
On 11/07/2014 06:09 AM, Siavash Eliasi wrote: > > On 11/07/2014 03:14 PM, Steven Newbury wrote: >> On Thu, 2014-11-06 at 21:00 -0800, Matt Turner wrote: >>> On Thu, Nov 6, 2014 at 8:56 PM, Siavash Eliasi < >>> siavashser...@gmail.com> wrote: Then I do recommend removing the "if (cpu_has_sse4_

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-07 Thread steve
On Fri Nov 7 14:09:09 2014 GMT, Siavash Eliasi wrote: > > On 11/07/2014 03:14 PM, Steven Newbury wrote: > > On Thu, 2014-11-06 at 21:00 -0800, Matt Turner wrote: > >> On Thu, Nov 6, 2014 at 8:56 PM, Siavash Eliasi < > >> siavashser...@gmail.com> wrote: > >>> Then I do recommend removing the "if (c

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-07 Thread Siavash Eliasi
On 11/07/2014 03:14 PM, Steven Newbury wrote: On Thu, 2014-11-06 at 21:00 -0800, Matt Turner wrote: On Thu, Nov 6, 2014 at 8:56 PM, Siavash Eliasi < siavashser...@gmail.com> wrote: Then I do recommend removing the "if (cpu_has_sse4_1)" from this patch and similar places, because there is no ru

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-07 Thread Timothy Arceri
On Fri, 2014-11-07 at 11:44 +, Steven Newbury wrote: > On Thu, 2014-11-06 at 21:00 -0800, Matt Turner wrote: > > On Thu, Nov 6, 2014 at 8:56 PM, Siavash Eliasi < > > siavashser...@gmail.com> wrote: > > > Then I do recommend removing the "if (cpu_has_sse4_1)" from this > > > patch and similar p

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-07 Thread Steven Newbury
On Thu, 2014-11-06 at 21:00 -0800, Matt Turner wrote: > On Thu, Nov 6, 2014 at 8:56 PM, Siavash Eliasi < > siavashser...@gmail.com> wrote: > > Then I do recommend removing the "if (cpu_has_sse4_1)" from this > > patch and similar places, because there is no runtime CPU > > dispatching happening f

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-06 Thread Matt Turner
On Thu, Nov 6, 2014 at 8:56 PM, Siavash Eliasi wrote: > Then I do recommend removing the "if (cpu_has_sse4_1)" from this patch and > similar places, because there is no runtime CPU dispatching happening for > SSE optimized code paths in action and just adds extra overhead (unnecessary > branches)

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-06 Thread Matt Turner
On Thu, Nov 6, 2014 at 1:30 AM, Siavash Eliasi wrote: > How and when is "cpu_has_sse4_1" true? Is it controllable at runtime through > setting some environmental variable? or is it set once during startup by > detecting CPU features? It's actually a macro, but yes, see the end of src/mesa/x86/com

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-06 Thread Siavash Eliasi
How and when is "cpu_has_sse4_1" true? Is it controllable at runtime through setting some environmental variable? or is it set once during startup by detecting CPU features? I guess checking for "cpu_has_sse4_1" is unnecessary if it isn't controllable by user at runtime; because "USE_SSE41" is

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-06 Thread Matt Turner
On Wed, Nov 5, 2014 at 12:54 PM, Matt Turner wrote: > On Wed, Nov 5, 2014 at 12:50 PM, Timothy Arceri wrote: >> There have been quite a few eyes over this now but nobody has given it a >> reviewed by yet. >> >> Would be nice to get it in before the code freeze. Any takers? > > Yes, I'll make sure

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-06 Thread Juha-Pekka Heikkila
On 29.10.2014 14:05, Timothy Arceri wrote: > Makes use of SSE to speed up compute of min and max elements > > Callgrind cpu usage results from pts benchmarks: > > Openarena 0.8.8: 3.67% -> 1.03% > UrbanTerror: 2.36% -> 0.81% > > V5: > - actually make use of the optimisation in android (Emil Veli

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-05 Thread Matt Turner
On Wed, Nov 5, 2014 at 12:50 PM, Timothy Arceri wrote: > There have been quite a few eyes over this now but nobody has given it a > reviewed by yet. > > Would be nice to get it in before the code freeze. Any takers? Yes, I'll make sure that happens. ___

Re: [Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-11-05 Thread Timothy Arceri
There have been quite a few eyes over this now but nobody has given it a reviewed by yet. Would be nice to get it in before the code freeze. Any takers? On Wed, 2014-10-29 at 23:05 +1100, Timothy Arceri wrote: > Makes use of SSE to speed up compute of min and max elements > > Callgrind cpu usa

[Mesa-dev] [PATCH V5] mesa: add SSE optimisation for glDrawElements

2014-10-29 Thread Timothy Arceri
Makes use of SSE to speed up compute of min and max elements Callgrind cpu usage results from pts benchmarks: Openarena 0.8.8: 3.67% -> 1.03% UrbanTerror: 2.36% -> 0.81% V5: - actually make use of the optimisation in android (Emil Velikov) - set a better array size limit for using SSE and added