summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/tests
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2018-06-05 22:26:47 +0200
committerGert Wollny <[email protected]>2018-08-11 12:32:42 +0200
commitd8c2119f9b0b257a23ceb398f6d0d78da916417e (patch)
tree080c906a4dea542e48b183688e1eff064450a993 /src/mesa/state_tracker/tests
parentc317d0ab54fdc2f25bd4460034d3a375654c40cb (diff)
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 <[email protected]> Acked-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/tests')
-rw-r--r--src/mesa/state_tracker/tests/st_tests_common.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/tests/st_tests_common.cpp b/src/mesa/state_tracker/tests/st_tests_common.cpp
index ef2513a5995..91b98988091 100644
--- a/src/mesa/state_tracker/tests/st_tests_common.cpp
+++ b/src/mesa/state_tracker/tests/st_tests_common.cpp
@@ -409,11 +409,11 @@ LifetimeEvaluatorTest::run(const vector<FakeCodeline>& code, bool& success)
{
FakeShader shader(code);
lifetime_result result(shader.get_num_temps());
-
+ vector <array_live_range> arr(10);
success =
get_temp_registers_required_live_ranges(mem_ctx, shader.get_program(mem_ctx),
- shader.get_num_temps(),
- &result[0]);
+ shader.get_num_temps(),
+ &result[0], 9, &arr[0]);
return result;
}
@@ -422,11 +422,11 @@ void LifetimeEvaluatorTest::run(const vector<FakeCodeline>& code, const temp_lt_
{
FakeShader shader(code);
lifetime_result result(shader.get_num_temps());
-
+ vector <array_live_range> arr(10);
bool success =
get_temp_registers_required_live_ranges(mem_ctx, shader.get_program(mem_ctx),
shader.get_num_temps(),
- &result[0]);
+ &result[0], 9, &arr[0]);
ASSERT_TRUE(success);
ASSERT_EQ(result.size(), e.size());
check(result, e);
@@ -478,8 +478,9 @@ void RegisterLifetimeAndRemappingTest::run(const vector<FakeCodeline>& code,
{
FakeShader shader(code);
std::vector<register_live_range> lt(shader.get_num_temps());
-
+ vector <array_live_range> arr(10);
get_temp_registers_required_live_ranges(mem_ctx, shader.get_program(mem_ctx),
- shader.get_num_temps(), &lt[0]);
+ shader.get_num_temps(), &lt[0],
+ 9, &arr[0]);
this->run(lt, expect);
}