-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Cache computed planes used for BBOX culling #17810
Conversation
This isn't a huge performance boost for the games that use BBOX (like Tekken), but it'll be more valuable if we start using soft culling more widely automatically, see #17808
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.
This is missing:
GPUgstate::Reset()
needs to dirty.GPUgstate::Restore()
needs to dirty.GPUStateCache::DoState()
maybe too on load?SoftGPU::Execute_*Mtx*()
which is probably key to the test failing, i.e. your changes are only in GPUCommonHW. SoftGPU updates "visible" matrices more accurately and has separate dirty flags for flushing software rendering.
-[Unknown]
Ah, thanks for the list :) |
It still doesn't use the "normal" dirtying flags from HW, i.e. for scissor. These are mostly useless to softgpu because it sends primitives to the queue right away, but tries to flush as inoften as possible. I think we could just override Execute_BoundingBox and always mark dirty there, or else check the -[Unknown] |
Right.. I like the option of checking SoftDirty::BINNER_RANGE flags and translating, though what would be good place to do that? Or I suppose could just do that in an overridden Execute_BoundingBox handler. Actually I'll just do the simpler thing and always set it, for now. |
This would be the place, since it's where the flag is checked and cleared: ppsspp/GPU/Software/BinManager.cpp Line 213 in a28acf2
But it's only done on submit to the binner, so it'd also need to be checked before testing the bounding box (and couldn't be cleared then.) Not super simple... well, we could add another dirty flag, but I'm not sure how much this would even help softgpu, for bbox tests alone. And it's already culling verts on intake. -[Unknown] |
That seems to work and should be safe, so I'll go with that. |
This isn't a huge performance boost for the games that use BBOX (like Tekken), although it does cut down these particular computations to a quarter-ish, but it'll be more valuable if we start using soft culling more widely automatically without BBOX, see #17808 . It's starting to look pretty interesting for performance in many games (though definitely not all).
EDIT: Hm, this fails the tests, interestingly..