From: Francisco Jerez Date: Wed, 11 Sep 2013 17:59:13 +0000 (-0700) Subject: mesa: Fix misplaced includes of "main/uniforms.h". X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e72db9f9729b8fe62213452751fed1cd337a7bc;p=mesa.git mesa: Fix misplaced includes of "main/uniforms.h". Several C++ source files include "main/uniforms.h" from an extern "C" block, which is both unnecessary, because "uniforms.h" already checks for a C++ compiler and sets the right linkage, and incorrect, because the header file includes other C++ headers ("glsl_types.h" and "ir_uniform.h") that are supposed to get C++ linkage. Reviewed-by: Paul Berry Reviewed-by: Chad Versace --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 2ebadc8aa06..bcb15ee0f92 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -35,7 +35,6 @@ extern "C" { #include "main/hash_table.h" #include "main/macros.h" #include "main/shaderobj.h" -#include "main/uniforms.h" #include "main/fbobject.h" #include "program/prog_parameter.h" #include "program/prog_print.h" @@ -47,6 +46,7 @@ extern "C" { #include "brw_wm.h" } #include "brw_fs.h" +#include "main/uniforms.h" #include "glsl/glsl_types.h" void diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 72c379a20c3..89d410219af 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -33,7 +33,6 @@ extern "C" { #include "main/macros.h" #include "main/shaderobj.h" -#include "main/uniforms.h" #include "program/prog_parameter.h" #include "program/prog_print.h" #include "program/prog_optimize.h" @@ -45,6 +44,7 @@ extern "C" { #include "brw_wm.h" } #include "brw_fs.h" +#include "main/uniforms.h" #include "glsl/glsl_types.h" #include "glsl/ir_optimization.h" diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 86317efcd51..01edd3ff8af 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -32,7 +32,6 @@ extern "C" { #include "imports.h" #include "mtypes.h" #include "main/context.h" -#include "main/uniforms.h" #include "main/macros.h" #include "main/samplerobj.h" #include "program/program.h" diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 8cd42dfd257..86607eea077 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -44,11 +44,11 @@ #include "main/mtypes.h" #include "main/shaderobj.h" +#include "main/uniforms.h" #include "program/hash_table.h" extern "C" { #include "main/shaderapi.h" -#include "main/uniforms.h" #include "program/prog_instruction.h" #include "program/prog_optimize.h" #include "program/prog_print.h" diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 53838b391d2..2bc6623c008 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -43,11 +43,11 @@ #include "main/mtypes.h" #include "main/shaderobj.h" +#include "main/uniforms.h" #include "program/hash_table.h" extern "C" { #include "main/shaderapi.h" -#include "main/uniforms.h" #include "program/prog_instruction.h" #include "program/prog_optimize.h" #include "program/prog_print.h"