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

Use AVX2 gather for samplerjit #15275

Merged
merged 6 commits into from
Jan 3, 2022

Conversation

unknownbrackets
Copy link
Collaborator

Although VPGATHERDD is high latency, it's still much better than manually assembling the values, and especially than the old way with CALL.

This had some nice gains in several areas on an AVX2 supporting PC. VC3 in game is now at ~46 FPS, LBP at ~56 FPS, and KHBBS is ~74 FPS. The VC3 logo screen improved a lot though, up to ~99 FPS from ~93.

Didn't heavily test the non-AVX2 paths, though.

-[Unknown]

From looking at assembly, just trying to keep it small.
Planning to expand this to more paths.
This should be rare, but a game could easily shove a CLUT4 texture at the
end of VRAM, and then accessing the last index would segfault.
We only use it for DXT now, so let's not keep the dead code around.
@hrydgard
Copy link
Owner

hrydgard commented Jan 3, 2022

That's a great result! Really cool. Think I've underestimated the gather instruction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants