Search
lxdream.org :: lxdream :: r754:35c496703380
lxdream 0.9.1
released Jun 29
Download Now
changeset754:35c496703380
parent753:1fe39c3a9bbc
child755:ab873907b00e
authornkeynes
dateSun Jul 20 11:37:47 2008 +0000 (11 years ago)
Commit testta changes for sort-dma tests
test/testta.c
1.1 --- a/test/testta.c Sun Jul 20 11:36:48 2008 +0000
1.2 +++ b/test/testta.c Sun Jul 20 11:37:47 2008 +0000
1.3 @@ -130,18 +130,33 @@
1.4 test_data_block_t input2 = get_test_data(test_case, "input2");
1.5 test_data_block_t output = get_test_data(test_case, "output");
1.6 test_data_block_t error = get_test_data(test_case, "error");
1.7 + test_data_block_t sortconf = get_test_data(test_case, "sortconf");
1.8 + test_data_block_t sorttab = get_test_data(test_case, "sorttab");
1.9 +
1.10 if( input == NULL || output == NULL ) {
1.11 fprintf( stderr, "Skipping test case '%s': data incomplete\n", test_case->test_name );
1.12 return -1;
1.13 }
1.14
1.15 - if( pvr_dma_write( 0x10000000, input->data, input->length, 0 ) == -1 ) {
1.16 - return -1;
1.17 + if( sortconf != NULL && sorttab != NULL ) {
1.18 + if( sortconf->length != 8 ) {
1.19 + fprintf( stderr, "Invalid sort config length: %d - abort test %s\n",
1.20 + sortconf->length, test_case->test_name );
1.21 + return -1;
1.22 + }
1.23 + uint32_t *sc = (uint32_t *)sortconf->data;
1.24 + if( sort_dma_write( sorttab->data, sorttab->length, input->data, input->length, *sc, *(sc+1) ) == -1 ){
1.25 + return -1;
1.26 + }
1.27 + } else {
1.28 + if( pvr_dma_write( 0x10000000, input->data, input->length, 0 ) == -1 ) {
1.29 + return -1;
1.30 + }
1.31 }
1.32
1.33 if( input2 != NULL ) {
1.34 - ta_reinit();
1.35 - pvr_dma_write( 0x10000000, input2->data, input2->length, 0 );
1.36 + ta_reinit();
1.37 + pvr_dma_write( 0x10000000, input2->data, input2->length, 0 );
1.38 }
1.39
1.40
.