Re: [Mesa-dev] [PATCH 2/4] glsl: Immediately inline built-ins rather than generating calls.

2016-09-23 Thread Ian Romanick
On 09/22/2016 06:54 PM, Kenneth Graunke wrote: > On Thursday, September 22, 2016 1:54:44 PM PDT Ian Romanick wrote: >> On 09/21/2016 10:20 PM, Kenneth Graunke wrote: >>> In the past, we imported the prototypes of built-in functions, generated >>> calls to those, and waited until link time to

Re: [Mesa-dev] [PATCH 2/4] glsl: Immediately inline built-ins rather than generating calls.

2016-09-22 Thread Kenneth Graunke
On Thursday, September 22, 2016 1:54:44 PM PDT Ian Romanick wrote: > On 09/21/2016 10:20 PM, Kenneth Graunke wrote: > > In the past, we imported the prototypes of built-in functions, generated > > calls to those, and waited until link time to resolve the calls and > > import the actual code for

Re: [Mesa-dev] [PATCH 2/4] glsl: Immediately inline built-ins rather than generating calls.

2016-09-22 Thread Ian Romanick
On 09/21/2016 10:20 PM, Kenneth Graunke wrote: > In the past, we imported the prototypes of built-in functions, generated > calls to those, and waited until link time to resolve the calls and > import the actual code for the built-in functions. I thought part of the reason we did this was to

[Mesa-dev] [PATCH 2/4] glsl: Immediately inline built-ins rather than generating calls.

2016-09-21 Thread Kenneth Graunke
In the past, we imported the prototypes of built-in functions, generated calls to those, and waited until link time to resolve the calls and import the actual code for the built-in functions. This severely limited our compile-time optimization opportunities: even trivial functions like dot() were