Re: [Mesa-dev] [PATCH 2/2] nir/algebraic: Optimize common array indexing sequence

2016-08-23 Thread Thomas Helland
12. aug. 2016 04.02 skrev "Timothy Arceri" : > > On Thu, 2016-08-11 at 20:54 +0200, Thomas Helland wrote: > > 2016-08-11 18:19 GMT+02:00 Ian Romanick : > > > > > > ping > > > > > > On 07/19/2016 10:37 PM, Ian Romanick wrote: > > > > > > > > From: Ian Romanick > > > > > > > > Some shaders include c

Re: [Mesa-dev] [PATCH 2/2] nir/algebraic: Optimize common array indexing sequence

2016-08-11 Thread Timothy Arceri
On Thu, 2016-08-11 at 20:54 +0200, Thomas Helland wrote: > 2016-08-11 18:19 GMT+02:00 Ian Romanick : > > > > ping > > > > On 07/19/2016 10:37 PM, Ian Romanick wrote: > > > > > > From: Ian Romanick > > > > > > Some shaders include code that looks like: > > > > > >    uniform int i; > > >    un

Re: [Mesa-dev] [PATCH 2/2] nir/algebraic: Optimize common array indexing sequence

2016-08-11 Thread Jason Ekstrand
On Aug 11, 2016 6:16 PM, "Ian Romanick" wrote: > > On 08/11/2016 11:54 AM, Thomas Helland wrote: > > 2016-08-11 18:19 GMT+02:00 Ian Romanick : > >> ping > >> > >> On 07/19/2016 10:37 PM, Ian Romanick wrote: > >>> From: Ian Romanick > >>> > >>> Some shaders include code that looks like: > >>> > >>

Re: [Mesa-dev] [PATCH 2/2] nir/algebraic: Optimize common array indexing sequence

2016-08-11 Thread Ian Romanick
On 08/11/2016 11:54 AM, Thomas Helland wrote: > 2016-08-11 18:19 GMT+02:00 Ian Romanick : >> ping >> >> On 07/19/2016 10:37 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> Some shaders include code that looks like: >>> >>>uniform int i; >>>uniform vec4 bones[...]; >>> >>>foo(bon

Re: [Mesa-dev] [PATCH 2/2] nir/algebraic: Optimize common array indexing sequence

2016-08-11 Thread Thomas Helland
2016-08-11 18:19 GMT+02:00 Ian Romanick : > ping > > On 07/19/2016 10:37 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> Some shaders include code that looks like: >> >>uniform int i; >>uniform vec4 bones[...]; >> >>foo(bones[i * 3], bones[i * 3 + 1], bones[i * 3 + 2]); >> >> CSE w

Re: [Mesa-dev] [PATCH 2/2] nir/algebraic: Optimize common array indexing sequence

2016-08-11 Thread Ian Romanick
ping On 07/19/2016 10:37 PM, Ian Romanick wrote: > From: Ian Romanick > > Some shaders include code that looks like: > >uniform int i; >uniform vec4 bones[...]; > >foo(bones[i * 3], bones[i * 3 + 1], bones[i * 3 + 2]); > > CSE would do some work on this: > >x = i * 3 >foo

[Mesa-dev] [PATCH 2/2] nir/algebraic: Optimize common array indexing sequence

2016-07-19 Thread Ian Romanick
From: Ian Romanick Some shaders include code that looks like: uniform int i; uniform vec4 bones[...]; foo(bones[i * 3], bones[i * 3 + 1], bones[i * 3 + 2]); CSE would do some work on this: x = i * 3 foo(bones[x], bones[x + 1], bones[x + 2]); The compiler may then add '<< 4 + b