[Dri-devel] Re:Maybe fixed shared texture object problem

2002-01-27 Thread Panagiotis Papadakos

A better patch without whitespace changes...

--- lib/GL/mesa/src/drv/mga/mgatexmem.c Sun Jan 27 12:59:37 2002
+++ lib/GL/mesa/src/drv/mga/mymgatexmem.c   Sun Jan 27 13:12:48 2002
@@ -254,8 +254,18 @@
idx != MGA_NR_TEX_REGIONS  nr  MGA_NR_TEX_REGIONS ;
idx = sarea-texList[heap][idx].prev, nr++)
{
+  /* If switching texturing schemes, then the SAREA might not
+   * have been properly cleared, so we need to reset the
+   * global texture LRU.
+   */
+  if ( idx * sz  mmesa-mgaScreen-textureSize[heap] ) {
+ nr = MGA_NR_TEX_REGIONS;
+ break;
+  }
+
   if (sarea-texList[heap][idx].age  mmesa-texAge[heap]) {
-mgaTexturesGone(mmesa, heap, idx * sz, sz, 1);
+mgaTexturesGone(mmesa, heap, idx * sz, sz,
+sarea-texList[heap][idx].in_use);
   }
}





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



Re: [Dri-devel] Re:Maybe fixed shared texture object problem

2002-01-27 Thread Keith Whitwell

Panagiotis Papadakos wrote:
 
 A better patch without whitespace changes...
 
 --- lib/GL/mesa/src/drv/mga/mgatexmem.c Sun Jan 27 12:59:37 2002
 +++ lib/GL/mesa/src/drv/mga/mymgatexmem.c   Sun Jan 27 13:12:48 2002
 @@ -254,8 +254,18 @@
 idx != MGA_NR_TEX_REGIONS  nr  MGA_NR_TEX_REGIONS ;
 idx = sarea-texList[heap][idx].prev, nr++)
 {
 +  /* If switching texturing schemes, then the SAREA might not
 +   * have been properly cleared, so we need to reset the
 +   * global texture LRU.
 +   */
 +  if ( idx * sz  mmesa-mgaScreen-textureSize[heap] ) {
 + nr = MGA_NR_TEX_REGIONS;
 + break;
 +  }
 +
if (sarea-texList[heap][idx].age  mmesa-texAge[heap]) {
 -mgaTexturesGone(mmesa, heap, idx * sz, sz, 1);
 +mgaTexturesGone(mmesa, heap, idx * sz, sz,
 +sarea-texList[heap][idx].in_use);
}
 }
 

Thanks for cleaning it up...  I'm having real trouble applying some of the
patches I'm getting off the mailing list - I'm not sure if it's me, or what.  

What I'm doing is:
- saving the message from netscape (eg to ~/mgapat)
- in a shell, changing directory to xc-trunk/lib/GL/mesa/src/drv/mga
- applying, as in patch  ~/mgapat

and what I get is:

[keithw@rover mga]$ patch  ~/mgapat
patching file mgatexmem.c
Hunk #1 FAILED at 254.
1 out of 1 hunk FAILED -- saving rejects to file mgatexmem.c.rej

Does your patch apply when you repeat the procedure on your side?  Is the
patch against dri cvs trunk, or something else?  

Obviously I could apply the changes by hand, but I'd rather know what's going
on with patch.

== Actually, 'patch -l' succeeds, so in this case at least, there's a
whitespace issue somewhere.

Anyway, applied.


Keith

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



Re: [Dri-devel] Re:Maybe fixed shared texture object problem

2002-01-27 Thread Michel Dänzer

On Son, 2002-01-27 at 13:01, Keith Whitwell wrote:

 I'm having real trouble applying some of the patches I'm getting off the
 mailing list - I'm not sure if it's me, or what.  
 
 What I'm doing is:
   - saving the message from netscape (eg to ~/mgapat)
  
I bet there's your problem. I sincerely hope you aren't still using
Netscape 4.x? :)

   - in a shell, changing directory to xc-trunk/lib/GL/mesa/src/drv/mga
   - applying, as in patch  ~/mgapat
 
 and what I get is:
 
   [keithw@rover mga]$ patch  ~/mgapat
   patching file mgatexmem.c
   Hunk #1 FAILED at 254.
   1 out of 1 hunk FAILED -- saving rejects to file mgatexmem.c.rej

Anyway, attaching patches instead of pasting them into the body is safer
because all sorts of problems can happen when doing the latter.


-- 
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast

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