Am Dienstag, 26. Dezember 2006 20:55 schrieb Dennis Schridde: > Am Dienstag, 26. Dezember 2006 11:41 schrieb Dennis Schridde: > > Am Dienstag, 26. Dezember 2006 02:53 schrieb Christian Ohm: > > > On Tuesday, 26 December 2006 at 2:37, Dennis Schridde wrote: > > > > I just profiled Warzone using gDEBugger. > > > > > > > > The logs are horrible and attached. > > > > (I monitored ~3 frames) > > > > > > > > Basically it looks like this: > > > > Lots of Matrix popping > > > > > > Which is bad, especially if uses any glGetWhatever functions, those > > > just kill performance (I think the shadow code uses that). > > > > Didn't look like it uses glGetX, only A LOT of glPopMatrix and > > glPushMatrix. ... > > Really a lot. > > > > > > Lots of texture binding > > > > > > Shouldn't be too bad, just uses up memory. > > > > From what I've read in GL3 articles, it sounded like glBindTexture is > > VERY bad and takes a lot of time... But actually it shouldn't use any > > memory, because the texture is only bound, not loaded. (Loading it > > multiple times would be even worse, though.) > > > > And glBindTexture taking long would also explain why the (callgrind) > > profiler reports that WZ spends a lot of time in the terrain rendering > > functions. I think if we would load the tertile texpage entirely (without > > spliting it into 512x512 pieces) and just calculate the tile-id into a UV > > coordinate into the complete tertile texpage, it should remove the need > > for 99% of the texture binds and thus improve the performance a lot. > > > > I tried that a while ago (and still have the patches, if someone wants). > > As requested: The Patch. > (I updated it, so it applies to r570.) > > I think most of is relatively ok. (Means: It is not a real ugly _hack_, but > maybe ugly anyways.) > > The changes to display3d.c are total crap, of course. > Somehow Warzone send some ints through the pipes, did some Voodoo to them > and in the end they got used as floats, which seems to work somehow. > I tried to replace that weirdness with floats right from the start, which > doesn't work. (Yes, I know that code _cant_ work, but to my excuse: It was > very late in the night when I got mad at the code.) > > I think somewhere the code which looks in which texpage the tile is and the > binds the appropriate textures should be removed, if I didn't do this > allready. > So this patch does only part of the job, I didn't get that far. > > --Dennis PS: Best is probably if you first read the patch and try to understand what I changed and why and how the old system worked. Especially for display3d.c this will be usefull.
pgpGqshTqWfct.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list [email protected] https://mail.gna.org/listinfo/warzone-dev
