Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-31 Thread Timothy Arceri
On 01/06/17 02:45, Marek Olšák wrote: On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri wrote: 3. The GLSL IR opts are both slow and not always optimal (possibly transforming the code to something that's harder to opt later), but due to uniform/varying optimisation requirements some optimisation

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-31 Thread Marek Olšák
On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri wrote: > 3. The GLSL IR opts are both slow and not always optimal (possibly > transforming the code to something that's harder to opt later), but due to > uniform/varying optimisation requirements some optimisations are required > *before* we can do

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-23 Thread Timothy Arceri
On 23/05/17 22:18, Brian Paul wrote: On 05/22/2017 07:15 PM, Timothy Arceri wrote: On 23/05/17 10:44, Marek Olšák wrote: On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri wrote: On 23/05/17 05:02, Marek Olšák wrote: On Sun, May 21, 2017 at 12:48 PM, Nicolai Hähnle wrote: Hi all, I've bee

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-23 Thread Brian Paul
On 05/22/2017 07:15 PM, Timothy Arceri wrote: On 23/05/17 10:44, Marek Olšák wrote: On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri wrote: On 23/05/17 05:02, Marek Olšák wrote: On Sun, May 21, 2017 at 12:48 PM, Nicolai Hähnle wrote: Hi all, I've been looking into ARB_gl_spirv for radeon

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Timothy Arceri
On 23/05/17 11:45, Rob Clark wrote: On Mon, May 22, 2017 at 9:33 PM, Rob Clark wrote: On Mon, May 22, 2017 at 9:15 PM, Timothy Arceri wrote: On 23/05/17 10:44, Marek Olšák wrote: On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri wrote: On 23/05/17 05:02, Marek Olšák wrote: On Sun, Ma

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Jason Ekstrand
On Mon, May 22, 2017 at 6:48 PM, Jason Ekstrand wrote: > On Mon, May 22, 2017 at 6:45 PM, Rob Clark wrote: > >> On Mon, May 22, 2017 at 9:33 PM, Rob Clark wrote: >> > On Mon, May 22, 2017 at 9:15 PM, Timothy Arceri >> wrote: >> >> On 23/05/17 10:44, Marek Olšák wrote: >> >>> >> >>> On Tue, May

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Jason Ekstrand
On Mon, May 22, 2017 at 6:45 PM, Rob Clark wrote: > On Mon, May 22, 2017 at 9:33 PM, Rob Clark wrote: > > On Mon, May 22, 2017 at 9:15 PM, Timothy Arceri > wrote: > >> On 23/05/17 10:44, Marek Olšák wrote: > >>> > >>> On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri < > tarc...@itsqueeze.com> >

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Rob Clark
On Mon, May 22, 2017 at 9:33 PM, Rob Clark wrote: > On Mon, May 22, 2017 at 9:15 PM, Timothy Arceri wrote: >> On 23/05/17 10:44, Marek Olšák wrote: >>> >>> On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri >>> wrote: On 23/05/17 05:02, Marek Olšák wrote: > > > On Sun, May 21

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Rob Clark
On Mon, May 22, 2017 at 9:15 PM, Timothy Arceri wrote: > On 23/05/17 10:44, Marek Olšák wrote: >> >> On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri >> wrote: >>> >>> On 23/05/17 05:02, Marek Olšák wrote: On Sun, May 21, 2017 at 12:48 PM, Nicolai Hähnle wrote: > > >>

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Timothy Arceri
On 23/05/17 10:44, Marek Olšák wrote: On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri wrote: On 23/05/17 05:02, Marek Olšák wrote: On Sun, May 21, 2017 at 12:48 PM, Nicolai Hähnle wrote: Hi all, I've been looking into ARB_gl_spirv for radeonsi. I don't fancy re-inventing the ~8k LOC of s

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Marek Olšák
On Tue, May 23, 2017 at 12:07 AM, Timothy Arceri wrote: > On 23/05/17 05:02, Marek Olšák wrote: >> >> On Sun, May 21, 2017 at 12:48 PM, Nicolai Hähnle >> wrote: >>> >>> Hi all, >>> >>> I've been looking into ARB_gl_spirv for radeonsi. I don't fancy >>> re-inventing >>> the ~8k LOC of src/compiler

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Timothy Arceri
On 23/05/17 05:02, Marek Olšák wrote: On Sun, May 21, 2017 at 12:48 PM, Nicolai Hähnle wrote: Hi all, I've been looking into ARB_gl_spirv for radeonsi. I don't fancy re-inventing the ~8k LOC of src/compiler/spirv, and there's already a perfectly fine SPIR-V -> NIR -> LLVM compiler pipeline in

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Jason Ekstrand
Taking the "just reply to Nicolai" approach like everyeone else... Nicolai, First off, thanks for working on this! I've given it a bit of thought in the context of i965, so I've got a few ideas about how you could overcome some of the issues. On Sun, May 21, 2017 at 3:48 AM, Nicolai Hähnle wro

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Ian Romanick
On 05/22/2017 12:02 PM, Marek Olšák wrote: > On Sun, May 21, 2017 at 12:48 PM, Nicolai Hähnle wrote: >> Hi all, >> >> I've been looking into ARB_gl_spirv for radeonsi. I don't fancy re-inventing >> the ~8k LOC of src/compiler/spirv, and there's already a perfectly fine >> SPIR-V -> NIR -> LLVM com

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-22 Thread Marek Olšák
On Sun, May 21, 2017 at 12:48 PM, Nicolai Hähnle wrote: > Hi all, > > I've been looking into ARB_gl_spirv for radeonsi. I don't fancy re-inventing > the ~8k LOC of src/compiler/spirv, and there's already a perfectly fine > SPIR-V -> NIR -> LLVM compiler pipeline in radv, so I looked into re-using

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-21 Thread Rob Clark
On Sun, May 21, 2017 at 11:17 AM, Timothy Arceri wrote: > > >> >> 3. NIR vs. TGSI >> --- >> It is *not* a goal for this project to use NIR for normal GLSL shaders. >> We'll keep the TGSI backend at least for now. But it makes sense to think >> ahead. >> >> A minor disadvantage of NIR

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-21 Thread Timothy Arceri
Questions = 1. How do we get good test coverage? A natural candidate would be to add a SPIR-V execution mode for the piglit shader_runner. That is, use build scripts to extract shaders from shader_test files and feed them through glslang to get s

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-21 Thread Timothy Arceri
3. NIR vs. TGSI --- It is *not* a goal for this project to use NIR for normal GLSL shaders. We'll keep the TGSI backend at least for now. But it makes sense to think ahead. A minor disadvantage of NIR is that the GLSL-to-NIR path is not as solid as the GLSL-to-TGSI path yet, b

Re: [Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-21 Thread Rob Clark
On Sun, May 21, 2017 at 6:48 AM, Nicolai Hähnle wrote: > Hi all, > > I've been looking into ARB_gl_spirv for radeonsi. I don't fancy re-inventing > the ~8k LOC of src/compiler/spirv, and there's already a perfectly fine > SPIR-V -> NIR -> LLVM compiler pipeline in radv, so I looked into re-using >

[Mesa-dev] [RFC] ARB_gl_spirv and NIR backend for radeonsi

2017-05-21 Thread Nicolai Hähnle
Hi all, I've been looking into ARB_gl_spirv for radeonsi. I don't fancy re-inventing the ~8k LOC of src/compiler/spirv, and there's already a perfectly fine SPIR-V -> NIR -> LLVM compiler pipeline in radv, so I looked into re-using that. It's not entirely straightforward because radeonsi and