(08-21-2017, 05:40 PM)dabore Wrote: interesting. a mega texture? and it never changes while the level is running? is this megatexture just one format? is it 8 bit? or 4 bit?
(*talks to self* why am asking those questions tho?)
(i have a zoe2 iso.) if i would like to start working on this issue, where would/should i start optimizing this one scenario without breaking other games? how can i visually debug the mega texture and the palettes?
Hum it is hard to explain. For GSdx a GS texture is a start address + a size + a format (which map to a standard GPU texture). However on the GS side, it is quite different, the texture is fully mutable. What you can do (note that I'm not 100% sure the game does that but it is a valid pattern)
* configure the texture register once
+ Start address 0 (or anywhere actually)
+ Size of 1024x1024 (basically a big chunk of the GS memory)
Then you can access a sub-part of the texture
* Configure the texture format likely 8 bits, but could be 4 bits, or RGBA. Each sub-part of the texture can have its own texture format, nothing forbid it
* Configure the sampler unit boundary (for example you can sample between [128;256], after 256 you can wrap at 128 or clamp)
The EE can write anywhere in the memory with any format. So you're free to upload a new sub-texture with a new format. (For us it means throw everything)
If you want to debug it, you need to spot a bad place, create a gsdump, replay it inside a GPU debugger. (you can also dump all "textures" from GSdx/gsdump)