filename | test/testrend.c |
changeset | 346:9b495cc4db65 |
prev | 307:a357a469f5ff |
next | 561:533f6b478071 |
author | nkeynes |
date | Sat Nov 17 01:13:41 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Detect presence of SH4 + ARM cross-compilers, and disable the system tests if we don't find the sh-elf environment. Detect build host to see if we can make a working translator |
file | annotate | diff | log | raw |
1.1 --- a/test/testrend.c Sun Jan 21 05:24:27 2007 +00001.2 +++ b/test/testrend.c Sat Nov 17 01:13:41 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: testrend.c,v 1.3 2007-01-21 05:24:27 nkeynes Exp $1.6 + * $Id: testrend.c,v 1.4 2007-01-31 11:02:50 nkeynes Exp $1.7 *1.8 * Renderer test cases1.9 *1.10 @@ -53,8 +53,10 @@1.12 test_data_block_t tex = get_test_data(test_case, "textures");1.13 if( tex != NULL ) {1.14 - uint32_t addr = *(uint32_t *)tex->data;1.15 - memcpy( (char *)(0xA5000000 + addr), tex->data+4, tex->length-4 );1.16 + uint32_t addr = 0xA4000000 + *(uint32_t *)tex->data;1.17 +1.18 + memcpy( (char *)addr, tex->data+4, tex->length-4 );1.19 + fprintf( stderr, "Loaded %d bytes to %08X\n", tex->length-4, addr );1.20 }1.22 test_data_block_t config_data = get_test_data( test_case, "config" );1.23 @@ -90,9 +92,9 @@1.24 /* Write backplane (if any) */1.25 if( backplane != NULL ) {1.26 uint32_t bgplane = pvr_get_objbuf_posn();1.27 - memcpy( (char *)(PVR_VRAM_BASE + bgplane), backplane->data, backplane->length );1.28 + memcpy( (char *)(PVR_VRAM_BASE + bgplane), backplane->data+4, backplane->length-4 );1.29 bgplane -= default_render_config.polybuf;1.30 - render_set_backplane( (bgplane << 1) | 0x01000000 );1.31 + render_set_backplane( (bgplane << 1) | *(uint32_t *)backplane->data );1.32 } else {1.33 render_set_backplane( 0 );1.34 }1.35 @@ -129,6 +131,12 @@1.36 }1.37 test_case = test_case->next;1.38 }1.39 +1.40 + asic_clear();1.41 + asic_wait(EVENT_RETRACE);1.42 + asic_clear();1.43 + asic_wait(EVENT_RETRACE);1.44 +1.45 free_test_dataset(test_data);1.46 if( test_failures != 0 ) {1.47 fprintf( stderr, "%d/%d test failures!\n", test_failures, test_cases );1.48 @@ -137,4 +145,5 @@1.49 fprintf( stderr, "%d tests OK\n", test_cases );1.50 return 0;1.51 }1.52 +1.53 }
.