Search
lxdream.org :: lxdream/src/pvr2/pvr2.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.c
changeset 871:c0b7e21cb62b
prev867:3af8840d5d8c
next890:a9896953e9a1
author nkeynes
date Fri Oct 10 00:13:39 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Skip the texcache render-buffer alloc for now (due to various texture-format
complications), and write the buffer straight back to vram after rendering.
file annotate diff log raw
1.1 --- a/src/pvr2/pvr2.c Tue Oct 07 11:14:49 2008 +0000
1.2 +++ b/src/pvr2/pvr2.c Fri Oct 10 00:13:39 2008 +0000
1.3 @@ -486,6 +486,12 @@
1.4 if( buffer != NULL ) {
1.5 pvr2_scene_render( buffer );
1.6 pvr2_finish_render_buffer( buffer );
1.7 + if( buffer->address < PVR2_RAM_BASE ) {
1.8 + // Flush immediately - optimize this later. Otherwise this gets
1.9 + // complicated very quickly trying to second-guess how it's
1.10 + // going to be used as a texture.
1.11 + pvr2_render_buffer_copy_to_sh4( buffer );
1.12 + }
1.13 }
1.14 asic_event( EVENT_PVR_RENDER_DONE );
1.15 break;
1.16 @@ -958,7 +964,7 @@
1.17 render_buffers[i] != displayed_render_buffer ) {
1.18 /* Never throw away the current "front buffer(s)" */
1.19 result = render_buffers[i];
1.20 - if( !result->flushed ) {
1.21 + if( !result->flushed && result->address != -1 ) {
1.22 pvr2_render_buffer_copy_to_sh4( result );
1.23 }
1.24 if( result->width != width || result->height != height ) {
1.25 @@ -1000,12 +1006,11 @@
1.26
1.27 if( render_addr & 0x01000000 ) { /* vram64 */
1.28 render_addr = (render_addr & 0x00FFFFFF) + PVR2_RAM_BASE_INT;
1.29 - result = texcache_get_render_buffer( render_addr, colour_format, width, height );
1.30 } else { /* vram32 */
1.31 render_addr = (render_addr & 0x00FFFFFF) + PVR2_RAM_BASE;
1.32 - result = pvr2_alloc_render_buffer( render_addr, width, height );
1.33 }
1.34 -
1.35 + result = pvr2_alloc_render_buffer( render_addr, width, height );
1.36 +
1.37 /* Setup the buffer */
1.38 if( result != NULL ) {
1.39 result->rowstride = render_stride;
.