Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-27 Thread Roland Scheidegger
Am 27.03.2018 um 20:40 schrieb Emil Velikov: > On 27 March 2018 at 00:08, Roland Scheidegger wrote: >> Am 27.03.2018 um 00:44 schrieb Rob Clark: >>> On Mon, Mar 26, 2018 at 6:38 PM, Rob Clark wrote: On Mon, Mar 26, 2018 at 6:07 PM, Roland Scheidegger wrote: > Am 26.03.2018 um 23:0

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-27 Thread Rob Clark
On Tue, Mar 27, 2018 at 2:40 PM, Emil Velikov wrote: > On 27 March 2018 at 00:08, Roland Scheidegger wrote: >> Am 27.03.2018 um 00:44 schrieb Rob Clark: >>> On Mon, Mar 26, 2018 at 6:38 PM, Rob Clark wrote: On Mon, Mar 26, 2018 at 6:07 PM, Roland Scheidegger wrote: > Am 26.03.201

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-27 Thread Emil Velikov
On 27 March 2018 at 00:08, Roland Scheidegger wrote: > Am 27.03.2018 um 00:44 schrieb Rob Clark: >> On Mon, Mar 26, 2018 at 6:38 PM, Rob Clark wrote: >>> On Mon, Mar 26, 2018 at 6:07 PM, Roland Scheidegger >>> wrote: Am 26.03.2018 um 23:01 schrieb Rob Clark: > correct me if I'm wrong,

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Roland Scheidegger
Am 27.03.2018 um 00:44 schrieb Rob Clark: > On Mon, Mar 26, 2018 at 6:38 PM, Rob Clark wrote: >> On Mon, Mar 26, 2018 at 6:07 PM, Roland Scheidegger >> wrote: >>> Am 26.03.2018 um 23:01 schrieb Rob Clark: correct me if I'm wrong, but I don't see how you could do the ## stuff to constru

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Rob Clark
On Mon, Mar 26, 2018 at 6:38 PM, Rob Clark wrote: > On Mon, Mar 26, 2018 at 6:07 PM, Roland Scheidegger > wrote: >> Am 26.03.2018 um 23:01 schrieb Rob Clark: >>> correct me if I'm wrong, but I don't see how you could do the ## stuff >>> to construct the built-in type name with templates. So I t

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Rob Clark
On Mon, Mar 26, 2018 at 6:07 PM, Roland Scheidegger wrote: > Am 26.03.2018 um 23:01 schrieb Rob Clark: >> correct me if I'm wrong, but I don't see how you could do the ## stuff >> to construct the built-in type name with templates. So I think the >> options are tons of copy/pasta code (ie. what w

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Ian Romanick
On 03/26/2018 02:01 PM, Rob Clark wrote: > correct me if I'm wrong, but I don't see how you could do the ## stuff > to construct the built-in type name with templates. So I think the > options are tons of copy/pasta code (ie. what we had before) or > macros. That is true... I don't know why my ey

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Roland Scheidegger
Am 26.03.2018 um 23:01 schrieb Rob Clark: > correct me if I'm wrong, but I don't see how you could do the ## stuff > to construct the built-in type name with templates. So I think the > options are tons of copy/pasta code (ie. what we had before) or > macros. > > I agree that could just construct

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Rob Clark
correct me if I'm wrong, but I don't see how you could do the ## stuff to construct the built-in type name with templates. So I think the options are tons of copy/pasta code (ie. what we had before) or macros. I agree that could just construct the whole method with the macro.. I like that better

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Ian Romanick
On 03/26/2018 01:33 PM, Ian Romanick wrote: > As much as I'm not a fan of C++ templates, I don't see how this > preprocessor macro reinvention of that mechanism is an improvement. At least if we're going to do this, can we put the whole body of the function in the macro, as is done elsewhere? > O

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Ian Romanick
As much as I'm not a fan of C++ templates, I don't see how this preprocessor macro reinvention of that mechanism is an improvement. On 03/26/2018 09:45 AM, Emil Velikov wrote: > From: Emil Velikov > > Update the macro to have the explic return. Using the current GCC > specific macro breaks other

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Matt Turner
On Mon, Mar 26, 2018 at 9:45 AM, Emil Velikov wrote: > From: Emil Velikov > > Update the macro to have the explic return. Using the current GCC > specific macro breaks other compilers such as the Intel one or MSVC. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105740 > Fixes: f407edf

[Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Emil Velikov
From: Emil Velikov Update the macro to have the explic return. Using the current GCC specific macro breaks other compilers such as the Intel one or MSVC. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105740 Fixes: f407edf3407396379e16b0be74b8d3b85d2ad7f0 Cc: Rob Clark Cc: Timothy Arcer