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

MIPTBP1 and 2 incorrect bitmask #460

Closed
crypt4489 opened this issue Sep 3, 2023 · 2 comments
Closed

MIPTBP1 and 2 incorrect bitmask #460

crypt4489 opened this issue Sep 3, 2023 · 2 comments

Comments

@crypt4489
Copy link
Contributor

In common/include/gs_gp.h, MIPTBP1 and 2 have an incorrect bitmask for the addresses of the mip levels. It should mask the lower 14 bits not 10 bits as it does now.

@rickgaiser
Copy link
Member

#define GS_SET_MIPTBP1(TBA1, TBW1, TBA2, TBW2, TBA3, TBW3) \
(u64)((TBA1)&0x000003FF) << 0 | (u64)((TBW1)&0x0000003F) << 14 | \
(u64)((TBA2)&0x000003FF) << 20 | (u64)((TBW2)&0x0000003F) << 34 | \
(u64)((TBA3)&0x000003FF) << 40 | (u64)((TBW3)&0x0000003F) << 54
#define GS_SET_MIPTBP2(TBA4, TBW4, TBA5, TBW5, TBA6, TBW6) \
(u64)((TBA4)&0x000003FF) << 0 | (u64)((TBW4)&0x0000003F) << 14 | \
(u64)((TBA5)&0x000003FF) << 20 | (u64)((TBW5)&0x0000003F) << 34 | \
(u64)((TBA6)&0x000003FF) << 40 | (u64)((TBW6)&0x0000003F) << 54

You're right, can you make a PR for changing this?

@crypt4489
Copy link
Contributor Author

@rickgaiser see #461

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

No branches or pull requests

2 participants