Re: [Mesa-dev] [RFC] NIR serialization

2017-09-15 Thread Eero Tamminen
Hi, On 13.09.2017 19:08, Jason Ekstrand wrote: On Wed, Sep 13, 2017 at 8:42 AM, Nicolai Hähnle > wrote: On 13.09.2017 11:54, Eero Tamminen wrote: On 12.09.2017 09:55, Jordan Justen wrote: On 2017-09-11 21:44:32, Timothy

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-14 Thread Connor Abbott
On Thu, Sep 14, 2017 at 10:15 PM, Connor Abbott wrote: > me too :) I'll push my stuff now > > On Thu, Sep 14, 2017 at 8:58 PM, Jason Ekstrand wrote: >> On Thu, Sep 14, 2017 at 12:40 PM, Connor Abbott wrote: >>> >>> On Tue, Sep 12,

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-14 Thread Connor Abbott
me too :) I'll push my stuff now On Thu, Sep 14, 2017 at 8:58 PM, Jason Ekstrand wrote: > On Thu, Sep 14, 2017 at 12:40 PM, Connor Abbott wrote: >> >> On Tue, Sep 12, 2017 at 2:09 PM, Jason Ekstrand >> wrote: >> > On Tue, Sep 12,

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-14 Thread Jason Ekstrand
On Thu, Sep 14, 2017 at 12:40 PM, Connor Abbott wrote: > On Tue, Sep 12, 2017 at 2:09 PM, Jason Ekstrand > wrote: > > On Tue, Sep 12, 2017 at 10:12 AM, Ian Romanick > wrote: > >> > >> On 09/11/2017 11:17 PM, Kenneth Graunke

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-14 Thread Connor Abbott
On Tue, Sep 12, 2017 at 2:09 PM, Jason Ekstrand wrote: > On Tue, Sep 12, 2017 at 10:12 AM, Ian Romanick wrote: >> >> On 09/11/2017 11:17 PM, Kenneth Graunke wrote: >> > On Monday, September 11, 2017 9:23:05 PM PDT Ian Romanick wrote: >> >> On

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-13 Thread Jason Ekstrand
On Wed, Sep 13, 2017 at 8:42 AM, Nicolai Hähnle wrote: > On 13.09.2017 11:54, Eero Tamminen wrote: > >> Hi, >> >> On 12.09.2017 09:55, Jordan Justen wrote: >> >>> On 2017-09-11 21:44:32, Timothy Arceri wrote: >>> On 12/09/17 14:23, Ian Romanick wrote: > On

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-13 Thread Nicolai Hähnle
On 13.09.2017 11:54, Eero Tamminen wrote: Hi, On 12.09.2017 09:55, Jordan Justen wrote: On 2017-09-11 21:44:32, Timothy Arceri wrote: On 12/09/17 14:23, Ian Romanick wrote: On 09/08/2017 01:59 AM, Kenneth Graunke wrote: We shouldn't use SPIR-V for the shader cache. The compilation process

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-13 Thread Eero Tamminen
Hi, On 12.09.2017 09:55, Jordan Justen wrote: On 2017-09-11 21:44:32, Timothy Arceri wrote: On 12/09/17 14:23, Ian Romanick wrote: On 09/08/2017 01:59 AM, Kenneth Graunke wrote: We shouldn't use SPIR-V for the shader cache. The compilation process for GLSL is: GLSL -> GLSL IR -> NIR ->

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Connor Abbott
I think the arguments for doing NIR serialization and deseriallization are pretty persuasive. I've started a skeleton of a NIR serialization implementation at https://cgit.freedesktop.org/~cwabbott0/mesa/log/?h=nir-serialize. Note that filling this in by following nir_clone should be mostly

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Timothy Arceri
On 13/09/17 03:00, Ian Romanick wrote: On 09/11/2017 09:44 PM, Timothy Arceri wrote: On 12/09/17 14:23, Ian Romanick wrote: On 09/08/2017 01:59 AM, Kenneth Graunke wrote: On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: On 2017-09-06 14:12:41, Daniel Schürmann wrote:

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Rob Clark
On Tue, Sep 12, 2017 at 4:39 PM, Jason Ekstrand wrote: > On Tue, Sep 12, 2017 at 11:09 AM, Jason Ekstrand > wrote: >> >> On Tue, Sep 12, 2017 at 10:12 AM, Ian Romanick >> wrote: >>> >>> On 09/11/2017 11:17 PM, Kenneth Graunke

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Jason Ekstrand
On Tue, Sep 12, 2017 at 11:09 AM, Jason Ekstrand wrote: > On Tue, Sep 12, 2017 at 10:12 AM, Ian Romanick > wrote: > >> On 09/11/2017 11:17 PM, Kenneth Graunke wrote: >> > On Monday, September 11, 2017 9:23:05 PM PDT Ian Romanick wrote: >> >> On

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Nicolai Hähnle
On 12.09.2017 06:25, Ian Romanick wrote: On 09/07/2017 04:26 PM, Jordan Justen wrote: On 2017-09-06 14:12:41, Daniel Schürmann wrote: Hello together! Recently, we had a small discussion (off the list) about the NIR serialization, which was previously discussed in [RFC] ARB_gl_spirv and NIR

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Jason Ekstrand
On Tue, Sep 12, 2017 at 10:12 AM, Ian Romanick wrote: > On 09/11/2017 11:17 PM, Kenneth Graunke wrote: > > On Monday, September 11, 2017 9:23:05 PM PDT Ian Romanick wrote: > >> On 09/08/2017 01:59 AM, Kenneth Graunke wrote: > >>> On Thursday, September 7, 2017 4:26:04 PM

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Ian Romanick
On 09/11/2017 11:17 PM, Kenneth Graunke wrote: > On Monday, September 11, 2017 9:23:05 PM PDT Ian Romanick wrote: >> On 09/08/2017 01:59 AM, Kenneth Graunke wrote: >>> On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: On 2017-09-06 14:12:41, Daniel Schürmann wrote: >

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Ian Romanick
On 09/11/2017 09:44 PM, Timothy Arceri wrote: > On 12/09/17 14:23, Ian Romanick wrote: >> On 09/08/2017 01:59 AM, Kenneth Graunke wrote: >>> On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: On 2017-09-06 14:12:41, Daniel Schürmann wrote: > Hello together! > Recently,

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Timothy Arceri
On 12/09/17 16:55, Jordan Justen wrote: On 2017-09-11 21:44:32, Timothy Arceri wrote: On 12/09/17 14:23, Ian Romanick wrote: On 09/08/2017 01:59 AM, Kenneth Graunke wrote: We shouldn't use SPIR-V for the shader cache. The compilation process for GLSL is: GLSL -> GLSL IR -> NIR -> i965 IRs.

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Jordan Justen
On 2017-09-10 17:15:48, Timothy Arceri wrote: > Ccing list. > > On 11/09/17 09:50, Timothy Arceri wrote: > > Hi Daniel, > > > > Here is the code that does the caching of tgsi in Gallium. > > > > https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/state_tracker/st_shader_cache.c > > > > > >

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Jordan Justen
On 2017-09-11 21:44:32, Timothy Arceri wrote: > On 12/09/17 14:23, Ian Romanick wrote: > > On 09/08/2017 01:59 AM, Kenneth Graunke wrote: > >> > >> We shouldn't use SPIR-V for the shader cache. > >> > >> The compilation process for GLSL is: GLSL -> GLSL IR -> NIR -> i965 IRs. > >> Storing the

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-12 Thread Kenneth Graunke
On Monday, September 11, 2017 9:23:05 PM PDT Ian Romanick wrote: > On 09/08/2017 01:59 AM, Kenneth Graunke wrote: > > On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: > >> On 2017-09-06 14:12:41, Daniel Schürmann wrote: > >>> Hello together! > >>> Recently, we had a small

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-11 Thread Kenneth Graunke
On Monday, September 11, 2017 9:27:28 PM PDT Ian Romanick wrote: > And... we wouldn't necessarily have to throw away cached SPIR-V when the > Mesa version changes... though we may want to anyway. Sure, SPIR-V is a defined, stable format, and that's a nice property. If we invented a serialized NIR

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-11 Thread Timothy Arceri
On 12/09/17 14:23, Ian Romanick wrote: On 09/08/2017 01:59 AM, Kenneth Graunke wrote: On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: On 2017-09-06 14:12:41, Daniel Schürmann wrote: Hello together! Recently, we had a small discussion (off the list) about the NIR

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-11 Thread Ian Romanick
On 09/11/2017 09:23 PM, Ian Romanick wrote: > On 09/08/2017 01:59 AM, Kenneth Graunke wrote: >> On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: >>> On 2017-09-06 14:12:41, Daniel Schürmann wrote: Hello together! Recently, we had a small discussion (off the list) about

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-11 Thread Ian Romanick
On 09/07/2017 04:26 PM, Jordan Justen wrote: > On 2017-09-06 14:12:41, Daniel Schürmann wrote: >> Hello together! >> Recently, we had a small discussion (off the list) about the NIR >> serialization, which was previously discussed in [RFC] ARB_gl_spirv and >> NIR backend for radeonsi. >> >> As

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-11 Thread Ian Romanick
On 09/08/2017 01:59 AM, Kenneth Graunke wrote: > On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: >> On 2017-09-06 14:12:41, Daniel Schürmann wrote: >>> Hello together! >>> Recently, we had a small discussion (off the list) about the NIR >>> serialization, which was previously

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-10 Thread Timothy Arceri
Ccing list. On 11/09/17 09:50, Timothy Arceri wrote: Hi Daniel, Here is the code that does the caching of tgsi in Gallium. https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/state_tracker/st_shader_cache.c Basically we just use the blob helpers to do the writing/reading.

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-08 Thread Marek Olšák
On Fri, Sep 8, 2017 at 2:09 AM, Rob Clark wrote: > On Thu, Sep 7, 2017 at 7:26 PM, Jordan Justen > wrote: >> On 2017-09-06 14:12:41, Daniel Schürmann wrote: >>> Hello together! >>> Recently, we had a small discussion (off the list) about the NIR

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-08 Thread Timothy Arceri
On 08/09/17 18:59, Kenneth Graunke wrote: On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: On 2017-09-06 14:12:41, Daniel Schürmann wrote: Hello together! Recently, we had a small discussion (off the list) about the NIR serialization, which was previously discussed in [RFC]

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-08 Thread Daniel Schürmann
The NIR->SPIRV->NIR round-trip was assumed to be completely lossless. But you are right, it would be risky to forget about some small pitfalls or to not have a total bijection. Also, it would make it much more difficult to make changes to NIR. Thanks for this really valid point. On

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-08 Thread Kenneth Graunke
On Thursday, September 7, 2017 4:26:04 PM PDT Jordan Justen wrote: > On 2017-09-06 14:12:41, Daniel Schürmann wrote: > > Hello together! > > Recently, we had a small discussion (off the list) about the NIR > > serialization, which was previously discussed in [RFC] ARB_gl_spirv and > > NIR

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-07 Thread Jason Ekstrand
On Thu, Sep 7, 2017 at 5:09 PM, Rob Clark wrote: > On Thu, Sep 7, 2017 at 7:26 PM, Jordan Justen > wrote: > > On 2017-09-06 14:12:41, Daniel Schürmann wrote: > >> Hello together! > >> Recently, we had a small discussion (off the list) about the

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-07 Thread Rob Clark
On Thu, Sep 7, 2017 at 7:26 PM, Jordan Justen wrote: > On 2017-09-06 14:12:41, Daniel Schürmann wrote: >> Hello together! >> Recently, we had a small discussion (off the list) about the NIR >> serialization, which was previously discussed in [RFC] ARB_gl_spirv and >>

Re: [Mesa-dev] [RFC] NIR serialization

2017-09-07 Thread Jordan Justen
On 2017-09-06 14:12:41, Daniel Schürmann wrote: > Hello together! > Recently, we had a small discussion (off the list) about the NIR > serialization, which was previously discussed in [RFC] ARB_gl_spirv and > NIR backend for radeonsi. > > As this topic could be interesting to more people, I