[Mesa-dev] [PATCH v3 0/7] mesa/st: glsl_to_tgsi: improved temp-reg lifetime estimation
Gert Wollny
gw.fossdev at gmail.com
Sun Jun 18 17:42:52 UTC 2017
Dear all,
following the comments of Emil and Nicolai I've updated the patch set.
Changes with respect to the old version are:
- split the changes into more patches
- correct formatting errors
- remove the use of the STL with one exception though:
since in st_glsl_to_tgsi.cpp std::sort is already used and its run-time
performance is significantly better than qsort. It is used in the register
rename mapping evaluation. It can be disabled by commenting out the define
USE_STL_SORT in st_glsl_to_tgsi_temprename.cpp.
- add more tests and improve the life-time evaluation accordingly
- further reduce memory allocations
The algorithms is the same as described before, with the little exception that
now initially a dry run over the instructions is used to count the numbers of
scopes. The run-time overhead of this operation can be neglected.
In order to make it easier to transition to the new code and test it I tied it
in parallel to the old code. It can be enabled by setting the environment
variable MESA_GLSL_TO_TGSI_NEW_MERGE.
piglit run on the "shader" test set doesn't show any changes. The additional
passing test of I reported for v2 no longer passes, probably because of the
more conservative life-time estimation required to make the new (valid) tests
pass, but as I wrote before, the problem with this shader
spec at glsl-1.50@execution at variable-indexing@gs-input-array-vec2-index-rd
(and its sister *vec3*) is, IMHO not solvable by better register-renaming.
The performance numbers estimated by running the shader-db are given in the
commit message of the last patch, the trend is the same like reported before.
Many thanks for any commenst,
Gert
Gert Wollny (7):
mesa/st: glsl_to_tgsi move some helper classes to extra files
mesa: Propagate c++11 CXXFLAGS from LLVM_CXXFLAGS to mesa/
mesa/st: glsl_to_tgsi: implement new temporary register lifetime
tracker
mesa/st: glsl_to_tgsi: add tests for the new temporary lifetime
tracker
mesa/st: glsl_to_tgsi: add register renamame mapping evaluator
mesa/st: glsl_to_tgsi: Add test set for evaluation of rename mapping
mesa/st: glsl_to_tgsi: tie in new temporary register merge approach
configure.ac | 1 +
src/mesa/Makefile.am | 4 +-
src/mesa/Makefile.sources | 4 +
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 319 +-----
src/mesa/state_tracker/st_glsl_to_tgsi_private.cpp | 207 ++++
src/mesa/state_tracker/st_glsl_to_tgsi_private.h | 165 ++++
.../state_tracker/st_glsl_to_tgsi_temprename.cpp | 752 ++++++++++++++
.../state_tracker/st_glsl_to_tgsi_temprename.h | 36 +
src/mesa/state_tracker/tests/Makefile.am | 41 +
.../tests/test_glsl_to_tgsi_lifetime.cpp | 1042 ++++++++++++++++++++
10 files changed, 2277 insertions(+), 294 deletions(-)
create mode 100644 src/mesa/state_tracker/st_glsl_to_tgsi_private.cpp
create mode 100644 src/mesa/state_tracker/st_glsl_to_tgsi_private.h
create mode 100644 src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
create mode 100644 src/mesa/state_tracker/st_glsl_to_tgsi_temprename.h
create mode 100644 src/mesa/state_tracker/tests/Makefile.am
create mode 100644 src/mesa/state_tracker/tests/test_glsl_to_tgsi_lifetime.cpp
--
2.13.0
More information about the mesa-dev
mailing list