Re: [Mesa-dev] [PATCH 00/18] Good bye pragma once

2017-03-22 Thread Emil Velikov
On 22 March 2017 at 11:02, Juha-Pekka Heikkila
 wrote:
> On 20.03.2017 18:12, Emil Velikov wrote:
>>
>> Hi all,
>>
>> We have a strange mix of pragma once vs ifndef guards in-tree.
>>
>> Since the former is less common, and concluded as the 'wrong' way,
>> I've went ahead and purged them. As a since side effect I also fixed
>> all the headers in the respective folders which did not have either
>> guard.
>>
>> With this in mind, we have one instance remaining in i965 (props to a
>> python generator), and SWR driver is left untouched.
>>
>> The whole thing build fine on Linux (autotools, scons native and scons
>> cross compile with mingw) and Windows (via Appveyor).
>>
>> I don't expect any real reviews here but an Ack or two will be
>> appreciated.
>>
>
> I read them through and all look good, they also compile all ok on my box.
> Acked-by: Juha-Pekka Heikkila 
>
Perfect ! Thank you Juha-Pekka/others for taking a look !

> I noticed "util/strndup.h" is included only into linker.cpp and
> shader_query.cpp of which I didn't spot strndup being used anywhere in
> shader_query.cpp.
>
There should be patch for that in your inbox ;-)

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/18] Good bye pragma once

2017-03-22 Thread Edward O'Callaghan
Reviewed-by: Edward O'Callaghan 

Thanks for getting rid of them Emil.

