diff options
author | Matthias Hopf <mhopf@suse.de> | 2009-02-03 12:02:34 +0100 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2009-02-03 12:02:34 +0100 |
commit | 1b8c857e717d5ac15874746db3c4a98e02175d7d (patch) | |
tree | 1cd43097ae62d49a030ade524be3c42e72fe6124 | |
parent | f355ee75ad3e2d12a00ddac62d28ebce475c515e (diff) |
Add continuously running full speed test 'F'.
-rw-r--r-- | r600_demo.c | 8 | ||||
-rw-r--r-- | r600_lib.h | 2 | ||||
-rw-r--r-- | r600_perf.c | 26 |
3 files changed, 23 insertions, 13 deletions
diff --git a/r600_demo.c b/r600_demo.c index b7af170..45247b9 100644 --- a/r600_demo.c +++ b/r600_demo.c @@ -514,7 +514,8 @@ void usage (char *argv[]) { "e\tEXA solid test\n" "E\tEXA copy test\n" "\n" - "P\ttextured pixel performance test\n" + "P\tPerformance test\n" + "F\tContinous Full-Power test\n" "\n" "[reg]s are dumped (also ranges) or written to, register addresses in hex\n" "\n", @@ -698,7 +699,10 @@ int main(int argc, char *argv[]) test_copy (&adapter); break; case 'P': - test_perf (&adapter); + test_perf (&adapter, 1, 1); + break; + case 'F': + test_perf (&adapter, 0, 2); break; default: fprintf (stderr, "***** Don't know '%c' test\n\n", argv[optind][i]); @@ -144,7 +144,7 @@ void tmp_test (adapter_t *); void test_solid(adapter_t *adapt); void test_copy(adapter_t *adapt); /* r600_perf.c : */ -void test_perf (adapter_t *); +void test_perf (adapter_t *, int textype, int alutype); #endif diff --git a/r600_perf.c b/r600_perf.c index c0d6303..bc2c34f 100644 --- a/r600_perf.c +++ b/r600_perf.c @@ -47,7 +47,7 @@ * Test rasterization performance with one texture */ -void test_tex_quad_perf(adapter_t *adapt) +void test_tex_quad_perf(adapter_t *adapt, int testtype) { static uint32_t vs[] = { // CF INST 0 @@ -342,15 +342,13 @@ void test_tex_quad_perf(adapter_t *adapt) /* Interpolator setup */ - /* Enabling flat shading needs both FLAT_SHADE_bit in SPI_PS_INPUT_CNTL_x - * *and* FLAT_SHADE_ENA_bit in SPI_INTERP_CONTROL_0 */ ereg (SPI_PS_IN_CONTROL_0, ((1 << NUM_INTERP_shift))); ereg (SPI_PS_IN_CONTROL_1, 0); ereg (SPI_PS_INPUT_CNTL_0 + (0 <<2), ((0 << SEMANTIC_shift) | (0x03 << DEFAULT_VAL_shift) | FLAT_SHADE_bit | SEL_CENTROID_bit)); - ereg (SPI_INTERP_CONTROL_0, /* FLAT_SHADE_ENA_bit | */ 0); + ereg (SPI_INTERP_CONTROL_0, 0); /* Vertex buffer setup */ @@ -395,7 +393,7 @@ void test_tex_quad_perf(adapter_t *adapt) * Test ALU performance */ -void test_alu_quad_perf(adapter_t *adapt) +void test_alu_quad_perf(adapter_t *adapt, int testtype) { static uint32_t vs[] = { // CF INST 0 @@ -515,7 +513,7 @@ void test_alu_quad_perf(adapter_t *adapt) uint64_t vb_addr, vs_addr, ps_addr; - int i, ps_size, alu_num, render_num; + int i, ps_size, alu_num, alu_scale, render_num; float render_time; @@ -755,7 +753,13 @@ void test_alu_quad_perf(adapter_t *adapt) /* Render n times, duplicate alu instructions per clause each time */ render_num = 64; - for (alu_num = 3; alu_num <= MAX_NUM_ALUS_PER_CLAUSE; alu_num *= 2) { + alu_num = 3; + alu_scale = 2; + if (testtype == 2) { + alu_num = MAX_NUM_ALUS_PER_CLAUSE; + alu_scale = 1; + } + for (; alu_num <= MAX_NUM_ALUS_PER_CLAUSE; alu_num *= alu_scale) { /* Set number of alu insts per clause */ for (i = 0; i < NUM_ALU_CLAUSES; i++) { @@ -801,8 +805,10 @@ void test_alu_quad_perf(adapter_t *adapt) } } -void test_perf (adapter_t *adapt) +void test_perf (adapter_t *adapt, int textype, int alutype) { - test_tex_quad_perf (adapt); - test_alu_quad_perf (adapt); + if (textype) + test_tex_quad_perf (adapt, textype); + if (alutype) + test_alu_quad_perf (adapt, alutype); } |