[Mesa-dev] [PATCH] nir/builder: Don't use designated initializers

Kenneth Graunke kenneth at whitecape.org
Mon Sep 21 10:35:38 PDT 2015


On Monday, September 21, 2015 09:24:17 AM Jason Ekstrand wrote:
> On Mon, Sep 21, 2015 at 9:22 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> > On Monday, September 21, 2015 08:26:04 AM Jason Ekstrand wrote:
> >> Designated initializers are not allowed in C++ (not even C++11).  Since
> >> nir_lower_samplers is now using nir_builder, and nir_lower_samplers is in
> >> C++, this breaks the build on some compilers.  Aparently, GCC 5 allows it
> >> in some limited extent because mesa still builds on my system without this
> >> patch.
> >>
> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92052
> >> ---
> >>  src/glsl/nir/nir_builder.h | 21 ++++++++++++++++++---
> >>  1 file changed, 18 insertions(+), 3 deletions(-)
> >
> > I'd rather just take Emil's patch to convert nir_lower_samplers out of
> > C++, honestly.  NIR is in C99, let's keep it that way.
> 
> But I want to be able to start using the builder in glsl_to_nir...
> --Jason

Ah, right...that makes more sense.  I'm still not sure whether it makes
sense to have all of this in inline functions in a .h file - if it were
in a .c file we wouldn't need to worry about this.

But this is fairly harmless, so for now,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150921/6c53b188/attachment.sig>


More information about the mesa-dev mailing list