Search
lxdream.org :: lxdream :: r346:9b495cc4db65
lxdream 0.9.1
released Jun 29
Download Now
changeset346:9b495cc4db65
parent345:7a26147e5dce
child347:e686be8b10df
authornkeynes
dateWed Jan 31 11:02:50 2007 +0000 (12 years ago)
Load textures into the right region
Allow setting the backplane control word from the test data
test/testrend.c
1.1 --- a/test/testrend.c Wed Jan 31 11:01:58 2007 +0000
1.2 +++ b/test/testrend.c Wed Jan 31 11:02:50 2007 +0000
1.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 cases
1.9 *
1.10 @@ -53,8 +53,10 @@
1.11
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.21
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 }
.