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

VideoCommon: Add option to disable mipmaps #11263

Merged
merged 1 commit into from Nov 11, 2022

Conversation

TellowKrinkle
Copy link
Contributor

M1 GPUs currently have a bug where rendering with mipmaps is slightly nondeterministic (the differences always happen at the edges of triangles, so I'm guessing it's an issue with helper invocations / bad derivatives leading to picking the wrong mip level). This (and the issue fixed by #11246) has kept the M1 fifoci offline, as it had a lot of issues with false positives.

Add an option to disable mipmaps so we can use the M1 fifoci again.

@Pokechu22
Copy link
Contributor

Looks good to me (especially since the setting is not exposed on the UI). I'm not sure whether arbitrary mipmap detection will still occur here or if having texLevels be 1 will skip that, but that doesn't really matter (since fifoci runs at 1x IR).

@iwubcode
Copy link
Contributor

iwubcode commented Nov 8, 2022

I would prefer wrapping it in a #if APPLE or if we want it to be provided to all platforms, then possibly using [[unlikely]] since there's really no use case I can think of for sane systems to use this.

Needed by M1 fifoci to work around a minor non-determinism bug
@TellowKrinkle
Copy link
Contributor Author

I would prefer wrapping it in a #if APPLE or if we want it to be provided to all platforms, then possibly using [[unlikely]] since there's really no use case I can think of for sane systems to use this.

Put it behind an #ifdef __APPLE__

@TellowKrinkle
Copy link
Contributor Author

TellowKrinkle commented Nov 8, 2022

If anyone was curious, here's some examples of the nondeterministic rendering (using https://fifo.ci/media/dff/DKCREFB2RAM.dff, which was very good at reproducing the issue)

Fun slightly different images

Example from the Metal renderer:
fda_0ce34dfd23277ec138e3dca9c97b2734d5c5355d
fda_f912fe4f25f52e0e43bdffb0c2f74e0a8f52f3d0
diff_fda

Example from the Vulkan renderer:
fdb_7c123239b8150a3f08d07f0ba18a8a8916881adf
fdb_8ddd665f705baf83aa6970884e615b8aa81e6b49
diff_fdb

@MayImilae
Copy link
Contributor

Looks good to me (especially since the setting is not exposed on the UI).

Same. LGTM.

@JosJuice JosJuice merged commit f28e560 into dolphin-emu:master Nov 11, 2022
11 checks passed
@TellowKrinkle TellowKrinkle deleted the NoMipsOption branch November 12, 2022 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants