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

Emil Velikov emil.l.velikov at gmail.com
Mon Sep 21 09:09:02 PDT 2015


On 19 September 2015 at 14:53, Jason Ekstrand <jason at jlekstrand.net> wrote:
> 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.
As mentioned previously, there is already a fix for that. I'll leave
the decision up-to you whether to pick it or not :)
http://lists.freedesktop.org/archives/mesa-dev/2015-September/094706.html

>  If anything, I'd rather leave it
> as a .cpp for now for the express purpose of checking nir_builder.
If we really want a test shouldn't we wire up a simple one tp make check ?
Something like an empty .cpp file that includes all(?) the nir
headers, unlike nir_lower_samplers.cpp which only has a few.

Cheers,
Emil


More information about the mesa-dev mailing list