[Mesa-dev] [PATCH 0/5] ir_variable data container

Tapani Pälli tapani.palli at intel.com
Wed Dec 4 04:16:39 PST 2013


Hi;

This series change ir_variable to include a data container for bitfields and 
other variables. This helps in variable cloning and serialization, it makes 
serialization easier but also much more maintainable.

I divided the moving of variables as multiple patches to not exceed maximum 
patch size limitation and make it more readable. I've verified individual 
patches by running make and make check between patches. I tested that gallium 
builds ok. I'm not able to run full Piglit suite now (getting file IO errors 
from Python ..) but all the tests I run manually show no regressions. Will try
to get full Piglit run working.

Here is a tree with patches on top:
http://cgit.freedesktop.org/~tpalli/mesa/log/?h=ir_changes

This branch includes 'automatic shader program cache' implementation that 
benefits from having the structure in ir_variable serialization code which is 
more compact and robus than previously:

http://cgit.freedesktop.org/~tpalli/mesa/log/?h=automatic_cache3
(note, contains also many of the fixes Paul Berry proposed for the caching)

My plan is to change some of the other structures too before actual cache 
implementation and this is the starting point.


Tapani Pälli (5):
  glsl: introduce data section to ir_variable
  glsl: move variables in to ir_variable::data, part I
  glsl: move variables in to ir_variable::data, part II
  glsl: move variables in to ir_variable::data, part III
  glsl: modify ir_clone to use memcpy

 src/glsl/ast_array_index.cpp                       |   8 +-
 src/glsl/ast_function.cpp                          |  16 +-
 src/glsl/ast_to_hir.cpp                            | 208 ++++++-------
 src/glsl/builtin_variables.cpp                     |  24 +-
 src/glsl/ir.cpp                                    |  52 ++--
 src/glsl/ir.h                                      | 340 +++++++++++----------
 src/glsl/ir_clone.cpp                              |  26 +-
 src/glsl/ir_constant_expression.cpp                |   2 +-
 src/glsl/ir_function.cpp                           |   2 +-
 src/glsl/ir_print_visitor.cpp                      |   6 +-
 src/glsl/ir_reader.cpp                             |  28 +-
 src/glsl/ir_set_program_inouts.cpp                 |  28 +-
 src/glsl/ir_validate.cpp                           |  10 +-
 src/glsl/link_atomics.cpp                          |  20 +-
 src/glsl/link_functions.cpp                        |   8 +-
 src/glsl/link_interface_blocks.cpp                 |  12 +-
 src/glsl/link_uniform_initializers.cpp             |   6 +-
 src/glsl/link_uniforms.cpp                         |  20 +-
 src/glsl/link_varyings.cpp                         |  84 ++---
 src/glsl/linker.cpp                                | 124 ++++----
 src/glsl/lower_clip_distance.cpp                   |  18 +-
 src/glsl/lower_named_interface_blocks.cpp          |  20 +-
 src/glsl/lower_output_reads.cpp                    |   2 +-
 src/glsl/lower_packed_varyings.cpp                 |  20 +-
 src/glsl/lower_ubo_reference.cpp                   |   2 +-
 src/glsl/lower_variable_index_to_cond_assign.cpp   |   2 +-
 src/glsl/opt_array_splitting.cpp                   |   4 +-
 src/glsl/opt_constant_folding.cpp                  |   4 +-
 src/glsl/opt_constant_propagation.cpp              |   4 +-
 src/glsl/opt_constant_variable.cpp                 |   4 +-
 src/glsl/opt_copy_propagation.cpp                  |   4 +-
 src/glsl/opt_copy_propagation_elements.cpp         |   4 +-
 src/glsl/opt_cse.cpp                               |   2 +-
 src/glsl/opt_dead_builtin_varyings.cpp             |  22 +-
 src/glsl/opt_dead_code.cpp                         |  10 +-
 src/glsl/opt_dead_code_local.cpp                   |   2 +-
 src/glsl/opt_flip_matrices.cpp                     |   4 +-
 src/glsl/opt_function_inlining.cpp                 |  14 +-
 src/glsl/opt_structure_splitting.cpp               |   4 +-
 src/glsl/opt_tree_grafting.cpp                     |  10 +-
 src/glsl/tests/builtin_variable_test.cpp           |  98 +++---
 src/glsl/tests/invalidate_locations_test.cpp       |  96 +++---
 src/mesa/drivers/dri/i965/brw_fs.cpp               |  14 +-
 src/mesa/drivers/dri/i965/brw_fs_fp.cpp            |   6 +-
 .../drivers/dri/i965/brw_fs_vector_splitting.cpp   |   2 +-
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp       |  36 +--
 src/mesa/drivers/dri/i965/brw_shader.cpp           |   2 +-
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp  |   2 +-
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp     |  20 +-
 src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp  |   2 +-
 src/mesa/main/ff_fragment_shader.cpp               |   8 +-
 src/mesa/main/shader_query.cpp                     |  36 +--
 src/mesa/program/ir_to_mesa.cpp                    |  24 +-
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp         |  30 +-
 54 files changed, 775 insertions(+), 781 deletions(-)

-- 
1.8.3.1



More information about the mesa-dev mailing list