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

Refactor software renderer jit cache to be shared #15180

Merged
merged 12 commits into from
Nov 28, 2021

Conversation

unknownbrackets
Copy link
Collaborator

Sorry for the huge #15163 pull, this should be more reasonably sized.

Basically, this changes the handling of the register cache (not memory backed, just a cache in registers) used for the draw pixel jit:

  • Simplifies and reduces arguments required.
  • Moves the function arguments to be managed by the regcache.
  • Correctness checks to make sure unlocked registers aren't used, all registers are unlocked, etc.

Relatedly, it prepares the argument types used to keep args vector for DrawPixel so they can be used elsewhere. Found ways to move away from preprocessor defines, mostly, too.

Lastly, this also changes ARM64 so that Math3D Vec2/Vec3/Vec4 are unioned with SIMD. Mainly, this is to allow passing directly as a vector argument in functions. It will impact memory requirements of Vec2/Vec3.

Most of the lines changed are renames. I kept just renames in 3d5bced, so look at the other commits for actual behavior changes.

-[Unknown]

This makes it match SSE and easier to keep things generic.  Will impact
alignment of non-packed Vec2/Vec3.
@unknownbrackets
Copy link
Collaborator Author

Apparently on MSVC ARM64, float32x4_t and int32x4_t are the same type. Annoying.

-[Unknown]

@hrydgard
Copy link
Owner

Not the easiest thing to review, but it looks good! Let's get it in.

@hrydgard hrydgard merged commit 2a93006 into hrydgard:master Nov 28, 2021
@unknownbrackets unknownbrackets deleted the softjit-args branch November 28, 2021 21:30
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