glsl_types: fix build break with intel/msvc compiler
authorRob Clark <robdclark@gmail.com>
Mon, 26 Mar 2018 22:45:07 +0000 (18:45 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 27 Mar 2018 12:17:11 +0000 (08:17 -0400)
commit1e0a06000bae17e1791f55127e7527946e9b6793
tree0d2c46ba0e38f64e7bffa4083a1f94cc6d4b79b5
parent41cf30b8bc55fdf36adac3311002dc32b6715949
glsl_types: fix build break with intel/msvc compiler

The VECN() macro was taking advantage of a GCC specific feature that is
not available on lesser compilers, mostly for the purposes of avoiding a
macro that encoded a return statement.

But as suggested by Ian, we could just have the macro produce the entire
method body and avoid the need for this.  So let's do that instead.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105740
Fixes: f407edf3407396379e16b0be74b8d3b85d2ad7f0
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Timothy Arceri <tarceri@itsqueeze.com>
Cc: Roland Scheidegger <sroland@vmware.com>
Cc: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl_types.cpp