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

Default zero dot display register to the 24 bit integer limit #1968

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

Jaklyy
Copy link
Contributor

@Jaklyy Jaklyy commented Jan 30, 2024

fixes: #1143
fixes a fail on one of Striker's line test roms

tested via this test rom installed to nand as DSiware on a new3DS: testdepth.zip

default behavior appears to be that it renders all the way up to the 24 bit integer limit (at which point it overflows to 0)

it goes through the reset function to set the variable on boot anyway but why not have the initialized state be correct too
@@ -197,7 +197,7 @@ class GPU3D

FIFO<CmdFIFOEntry, 64> CmdStallQueue {};

u32 ZeroDotWLimit = 0;
u32 ZeroDotWLimit = 0xFFFFFF;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this need to be changed in Reset?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did change it there, i just now also changed the variable's default value to look pretty/avoid confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

though looking at it now no other variable gets initialized in gpu3d.h to its actual default as stated in the reset function
so maybe i should revert that change to avoid inconsistency?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there isn't really a reason for the variables to be initialised in the header, except to prevent UB in case they are read before Reset is called (though that shouldn't happen if that makes any sense).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, so it's mostly just personal preference what value they get initialized to
i wont worry about it
if someone wants it changed back for consistency with the other values being 0 initialized I can revert that change easily

@RSDuck RSDuck merged commit 161bd9d into melonDS-emu:master Aug 1, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

Rendering Issue (Homebrew)
2 participants