Wednesday, May 9, 2012

Yet Another Roundup

MDL instancing was done and removed.  It gave a decent enough balance of being faster when there was lots of MDLs on screen but slower when there was fewer, but one of the major problems was that the only case where it benchmarked appreciably faster was a stupidly excessive one - my 400 Knights Death Map.  Draw calls in D3D11 have low enough overhead that you need to go to in or around this kind of level before it's worthwhile.

If that was all I would have probably kept it, but it turned out that the one genuine gameplay case I was hoping to improve - the overuse of the Quoth longtorch model in ne_tower - turned out a good deal slower.

So when it came down to the final decision, a real gameplay case outweighs a synthetic benchmark any day of the week.

I'm retaining a copy of the code anyway as I may work over it again sometime with the intention of switching between instanced and non-instanced cases as required.

I've also heavily reworked the filesystem code, and cleaned up a lot of evil mess.  The full memory-mapping for PAK files is there, as are some improvements in PK3 handling.  Load speeds are up a little; not too much but enough.  Memory-mapping also makes file reading become a LOT simpler and cleaner - it's now just a straight memcpy to the destination rather than having to allocate a buffer, read it in, copy over, clear the buffer.

I can work over that a bit more to get it better again, but the current cut of it is quite nice.

Speaking of PK3 files, I'm now quite convinced that the crashes I had reported when loading QRP textures from a PK3 file are nothing to do with my texture loader and everything to do with my old PK3 loader.  When working over this part of the code, I discovered a few places that were - shall we say - somewhat less than robust.

The new loader is much better.  Promise.

1 comment:

Marty said...

In my case, I believe I tried both ways. QRP as pk3's and I also tried unpacking them and my system crashed with 1.9.0. If there is something else on my system that is causing the crash, I haven't been able to determine what it is.