On 03/21/2017 03:12 AM, Emil Velikov wrote:
> Hi all,
> 
> We have a strange mix of pragma once vs ifndef guards in-tree.
> 
> Since the former is less common, and concluded as the 'wrong' way,
> I've went ahead and purged them. As a since side effect I also fixed
> all the headers in the respective folders which did not have either
> guard.
> 
> With this in mind, we have one instance remaining in i965 (props to a
> python generator), and SWR driver is left untouched.
> 
> The whole thing build fine on Linux (autotools, scons native and scons
> cross compile with mingw) and Windows (via Appveyor).
> 
> I don't expect any real reviews here but an Ack or two will be
> appreciated.
> 
> Thanks
> Emil
> 
> Emil Velikov (18):
>   i965: make brw_setup_image_uniform_values static
>   ac: consistently use ifndef guards over pragma once
>   radv: consistently use ifndef guards over pragma once
>   compiler: consistently use ifndef guards over pragma once
>   glsl: consistently use ifndef guards over pragma once
>   nir: consistently use ifndef guards over pragma once
>   spirv: consistently use ifndef guards over pragma once
>   egl/dri2: consistently use ifndef guards over pragma once
>   st/wgl: consistently use ifndef guards over pragma once
>   i965: consistently use ifndef guards over pragma once
>   intel/common: consistently use ifndef guards over pragma once
>   intel/compiler: consistently use ifndef guards over pragma once
>   mesa/main: consistently use ifndef guards over pragma once
>   mesa/program: consistently use ifndef guards over pragma once
>   util: consistently use ifndef guards over pragma once
>   util: inline strndup implementation in the header
>   util/strndup: move header inclusion as applicable
>   util: automake: beautify sources list
> 
>  src/amd/common/ac_binary.h |  5 ++-
>  src/amd/common/ac_llvm_util.h  |  6 ++-
>  src/amd/common/ac_nir_to_llvm.h|  4 +-
>  src/amd/vulkan/vk_format.h |  5 ++-
>  src/compiler/glsl/ast.h|  1 -
>  src/compiler/glsl/blob.h   |  1 -
>  src/compiler/glsl/glsl_parser_extras.h |  1 -
>  src/compiler/glsl/glsl_symbol_table.h  |  1 -
>  src/compiler/glsl/glsl_to_nir.h|  5 +++
>  src/compiler/glsl/ir.h |  1 -
>  src/compiler/glsl/ir_array_refcount.h  |  5 +++
>  src/compiler/glsl/ir_basic_block.h |  5 +++
>  src/compiler/glsl/ir_builder_print_visitor.h   |  1 -
>  src/compiler/glsl/ir_expression_flattening.h   |  5 +++
>  src/compiler/glsl/ir_function_inlining.h   |  5 +++
>  src/compiler/glsl/ir_hierarchical_visitor.h|  1 -
>  src/compiler/glsl/ir_optimization.h|  6 ++-
>  src/compiler/glsl/ir_print_visitor.h   |  1 -
>  src/compiler/glsl/ir_reader.h  |  1 -
>  src/compiler/glsl/ir_rvalue_visitor.h  |  5 +++
>  src/compiler/glsl/ir_uniform.h |  1 -
>  src/compiler/glsl/ir_variable_refcount.h   |  5 +++
>  src/compiler/glsl/ir_visitor.h |  1 -
>  .../glsl/link_uniform_block_active_visitor.h   |  1 -
>  src/compiler/glsl/link_varyings.h  |  1 -
>  src/compiler/glsl/linker.h |  1 -
>  src/compiler/glsl/list.h   |  1 -
>  src/compiler/glsl/loop_analysis.h  |  1 -
>  src/compiler/glsl/lower_buffer_access.h|  1 -
>  src/compiler/glsl/program.h|  4 ++
>  src/compiler/glsl/s_expression.h   |  1 -
>  src/compiler/glsl/shader_cache.h   |  1 -
>  src/compiler/glsl/standalone_scaffolding.h |  1 -
>  src/compiler/glsl/test_optpass.h   |  1 -
>  .../glsl/tests/uniform_initializer_utils.h |  5 ++-
>  src/compiler/glsl_types.h  |  1 -
>  src/compiler/nir/nir.h |  5 ++-
>  src/compiler/nir/nir_array.h   |  5 ++-
>  src/compiler/nir/nir_constant_expressions.h|  5 +++
>  src/compiler/nir/nir_control_flow.h|  7 +++-
>  src/compiler/nir/nir_control_flow_private.h|  6 ++-
>  src/compiler/nir/nir_instr_set.h   |  4 +-
>  src/compiler/nir/nir_loop_analyze.h|  5 ++-
>  src/compiler/nir/nir_phi_builder.h |  5 ++-
>  src/compiler/nir/nir_vla.h |  6 ++-
>  src/compiler/nir/nir_worklist.h|  1 -
>  src/compiler/nir_types.h   |  5 ++-
>  src/compiler/spirv/nir_spirv.h |  2 -
>  src/compiler/spirv/spirv_info.h|  5 +++
>  src/compiler/spirv/vtn_private.h   |  5 +++
>  

Re: [Mesa-dev] [PATCH 00/18] Good bye pragma once

2017-03-22 Thread Juha-Pekka Heikkila

On 20.03.2017 18:12, Emil Velikov wrote:

Hi all,

We have a strange mix of pragma once vs ifndef guards in-tree.

Since the former is less common, and concluded as the 'wrong' way,
I've went ahead and purged them. As a since side effect I also fixed
all the headers in the respective folders which did not have either
guard.

With this in mind, we have one instance remaining in i965 (props to a
python generator), and SWR driver is left untouched.

The whole thing build fine on Linux (autotools, scons native and scons
cross compile with mingw) and Windows (via Appveyor).

I don't expect any real reviews here but an Ack or two will be
appreciated.



I read them through and all look good, they also compile all ok on my box.
Acked-by: Juha-Pekka Heikkila 

I noticed "util/strndup.h" is included only into linker.cpp and 
shader_query.cpp of which I didn't spot strndup being used anywhere in 
shader_query.cpp.


/Juha-Pekka
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/18] Good bye pragma once

