-
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
Draw rectangles always using a specialized path in softgpu #15389
Conversation
Bah, I've got something off about pixel centers. Probably won't have time to look at this more for a bit. There's also something wrong even before this, as I'm seeing Valkyrie Profile and Kingdom Hearts with rounding errors in some screens. I think the sampler code will need to be adjusted... will need to make these tests properly test those areas too. Considering just disabling the tests for now as I don't want to include that in this pull, and some things seem to be better here. But I guess the better thing is to fix that separately and rebase this. -[Unknown] |
I'm fine with either temp-disabling the tests, or to fix later. Though the triangle vertex reuse bit could be merged separately in the meantime, I guess. I'm gonna try Ridge Racer later which I suspect could be affected by that. EDIT: Doesn't fix Ridge Racer. |
Okay, I'm going to disable for now as I see other tests that have gotten better. I think I'm going to need to change the test to get to the bottom of the actual behavior. Though, I don't like disabling passing tests in general, so hopefully I'm not setting a bad precedent. -[Unknown] |
We're still sometimes using the slow rect-as-triangles path, let's do something faster. As a first step, just handle binning.
Was not clamping to zero when negative.
Filtering is still not perfect but this makes different orientations better.
3c4e11d
to
ff5edb2
Compare
This now also fixes a nearest filtering clamp issue. I do see Ridge Racer has the weird flicker artifacting still... -[Unknown] |
For cases where textures aren't 1:1, there's rotation, or similar - this uses a rectangle path rather than sending triangles. This also tries to convert more triangle strips/fans/etc. into rectangles to take advantage of this.
While there, I also noticed that we could clip verts that were used for other triangles in fans/strips, which must've been wrong.
In some games, like Persona 3, Valkyria Chronicles 3, Naruto, or Vampire Chronicle, this gives around 6-9%. Valkyrie Profile gains around 14%. Other games like Kingdom Hearts, Call of Duty (even though it has bloom that's affected), or God of War gain almost nothing.
Found this opportunity using the GE debugger prim filter to try to narrow down the slowest draws.
-[Unknown]