[Mesa-dev] [PATCH 3/3] nir: rename nir_lower_samplers.c{pp,}

Jason Ekstrand jason at jlekstrand.net
Sat Sep 19 06:53:05 PDT 2015


On Sat, Sep 19, 2015 at 1:28 AM, Jonathan Gray <jsg at jsg.id.au> wrote:
> On Fri, Sep 18, 2015 at 10:52:35AM -0700, Jason Ekstrand wrote:
>> On Sep 18, 2015 12:40 PM, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:
>> >
>> > Thanks for the review/testing guys.
>> >
>> > Just noticed that some typos/strange wording
>> >
>> > On 17 September 2015 at 16:25, Emil Velikov <emil.l.velikov at gmail.com>
>> wrote:
>> > > With the only C++ function having it's own wrapper we can 'demote' this
>> > s/it's/its/
>> >
>> > > file to a normal C one. This allows us to get rid of extern C {
>> > > support C99 designated initializers in CPP code.
>> > >
>> > This allows us to get rid of extern C { #include <foo.h> } 'hacks'.
>> > Plus some of the headers may use C99 initializers, which are not
>> > supported by the ISO standard.
>>
>> What headers are those?  All NIR headers should be C++ safe.
>
> As mentioned in another thread already, nir_builder.h
>
> In file included from nir/nir_lower_samplers.cpp:27:
> nir/nir_builder.h: In function 'nir_ssa_def* nir_imm_float(nir_builder*, float)':
> nir/nir_builder.h:79: error: expected primary-expression before '.' token
> nir/nir_builder.h:79: error: expected primary-expression before '{' token
> nir/nir_builder.h:79: error: expected `}' before '{' token
> nir/nir_builder.h:79: error: expected `}' before '{' token
> nir/nir_builder.h:79: warning: missing braces around initializer for 'float [4]'
> nir/nir_builder.h:79: error: expected ',' or ';' before '{' token
> nir/nir_builder.h:79: warning: unused variable 'v'
> nir/nir_builder.h:79: warning: no return statement in function returning non-void
> nir/nir_builder.h: At global scope:
> nir/nir_builder.h:79: error: expected declaration before '}' token
> Makefile:1447: recipe for target 'nir/nir_lower_samplers.lo' failed

Thanks.  We need to fix nir_builder.  If anything, I'd rather leave it
as a .cpp for now for the express purpose of checking nir_builder.
Eventually, we'll move glsl_to_nir over to nir_builder and that'll use
C++ as well.
--jason


More information about the mesa-dev mailing list