Keith Whitwell wrote:
> 
>>
>> ------------------------------------------------------------------------
>>
>> --- xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c    Wed Jun 12 
>> 19:03:59 2002
>> +++ ../build/dri/xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c    Wed 
>> Jun 12 20:01:42 2002
>> @@ -856,14 +856,14 @@
>>        clear.depth_mask  = rmesa->state.stencil.clear;
>>        clear.depth_boxes = depth_boxes;
>>  
>> -      nr = rmesa->sarea->nbox;
>> +      n--;
>>        b = rmesa->sarea->boxes;
>> -      for ( i = 0 ; i < nr ; i++ ) {
>> -     depth_boxes[i].f[RADEON_CLEAR_X1] = (float)b[i].x1;
>> -     depth_boxes[i].f[RADEON_CLEAR_Y1] = (float)b[i].y1;
>> -     depth_boxes[i].f[RADEON_CLEAR_X2] = (float)b[i].x2;
>> -     depth_boxes[i].f[RADEON_CLEAR_Y2] = (float)b[i].y2;
>> -     depth_boxes[i].f[RADEON_CLEAR_DEPTH] = +      for ( ; n >= 0 ; 
>> n-- ) {
>> +     depth_boxes[n].f[RADEON_CLEAR_X1] = (float)b[n].x1;
>> +     depth_boxes[n].f[RADEON_CLEAR_Y1] = (float)b[n].y1;
>> +     depth_boxes[n].f[RADEON_CLEAR_X2] = (float)b[n].x2;
>> +     depth_boxes[n].f[RADEON_CLEAR_Y2] = (float)b[n].y2;
>> +     depth_boxes[n].f[RADEON_CLEAR_DEPTH] =          
>> (float)rmesa->state.depth.clear;
>>        }
>>  
>>
> 
> Jacek,
> 
> Can you explain what this change actually does?  You've changed the way 
> the loop condition is tested and the order of the loop, but I don't see 
> any change to the actual logic of the loop...  Maybe I'm blind, but I 
> don't understand how this fixes your problem.
> 
> Keith
> 

Sorry.

The problem was not in the logic of operation but in in use of variable 
'i' in this loop. After this loop it's value was never greater than 
RADEON_NR_SAREA_CLIPRECTS and this variable is used in other loop (the 
one containing 'smaller' one). It's value after the loop should be total 
number of cliprects processed and send to hardware (correct me if I'am 
wrong) not only in this pass. That's why we had this lockup. So I've 
just used n wchich is not used after this loop. In my opinion each loop 
should have it's own variable for iteration so we can avoid such 
problems in future when for example someone changes some part of this 
quite long loop not examining is as whole. In this case everything 
worked well at firs sight.

Jacek

Sorry if my english isn't perfect but I'am not native english speaker 
(writer ;-)).


--
----
Darmowe konta e-mail 30 MB, w idealnej domenie,
czyli [EMAIL PROTECTED] i wszystko jasne!
Zapraszamy! http://www.twoje.konto.pl
----

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to