mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 01:25:25 +00:00
1217a8e69b
This fixes a longstanding issue with resolution scale that could result in flickering graphics, typically the first frame something is drawn, or on camera cuts in cutscenes. The root cause of the issue is that texture scale can be changed when binding textures or images. This typically happens because a texture becomes a view of a larger texture, such as a 400x225 texture becoming a view of a 800x450 texture with two levels. If the 400x225 texture is bound as a render target and has state [1x Undesired], but the storage texture is [2x Scaled], the render target texture's scale is changed to [2x Scaled] to match its new storage. This means the scale changed after the render target state was processed... This can cause a number of issues. When render target state is processed, texture scales are examined and potentially changed so that they are all the same value. If one texture is scaled, all textures must be. If one texture is blacklisted from scaling, all of them must be. This results in a single resolution scale value being assigned to the TextureManager, which also scales the scissor and viewport values. If the scale is chosen as 1x, and a later texture binding changes one of the textures to be 2x, the scale in TextureManager no longer matches all of the bound textures. What's worse, the scales in these textures could mismatch entirely. This typically results in the support buffer scale, viewport and scissor being wrong for at least one of the bound render targets. This PR fixes the issue by re-evaluating render target state if any scale mismatches the expected scale after texture bindings happen. This can actually cause scale to change again, so it must loop back to perform texture bindings again. This can happen as many times as it needs to, but I don't expect it to happen more than once. Problematic bindings will just result in a blacklist, which will propagate to other bound targets. |
||
---|---|---|
.. | ||
ARMeilleure | ||
Ryujinx | ||
Ryujinx.Audio | ||
Ryujinx.Audio.Backends.OpenAL | ||
Ryujinx.Audio.Backends.SDL2 | ||
Ryujinx.Audio.Backends.SoundIo | ||
Ryujinx.Common | ||
Ryujinx.Cpu | ||
Ryujinx.Graphics.Device | ||
Ryujinx.Graphics.GAL | ||
Ryujinx.Graphics.Gpu | ||
Ryujinx.Graphics.Host1x | ||
Ryujinx.Graphics.Nvdec | ||
Ryujinx.Graphics.Nvdec.FFmpeg | ||
Ryujinx.Graphics.Nvdec.Vp9 | ||
Ryujinx.Graphics.OpenGL | ||
Ryujinx.Graphics.Shader | ||
Ryujinx.Graphics.Texture | ||
Ryujinx.Graphics.Vic | ||
Ryujinx.Graphics.Video | ||
Ryujinx.Graphics.Vulkan | ||
Ryujinx.Gtk3 | ||
Ryujinx.Headless.SDL2 | ||
Ryujinx.HLE | ||
Ryujinx.Horizon | ||
Ryujinx.Horizon.Common | ||
Ryujinx.Horizon.Generators | ||
Ryujinx.Horizon.Kernel.Generators | ||
Ryujinx.Input | ||
Ryujinx.Input.SDL2 | ||
Ryujinx.Memory | ||
Ryujinx.SDL2.Common | ||
Ryujinx.ShaderTools | ||
Ryujinx.Tests | ||
Ryujinx.Tests.Memory | ||
Ryujinx.Tests.Unicorn | ||
Ryujinx.UI.Common | ||
Ryujinx.UI.LocaleGenerator | ||
Spv.Generator |