Re: [Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

2016-12-12 Thread Kenneth Graunke
On Monday, December 12, 2016 4:35:46 PM PST Marek Olšák wrote: [snip] > Yeah, the GLSL compiler can't really do anything if it sees a bitcast. > I tried to write a pass that removes bitcasts, but it's a PITA because > you can have a vec4 where xzw are used as float and y as int. > > I just gave up

Re: [Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

2016-12-12 Thread Marek Olšák
On Mon, Dec 12, 2016 at 6:28 AM, Timothy Arceri wrote: > On Mon, 2016-12-12 at 11:35 +1100, Timothy Arceri wrote: >> On Sun, 2016-12-11 at 00:00 -0800, Kenneth Graunke wrote: >> > >> > On Saturday, December 10, 2016 12:37:16 PM PST Matt Turner wrote: >> > > >> > > >> > > On Fri, Dec 9, 2016 at 8:2

Re: [Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

2016-12-11 Thread Timothy Arceri
On Mon, 2016-12-12 at 11:35 +1100, Timothy Arceri wrote: > On Sun, 2016-12-11 at 00:00 -0800, Kenneth Graunke wrote: > > > > On Saturday, December 10, 2016 12:37:16 PM PST Matt Turner wrote: > > > > > > > > > On Fri, Dec 9, 2016 at 8:28 PM, Kenneth Graunke > > e. > > > org> wrote: > > > > > >

Re: [Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

2016-12-11 Thread Timothy Arceri
On Sun, 2016-12-11 at 00:00 -0800, Kenneth Graunke wrote: > On Saturday, December 10, 2016 12:37:16 PM PST Matt Turner wrote: > > > > On Fri, Dec 9, 2016 at 8:28 PM, Kenneth Graunke > org> wrote: > > > > > > A number of games have large arrays of constants, which we > > > promote to > > > unifor

Re: [Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

2016-12-11 Thread Marek Olšák
I don't see any difference in Deus Ex, but F1 2015 uses 64% less spilled-temp-array memory with this on GCN. Marek On Sat, Dec 10, 2016 at 5:28 AM, Kenneth Graunke wrote: > A number of games have large arrays of constants, which we promote to > uniforms. This introduces copies from the uniform

Re: [Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

2016-12-11 Thread Kenneth Graunke
On Saturday, December 10, 2016 12:37:16 PM PST Matt Turner wrote: > On Fri, Dec 9, 2016 at 8:28 PM, Kenneth Graunke wrote: > > A number of games have large arrays of constants, which we promote to > > uniforms. This introduces copies from the uniform array to the original > > temporary array. No

Re: [Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

2016-12-10 Thread Matt Turner
On Fri, Dec 9, 2016 at 8:28 PM, Kenneth Graunke wrote: > A number of games have large arrays of constants, which we promote to > uniforms. This introduces copies from the uniform array to the original > temporary array. Normally, copy propagation eliminates those copies, > making everything refe

[Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

2016-12-09 Thread Kenneth Graunke
A number of games have large arrays of constants, which we promote to uniforms. This introduces copies from the uniform array to the original temporary array. Normally, copy propagation eliminates those copies, making everything refer to the uniform array directly. A number of shaders in "Deus E