GE Debugger: Dump textures only if possibly used.

This commit is contained in:
Unknown W. Brackets 2022-11-01 22:15:11 -07:00
parent e7185f93b3
commit 5afb009b56

View File

@ -420,9 +420,12 @@ static void FlushPrimState(int vcount) {
// We re-flush textures always in case the game changed them... kinda expensive.
// TODO: Dirty textures on transfer/stall/etc. somehow?
// TODO: Or maybe de-dup by validating if it has changed?
bool textureEnabled = gstate.isTextureMapEnabled() || gstate.isAntiAliasEnabled();
// Play it safe and allow texture coords to emit data too.
bool textureCoords = (gstate.vertType & GE_VTYPE_TC_MASK) != 0;
for (int level = 0; level < 8; ++level) {
u32 texaddr = gstate.getTextureAddress(level);
if (texaddr) {
if (texaddr && (textureEnabled || textureCoords)) {
EmitTextureData(level, texaddr);
}
}