[Mesa-dev] [PATCH 0/7] Fix ralloc/rzalloc usage v2

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Jun 14 14:58:59 UTC 2016


Here is fixed version of this ralloc set. Now I got to run this on many
different machines thanks to Mark Janes. There didn't show up any
regressions on different gen hw. On my IVB I've been running also many
different traces with Apitrace while having Valgrind running on background
but Valgrind did seem to be happy with my changes.

As a performance test I did shader-db compile runs 10 times and compare
timing results against what Mesa master does on my IVB. To my surprise this
does bring reasonable gain which also seem to be repeatable, on my IVB
shader compile time is around 5% faster with these changes.

/Juha-Pekka

Juha-Pekka Heikkila (7):
  glsl: Fix reading of uninitialized memory
  util: use rzalloc instead on ralloc in _mesa_hash_table_create()
  util: use rzalloc instead on ralloc in _mesa_set_create(()
  nir: zero allocated memory where needed
  i965/vec4: zero allocated memory where needed
  i965/fs: fill allocated memory with zeros where needed
  util: Fix ralloc to use malloc instead of calloc

 src/compiler/glsl/ast_to_hir.cpp                   |  2 +-
 src/compiler/glsl/glcpp/glcpp-parse.y              |  4 +-
 src/compiler/glsl/link_uniform_blocks.cpp          |  2 +-
 src/compiler/glsl_types.cpp                        |  2 +-
 src/compiler/nir/nir.c                             |  6 +--
 src/compiler/nir/nir_opt_dce.c                     |  2 +-
 src/compiler/nir/nir_phi_builder.c                 |  2 +-
 src/compiler/nir/nir_search.c                      |  2 +-
 src/compiler/nir/nir_to_ssa.c                      |  2 +-
 src/compiler/nir/nir_worklist.c                    |  2 +-
 .../drivers/dri/i965/brw_fs_copy_propagation.cpp   |  2 +-
 .../dri/i965/brw_fs_dead_code_eliminate.cpp        |  4 +-
 .../dri/i965/brw_vec4_dead_code_eliminate.cpp      |  4 +-
 src/util/hash_table.c                              |  2 +-
 src/util/ralloc.c                                  | 49 +++++++++++++++-------
 src/util/ralloc.h                                  |  2 +-
 src/util/set.c                                     |  2 +-
 17 files changed, 54 insertions(+), 37 deletions(-)

-- 
1.9.1



More information about the mesa-dev mailing list