Bug 92052 - nir/nir_builder.h:79: error: expected primary-expression before ‘.’ token
Summary: nir/nir_builder.h:79: error: expected primary-expression before ‘.’ token
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2015-09-20 07:36 UTC by Vinson Lee
Modified: 2015-09-22 06:07 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2015-09-20 07:36:27 UTC
mesa: 99b1f4751f97631011b64fabcb57acf6beae01ac (master 11.1.0-devel)

  CXX    nir/nir_lower_samplers.lo
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: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
nir/nir_builder.h: In function ‘nir_ssa_def* nir_imm_vec4(nir_builder*, float, float, float, float)’:
nir/nir_builder.h:86: error: expected primary-expression before ‘.’ token
nir/nir_builder.h:86: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
nir/nir_builder.h: In function ‘nir_ssa_def* nir_imm_int(nir_builder*, int)’:
nir/nir_builder.h:93: error: expected primary-expression before ‘.’ token
nir/nir_builder.h:93: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
Comment 1 Vinson Lee 2015-09-20 07:49:01 UTC
ef8eebc6ad5d86e524426f0755c0f7d0b4c0cd3e is the first bad commit
commit ef8eebc6ad5d86e524426f0755c0f7d0b4c0cd3e
Author: Timothy Arceri <t_arceri@yahoo.com.au>
Date:   Wed Aug 26 22:18:36 2015 +1000

    nir: support indirect indexing samplers in struct arrays
    
    As a bonus we get indirect support for arrays of arrays for free.
    
    V5: couple of small clean-ups suggested by Jason.
    
    V4: fix struct member location caclulation, use nir_ssa_def rather than
    nir_src for the indirect as suggested by Jason
    
    V3: Use nir_instr_rewrite_src() with empty src rather then clearing
    the use_link list directly for the old indirects as suggested by Jason
    
    V2: Fixed validation error in debug build
    
    Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>

:040000 040000 083959ec82e909e081f9b469eaba4b52c5f18b92 fe8a25cf7cff07ec5d39df88bcf7f472a5e8d2a0 M	src
bisect run success
Comment 2 Jason Ekstrand 2015-09-21 15:27:53 UTC
What GCC version are you using?  Mesa still builds fine on my system with GCC 5.1.1 so maybe GCC 5 allows designated initializers in C++?  In any case, I've sent a patch that should fix the errors listed:

http://patchwork.freedesktop.org/patch/60023/

Let me know if it still won't build.
Comment 3 Vinson Lee 2015-09-22 06:07:53 UTC
commit 46362db4a6bb6db64727d3adcb16ca8f32aa70fb
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Mon Sep 21 08:22:12 2015 -0700

    nir/builder: Don't use designated initializers
    
    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
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>


bug/show.html.tmpl processed on Mar 25, 2017 at 07:49:46.
(provided by the Example extension).