Commit graph

97 commits

Author SHA1 Message Date
lat9nq
eae5e1f6f3 shared_translation: Finish using int ids 2023-07-21 10:56:07 -04:00
lat9nq
d7ffd33ca0 configure_graphics: Partial runtime implementation 2023-07-21 10:56:07 -04:00
lat9nq
b527f47bd6 configuration: Add base class to tabs
Tabs that largely configure SwitchableSetting's are now Tabs and grouped
together.
2023-07-21 10:56:07 -04:00
lat9nq
fc30b04714 settings,video_core: Consolidate ASTC decoding options
Just puts them all neatly into one place.
2023-07-21 10:56:07 -04:00
lat9nq
eb2c848912 vk_device_info: Check only affected Intel drivers
Renames is_intel_proprietary to has_broken_compute for accuracy.

vk_device_info: Use vulkan::device to check compute
2023-06-18 16:15:51 -04:00
lat9nq
3263f49390 yuzu-qt: Load Vulkan device info at startup
Loading it when the configuration opens now incurs a noticeable delay.
We also don't need to rediscover the same data repeatedly each time the
configuration opens.

Moves vulkan device info discovery to yuzu's startup as opposed to the
configure_graphics constructor.
2023-06-06 01:54:44 -04:00
bunnei
74e76421e6 android: native: Add support for custom Vulkan driver loading. 2023-06-03 00:05:31 -07:00
lat9nq
409c6af0e4 yuzu-qt/config: Add option to disable compute on Intel
This option is only visible if an Intel GPU using the proprietary
driver is found during Vulkan device enumeration.

configure_graphics: More directly get driver id

Vulkan::Device does quite a bit more than we need just to see the
driver ID here.
2023-05-07 01:06:22 -04:00
lat9nq
fa8da0ded9 qt_common: Remove yuzu prefix 2023-05-03 18:11:53 -04:00
lat9nq
047ee6733f configure_graphics: No there isn't a hyphen in VSync
Most sources seem to suggest VSync and not V-Sync
2023-05-02 21:52:43 -04:00
lat9nq
e382ab8058 configure_graphics: Clean up includes [IWYU] 2023-05-02 21:52:43 -04:00
lat9nq
40108e515b configure_graphics: Actively find present modes
When Vulkan devices are enumerated, this also determines the available
present modes for each device, maps them to a vector, and gives
those options to the user.
OpenGL options are limited to On/Off.

Required creating a VkSurfaceKHR during device enumeration, which
may or may not be desireable. For the sake of a less confusing UI.

Also fixes a bug where if a graphics device disappears on the host, we
don't try and select the non-existant devices.

configure_graphics: Remove vsync runtime lock for Vulkan

configure_graphics: Recommend Mailbox present mode

configure_graphics: Fix type-limits warning

configure_graphics: Clean up includes

configure_graphics: Add tooltip
2023-05-02 21:52:43 -04:00
lat9nq
581d8f34ee configuration: Expose separate swap present modes
Previously, yuzu would try and guess which vsync mode to use given
different scenarios, but apparently we didn't always get it right. This
exposes the separate modes in a drop-down the user can select.

If a mode isn't available in Vulkan, it defaults to FIFO.
2023-05-02 21:51:29 -04:00
Lioncash
1ad43e68da configure_graphics: Make SPIRV backend string translatable
The parenthetical needs to be translatable, like with GLASM
2022-12-06 00:13:07 -05:00
bunnei
d3e229ee9d Merge pull request #9344 from liamwhite/null
video_core: add null backend
2022-12-03 11:23:25 -08:00
Matías Locatti
39df80ff00 Merge pull request #9303 from liamwhite/new-vulkan-init
Vulkan: update initialization
2022-12-02 18:32:54 -03:00
Liam
acc4a150ef video_core: add null backend 2022-11-28 19:49:09 -05:00
Liam
0a077cb467 Vulkan: update initialization
Co-authored-by: bylaws <bylaws@users.noreply.github.com>
2022-11-27 14:58:28 -05:00
lat9nq
cedec65403 configure_graphics: Implement custom FSR Sharpening setting 2022-11-25 22:42:54 -05:00
Matías Locatti
8e19421f84 FSR Sharpening Slider part 1 - only a global slider 2022-11-24 04:22:13 -05:00
Morph
5254f0499b configure_graphics: Fix graphics API selection when a game is running
The graphics API setting should not be changed when a game is running.
2022-10-07 15:11:26 -04:00
Andrea Pappacoda
6a2efdda2f chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to b2eb103829
2022-07-27 12:53:49 +02:00
lat9nq
27848d6052 yuzu: Simplify broken Vulkan handling 2022-07-10 16:52:00 -04:00
lat9nq
d801be7c1a configure_graphics: Remove unused include 2022-06-04 04:18:21 -04:00
lat9nq
b527556c38 yuzu-qt: Make has_broken_vulkan only for crashes
Being able to catch and handle a Vulkan exception is not what this is
for.
2022-05-30 10:58:18 -04:00
lat9nq
7506b68555 yuzu-qt: Attempt to workaround broken Vulkan installations
This does a few things in order to make the default setting Vulkan
workable.

- When yuzu boots, it just opens the Vulkan library.
  - If it works, all good and we continue with Vulkan as the default.
  - If something breaks, a new file in the config directory will be left
    behind (this is deleted normally).