2017-03-21 Thread Vedran Miletić
On 03/20/2017 05:12 PM, Emil Velikov wrote:
> Hi all,
> 
> We have a strange mix of pragma once vs ifndef guards in-tree.
> 
> Since the former is less common, and concluded as the 'wrong' way,
> I've went ahead and purged them. As a since side effect I also fixed
> all the headers in the respective folders which did not have either
> guard.
> 
> With this in mind, we have one instance remaining in i965 (props to a
> python generator), and SWR driver is left untouched.
> 
> The whole thing build fine on Linux (autotools, scons native and scons
> cross compile with mingw) and Windows (via Appveyor).
> 
> I don't expect any real reviews here but an Ack or two will be
> appreciated.
> 
> Thanks
> Emil
> 
> Emil Velikov (18):
>   i965: make brw_setup_image_uniform_values static
>   ac: consistently use ifndef guards over pragma once
>   radv: consistently use ifndef guards over pragma once
>   compiler: consistently use ifndef guards over pragma once
>   glsl: consistently use ifndef guards over pragma once
>   nir: consistently use ifndef guards over pragma once
>   spirv: consistently use ifndef guards over pragma once
>   egl/dri2: consistently use ifndef guards over pragma once
>   st/wgl: consistently use ifndef guards over pragma once
>   i965: consistently use ifndef guards over pragma once
>   intel/common: consistently use ifndef guards over pragma once
>   intel/compiler: consistently use ifndef guards over pragma once
>   mesa/main: consistently use ifndef guards over pragma once
>   mesa/program: consistently use ifndef guards over pragma once
>   util: consistently use ifndef guards over pragma once
>   util: inline strndup implementation in the header
>   util/strndup: move header inclusion as applicable
>   util: automake: beautify sources list
> 
>  src/amd/common/ac_binary.h |  5 ++-
>  src/amd/common/ac_llvm_util.h  |  6 ++-
>  src/amd/common/ac_nir_to_llvm.h|  4 +-
>  src/amd/vulkan/vk_format.h |  5 ++-
>  src/compiler/glsl/ast.h|  1 -
>  src/compiler/glsl/blob.h   |  1 -
>  src/compiler/glsl/glsl_parser_extras.h |  1 -
>  src/compiler/glsl/glsl_symbol_table.h  |  1 -
>  src/compiler/glsl/glsl_to_nir.h|  5 +++
>  src/compiler/glsl/ir.h |  1 -
>  src/compiler/glsl/ir_array_refcount.h  |  5 +++
>  src/compiler/glsl/ir_basic_block.h |  5 +++
>  src/compiler/glsl/ir_builder_print_visitor.h   |  1 -
>  src/compiler/glsl/ir_expression_flattening.h   |  5 +++
>  src/compiler/glsl/ir_function_inlining.h   |  5 +++
>  src/compiler/glsl/ir_hierarchical_visitor.h|  1 -
>  src/compiler/glsl/ir_optimization.h|  6 ++-
>  src/compiler/glsl/ir_print_visitor.h   |  1 -
>  src/compiler/glsl/ir_reader.h  |  1 -
>  src/compiler/glsl/ir_rvalue_visitor.h  |  5 +++
>  src/compiler/glsl/ir_uniform.h |  1 -
>  src/compiler/glsl/ir_variable_refcount.h   |  5 +++
>  src/compiler/glsl/ir_visitor.h |  1 -
>  .../glsl/link_uniform_block_active_visitor.h   |  1 -
>  src/compiler/glsl/link_varyings.h  |  1 -
>  src/compiler/glsl/linker.h |  1 -
>  src/compiler/glsl/list.h   |  1 -
>  src/compiler/glsl/loop_analysis.h  |  1 -
>  src/compiler/glsl/lower_buffer_access.h|  1 -
>  src/compiler/glsl/program.h|  4 ++
>  src/compiler/glsl/s_expression.h   |  1 -
>  src/compiler/glsl/shader_cache.h   |  1 -
>  src/compiler/glsl/standalone_scaffolding.h |  1 -
>  src/compiler/glsl/test_optpass.h   |  1 -
>  .../glsl/tests/uniform_initializer_utils.h |  5 ++-
>  src/compiler/glsl_types.h  |  1 -
>  src/compiler/nir/nir.h |  5 ++-
>  src/compiler/nir/nir_array.h   |  5 ++-
>  src/compiler/nir/nir_constant_expressions.h|  5 +++
>  src/compiler/nir/nir_control_flow.h|  7 +++-
>  src/compiler/nir/nir_control_flow_private.h|  6 ++-
>  src/compiler/nir/nir_instr_set.h   |  4 +-
>  src/compiler/nir/nir_loop_analyze.h|  5 ++-
>  src/compiler/nir/nir_phi_builder.h |  5 ++-
>  src/compiler/nir/nir_vla.h |  6 ++-
>  src/compiler/nir/nir_worklist.h|  1 -
>  src/compiler/nir_types.h   |  5 ++-
>  src/compiler/spirv/nir_spirv.h |  2 -
>  src/compiler/spirv/spirv_info.h|  5 +++
>  src/compiler/spirv/vtn_private.h   |  5 +++
>  src/egl/drivers/dri2/egl_dri2_fallbacks.h  |  5 ++-
>  

Re: [Mesa-dev] [PATCH 00/18] Good bye pragma once

2017-03-20 Thread Lionel Landwerlin

Patches 1, 10, 11 & 12 look good to me :

Acked-by: Lionel Landwerlin 

On 20/03/17 16:12, Emil Velikov wrote:

Hi all,

We have a strange mix of pragma once vs ifndef guards in-tree.

Since the former is less common, and concluded as the 'wrong' way,
I've went ahead and purged them. As a since side effect I also fixed
all the headers in the respective folders which did not have either
guard.

With this in mind, we have one instance remaining in i965 (props to a
python generator), and SWR driver is left untouched.

The whole thing build fine on Linux (autotools, scons native and scons
cross compile with mingw) and Windows (via Appveyor).

I don't expect any real reviews here but an Ack or two will be
appreciated.

Thanks
Emil

Emil Velikov (18):
   i965: make brw_setup_image_uniform_values static
   ac: consistently use ifndef guards over pragma once
   radv: consistently use ifndef guards over pragma once
   compiler: consistently use ifndef guards over pragma once
   glsl: consistently use ifndef guards over pragma once
   nir: consistently use ifndef guards over pragma once
   spirv: consistently use ifndef guards over pragma once
   egl/dri2: consistently use ifndef guards over pragma once
   st/wgl: consistently use ifndef guards over pragma once
   i965: consistently use ifndef guards over pragma once
   intel/common: consistently use ifndef guards over pragma once
   intel/compiler: consistently use ifndef guards over pragma once
   mesa/main: consistently use ifndef guards over pragma once
   mesa/program: consistently use ifndef guards over pragma once
   util: consistently use ifndef guards over pragma once
   util: inline strndup implementation in the header
   util/strndup: move header inclusion as applicable
   util: automake: beautify sources list

  src/amd/common/ac_binary.h |  5 ++-
  src/amd/common/ac_llvm_util.h  |  6 ++-
  src/amd/common/ac_nir_to_llvm.h|  4 +-
  src/amd/vulkan/vk_format.h |  5 ++-
  src/compiler/glsl/ast.h|  1 -
  src/compiler/glsl/blob.h   |  1 -
  src/compiler/glsl/glsl_parser_extras.h |  1 -
  src/compiler/glsl/glsl_symbol_table.h  |  1 -
  src/compiler/glsl/glsl_to_nir.h|  5 +++
  src/compiler/glsl/ir.h |  1 -
  src/compiler/glsl/ir_array_refcount.h  |  5 +++
  src/compiler/glsl/ir_basic_block.h |  5 +++
  src/compiler/glsl/ir_builder_print_visitor.h   |  1 -
  src/compiler/glsl/ir_expression_flattening.h   |  5 +++
  src/compiler/glsl/ir_function_inlining.h   |  5 +++
  src/compiler/glsl/ir_hierarchical_visitor.h|  1 -
  src/compiler/glsl/ir_optimization.h|  6 ++-
  src/compiler/glsl/ir_print_visitor.h   |  1 -
  src/compiler/glsl/ir_reader.h  |  1 -
  src/compiler/glsl/ir_rvalue_visitor.h  |  5 +++
  src/compiler/glsl/ir_uniform.h |  1 -
  src/compiler/glsl/ir_variable_refcount.h   |  5 +++
  src/compiler/glsl/ir_visitor.h |  1 -
  .../glsl/link_uniform_block_active_visitor.h   |  1 -
  src/compiler/glsl/link_varyings.h  |  1 -
  src/compiler/glsl/linker.h |  1 -
  src/compiler/glsl/list.h   |  1 -
  src/compiler/glsl/loop_analysis.h  |  1 -
  src/compiler/glsl/lower_buffer_access.h|  1 -
  src/compiler/glsl/program.h|  4 ++
  src/compiler/glsl/s_expression.h   |  1 -
  src/compiler/glsl/shader_cache.h   |  1 -
  src/compiler/glsl/standalone_scaffolding.h |  1 -
  src/compiler/glsl/test_optpass.h   |  1 -
  .../glsl/tests/uniform_initializer_utils.h |  5 ++-
  src/compiler/glsl_types.h  |  1 -
  src/compiler/nir/nir.h |  5 ++-
  src/compiler/nir/nir_array.h   |  5 ++-
  src/compiler/nir/nir_constant_expressions.h|  5 +++
  src/compiler/nir/nir_control_flow.h|  7 +++-
  src/compiler/nir/nir_control_flow_private.h|  6 ++-
  src/compiler/nir/nir_instr_set.h   |  4 +-
  src/compiler/nir/nir_loop_analyze.h|  5 ++-
  src/compiler/nir/nir_phi_builder.h |  5 ++-
  src/compiler/nir/nir_vla.h |  6 ++-
  src/compiler/nir/nir_worklist.h|  1 -
  src/compiler/nir_types.h   |  5 ++-
  src/compiler/spirv/nir_spirv.h |  2 -
  src/compiler/spirv/spirv_info.h|  5 +++
  src/compiler/spirv/vtn_private.h   |  5 +++
  src/egl/drivers/dri2/egl_dri2_fallbacks.h  |  5 ++-
  src/gallium/state_trackers/wgl/stw_ext_context.h   |  4 +-
 

[Mesa-dev] [PATCH 00/18] Good bye pragma once

2017-03-20 Thread Emil Velikov
Hi all,

We have a strange mix of pragma once vs ifndef guards in-tree.

Since the former is less common, and concluded as the 'wrong' way,
I've went ahead and purged them. As a since side effect I also fixed
all the headers in the respective folders which did not have either
guard.

With this in mind, we have one instance remaining in i965 (props to a
python generator), and SWR driver is left untouched.

The whole thing build fine on Linux (autotools, scons native and scons
cross compile with mingw) and Windows (via Appveyor).

I don't expect any real reviews here but an Ack or two will be
appreciated.

Thanks
Emil

Emil Velikov (18):
  i965: make brw_setup_image_uniform_values static
  ac: consistently use ifndef guards over pragma once
  radv: consistently use ifndef guards over pragma once
  compiler: consistently use ifndef guards over pragma once
  glsl: consistently use ifndef guards over pragma once
  nir: consistently use ifndef guards over pragma once
  spirv: consistently use ifndef guards over pragma once
  egl/dri2: consistently use ifndef guards over pragma once
  st/wgl: consistently use ifndef guards over pragma once
  i965: consistently use ifndef guards over pragma once
  intel/common: consistently use ifndef guards over pragma once
  intel/compiler: consistently use ifndef guards over pragma once
  mesa/main: consistently use ifndef guards over pragma once
  mesa/program: consistently use ifndef guards over pragma once
  util: consistently use ifndef guards over pragma once
  util: inline strndup implementation in the header
  util/strndup: move header inclusion as applicable
  util: automake: beautify sources list

 src/amd/common/ac_binary.h |  5 ++-
 src/amd/common/ac_llvm_util.h  |  6 ++-
 src/amd/common/ac_nir_to_llvm.h|  4 +-
 src/amd/vulkan/vk_format.h |  5 ++-
 src/compiler/glsl/ast.h|  1 -
 src/compiler/glsl/blob.h   |  1 -
 src/compiler/glsl/glsl_parser_extras.h |  1 -
 src/compiler/glsl/glsl_symbol_table.h  |  1 -
 src/compiler/glsl/glsl_to_nir.h|  5 +++
 src/compiler/glsl/ir.h |  1 -
 src/compiler/glsl/ir_array_refcount.h  |  5 +++
 src/compiler/glsl/ir_basic_block.h |  5 +++
 src/compiler/glsl/ir_builder_print_visitor.h   |  1 -
 src/compiler/glsl/ir_expression_flattening.h   |  5 +++
 src/compiler/glsl/ir_function_inlining.h   |  5 +++
 src/compiler/glsl/ir_hierarchical_visitor.h|  1 -
 src/compiler/glsl/ir_optimization.h|  6 ++-
 src/compiler/glsl/ir_print_visitor.h   |  1 -
 src/compiler/glsl/ir_reader.h  |  1 -
 src/compiler/glsl/ir_rvalue_visitor.h  |  5 +++
 src/compiler/glsl/ir_uniform.h |  1 -
 src/compiler/glsl/ir_variable_refcount.h   |  5 +++
 src/compiler/glsl/ir_visitor.h |  1 -
 .../glsl/link_uniform_block_active_visitor.h   |  1 -
 src/compiler/glsl/link_varyings.h  |  1 -
 src/compiler/glsl/linker.h |  1 -
 src/compiler/glsl/list.h   |  1 -
 src/compiler/glsl/loop_analysis.h  |  1 -
 src/compiler/glsl/lower_buffer_access.h|  1 -
 src/compiler/glsl/program.h|  4 ++
 src/compiler/glsl/s_expression.h   |  1 -
 src/compiler/glsl/shader_cache.h   |  1 -
 src/compiler/glsl/standalone_scaffolding.h |  1 -
 src/compiler/glsl/test_optpass.h   |  1 -
 .../glsl/tests/uniform_initializer_utils.h |  5 ++-
 src/compiler/glsl_types.h  |  1 -
 src/compiler/nir/nir.h |  5 ++-
 src/compiler/nir/nir_array.h   |  5 ++-
 src/compiler/nir/nir_constant_expressions.h|  5 +++
 src/compiler/nir/nir_control_flow.h|  7 +++-
 src/compiler/nir/nir_control_flow_private.h|  6 ++-
 src/compiler/nir/nir_instr_set.h   |  4 +-
 src/compiler/nir/nir_loop_analyze.h|  5 ++-
 src/compiler/nir/nir_phi_builder.h |  5 ++-
 src/compiler/nir/nir_vla.h |  6 ++-
 src/compiler/nir/nir_worklist.h|  1 -
 src/compiler/nir_types.h   |  5 ++-
 src/compiler/spirv/nir_spirv.h |  2 -
 src/compiler/spirv/spirv_info.h|  5 +++
 src/compiler/spirv/vtn_private.h   |  5 +++
 src/egl/drivers/dri2/egl_dri2_fallbacks.h  |  5 ++-
 src/gallium/state_trackers/wgl/stw_ext_context.h   |  4 +-
 src/intel/common/gen_debug.h   |  6 ++-
 src/intel/compiler/brw_cfg.h   |  1 -
 src/intel/compiler/brw_compiler.h  |  5 ++-