(09-29-2015, 02:23 PM)phly95 Wrote: For example, if the game says "load navi.gcimg" and there is "navi.png" in the texture pack, why can't it load that instead instead of waiting until the texture is actively being used by dolphin?
I'm going to take a guess on this and say that it might be really hard to pinpoint where exactly a game says "load navi.gcimg". It would be very helpful to wave your hand and say "Dolphin, whenever you encounter this function, do this instead," but actually determining where that function is within the game's code is the problem. I gather you'd need to analyze the game in a debugger to find out where it's trying to load data to be used as a texture. There might be multiple functions that load this data from the disk for textures as well. I can think of a dozen other logistical issues with trying to pin down a specific "load data from disk for texture" function, but I'll just let real Dolphin devs comment on anything like that.
Something more straightforward would be to load a texture from your HDD/SDD or whatever as soon as texture data hits Dolphin's emulated VRAM and is properly hashed. But you'd still come across (or at least run the risk of) stuttering due to an I/O bottleneck. That would only potentially solve the issue of consuming massive amounts of RAM during gameplay.
Here's a crazy idea that would be an absolute pain to implement, but I think it has some merit. If Dolphin could somehow assign certain textures a priority level, certain textures could be loaded on startup, while others are loaded dynamically as they are encountered in the game. It would probably be something best left to the people making texture packs (they can pick and choose common ones, or do a 50/50 type deal). They could chose smaller textures or lesser used textures to be loaded dynamically.
Like I said, this would be a pain to code properly, especially where to store the priority data. Simplest way I can think of is to just change the extension of any custom texture for any custom texture with priority. E.g. "123456789.png" has priority by default, but "123456789.png.tex" does not. I gather Dolphin doesn't care greatly about the extension (well, the image format itself has to be acceptable) and that the filename/texture hash is what matters, so this method is not entirely intrusive to how things are done now. But it'd be up to individual texture packs to go through and hand-pick what has priority and what doesn't; it'd still be a real mess. I suppose Dolphin itself could automatically assign these priorities based on the relative size of custom textures (bigger textures get priority, smaller ones are loaded dynamically, or maybe vice versa). Or it could just do a lottery type deal (50/50 randomly, half gets priority, half is dynamically loaded).
But that's just me, and that idea's just crazy
