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
VideoCommon:FramebufferManager: Mark cache as valid after refresh #11172
Conversation
|
Is anything blocking this? The change is fairly trivial. |
|
I'd like @Pokechu22 or someone else familiar with this stuff to look it over. Basically, we never set valid to true directly, we always call |
|
So, what I see is that However, I'm less sure of what "valid" even means, since if one call to |
|
I see what you're saying, a rename sounds like a good idea. I have no idea what we should call it however. I would still hesitate to sign off on this PR until we know what the preconditions are for the I think renaming |
|
I think |
|
Would it make sense to remove the non-tiled path entirely (instead treating the non-tiled case as one full-screen tile), and also replace |
Maybe |
|
Calling EDIT: I've solved it by adding a separate field for the refresh. Much clearer now. |
Otherwise we might never hit the early return if either depth or color doesnt have any active tiles.
|
Well, I'll look at what you provided but my thinking looking at the code in master (I hadn't really looked at this much) is that we're using the wrong construct. This feels like it'd be more appropriate to be a
|
|
The problem with making it a map is that tiles that aren't RefreshPeekCache specifically looks for those: Tiles that have been accessed in the last 8 frames ( |
|
@iwubcode Just as a side note, a You should obviously profile this on a case-by-case basis, but be careful with such ideas that look fine on paper; modern CPUs are weird! |
|
Ah good point, missed that. That's unfortunate as it would have simplified things greatly but what you have works. Will be curious to hear @Pokechu22 's thoughts but I'm signing off. |
|
@AdmiralCurtiss - oh is the sample size here that small? I would opt for an array (or possibly a vector) with very tiny sizes for reasons you stated. But I thought a couple hundred to 10'000 is a better case for a map. 10'000+ is a better case for unordered_map (if it's actually unordered data, the hashing can benefit larger sets but smaller sets it's not worth the cost). Obviously this is a generalization and profiling is the best way to go. I do forget about cache friendliness though. I tend to deal with larger data sets. I'll have to keep that in mind. Thanks! Still, part of the reason I stated this was I thought the size was substantial enough. Of course, the other part was design. I ended up being wrong about both I guess :D |
|
Our default is 64 tiles. |
|
Ahha, I was thinking of the accuracy setting, which still isn't very large (in my head I thought 1024+). 64 is definitely tiny and I agree a map is not necessary there. Thanks @AdmiralCurtiss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Untested.
Small thing I noticed after #11098 got merged.
Otherwise we might never hit the early return if either depth or color doesnt have any active tiles.