Search
lxdream.org :: lxdream/src/pvr2/rendcore.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/rendcore.c
changeset 477:9a373f2ff009
prev429:e581b90c3fb3
next540:a3767018a96d
author nkeynes
date Wed Oct 31 09:10:23 2007 +0000 (14 years ago)
permissions -rw-r--r--
last change Add save/restore of render buffers in save states
Gzip memory blocks in save states
Move front-buffer management back to pvr2
Add screenshot preview when loading save states
Various minor fixes and cleanups
file annotate diff log raw
1.1 --- a/src/pvr2/rendcore.c Mon Oct 08 11:52:13 2007 +0000
1.2 +++ b/src/pvr2/rendcore.c Wed Oct 31 09:10:23 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: rendcore.c,v 1.20 2007-10-08 11:52:13 nkeynes Exp $
1.6 + * $Id: rendcore.c,v 1.21 2007-10-31 09:10:23 nkeynes Exp $
1.7 *
1.8 * PVR2 renderer core.
1.9 *
1.10 @@ -41,8 +41,8 @@
1.11 GL_MODULATE
1.12 };
1.13 int pvr2_render_colour_format[8] = {
1.14 - COLFMT_ARGB1555, COLFMT_RGB565, COLFMT_ARGB4444, COLFMT_ARGB1555,
1.15 - COLFMT_RGB888, COLFMT_ARGB8888, COLFMT_ARGB8888, COLFMT_ARGB4444 };
1.16 + COLFMT_BGRA1555, COLFMT_RGB565, COLFMT_BGRA4444, COLFMT_BGRA1555,
1.17 + COLFMT_BGR888, COLFMT_BGRA8888, COLFMT_BGRA8888, COLFMT_BGRA4444 };
1.18
1.19
1.20 #define CULL_NONE 0
1.21 @@ -428,7 +428,7 @@
1.22 for( i=0; i<strip_count; i++ ) {
1.23 render_set_context( polygon, render_mode );
1.24 render_vertexes( *polygon, polygon+context_length, 3, vertex_length,
1.25 - render_mode );
1.26 + render_mode );
1.27 polygon += polygon_length;
1.28 }
1.29 } else if( (entry & 0xE0000000) == 0xA0000000 ) {
1.30 @@ -439,7 +439,7 @@
1.31 for( i=0; i<strip_count; i++ ) {
1.32 render_set_context( polygon, render_mode );
1.33 render_quad_vertexes( *polygon, polygon+context_length, vertex_length,
1.34 - render_mode );
1.35 + render_mode );
1.36 polygon += polygon_length;
1.37 }
1.38 } else {
1.39 @@ -455,7 +455,7 @@
1.40 first = 0;
1.41 render_set_context(polygon, render_mode);
1.42 render_vertexes( *polygon, polygon+context_length + (first*vertex_length),
1.43 - (last-first+3), vertex_length, render_mode );
1.44 + (last-first+3), vertex_length, render_mode );
1.45 }
1.46 }
1.47 }
1.48 @@ -487,8 +487,6 @@
1.49
1.50 struct tile_segment *segment = (struct tile_segment *)(video_base + segmentbase);
1.51
1.52 - struct timeval tv_start, tv_end;
1.53 - gettimeofday(&tv_start, NULL);
1.54 glEnable( GL_SCISSOR_TEST );
1.55 do {
1.56 // fwrite_dump32v( (uint32_t *)segment, sizeof(struct tile_segment), 6, stderr );
1.57 @@ -548,9 +546,6 @@
1.58 }
1.59 } while( ((segment++)->control & SEGMENT_END) == 0 );
1.60 glDisable( GL_SCISSOR_TEST );
1.61 -
1.62 - gettimeofday(&tv_end, NULL);
1.63 - timersub(&tv_end,&tv_start, &tv_start);
1.64 }
1.65
1.66 static float render_find_maximum_tile_z( pvraddr_t tile_entry, float inputz )
.