Re: [Mesa-dev] [PATCH] mesa/st: Include nir.h for nir_shader symbol.
On Tue, Jun 28, 2016 at 7:51 AM, Rob Clarkwrote: > Already half of the world gets recompiled when you touch nir.h, and > I'd rather not make that worse.. Exactly my thoughts. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa/st: Include nir.h for nir_shader symbol.
On Mon, Jun 27, 2016 at 10:08 PM, Matt Turnerwrote: > On Mon, Jun 27, 2016 at 6:45 PM, Vinson Lee wrote: >> Fix this build error with GCC 4.4. >> >> CC state_tracker/st_nir_lower_builtin.lo >> In file included from state_tracker/st_nir_lower_builtin.c:61: >> state_tracker/st_nir.h:34: error: redefinition of typedef ‘nir_shader’ >> ../../src/compiler/nir/nir.h:1830: note: previous declaration of >> ‘nir_shader’ was here > > This error seems to imply that nir.h is already being included somehow. > > Does just removing the typedef solve the problem? Can we figure out > how nir.h is already being included and remove that? nir.h is coming from st_nir_lower_builtin.c which #includes st_nir.h.. Perhaps the thing to do is drop the typedef, and just fwd declare 'struct nir_shader', and use 'struct nir_shader' instead of 'nir_shader' in st_nir.h Already half of the world gets recompiled when you touch nir.h, and I'd rather not make that worse.. BR, -R ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa/st: Include nir.h for nir_shader symbol.
On Mon, Jun 27, 2016 at 6:45 PM, Vinson Leewrote: > Fix this build error with GCC 4.4. > > CC state_tracker/st_nir_lower_builtin.lo > In file included from state_tracker/st_nir_lower_builtin.c:61: > state_tracker/st_nir.h:34: error: redefinition of typedef ‘nir_shader’ > ../../src/compiler/nir/nir.h:1830: note: previous declaration of ‘nir_shader’ > was here This error seems to imply that nir.h is already being included somehow. Does just removing the typedef solve the problem? Can we figure out how nir.h is already being included and remove that? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] mesa/st: Include nir.h for nir_shader symbol.
Fix this build error with GCC 4.4. CC state_tracker/st_nir_lower_builtin.lo In file included from state_tracker/st_nir_lower_builtin.c:61: state_tracker/st_nir.h:34: error: redefinition of typedef ‘nir_shader’ ../../src/compiler/nir/nir.h:1830: note: previous declaration of ‘nir_shader’ was here Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96235 Signed-off-by: Vinson Lee--- src/mesa/state_tracker/st_nir.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_nir.h b/src/mesa/state_tracker/st_nir.h index 49ba573..d3b4704 100644 --- a/src/mesa/state_tracker/st_nir.h +++ b/src/mesa/state_tracker/st_nir.h @@ -26,13 +26,12 @@ #include "st_context.h" #include "compiler/shader_enums.h" +#include "compiler/nir/nir.h" #ifdef __cplusplus extern "C" { #endif -typedef struct nir_shader nir_shader; - void st_nir_lower_builtin(nir_shader *shader); nir_shader * st_glsl_to_nir(struct st_context *st, struct gl_program *prog, struct gl_shader_program *shader_program, -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev