Search
lxdream.org :: lxdream/src/pvr2/rendcore.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/rendcore.c
changeset 222:541d9d899aba
prev221:cf5c6d326162
next223:f6c28fa9076b
author nkeynes
date Tue Sep 12 11:54:19 2006 +0000 (15 years ago)
permissions -rw-r--r--
last change Bug #0005 Implement translucent poly sorting
Implement quick-and-dirty sorting based on min-z. It's not remotely complete
but damn that looks so much better ^_^
file annotate diff log raw
1.1 --- a/src/pvr2/rendcore.c Tue Sep 12 08:38:38 2006 +0000
1.2 +++ b/src/pvr2/rendcore.c Tue Sep 12 11:54:19 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: rendcore.c,v 1.4 2006-09-12 08:38:38 nkeynes Exp $
1.6 + * $Id: rendcore.c,v 1.5 2006-09-12 11:54:19 nkeynes Exp $
1.7 *
1.8 * PVR2 renderer core.
1.9 *
1.10 @@ -37,11 +37,6 @@
1.11 COLFMT_RGB888, COLFMT_ARGB8888, COLFMT_ARGB8888, COLFMT_ARGB4444 };
1.12
1.13
1.14 -#define RENDER_ZONLY 0
1.15 -#define RENDER_NORMAL 1 /* Render non-modified polygons */
1.16 -#define RENDER_CHEAPMOD 2 /* Render cheap-modified polygons */
1.17 -#define RENDER_FULLMOD 3 /* Render the fully-modified version of the polygons */
1.18 -
1.19 #define CULL_NONE 0
1.20 #define CULL_SMALL 1
1.21 #define CULL_CCW 2
1.22 @@ -246,11 +241,6 @@
1.23 } while( 1 );
1.24 }
1.25
1.26 -void render_autosort_tile( pvraddr_t tile_entry, int render_mode, gboolean cheap_modifier_mode ) {
1.27 - //WARN( "Autosort not implemented yet" );
1.28 - render_tile( tile_entry, render_mode, cheap_modifier_mode );
1.29 -}
1.30 -
1.31 void pvr2_render_tilebuffer( int width, int height, int clipx1, int clipy1,
1.32 int clipx2, int clipy2 ) {
1.33
1.34 @@ -262,7 +252,7 @@
1.35 int isp_config = MMIO_READ( PVR2, RENDER_ISPCFG );
1.36 int shadow_cfg = MMIO_READ( PVR2, RENDER_SHADOW );
1.37
1.38 - if( obj_config & 0x00200000 ) {
1.39 + if( (obj_config & 0x00200000) == 0 ) {
1.40 if( isp_config & 1 ) {
1.41 tile_sort = 0;
1.42 } else {
1.43 @@ -314,7 +304,8 @@
1.44 if( (segment->transmod_ptr & NO_POINTER) == 0 ) {
1.45 /* TODO */
1.46 }
1.47 - if( tile_sort == 2 || (tile_sort == 1 && (segment->control & SEGMENT_SORT_TRANS)) ) {
1.48 + if( tile_sort == 2 ||
1.49 + (tile_sort == 1 && ((segment->control & SEGMENT_SORT_TRANS)==0)) ) {
1.50 render_autosort_tile( segment->trans_ptr, RENDER_NORMAL, cheap_shadow );
1.51 } else {
1.52 render_tile( segment->trans_ptr, RENDER_NORMAL, cheap_shadow );
.