Commit Graph

218 Commits

Author SHA1 Message Date
6ea0d17802 VideoCommon: when graphics settings change, trigger a reload of all custom shaders 2023-08-20 18:53:27 -05:00
2edf81cdb0 Video: implement output resampling (upscaling/downscaling) methods 2023-08-18 02:00:55 +03:00
a2702c6e27 Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted.
To further increase the accuracy of the post process phase, I've added (scRGB) HDR support, which is necessary
to fully display the PAL and NTSC-J color spaces, and also to improve the quality of post process texture samplings and
do them in linear space instead of gamma space (which is very important when playing at low resolutions).
For SDR, the quality is also slightly increased, at least if any post process runs, as the buffer is now
R10G10B10A2 (on Vulkan, DX11 and DX12) if supported; previously it was R8G8B8A8 but the alpha bits were wasted.

Gamma correction is arguably the most important thing as Dolphin on Windows outputted in "sRGB" (implicitly)
as that's what Windows expects by default, though sRGB gamma is very different from the gamma commonly used
by video standards dating to the pre HDR era (roughly gamma 2.35).

Additionally, the addition of HDR support (which is pretty straight forward and minimal), added support for
our own custom AutoHDR shaders, which would allow us to achieve decent looking HDR in Dolphin games without
having to use SpecialK or Windows 11 AutoHDR. Both of which don't necessarily play nice with older games
with strongly different and simpler lighting. HDR should also be supported in Linux.
Development of my own AutoHDR shader is almost complete and will come next.

This has been carefully tested and there should be no regression in any of the different features that Dolphin
offers, like multisampling, stereo rendering, other post processes, etc etc.

Fixes: https://bugs.dolphin-emu.org/issues/8941

Co-authored-by: EndlesslyFlowering <EndlesslyFlowering@protonmail.com>
Co-authored-by: Dogway <lin_ares@hotmail.com>
2023-06-19 01:34:42 +03:00
23bebc5270 VideoBackends:Vulkan: Allow loading custom drivers on Android
... using libadrenotools
2023-06-11 13:52:34 +02:00
60f2b5af7b Apply suggestions from code review
Co-authored-by: Mai <mathew1800@gmail.com>
Co-authored-by: BhaaL <bhaalsen@gmail.com>
Co-authored-by: iwubcode <iwubcode@users.noreply.github.com>
2023-02-09 18:36:20 +13:00
cf9a6f8477 Lint fixes 2023-02-09 18:36:20 +13:00
31cfe8250d Lint fixes 2023-02-09 18:36:20 +13:00
11de923dcb Move xfb tracking and IR scaling out of RenderBase 2023-02-09 18:36:20 +13:00
3ae78b8e76 Also use events for config changed 2023-01-31 19:41:24 +13:00
0da69055d9 Split out everying remaining from Swap 2023-01-31 19:41:24 +13:00
9d125a6e43 Move ConfigChanged out of RenderBase
There is this nice VideoConfig file that's perfect for it
2023-01-31 19:41:24 +13:00
a2f4606d33 Merge pull request #11205 from TellowKrinkle/AutoPresent
VideoBackends:Metal: Default to presentDrawable when vsync is on
2023-01-30 09:01:18 +01:00
9c9310bf44 Merge pull request #11208 from TellowKrinkle/CPUCull
Cull vertices on the CPU
2023-01-26 23:15:23 +01:00
1be0149146 VideoCommon: Cull vertices on the CPU 2023-01-25 02:21:56 -06:00
23ad07b368 Add VISkip 2023-01-14 01:56:37 -05:00
673f81c18a New FrameTime/VBlank Analyzer + Graph 2022-12-23 19:52:53 -05:00
8a3b8a925e Core: Add option to force linear texture filtering. 2022-12-09 02:02:16 +01:00
edb2c90b38 Improve FPS/VPS Counting and Revamp Appearance 2022-11-23 00:11:47 +01:00
37a51f1d09 VideoCommon: Add an option to disable mipmaps
Needed by M1 fifoci to work around a minor non-determinism bug
2022-11-07 22:18:56 -06:00
fa8134deda VideoBackends:Metal: Default to presentDrawable when vsync is on 2022-10-24 17:55:30 -05:00
b66793194e Merge pull request #11028 from tellowkrinkle/MetalFixes
Various Metal renderer improvements
2022-10-24 15:22:37 -04:00
0a42c534c3 VideoCommon: Add configuration to prefer VS for line/point expansion 2022-10-22 20:13:24 -05:00
a13f09433c VideoBackends:Metal: Add config option to use presentDrawable 2022-10-08 04:46:07 -05:00
c08de82e90 VideoBackends:Metal: Bring back unified memory config
Turns out it was helpful.  (Most improvement in ubershaders.)  This time with much better auto mode.
2022-10-08 04:46:05 -05:00
56fce3ba8a Software: Remove dedicated texture/frame dumping infrastructure
Texture dumping can already be done using VideoCommon's system (and in fact the same setting already enabled *both* of these). Dumping objects/TEV stages/texture fetches doesn't currently have an equivalent, but could be added to the FIFO player instead.
2022-09-26 18:25:54 -07:00
76b4318b88 CPUDetect: improve win/arm64 support
read brand_string on macos/arm64
remove unused flags
report family/model info instead of vendor name
2022-07-25 21:21:11 -07:00
0f88155729 Core / DolphinQt / VideoCommon: add setting for enabling graphic mods 2022-06-27 18:20:52 -05:00
3949698acf Verify graphics config validity after populating the backend info
... and refresh the config before populating the backend info, as the config (specifically iAdapter) needs to be set to correctly populate the backend info.