- If Vulkan is not working, has_broken_vulkan is set to true.
  - The first time this happens, a warning is displayed to notify the
    user.
  - This forces use of OpenGL, and Vulkan cannot be selected.
  - The Shader Backend selector is made accessible for use in custom
    configurations.
  - To disable has_broken_vulkan, the user needs to press a button in
    Graphics Configuration to manually run the Vulkan device
    enumeration.
2022-05-30 10:57:59 -04:00
ameerj
012963c513 yuzu: Reduce unused includes 2022-03-20 02:25:09 -04:00
Marshall Mohror
e6c99aecb0 Frontend: Add anti-aliasing method setting 2021-11-16 22:11:32 +01:00
lat9nq
c89adcb342 video_core,yuzu: Move UpdateRescalingInfo call to video_core
This only needs to happen once per game boot, so we can just call it
during CreateGPU and be done with it, avoiding the need to call it in
the frontends.
2021-11-16 22:11:30 +01:00
Fernando Sahmkow
bca25d2a0f Renderer: Implement Bicubic and ScaleForce filters. 2021-11-16 22:11:29 +01:00
Fernando Sahmkow
b9a9b8d768 Settings: Add resolution scaling to settings. 2021-11-16 22:11:27 +01:00
Morph
e7364a0165 configuration: Use std::make_unique instead of operator new for ui 2021-10-15 15:26:32 -04:00
lat9nq
6405a2a989 configuration: Add const qualifier where able 2021-10-07 13:50:13 -04:00
lat9nq
3aec34df0a yuzu qt: Remove global system instances from config, WaitTree, main 2021-10-07 13:50:13 -04:00
ameerj
82906e26a5 configure_graphics: Add GPU nvdec decoding as an option
Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference.

Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
2021-08-16 14:40:53 -04:00
bunnei
0821c4c02d Merge pull request #6700 from lat9nq/fullscreen-enum
general: Implement FullscreenMode enumeration
2021-07-28 11:36:42 -07:00
Vamsi Krishna
713f960ce3 configure_graphics: reword GLASM option
Change wording to explain that GLASM is actually short for Assembly Shaders
2021-07-26 20:49:31 +05:30
lat9nq
24b832dee9 Merge branch 'master' into fullscreen-enum 2021-07-25 15:31:33 -04:00
lat9nq
4b02e2b489 general: Implement FullscreenMode enumeration
Prevents us from using an unclear 0 or 1 to describe the fullscreen
mode.
2021-07-23 10:14:37 -04:00
lat9nq
df62bcd9cb configure_graphics: Mark SPIR-V as Experimental, Mesa only 2021-07-22 21:51:40 -04:00
lat9nq
84bc5be7a1 configure_graphics: Re-order vulkan device populating 2021-07-22 21:51:40 -04:00
lat9nq
ddd4720fe4 general: Add setting shader_backend
GLASM is getting good enough that we can move it out of advanced
graphics settings. This removes the setting `use_assembly_shaders`,
opting for a enum class `shader_backend`. This comes with the benefits
that it is extensible for additional shader backends besides GLSL and
GLASM, and this will work better with a QComboBox.

Qt removes the related assembly shader setting from the Advanced
Graphics section and places it as a new QComboBox in the API Settings
group. This will replace the Vulkan device selector when OpenGL is
selected.

Additionally, mark all of the custom anisotropic filtering settings as
"WILL BREAK THINGS", as that is the case with a select few games.
2021-07-22 21:51:39 -04:00
ameerj
62979cbf0b configure_graphics: Use u8 for bg_color values 2021-07-08 21:45:01 -04:00
ameerj
2ec9c87101 configure_graphics: Add Accelerate ASTC decoding setting 2021-06-15 20:19:00 -04:00
lat9nq
4158f88b49 configuration: Simplify applying per-game settings
Originally, every time we add a per-game setting, we'd have to guard for
it when setting it on the global config, and use a specific function to
do it for the per-game config.

This moves the global check into the ApplyPerGameSetting function so
that we can use it for changing both the global and per-game states.
Less work for the programmer.
2021-05-15 22:59:38 -04:00
bunnei
7a76bc30fa common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
Morph
827c0726cc configure_graphics: Add Borderless Windowed fullscreen mode
The borderless windowed fullscreen mode solves several issues with the presentation of the overlay dialogs and on-screen keyboard in exclusive fullscreen mode, and also has other benefits such as smoother gameplay, lower latency and a significant reduction in screen tearing.

Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-06 05:58:57 -04:00
lat9nq
140f317b01 configure_graphics: Prevent stack-use-after-scope
Address Sanitizer reports stack-use-after-scope on line 231
`vulkan_devices.push_back(QString::fromStdString(name));`. Instead of
using a pointer, copy the string into a std::string and use that,
instead.
2021-04-04 15:05:22 -04:00
ReinUsesLisp
758731e48c vulkan_wrapper: Pull Windows symbols 2021-02-13 02:16:21 -03:00
ReinUsesLisp
70b3c29534 gpu: Report renderer errors with exceptions
Instead of using a two step initialization to report errors, initialize
the GPU renderer and rasterizer on the constructor and report errors
through std::runtime_error.
2021-02-13 02:16:19 -03:00