Ryujinx-git/src
riperiperi 1217a8e69b
GPU: Rebind RTs if scale changes when binding textures (#6493)
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.
2024-03-14 19:59:09 -03:00
..
ARMeilleure Separate guest/host tracking + unaligned protection (#6486) 2024-03-14 19:38:27 -03:00
Ryujinx Ava UI: Update Ava (#6430) 2024-03-14 02:29:13 +01:00
Ryujinx.Audio Migrate Audio service to new IPC (#6285) 2024-02-22 16:58:33 -03:00
Ryujinx.Audio.Backends.OpenAL Migrate Audio service to new IPC (#6285) 2024-02-22 16:58:33 -03:00
Ryujinx.Audio.Backends.SDL2 Migrate Audio service to new IPC (#6285) 2024-02-22 16:58:33 -03:00
Ryujinx.Audio.Backends.SoundIo Migrate Audio service to new IPC (#6285) 2024-02-22 16:58:33 -03:00
Ryujinx.Common Add title of game to screenshot text (#6266) 2024-03-07 22:49:57 +00:00
Ryujinx.Cpu Separate guest/host tracking + unaligned protection (#6486) 2024-03-14 19:38:27 -03:00
Ryujinx.Graphics.Device Add a separate device memory manager (#6153) 2024-01-22 17:14:46 -03:00
Ryujinx.Graphics.GAL Vulkan: Improve texture barrier usage, timing and batching (#6240) 2024-02-17 00:21:37 -03:00
Ryujinx.Graphics.Gpu GPU: Rebind RTs if scale changes when binding textures (#6493) 2024-03-14 19:59:09 -03:00
Ryujinx.Graphics.Host1x Add a separate device memory manager (#6153) 2024-01-22 17:14:46 -03:00
Ryujinx.Graphics.Nvdec Add a separate device memory manager (#6153) 2024-01-22 17:14:46 -03:00
Ryujinx.Graphics.Nvdec.FFmpeg editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Nvdec.Vp9 editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.OpenGL OpenGL: Mask out all color outputs with no fragment shader (#6341) 2024-02-22 18:43:19 +01:00
Ryujinx.Graphics.Shader Fix geometry shader passthrough issue (#6462) 2024-03-13 17:26:19 -03:00
Ryujinx.Graphics.Texture editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Vic Remove Vic Reference to Host1x (#6277) 2024-02-08 20:01:03 +01:00
Ryujinx.Graphics.Video editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Vulkan Consider Polygon as unsupported is triangle fans are unsupported on Vulkan (#6490) 2024-03-14 19:46:57 -03:00
Ryujinx.Gtk3 Add title of game to screenshot text (#6266) 2024-03-07 22:49:57 +00:00
Ryujinx.Headless.SDL2 Infra: Capitalisation Consistency (#6296) 2024-02-11 03:09:18 +01:00
Ryujinx.HLE Update dependencies from SixLabors to the latest version before the license change (#6440) 2024-03-08 13:16:32 -03:00
Ryujinx.Horizon IPC code gen improvements (#6352) 2024-02-23 21:12:24 -03:00
Ryujinx.Horizon.Common Migrate Audio service to new IPC (#6285) 2024-02-22 16:58:33 -03:00
Ryujinx.Horizon.Generators IPC code gen improvements (#6352) 2024-02-23 21:12:24 -03:00
Ryujinx.Horizon.Kernel.Generators editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Input Input: Improve controller identification (#6029) 2024-01-22 17:02:44 -03:00
Ryujinx.Input.SDL2 Input: Improve controller identification (#6029) 2024-01-22 17:02:44 -03:00
Ryujinx.Memory Separate guest/host tracking + unaligned protection (#6486) 2024-03-14 19:38:27 -03:00
Ryujinx.SDL2.Common Load custom SDL mappings from application data folder (#6295) 2024-02-10 19:41:02 +01:00
Ryujinx.ShaderTools editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Tests Cpu: Implement Vpadal and Vrintr instructions (#6185) 2024-01-30 00:51:05 +01:00
Ryujinx.Tests.Memory Separate guest/host tracking + unaligned protection (#6486) 2024-03-14 19:38:27 -03:00
Ryujinx.Tests.Unicorn editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.UI.Common macOS: Stop storing user data in Documents for some users; fix symlinks (#6241) 2024-02-11 19:04:39 +01:00
Ryujinx.UI.LocaleGenerator Infra: Capitalisation Consistency (#6296) 2024-02-11 03:09:18 +01:00
Spv.Generator editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00