[Mesa-dev] [PATCH v4 0/6] mesa/st: glsl_to_tgsi: improved temp-reg lifetime estimation
Gert Wollny
gw.fossdev at gmail.com
Wed Jun 21 12:59:03 UTC 2017
following the comments of Emil and Nicolai I've updated the patch set.
Because v3 was borked I restarted from v2.
Changes with respect to the version 2 are:
- split the changes into more patches
- correct formatting errors
- rename functions and methods to better clarify what they are used for
- remove unused methods and variables in prog_scope
- eliminate the class tgsi_temp_lifetime
- remove the use the STL in the core library 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
- no longer require C++11 for the core library code
- the tests, however, make use of C++11 and the STL
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 shows no regressions and fixes
spec at glsl-1.50@execution at variable-indexing@gs-input-array-vec2-index-rd
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,
i.e. the all-over run-times are a bit lower, mostly because the new evaluation
for the mapping uses a binary search. However, because of the stocastical
sampling measuring these numbers with perf borders at statistical
insignificance, the influence on the all-over run-time is just too low.
I've also run a few programs (GPUtest benchmarks, Unigine-valley, Unigine-heaven)
and couldn't seen any visually indications that registers would be megrged
wrongly.
Many thanks for any commenst,
Gert
** BLURB HERE ***
Gert Wollny (6):
mesa/st: glsl_to_tgsi move some helper classes to extra files
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 | 2 +-
src/mesa/Makefile.sources | 4 +
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 315 +-----
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 | 761 ++++++++++++++
.../state_tracker/st_glsl_to_tgsi_temprename.h | 36 +
src/mesa/state_tracker/tests/Makefile.am | 40 +
.../tests/test_glsl_to_tgsi_lifetime.cpp | 1070 ++++++++++++++++++++
10 files changed, 2313 insertions(+), 288 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