Before, the list of valid antialiasing modes was always determined from the first adapter on the list on startup, regardless of the adapter the user selected.
2022-05-16 16:59:57 -07:00
f3eff70e2f Implement ImGui window for scissor rectangles
This is mainly for debugging, and is only exposed by manually editing the configuration.
2022-04-16 12:35:00 -07:00
c5c4169bc8 Merge pull request #10255 from Pokechu22/sw-zfreeze
Software: Fix zfreeze with CullMode::All
2022-04-15 11:12:49 +12:00
e932a1bfb7 Merge pull request #10571 from AdmiralCurtiss/ffmpeg-custom-pix-fmt
VideoCommon/FrameDump: Allow user to specify a pixel format.
2022-04-09 14:19:39 -04:00
3a742e99bb Software: Remove config to disable ZComploc and ZFreeze
These aren't particularly useful, and make the code a bit more confusing.  If for some reason someone wants to test what happens when these functions are disabled, it's easier to just edit the code that implements them.  They aren't exposed in the UI, so one would need to restart Dolphin to do it anyways.
2022-04-08 20:05:32 -07:00
f6ab317374 Fix typo (GFX_HACK_VERTEX_ROUDING -> GFX_HACK_VERTEX_ROUNDING) 2022-04-08 18:30:59 -07:00
3382408b8e VideoCommon/FrameDump: Allow user to specify a pixel format. 2022-04-09 00:45:49 +02:00
4c0dcf42b8 Merge pull request #10346 from iwubcode/fixed_shader_precompile_parallelization
VideoCommon: Fix shader precompilization detection
2022-01-06 16:28:15 -05:00
fb47035f97 Config: Port emulation speed setting to new config system. 2022-01-06 16:13:54 +01:00
9b4e5b00ee VideoCommon: assume the majority of os/drivers support parallel compiling of shaders, we can create bugs if there are issues. Android is assumed buggy 2022-01-04 20:40:07 -06:00
9a914d33d5 Merge pull request #9414 from DevJPM/master
Fix CPU Core Count detection and Enable Parallel Shader Compilation
2022-01-04 10:15:12 -05:00
2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
613c4563c2 VideoCommon: Gate Multi-Threaded Shader Pre-Compilation behind a bug entry 2021-11-22 09:34:28 +01:00
61cfd8696e Fix CPU Core Count detection and Enable Parallel Shader Compilation
This does this following things:

- Default to the runtime automatic number of threads for pre-compiling shaders
- Adds a distinct automatic thread count computation for pre-compilation  (which has less other things going on
and should scale better beyond 4 cores)
- Removes the unused logical_core_count field from the CPU detection
- Changes the semantics of num_cores from maximaum addressable number of cores to actually available CPU cores
(which is also how it was actually used)
- Updates the computation of the HTT flag now that AMD no longer lies about it for its Zen processors
- Background shader compilation is *not* enabled by default
2021-11-20 16:08:10 +01:00
93eea7cb13 VideoCommon: Add option to use old behavior (Fast Texture Sampling)
Co-authored-by: JosJuice <josjuice@gmail.com>
2021-11-17 21:27:32 -08:00
78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
c583cac568 Hack to hide debug cubes in Super Mario Sunshine
... while not breaking other games.
2021-06-09 20:50:49 -07:00
f6ab9a9b6f Core / VideoCommon: Remove old Free Look config 2020-12-24 13:49:25 -06:00
9c8338ec4c DolphinQt / VideoCommon: Add additional texture dumping options. Specifically, this enables users to choose whether to dump mip maps, base level textures, or both. 2020-07-22 19:30:27 -05:00
0441d6aa5e VertexShaderManager: Avoid accessing freelook control type configuration each call which caused a performance hit, move check to RenderBase where it is checked when config changes 2020-07-02 12:55:08 -05:00
11ba623f26 Add an option to present/skip presenting duplicate frames
Currently, we do not display every second frame in 25fps/30fps games
which run to vsync. This improves performance as there's less rendering
for the GPU to perform, but when combined with vsync, could cause frame
pacing issues.

This commit adds an option to force every frame generated by the console
to be displayed to the host, which may improve pacing for these games.
2020-01-14 10:57:35 +10:00
a218a794cb FramebufferManager: Implement deferred EFB cache invalidation 2019-03-09 12:24:04 +10:00