Search
lxdream.org :: lxdream :: r1291:8884bf45f010
lxdream 0.9.1
released Jun 29
Download Now
changeset1291:8884bf45f010
parent1290:b41d4dc2c83e
child1292:799fdd4f704a
authornkeynes
dateSat Aug 04 08:46:28 2012 +1000 (8 years ago)
Handle corner case in pvr2_run_slice when we've previously slightly overrun
the end of the time slice
src/pvr2/pvr2.c
1.1 --- a/src/pvr2/pvr2.c Sat Aug 04 08:27:01 2012 +1000
1.2 +++ b/src/pvr2/pvr2.c Sat Aug 04 08:46:28 2012 +1000
1.3 @@ -345,8 +345,12 @@
1.4
1.5 static uint32_t pvr2_run_slice( uint32_t nanosecs )
1.6 {
1.7 - pvr2_update_raster_posn( nanosecs );
1.8 - pvr2_state.cycles_run = 0;
1.9 + if( nanosecs <= pvr2_state.cycles_run ) {
1.10 + pvr2_state.cycles_run -= nanosecs;
1.11 + } else {
1.12 + pvr2_update_raster_posn( nanosecs );
1.13 + pvr2_state.cycles_run = 0;
1.14 + }
1.15 return nanosecs;
1.16 }
1.17
.