[Mesa-dev] [PATCH v3 00/10] glsl_to_tgsi: Further improvement of lifetime tracking for register merge

Gert Wollny gw.fossdev at gmail.com
Tue Dec 12 13:40:50 UTC 2017


Dear all,

this is another update to the patch set that adds enhanced tracking of IF/ELSE
branches and tracking of reladdr* registers for the register_merge step.

It cleans up the debugging output and moves the testing classes into a conveniance 
library. The latter is in preparation for another series that will deal with array 
merging. 

The series shows no piglit regressions and I use it already for quite some time. 

So far patches 3 (was 1 in v3) and 8 (was 5 in v1)

  Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

Changes w.r.t. v3:

* Add patch 1: mesa/program: Add missing file types to _mesa_register_file_name
* Ass patch 2: Add stream and equal operators and rewrite the debug output to
  use the stream operator and  _mesa_register_file_name instead of some
  hand backed code and squeash former patch 5 into this. 
* Move the Mock* classes and shared test code into a conveniance
  library, and rename Mock* to Fake* since they are not really Mocks.

Changes w.r.t. v2:

* patch 9: make the creation of register description tuples explicit because 
  this is what in c++11 is actually required (This slipped before because it 
  seems that g++-7.2 handles tuple initialization like it was c++17, also with
  its default setting -std=c++14). 

v1: 

* patches 2-4(new): As suggested by Nikolai, these patches unify the test classes 
  with respect to the different register inputs (at this point: plain and with 
  swizzle). In addition, some comments are corrected and the used of white spaces 
  in the test cases is made more consistent. 
* patch 5: correct the debug output for indirect addressing. Nikolai suggested that 
  another patch might be in order to properly propagate the information when and 
  which address register is used, but since st_*_reg is passed through various 
  levels by value, I'd prefer to deal with that in another, dedicated patch series.
* patch 6: Further improve the tracking algorithm, and, as requested by Nikolai, 
  rename some variables and add comments to make the algorithm clearer.
* patch 7: Add yet more tests. 
* patch 9: Update the tests to adhere to the new, unified interface. 
* patch 10 (new): remove the no longer needed assert for the use of address registers 
  in register_merge (I was considering to add this to 8, but since that one was already 
  reviewed ...)

many thanks for any comments, 
Gert

PS: I have no write access to mesa-git. 

Gert Wollny (10):
  mesa/st/tests: Fix zero-byte allocation leaks
  mesa/st/tests: unify MockCodeLine* classes
  mesa/st/tests: base check of number of registers on opcode info
  mesa/st/tests: cleanup whitespace usage and correct some comments
  mesa/st/glsl_to_tgsi: Correct debug output for indirect access
  mesa/st/glsl_to_tgsi: Add tracking of ifelse writes in register
    merging
  mesa/st/tests: Add tests for improved tracking of temporaries
  mesa/st/glsl_to_tgsi: Add tracking of indirect addressing registers
  mesa/st/tests: Add tests for lifetime tracking with indirect
    addressing
  mesa/st/glsl_to_tgsi: remove now unneeded assert.

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp         |    1 -
 .../state_tracker/st_glsl_to_tgsi_temprename.cpp   |  540 +++++++--
 .../tests/test_glsl_to_tgsi_lifetime.cpp           | 1278 +++++++++++++++-----
 3 files changed, 1401 insertions(+), 418 deletions(-)

-- 
2.13.6



More information about the mesa-dev mailing list