OSDN Git Service

mesa/st/glsl_to_tgsi: Expose array live range tracking and merging
authorGert Wollny <gw.fossdev@gmail.com>
Tue, 5 Jun 2018 20:26:47 +0000 (22:26 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Sat, 11 Aug 2018 10:32:42 +0000 (12:32 +0200)
commitd8c2119f9b0b257a23ceb398f6d0d78da916417e
tree080c906a4dea542e48b183688e1eff064450a993
parentc317d0ab54fdc2f25bd4460034d3a375654c40cb
mesa/st/glsl_to_tgsi: Expose array live range tracking and merging

This patch ties in the array split, merge, and interleave code.

shader-db changes in the TGSI code are:

              original code  |  array-merge  |       change
              mean      max  |  mean    max  | best  mean %  worst
      -----------------------------------------------------------
      arrays   0.05       2  |   0.00     0  |  -2   -100      0
total temps    5.05      21  |   4.92    20  | -15   -2.59     1
      instr   55.33     988  |  55.20   988  | -15   -0.24     0

Evaluation:

Run shader-db in single thread mode (otherwise the output is
not ordered and the best and worst column don't make sense) to
get results pre-stats.txt and post-stats.txt. Then using
python pandas:

 import pandas as pd
 old_stats = pd.read_csv('pre-stats.txt')
 new_stats = pd.read_csv('post-stats.txt')
 omean = old_stats.mean()
 omax = old_stats.max()
 nmean = new_stats.mean()
 nmax = new_stats.max()
 delta =  new_stats - old_stats
 pd.concat([omean, omax, nmean, nmax, delta.min(),
            delta.mean()/old_stats.mean()*100, delta.max()],
            axis=1, keys=['mean', 'max', 'mean', 'max', 'best',
            'avg change %', 'worst'])

v4: - Correct typo and add bugs that are fixed by this series.
    - Update stats and describe stats evaluation

Bugzilla:
  https://bugs.freedesktop.org/show_bug.cgi?id=105371
  https://bugs.freedesktop.org/show_bug.cgi?id=100200
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
src/mesa/state_tracker/st_glsl_to_tgsi_array_merge.h
src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
src/mesa/state_tracker/st_glsl_to_tgsi_temprename.h
src/mesa/state_tracker/tests/st_tests_common.cpp