Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Thomas Helland
On Nov 13, 2016 14:32, "Marek Olšák" wrote: > > Interesting idea. Also added this: > Oh, nice! Gotta catch them all :-) > diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp > index cc28b26..295d10b 100644 > --- a/src/compiler/glsl/linker.cpp > +++ b/src/compiler/glsl/linker

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Thomas Helland
Forwarding to the mailing list because I'm an idiot and am apparently not able to email. > 2016-11-13 10:39 GMT+01:00 Timothy Arceri : > > On Sun, 2016-11-13 at 02:29 +0100, Thomas Helland wrote: > >> It turns out that only 8% of shaders benefit from more than one run > >> of the do_common_optimiz

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Marek Olšák
> I've tested my private shader-db (26011 shaders, many games). I see > only 2 regressions on radeonsi, both are changes in the code size: > WORST REGRESSIONS - Code Size > Before After Delta Percentage > shaders/private/alien_isolation/788.shader_test [0] > 8784 9080 2963

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Marek Olšák
Interesting idea. Also added this: diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index cc28b26..295d10b 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4985,10 +4985,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Timothy Arceri
On Sun, 2016-11-13 at 02:29 +0100, Thomas Helland wrote: > It turns out that only 8% of shaders benefit from more than one run > of the do_common_optimization function, now that it has the loop. > Doing only one run makes no difference to instruction count with NIR. > > 8324 shaders were run This

[Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-12 Thread Thomas Helland
It turns out that only 8% of shaders benefit from more than one run of the do_common_optimization function, now that it has the loop. Doing only one run makes no difference to instruction count with NIR. 8324 shaders were run 8128 benefit from 1 calls to do_common_optimization 679 benefit from 2