Search
lxdream.org :: lxdream/src/pvr2/glrender.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glrender.c
changeset 934:3acd3b3ee6d1
prev886:2bc6d2329cce
next1066:ddffe9d2b332
author nkeynes
date Fri Dec 26 14:25:23 2008 +0000 (11 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change Change RAM regions to use static arrays rather than mmap regions, for a 2-3% performance gain.
General mem cleanups, including some save state fixes that break states again.
file annotate diff log raw
1.1 --- a/src/pvr2/glrender.c Mon Oct 20 05:08:31 2008 +0000
1.2 +++ b/src/pvr2/glrender.c Fri Dec 26 14:25:23 2008 +0000
1.3 @@ -24,7 +24,7 @@
1.4 #include "pvr2/scene.h"
1.5 #include "pvr2/glutil.h"
1.6
1.7 -#define IS_EMPTY_TILE_LIST(p) ((*((uint32_t *)(video_base+(p))) >> 28) == 0x0F)
1.8 +#define IS_EMPTY_TILE_LIST(p) ((*((uint32_t *)(pvr2_main_ram+(p))) >> 28) == 0x0F)
1.9
1.10 int pvr2_poly_depthmode[8] = { GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL,
1.11 GL_GREATER, GL_NOTEQUAL, GL_GEQUAL,
1.12 @@ -274,7 +274,7 @@
1.13
1.14 void gl_render_tilelist( pvraddr_t tile_entry, GLint depth_mode )
1.15 {
1.16 - uint32_t *tile_list = (uint32_t *)(video_base+tile_entry);
1.17 + uint32_t *tile_list = (uint32_t *)(pvr2_main_ram+tile_entry);
1.18 int strip_count;
1.19 struct polygon_struct *poly;
1.20
1.21 @@ -287,7 +287,7 @@
1.22 case 0x0F:
1.23 return; // End-of-list
1.24 case 0x0E:
1.25 - tile_list = (uint32_t *)(video_base + (entry&0x007FFFFF));
1.26 + tile_list = (uint32_t *)(pvr2_main_ram + (entry&0x007FFFFF));
1.27 break;
1.28 case 0x08: case 0x09: case 0x0A: case 0x0B:
1.29 strip_count = ((entry >> 25) & 0x0F)+1;
1.30 @@ -313,7 +313,7 @@
1.31 */
1.32 void gl_render_tilelist_depthonly( pvraddr_t tile_entry )
1.33 {
1.34 - uint32_t *tile_list = (uint32_t *)(video_base+tile_entry);
1.35 + uint32_t *tile_list = (uint32_t *)(pvr2_main_ram+tile_entry);
1.36 int strip_count;
1.37 struct polygon_struct *poly;
1.38
1.39 @@ -330,7 +330,7 @@
1.40 case 0x0F:
1.41 return; // End-of-list
1.42 case 0x0E:
1.43 - tile_list = (uint32_t *)(video_base + (entry&0x007FFFFF));
1.44 + tile_list = (uint32_t *)(pvr2_main_ram + (entry&0x007FFFFF));
1.45 break;
1.46 case 0x08: case 0x09: case 0x0A: case 0x0B:
1.47 strip_count = ((entry >> 25) & 0x0F)+1;
1.48 @@ -428,7 +428,7 @@
1.49
1.50 void gl_render_modifier_tilelist( pvraddr_t tile_entry, uint32_t tile_bounds[] )
1.51 {
1.52 - uint32_t *tile_list = (uint32_t *)(video_base+tile_entry);
1.53 + uint32_t *tile_list = (uint32_t *)(pvr2_main_ram+tile_entry);
1.54 int strip_count;
1.55 struct polygon_struct *poly;
1.56
1.57 @@ -456,7 +456,7 @@
1.58 glStencilOp( GL_KEEP, GL_KEEP, GL_KEEP );
1.59 return; // End-of-list
1.60 case 0x0E:
1.61 - tile_list = (uint32_t *)(video_base + (entry&0x007FFFFF));
1.62 + tile_list = (uint32_t *)(pvr2_main_ram + (entry&0x007FFFFF));
1.63 break;
1.64 case 0x08: case 0x09: case 0x0A: case 0x0B:
1.65 strip_count = ((entry >> 25) & 0x0F)+1;
.