Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-21 Thread Rob Clark
On Mon, Dec 21, 2015 at 10:51 AM, Jose Fonseca wrote: > On 19/12/15 22:39, Rob Clark wrote: >> >> From: Rob Clark >> >> We are going to start using nir_builder.h from some gallium code, which >> is currently only C90. > > > Which parts of gallium are you referring to? gallium/auxiliary/nir Alth

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-21 Thread Jose Fonseca
On 19/12/15 22:39, Rob Clark wrote: From: Rob Clark We are going to start using nir_builder.h from some gallium code, which is currently only C90. Which parts of gallium are you referring to? > Which results in: In file included from nir/nir_emulate.c:26:0: ../../../src/glsl/nir/ni

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-21 Thread Rob Clark
On Sun, Dec 20, 2015 at 10:51 PM, Connor Abbott wrote: > On Sun, Dec 20, 2015 at 10:43 AM, Rob Clark wrote: >> On Sun, Dec 20, 2015 at 12:25 AM, Connor Abbott wrote: But, this would still be an issue for tgsi_to_nir, which I guess wouldn't make sense in glsl/nir. Although turns out we

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-20 Thread Connor Abbott
On Sun, Dec 20, 2015 at 10:43 AM, Rob Clark wrote: > On Sun, Dec 20, 2015 at 12:25 AM, Connor Abbott wrote: >>> But, this would still be an issue for tgsi_to_nir, which I guess >>> wouldn't make sense in glsl/nir. Although turns out we solve that >>> today by: >>> >>> #ifdef __GNUC__ >>> #pr

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-20 Thread Rob Clark
On Sun, Dec 20, 2015 at 12:25 AM, Connor Abbott wrote: >> But, this would still be an issue for tgsi_to_nir, which I guess >> wouldn't make sense in glsl/nir. Although turns out we solve that >> today by: >> >> #ifdef __GNUC__ >> #pragma GCC diagnostic ignored "-Wdeclaration-after-statement"

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Connor Abbott
On Sun, Dec 20, 2015 at 12:02 AM, Rob Clark wrote: > On Sat, Dec 19, 2015 at 11:46 PM, Connor Abbott wrote: >> On Sat, Dec 19, 2015 at 11:08 PM, Rob Clark wrote: >>> On Sat, Dec 19, 2015 at 10:30 PM, Connor Abbott wrote: On Sat, Dec 19, 2015 at 10:19 PM, Rob Clark wrote: > On Sat, Dec

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Rob Clark
On Sat, Dec 19, 2015 at 11:46 PM, Connor Abbott wrote: > On Sat, Dec 19, 2015 at 11:08 PM, Rob Clark wrote: >> On Sat, Dec 19, 2015 at 10:30 PM, Connor Abbott wrote: >>> On Sat, Dec 19, 2015 at 10:19 PM, Rob Clark wrote: On Sat, Dec 19, 2015 at 10:05 PM, Connor Abbott wrote: > O

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Connor Abbott
On Sat, Dec 19, 2015 at 11:08 PM, Rob Clark wrote: > On Sat, Dec 19, 2015 at 10:30 PM, Connor Abbott wrote: >> On Sat, Dec 19, 2015 at 10:19 PM, Rob Clark wrote: >>> On Sat, Dec 19, 2015 at 10:05 PM, Connor Abbott wrote: On Sat, Dec 19, 2015 at 9:52 PM, Rob Clark wrote: > On Sat, Dec

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Rob Clark
On Sat, Dec 19, 2015 at 10:30 PM, Connor Abbott wrote: > On Sat, Dec 19, 2015 at 10:19 PM, Rob Clark wrote: >> On Sat, Dec 19, 2015 at 10:05 PM, Connor Abbott wrote: >>> On Sat, Dec 19, 2015 at 9:52 PM, Rob Clark wrote: On Sat, Dec 19, 2015 at 9:30 PM, Connor Abbott wrote: > On Sat, D

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Connor Abbott
On Sat, Dec 19, 2015 at 10:19 PM, Rob Clark wrote: > On Sat, Dec 19, 2015 at 10:05 PM, Connor Abbott wrote: >> On Sat, Dec 19, 2015 at 9:52 PM, Rob Clark wrote: >>> On Sat, Dec 19, 2015 at 9:30 PM, Connor Abbott wrote: On Sat, Dec 19, 2015 at 9:18 PM, Rob Clark wrote: > Note that this

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Rob Clark
On Sat, Dec 19, 2015 at 10:05 PM, Connor Abbott wrote: > On Sat, Dec 19, 2015 at 9:52 PM, Rob Clark wrote: >> On Sat, Dec 19, 2015 at 9:30 PM, Connor Abbott wrote: >>> On Sat, Dec 19, 2015 at 9:18 PM, Rob Clark wrote: Note that this is *only* about the header files.. not the src files. >>>

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Connor Abbott
On Sat, Dec 19, 2015 at 9:52 PM, Rob Clark wrote: > On Sat, Dec 19, 2015 at 9:30 PM, Connor Abbott wrote: >> On Sat, Dec 19, 2015 at 9:18 PM, Rob Clark wrote: >>> Note that this is *only* about the header files.. not the src files. >>> I'm not proposing to make NIR support C90. >> >> Why would y

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Rob Clark
On Sat, Dec 19, 2015 at 9:30 PM, Connor Abbott wrote: > On Sat, Dec 19, 2015 at 9:18 PM, Rob Clark wrote: >> Note that this is *only* about the header files.. not the src files. >> I'm not proposing to make NIR support C90. > > Why would you need to only make the header filef C90 compliant? If yo

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Connor Abbott
On Sat, Dec 19, 2015 at 9:18 PM, Rob Clark wrote: > Note that this is *only* about the header files.. not the src files. > I'm not proposing to make NIR support C90. Why would you need to only make the header filef C90 compliant? If you just need to pass around a nir_shader * or something, you ca

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Rob Clark
Note that this is *only* about the header files.. not the src files. I'm not proposing to make NIR support C90. I will at some point, before it is ready to merge, need to arrange the NIR related bits in mesa st so that we can build without it, for benefit of the MSVC folks. (It might be useful so

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Connor Abbott
We haven't allowed NIR in core gallium before, since core gallium has to be built with some old version of MSVC that doesn't support many C99 features that we really wanted to use. The only reason that -Werror exists is for compatibility with old MSVC, and if you want to use NIR with something that

Re: [Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread eocallaghan
On 2015-12-20 09:39, Rob Clark wrote: From: Rob Clark We are going to start using nir_builder.h from some gallium code, which is currently only C90. Which results in: In file included from nir/nir_emulate.c:26:0: ../../../src/glsl/nir/nir_builder.h: In function ‘nir_build_alu’: ../..

[Mesa-dev] [PATCH] nir/builder: fix C90 build errors

2015-12-19 Thread Rob Clark
From: Rob Clark We are going to start using nir_builder.h from some gallium code, which is currently only C90. Which results in: In file included from nir/nir_emulate.c:26:0: ../../../src/glsl/nir/nir_builder.h: In function ‘nir_build_alu’: ../../../src/glsl/nir/nir_builder.h:132:4: er