Only call SetGenerationMode from BPWritten if the cull mode changed.

Should decrease CPU usage on the GPU thread by a bit in the OGL backend.
This commit is contained in:
Pierre Bourdon 2013-08-15 00:25:25 +02:00
parent 998194246c
commit 7622d5b354
1 changed files with 4 additions and 1 deletions

View File

@ -153,7 +153,10 @@ void BPWritten(const BPCmd& bp)
bpmem.genMode.numtexgens, bpmem.genMode.numcolchans,
bpmem.genMode.multisampling, bpmem.genMode.numtevstages+1, bpmem.genMode.cullmode,
bpmem.genMode.numindstages, bpmem.genMode.zfreeze);
SetGenerationMode();
// Only call SetGenerationMode when cull mode changes.
if (bp.changes & 0xC000)
SetGenerationMode();
break;
}
case BPMEM_IND_MTXA: // Index Matrix Changed