Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TexCache: Decimate CLUT variants more often #10624

Merged
merged 2 commits into from
Feb 18, 2018

Conversation

unknownbrackets
Copy link
Collaborator

@unknownbrackets unknownbrackets commented Feb 18, 2018

May help #10418. Though we should probably try to handle going over limit better than crashing.

This cuts down on the first mission's texture allocation to 1/3 (about 120 instead of 360.) Having 6+ variants shouldn't be too common, so should be mostly safe.

This impacts Popolocrois by about 14% reduction in performance with retain changed textures on, but makes it very slightly faster with it off (though still much slower than with it on.) I think that's pretty acceptable, and it's an edge case game.

-[Unknown]

When creating a new texture, we determine if it has CLUT variants and
decimate more often.
It should be safe to decimate after fewer frames with a threshold like
this.
@hrydgard
Copy link
Owner

Bit worried that the extra lookups in the texture cache map could cost something in games that are unaffected by the problem, but I guess usually it'll already be in cache..

First thought about nicer ways to handle running out, I guess we could have a little list or flagging of textures that are "in-flight", and instakill those that aren't if we run out of memory... we'll soon have implemented a GL driver going too far down that path though ;)

@hrydgard
Copy link
Owner

Couldn't measure a consistent difference in GTA: LCS, which is a game that uses many textures per frame (>1000). So not really worried about slowdown, let's try this.

@hrydgard hrydgard merged commit 78449ce into hrydgard:master Feb 18, 2018
@unknownbrackets unknownbrackets deleted the texcache branch February 18, 2018 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants