Commit Graph

18702 Commits

Author SHA1 Message Date
Fernando S 7461196839
Merge pull request #6515 from german77/gc_thread_safe
input_common: Fix data race on GC implementation
2021-10-23 23:28:22 +02:00
Feng Chen b769bea61b Fix vulkan viewport issue 2021-10-22 22:56:31 +08:00
ameerj 1841f63a40 common/alignment: Fix VS2022 compilation
VS2022 seems to introduce an optimization when moving vectors to check for equality of the element values. AlignmentAllocator needed to overload the equality operator to fix compilation of its usage in vector moving.
2021-10-20 01:22:00 -04:00
ameerj b01aa721ff input_common: Fix VS2022 compilation errors 2021-10-20 01:21:59 -04:00
bunnei c82318c9cb
Merge pull request #7197 from Moonlacer/tas_help_link
tas_ui: Add a Help Link to the TAS Page on the yuzu Website, Along with Minor Grammar Changes
2021-10-19 15:49:30 -07:00
bunnei c871320760
Merge pull request #7198 from ameerj/settings-chrono
settings: Remove std::chrono usage
2021-10-19 09:55:50 -07:00
ameerj 06894b0711 emit_spirv_image: Fix depth image implicit lod sample in compute
Ensures all drivers behave the same way in this case.
2021-10-17 17:09:11 -04:00
bunnei 4e81b799f1
Merge pull request #7173 from Morph1984/invalidate-unmap
KPageTable: Perform ranged invalidation when unmapping code memory
2021-10-17 03:25:26 -07:00
ameerj ef811c6425 settings: Remove std::chrono usage
Alleviates the dependency on chrono for all files that include settings.h
2021-10-17 00:37:49 -04:00
Moonlacer abe6d39b1a add_link
remove_accident

fix_whoopsie
2021-10-16 21:48:49 -05:00
Ameer J 3791c7ca82
Merge pull request #7077 from FernandoS27/face-down
A series of fixes to queries and indexed samplers.
2021-10-16 21:41:54 -04:00
Fernando Sahmkow 3f4444b552 Shader Compiler: avoid overflowed indices on indixed samplers. 2021-10-17 03:38:09 +02:00
Ameer J 5b735a4c9d
Merge pull request #7127 from FernandoS27/i-saw-a-wabbit
A few fixes on Vulkan and Rasterizer Caching
2021-10-16 21:37:43 -04:00
Mai M 28d343d288
Merge pull request #7195 from MightyCreak/fix-warning-typo
main: fix typo in warning message
2021-10-16 19:50:41 -04:00
Fernando Sahmkow da6673e79a SVC: Implement svcInfo:IdleTickCount
Used by the Witcher 3
2021-10-16 20:33:44 +02:00
Romain Failliot 992f325662 main: fix typo in warning message 2021-10-16 12:53:06 -04:00
Morph d4c79a0404 main: Add missing make_unique for ui 2021-10-15 19:36:52 -04:00
bunnei aef3ae1cb9
Merge pull request #7187 from FernandoS27/boy-i-say-boy
NVHost_Ctrl: Force wait if the gpu falls behind too long.
2021-10-15 16:14:32 -07:00
Morph 41b4047536
Merge pull request #7188 from Morph1984/web-applet-include
qt_web_browser: Add missing QApplication include
2021-10-15 18:52:22 -04:00
Feng Chen de81571289
service/vi: Stub IHOSBinderDriver::TransactParcel GetBufferHistory (#7184) 2021-10-15 18:50:45 -04:00
Morph 2b622411fd qt_web_browser: Add missing QApplication include 2021-10-15 18:48:50 -04:00
Fernando Sahmkow 53cf91d151 NvHost/Core: Address Feedback. 2021-10-16 00:23:27 +02:00
FernandoS27 198c6ad0d7 Suspend temporally 2021-10-16 00:23:23 +02:00
FernandoS27 7dca0bc11d NVHost_Ctrl: Force wait if the gpu falls behind too long. 2021-10-16 00:22:01 +02:00
Romain Failliot 427ce8dcef ui: fix crash when closing configure window
This crash happens 100% of the time (on Linux at least), you just need
to open the configure window and click OK.

It seems to happen when the tabs are destroyed and once all the tabs are
destroyed, a final signal is sent with `index == -1`. So `debug_tab_tab`
doesn't exist anymore when this happens, so the crash.
2021-10-15 17:43:30 -04:00
Morph 5c6ca597c5 bootmanager: Forward declare System and SystemResultStatus 2021-10-15 17:35:34 -04:00
Morph f0dc07dbac yuzu: Construct system in GMainWindow 2021-10-15 17:35:33 -04:00
Morph 17763a44d5 core: Move ResultStatus outside of System
Allows it to be a forward declaration in other header files.
2021-10-15 17:34:49 -04:00
Morph 218ebc1fe8 yuzu_cmd: Remove remaining static system instances 2021-10-15 17:34:48 -04:00
Morph b6719094e6 core: Remove static system instance 2021-10-15 17:34:48 -04:00
Mai M 764369f4c7
Merge pull request #7172 from Morph1984/out-of-bounds
string_util: Prevent out of bounds access in u16string_view buffer
2021-10-15 17:04:44 -04:00
Mai M d5c4af2d5b
Merge pull request #7174 from MightyCreak/hide-cursor-by-default
Check "Hide mouse on inactivity" by default
2021-10-15 17:03:10 -04:00
Mai M 5b7b7276d5
Merge pull request #7185 from Morph1984/make_unique_ui
yuzu: Use make_unique instead of operator new for constructing ui
2021-10-15 16:58:45 -04:00
Romain Failliot ecef109162 Hide mouse cursor by default 2021-10-15 16:01:20 -04:00
Creak bad122b195
main: Slightly refactor NCA entry installation in InstallNCA (#7181)
* main: Slightly refactor NCA entry installation in InstallNCA

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-10-15 15:57:25 -04:00
Morph 86908d569e main: Use std::unique_ptr for ui 2021-10-15 15:35:59 -04:00
Morph ab441fb009 configuration: Use std::make_unique instead of operator new for ui 2021-10-15 15:26:32 -04:00
lat9nq 851fe91b69
config: Read network_interface
Let's yuzu_cmd use a network interface. Also adds it to the default ini.
2021-10-15 12:14:09 -04:00
Moonlacer c68ce25a14
settings_ui: Better NVDEC Description For Each Video Rendering Option (#7165)
* better_description

* Revert "better_description"

This reverts commit 3a152a6ba6f2d6e02530b69a8194e4db302c8acd.

* better_nvdec_wording

* best_performance

* update_word_stuff

* another_update
2021-10-14 18:01:12 -07:00
Morph b02d662980
Merge pull request #6774 from lat9nq/remove-global-yuzu
yuzu qt: Remove global system instances
2021-10-14 14:12:22 -04:00
Morph 0d6057b2fa string_util: Make use of std::string_view and add bounds checking
Makes use of std::string_view in StringFromFixedZeroTerminatedBuffer and add bounds checking
2021-10-14 14:09:34 -04:00
Morph 3ffff78a27 string_util: Prevent out of bounds access in u16string_view buffer 2021-10-14 14:09:34 -04:00
Morph 894b483a0d
Merge pull request #7157 from ameerj/vic-surface-size
vic: Use the minimum of surface/frame dimensions when writing the final frame to the GPU
2021-10-13 20:41:17 -04:00
bunnei 2643752f93
Merge pull request #7142 from german77/sdl_range
input_common/sdl: Fix joystick range
2021-10-13 15:15:18 -07:00
bunnei 9f0f827db4
Merge pull request #7158 from ameerj/window-900p
main: Add option to reset window size to 900p
2021-10-13 12:29:45 -07:00
Morph 50384e2619 KPageTable: Perform ranged invalidation when unmapping code memory
Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
2021-10-13 14:27:11 -04:00
Ameer J a39760b947
Merge pull request #7147 from behunin/patch-1
Update configure_tas.ui
2021-10-12 15:52:21 -04:00
Ameer J 018cf3853e
Merge pull request #7109 from vonchenplus/fix_h264_max__reference_num_error
h264: Use max allowed max_num_ref_frames when using CPU decoding
2021-10-12 14:08:37 -04:00
Creak 0b8a7ca213
common/fs/path_util: Slightly refactor PathManagerImpl's constructor
This moves all GenerateYuzuPath calls outside of the platofrm-specific #ifdefs, replacing them with assignments to paths.
2021-10-11 21:56:25 -04:00
Romain Failliot 39b3c9022d Create local variables for mouse and wheel positions 2021-10-11 19:21:24 -04:00
Romain Failliot 818651909f Fix a few warnings
- configure_input_player_widget.cpp: always better to use `const auto &`
  whenever possible
- profiler.cpp: `ev->pos()` is deprecated, replace with
  `ev->position()`, which returns floats, thus the addition of
  `.toPoint()` (same as what's happening in `pos()`)
- game_list.cpp: `QString::SplitBehavior` is deprecate, use `Qt::`
  namespace instead
2021-10-11 19:21:17 -04:00
Morph 97452b9558
Merge pull request #7110 from vonchenplus/fix_extract_offline_romefs_error
applets/web: Fallback to loader to get the manual romfs if none is found
2021-10-11 02:09:42 -04:00
german77 8212a864ca input_common/sdl: Fix joystick range 2021-10-11 01:03:01 -05:00
ameerj 5c829c7e4e main: Add option to reset window size to 900p 2021-10-11 01:29:02 -04:00
Feng Chen 0ee2185c59 applets/web: Fallback to loader to get the manual romfs if none is found 2021-10-11 13:12:51 +08:00
ameerj f346b04d12 vic: Use the minimum of surface/frame dimensions when writing the final frame to the GPU
Addresses possible buffer overflow behavior.
2021-10-10 18:44:16 -04:00
Feng Chen ba8be75037 h264: Use max allowed max_num_ref_frames when using CPU decoding 2021-10-10 20:07:19 +08:00
Valeri 0394e4bb8e
vic: Allow surface to be higher than frame
Touhou Genso Wanderer Lotus Labyrinth R decodes 1920x1080 videos into 1920x1088 surface.
Only allow mismatch for height, since larger width would result in increasingly offset rows and somewhat defeat entire purpose of this check.
2021-10-09 20:22:09 +03:00
Mai M 39cd6306e6
Merge pull request #7138 from ameerj/vic-fmt
vic: Implement RGBX8 video frame format
2021-10-08 19:19:20 -04:00
Levi Behunin 54ae8d1649
Update configure_tas.ui
Remove the geometry property again(7045) after 7090 re-added.
2021-10-08 15:52:17 -06:00
ameerj 403fc86c11 vic: Avoid memory corruption when multiple streams with different dimensions are decoded
This is a work around to avoid buffer overflow errors until multi channel/multi stream decoding is supported.
2021-10-08 01:22:38 -04:00
ameerj 5aae61775f vic: Refactor frame writing methods 2021-10-07 14:56:44 -04:00
lat9nq b6894bfc5b discord_impl: Remove global system instances 2021-10-07 13:50:13 -04:00
lat9nq 4ce53ffe6a game_list: Remove global instances of Core::System 2021-10-07 13:50:13 -04:00
lat9nq 493905665c configuration: Add const qualifier where able 2021-10-07 13:50:13 -04:00
lat9nq fb66a455c4 yuzu qt: Remove global system instances from config, WaitTree, main 2021-10-07 13:50:13 -04:00
Morph bea7824bd1 kernel: hle_ipc: Foward declare KAutoObject 2021-10-07 13:32:36 -04:00
Morph 7bb2dd75cd service: Reduce header include overhead 2021-10-07 13:32:21 -04:00
ameerj 899fdb9c44 vic: Implement RGBX frame format 2021-10-07 11:06:57 -04:00
Fernando S f84328934f
Merge pull request #7118 from ameerj/vc-gpu-impl
gpu: Migrate implementation to the cpp file
2021-10-06 20:02:31 +02:00
bunnei 8fad7dc248
Merge pull request #7090 from Moonlacer/tas_spacing_addition
(Minor Change) Hint (?) Button Removal and Spacing Change to the TAS Window
2021-10-05 21:18:04 -07:00
bunnei 5b2fa8dd41
Merge pull request #7115 from ameerj/log-compile
common/logging: Reduce dependent header include overhead
2021-10-05 10:05:46 -07:00
bunnei b869439969
Merge pull request #7103 from Morph1984/service-ctx-event
service: Replace all service event creation with ServiceContext::CreateEvent
2021-10-04 17:20:46 -07:00
bunnei 158a693111
Merge pull request #7101 from ameerj/vk-tess-topology
vk_graphics_pipeline: Force patch list topology when tessellation is used
2021-10-04 15:37:32 -07:00
Fernando Sahmkow 0498669b4b Vulkan: Fix failing barrier on refresh. 2021-10-04 20:56:15 +02:00
FernandoS27 bb8bf740e9 RasterizerInterface: Correct size of CPU addresses to cache. 2021-10-04 20:47:31 +02:00
FernandoS27 7f4de3466a Vulkan: Fix the master Semaphore 2021-10-04 20:46:58 +02:00
bunnei 1d829150ee
Merge pull request #7107 from astrelsky/iob_fix
prevent access violation from iob in Memory::IsValidVirtualAddress
2021-10-04 11:08:35 -07:00
Ameer J 01f79d638f
Merge pull request #7091 from vonchenplus/fix_memroy_leak
core: Fix memory leak
2021-10-04 00:09:08 -04:00
bunnei e209fff374
Merge pull request #7111 from lat9nq/no-title-bar-version
main: Don't add an extra separator when the title version is absent
2021-10-03 00:27:08 -07:00
bunnei 4a77ceb151
Merge pull request #7113 from Morph1984/no-log-ip-addr
network: Do not log IP address
2021-10-02 23:19:34 -07:00
ameerj 71e19153ef nvflinger: Use jthread and stop_token for VSync thread
Avoids a destruction data race that may occur on the vsync thread
2021-10-03 00:35:57 -04:00
ameerj 6c0d902373 nvhost_ctrl: Refactor usage of gpu.LockSync()
This seems to only be used to protect a later gpu function call. So we can move the lock into that call instead.
2021-10-03 00:35:57 -04:00
ameerj 427bf76e62 gpu: Migrate implementation to the cpp file 2021-10-03 00:35:57 -04:00
bunnei 21ed944ff9
Merge pull request #6979 from german77/joycon_name
input_common: Add alternative string for joycons
2021-10-02 02:58:25 -07:00
Morph 2f5808b7ff service: am: Make use of Exit to exit the currently running application
This also moves the call to the end to ensure services are properly destructed on exit.
2021-10-01 23:39:55 -04:00
Morph 282bdfd1bf yuzu: main: Register a callback for Exit 2021-10-01 23:39:54 -04:00
Morph d8467ca6c0 core: Add Exit and ExitCallback
This allows ISelfController::Exit to stop the currently running application. This is typically used by homebrew to exit back to the homebrew menu after calling consoleExit with libnx.
2021-10-01 23:39:54 -04:00
Morph fadcee14f8 service: Replace service event creation with ServiceContext::CreateEvent
The service context helps to manage all created events and allows us to close them upon destruction.
2021-10-01 23:38:59 -04:00
Morph 219d0ba978 network: Do not log IP address
Logging this may be a privacy concern for some users.
2021-10-01 23:38:44 -04:00
bunnei 3a33519598
Merge pull request #7102 from Morph1984/remove-boxcat
Remove Boxcat BCAT backend
2021-10-01 18:41:41 -07:00
ameerj 579f4ea4bd common/logging: Reduce scope of fmt include 2021-10-01 20:48:49 -04:00
ameerj 5daf3abe65 common/logging: Move Log::Entry declaration to a separate header
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-10-01 20:48:49 -04:00
bunnei c3784b2a08
Merge pull request #7075 from v1993/power-of-tea
applets: Use subdirectory of main data directory for QtWebEngine storage
2021-09-30 16:29:28 -07:00
lat9nq 596323f89f main: Don't add an extra separator when the title version is absent
Some titles, such as homebrew, do not have any version string. Because
yuzu hard codes the title bar string assuming a version string is
preset, booting homebrew causes yuzu to add an extra separator with no
content between.

This uses a lambda expression to prevent that from happening.
2021-09-30 18:57:37 -04:00
bunnei 8bd5742349
Merge pull request #7061 from ameerj/dma-buffer-misc
buffer_cache, maxwell_dma: Minor refactoring and code fixes
2021-09-30 12:34:28 -07:00
Mai M b9251155f8
Merge pull request #7104 from Morph1984/style
style: Remove extra space preceding the :: operator
2021-09-29 19:32:39 -04:00
Andrew Strelsky 4ce0a650d1
prevent access violation from iob in Memory::IsValidVirtualAddress 2021-09-29 19:26:44 -04:00
bunnei 91341b421d
Merge pull request #7036 from ameerj/ogl-bgr-v2
gl_texture_cache: Unify BGR copy passes using PBOs
2021-09-29 16:10:56 -07:00
Andrew Strelsky 3fc7aceea7
Fixed invalid iterator usage 2021-09-29 06:58:48 -04:00
Morph e29f3b87f1 style: Remove extra space preceding the :: operator 2021-09-29 01:26:01 -04:00
Morph 839547dc90 CMakeLists: Remove BoxCat build option 2021-09-29 01:24:21 -04:00
Morph 8af9f3216e settings: Remove BCAT settings 2021-09-29 01:24:21 -04:00
Morph 673d37a7c2 configure_network: Remove BCAT 2021-09-29 01:24:21 -04:00
Morph 4acec5283e service: bcat: Remove BoxCat BCAT implementation
The current implementation of BoxCat as it stands is non-functional due to the reliance on a server providing BCAT files.
This implementation will eventually be replaced with one that allows the use of local BCAT files dumped from a Nintendo Switch.
2021-09-29 01:21:35 -04:00
Moonlacer d09e618bd2 configure_tas: Remove help button from dialog window 2021-09-29 00:12:31 -04:00
Moonlacer e55affe264 configure_tas: Ensure dialog buttons always stay at the bottom
Previously, the dialog buttons would be floating in-place when the dialog is stretched downwards.
This change ensures that the dialog buttons always stay at the bottom of the window.
2021-09-29 00:04:19 -04:00
Morph 5f6cd32c9e externals: Remove libzip 2021-09-28 23:18:39 -04:00
Morph 616d0236f5 file_sys: Remove vfs_libzip 2021-09-28 23:18:39 -04:00
Morph 781c1d8df8
Merge pull request #7018 from lat9nq/splat-stubs
audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAuto
2021-09-28 22:06:11 -04:00
Feng Chen 5fbfc4c19e Fix KShareMemory object leak 2021-09-29 09:51:20 +08:00
Ameer J fba301155b
Merge pull request #7042 from v1993/patch-7
Hide XInput bypass on non-Windows OSes
2021-09-28 17:07:12 -04:00
ameerj 6f35fb8d26 vk_graphics_pipeline: Force patch list topology when tessellation is used
Fixes a crash on some drivers when tessellation is used but the IA topology is not patch list.
2021-09-28 16:39:42 -04:00
bunnei 24c0dde958
Merge pull request #7076 from ameerj/amd-botw
vk_texture_cache: Disable cube compatibility flag on non-mesa AMD GCN4 and earlier
2021-09-28 10:46:56 -07:00
german77 bc4b4e3f56 service/es: Update to 13.0.0 2021-09-26 20:17:07 -05:00
german77 d780eab357 service/npns: Update to 13.0.0 2021-09-26 20:13:09 -05:00
german77 b0e83f949e service/vi: Update to 13.0.0 2021-09-26 20:12:02 -05:00
german77 321c64a122 service/am: Update to 13.0.0 2021-09-26 20:00:12 -05:00
german77 d103e2daf9 service/audio: Update to 13.0.0 2021-09-26 19:49:09 -05:00
german77 e401c77351 service/hid: Update to 13.0.0 2021-09-26 19:45:47 -05:00
german77 4b5f0af3fd service/btdrv: Update to 13.0.0 2021-09-26 19:32:45 -05:00
german77 f5b41068e6 service/usb: Update to 13.0.0 2021-09-26 19:26:52 -05:00
Morph 5114819b6b
Merge pull request #7078 from ameerj/vc-jthread-fixes
video_core: Fix jthread related hangs when stopping emulation
2021-09-26 16:40:13 -04:00
Feng Chen 7cd43b139a Fix KScopedAutoObject object leak when SendSyncRequest 2021-09-25 22:16:21 +08:00
Morph 7dd7c54add service: bsd: Stub Read
- Used by Diablo II: Resurrected
2021-09-25 08:04:33 -04:00
Morph 06f22c3d28 service: bsd: Implement Read
- Used by Diablo II: Resurrected
2021-09-24 16:46:52 -04:00
ameerj 73666fb262 general: Update style to clang-format-12 2021-09-24 15:52:05 -04:00
Morph c8512839d7
Merge pull request #7069 from lioncash/uuid
common/uuid: Add validity checking functions to interface
2021-09-24 08:02:11 -04:00
ameerj ab63a193d7 video_core: Fix jthread related hangs when stopping emulation
jthread on some compilers is more picky when it comes to the order in which objects are destroyed.
2021-09-23 20:34:02 -04:00
ameerj 1e1ecca691 vk_texture_cache: Disable cube compatibility flag on non-mesa AMD GCN4 and earlier
Fixes rainbow textures on BOTW.
2021-09-23 19:40:53 -04:00
Fernando Sahmkow d702b393a4 Vulkan Query Cache: make sure to wait for the query result. 2021-09-24 01:14:17 +02:00
Fernando Sahmkow 8fdb51ab46 QueryCache: Flush queries in order of running. 2021-09-24 01:13:42 +02:00
bunnei 326a449ef0
Merge pull request #7068 from behunin/patch-3
Debug Config Ui: Clean-up and nits
2021-09-23 15:19:22 -07:00
v1993 3e07655b1b
Use subdirectory of main data directory for QtWebEngine storage
Previously, an unrelated directory was used for this. Keep everything together for consistency.
2021-09-24 00:49:39 +03:00
bunnei 17bf40f405
Merge pull request #7045 from behunin/patch-1
Tas configure ui nits
2021-09-23 09:29:55 -07:00
Fernando Sahmkow 60a3980561 Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan. 2021-09-23 03:49:10 +02:00
Lioncash 091e141142 core/profile_select: Avoid uninitialized read in SelectProfile()
The default constructor of UUID doesn't initialize its data members, so
we need to directly initialize it to be invalid.
2021-09-22 18:10:39 -04:00
Lioncash 40314cc586 common/uuid: Add validity checking functions to interface
Given we have a function to invalidate, we should also have ones to
query the validity. Also makes the code more straightforward to read.
2021-09-22 17:59:00 -04:00
Levi Behunin 2b3c9c61db Clean-up and nits
Remove redundent label, rearange checkboxs to keep same 3 per column layout, remove unneeded properties.
2021-09-22 00:56:03 -06:00
Levi Behunin 77e327dd1a Clean-up
Numerize names, remove unneeded properties and spacer.
2021-09-20 20:02:54 -06:00
bunnei 7b22d61fb1
Merge pull request #7003 from ameerj/unlocked-present-mode
vk_swapchain: Use immediate present mode when mailbox is unavailable and FPS is unlocked
2021-09-20 14:34:21 -07:00
Ameer J cd973d6037
Merge pull request #7017 from FernandoS27/i-am-barbie-girl
Spir-V: Rescale the frag depth to 0,1 mode when -1,1 mode is used in Vulkan.
2021-09-19 23:56:08 -04:00
ameerj 24049591f6 maxwell_dma: Minor refactoring 2021-09-19 20:36:41 -04:00
ameerj 1ea8073783 buffer_cache: Minor fixes
Loop through the tmp_intervals by reference, rather than by copy, and fix gl clear buffer size calculation.
2021-09-19 20:35:07 -04:00
bunnei a9c3619d26
Merge pull request #7019 from ameerj/videocore-jthread
videocore: Use std::jthread for worker threads
2021-09-18 20:37:40 -07:00
Levi Behunin ad85689417
Tas configure ui nits
Text looked cramped on my pc (Ubuntu 21.04). Re-flowed text as well for nicer read.
2021-09-18 19:41:59 -06:00
german77 75d8ec1e9f UI: Relocate tas menu and add brief description 2021-09-18 23:23:03 +02:00
german77 5401cf6eb5 input_common/tas: new update method 2021-09-18 23:22:57 +02:00
german77 33a1d790e8 input_common/tas: Document the main class 2021-09-18 23:22:48 +02:00
german77 e6c4bf52f0 input_common/tas: Add swap controller 2021-09-18 23:22:42 +02:00
german77 9bb6580d89 input_common/tas: overwrite file dialog 2021-09-18 23:22:42 +02:00
MonsterDruide1 f078b15565 input_common/tas: Fallback to simple update 2021-09-18 23:22:30 +02:00
german77 c01a872c8e config: Move TAS options to it's own menu 2021-09-18 23:22:30 +02:00
MonsterDruide1 4297d2fea2 core: Hacky TAS syncing & load pausing
To keep the TAS inputs synced to the game speed even through lag spikes and loading zones, deeper access is required.

First, the `TAS::UpdateThread` has to be executed exactly once per frame. This is done by connecting it to the service method the game calls to pass parameters to the GPU: `Service::VI::QueueBuffer`.

Second, the loading time of new subareas and/or kingdoms (SMO) can vary. To counteract that, the `CPU_BOOST_MODE` can be detected: In the `APM`-interface, the call to enabling/disabling the boost mode can be caught and forwarded to the TASing system, which can pause the script execution if neccessary and enabled in the settings.
2021-09-18 23:22:20 +02:00
MonsterDruide1 3a7b37238b main: TAS Playback state label
During script playback/recording, the user has to see what happens currently. For that, a new label has been added to the bottom-left corner, always displaying the current state of the TASing system.
2021-09-18 23:22:12 +02:00
MonsterDruide1 f25d6ebc45 settings: File selector & other settings
First of all, TASing requires a script to play back. The user can select the parent directory at `System -> Filesystem`, next to an option to pause TAS during loads: This requires a "hacky" setup deeper in the code and will be added in the last commit.

Also, Hotkeys are being introduced: CTRL+F5 for playback start/stop, CTRL+F6 for re-reading the script and CTRL+F7 for recording a new script.
2021-09-18 23:22:11 +02:00
MonsterDruide1 b42c3ce21d input_common/tas: Base playback & recording system
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called.

The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate.

Co-authored-by: Naii-the-Baf <sfabian200@gmail.com>
Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
2021-09-18 23:22:00 +02:00
bunnei 35f46fc079
Merge pull request #7020 from Moonlacer/remove_audio_stretching
Remove audio stretching
2021-09-18 11:18:24 -07:00
Valeri 738cd1896b
If not on Windows, disable raw input
This way, if someone copies their Windows config to other OS, they won't be stuck without web applet for no apparent reason.
2021-09-18 15:10:00 +03:00
Valeri b54bf126f7
Hide XInput bypass on non-Windows OSes
Follow-up to #6950. This option is a no-op on other OSes and only serves to spread confusion there.
2021-09-18 14:41:51 +03:00
bunnei 6d7801deb7
Merge pull request #6950 from german77/multiplay
input_common: Add advanced setting for 8 player support
2021-09-17 17:25:51 -07:00
bunnei d4ee94165f
Merge pull request #7015 from german77/NotGoodForTerra
ngct: Stub Match
2021-09-17 10:58:55 -07:00
bunnei ff54d9615f
Merge pull request #7011 from ameerj/vk-validation-0x0
vulkan_debug_callback: Ignore InvalidCommandBuffer-VkDescriptorSet errors
2021-09-16 17:17:04 -07:00
ameerj 22162f906b host_shaders: Remove opengl_copy_bgra.comp 2021-09-16 19:49:13 -04:00
ameerj ab808fe7cf gl_texture_cache: Migrate BGRCopyPass from util_shaders
The BGR copies no longer use shaders.
2021-09-16 19:49:12 -04:00
Fernando S a606b1448b
Merge pull request #7027 from ameerj/sorry-amd
vulkan_device: Reorder Float16Int8 declaration
2021-09-16 07:05:58 +02:00
ameerj e3c153efa4 vulkan_device: Reorder Float16Int8 declaration
This variable was going out of scope before its usage in the vulkan device creation, causing a crash on very specific drivers.
2021-09-16 00:54:24 -04:00
ameerj 5601e1cb00 Revert "Merge pull request #7006 from FernandoS27/a-motherfucking-driver"
This reverts commit 62e88d0e74, reversing
changes made to edf3da346f.
2021-09-16 00:51:22 -04:00
bunnei f6d5444293
Merge pull request #7010 from Morph1984/fs-timestamp
vfs: Partially implement GetFileTimeStampRaw
2021-09-15 20:13:26 -07:00
Moonlacer 371feaa635 fix_clang_error 2021-09-15 20:20:45 -05:00
ameerj 7f737b022a util_shaders: Unify BGRA copy passes 2021-09-15 21:10:52 -04:00
Moonlacer 09ab819040 fix_accidental_deletion 2021-09-15 19:59:10 -05:00
Moonlacer 44135b011f remove-audio-stretching-setting 2021-09-15 19:52:43 -05:00
ameerj 84f7e7e91c vk_scheduler: Use std::jthread 2021-09-15 20:49:07 -04:00
ameerj 877cd60b00 gpu: Use std::jthread for async gpu thread 2021-09-15 20:49:07 -04:00
ameerj c2ddda2f51 threadsafe_queue: Add std::stop_token overload to PopWait
Useful for jthreads which make use of the threadsafe queues.
2021-09-15 20:49:07 -04:00
lat9nq 7bc07195c5 audin_u: Return a buffer event in RegisterBufferEvent
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2021-09-15 16:38:12 -04:00
lat9nq 17b0955f9a audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAuto
This also moves IAudioIn's definition to the header.

Required for Splatoon 2 LAN play.
2021-09-15 15:52:09 -04:00
Fernando Sahmkow 13471ddf86 Build System: Build with JCC Erratum Mitigation 2021-09-15 21:32:44 +02:00
Fernando Sahmkow 8984abfc76 Spir-V: Rescale the frag depth to 0,1 mode when -1,1 mode is used in Vulkan. 2021-09-15 21:30:33 +02:00
Narr the Reg b34b3efbb2
ngct: Stub Match
Needed for  Cruis'n Blast
2021-09-15 00:17:31 -05:00
Morph 2df2b3719a renderers: Log total pipeline count 2021-09-14 13:18:26 -04:00
Morph 8d63ebcb64 vfs: Partially implement GetFileTimeStampRaw
Gets rid of homebrew warnings using this func
2021-09-14 08:48:01 -04:00
bunnei 081ccc6441
Merge pull request #7009 from ameerj/main_process_cleanup
core: Destroy main_process during shutdown
2021-09-13 23:32:43 -07:00
ameerj 67f7a6c398 core: Destroy main_process during shutdown
The main_process was never being cleaned up, causing a noticeable memory leak after subsequent launches. This change cleans up the memory during Core Shutdown, mitigating the leak.
2021-09-13 23:44:52 -04:00
ameerj db1c4b125f vulkan_debug_callback: Ignore InvalidCommandBuffer-VkDescriptorSet errors
This validation error is spammed on some titles, asserting that VkDescriptorSet 0x0[] was destroyed.

This is likely a validation layer bug when using VK_KHR_push_descriptor, which can avoid using traditional VkDescriptorSet. It should be safe to ignore for now.
2021-09-13 23:08:59 -04:00
Morph d86a9b9a4b
Merge pull request #6943 from FernandoS27/omae-wa-mou-shindeiru
Vulkan: Disable VK_EXT_SAMPLER_FILTER_MINMAX in GCN AMD
2021-09-13 17:33:15 -04:00
Fernando Sahmkow 7a712da2b3 Vulkan: Disable VK_EXT_SAMPLER_FILTER_MINMAX in GCN AMD since it's broken. 2021-09-13 23:29:57 +02:00
Morph 62e88d0e74
Merge pull request #7006 from FernandoS27/a-motherfucking-driver
Vulkan: Blacklist Int8Float16 Extension on AMD on driver 21.9.1
2021-09-13 17:25:56 -04:00
Mai M edf3da346f
Merge pull request #7005 from Morph1984/enum-bitwise-shift-ops
common_funcs: Add enum flag bitwise shift operator overloads
2021-09-13 17:21:22 -04:00
Morph fde9b84b21
Merge pull request #6944 from FernandoS27/dear-drunk-me
Vulkan/Descriptors: Increase sets per pool on AMD propietary driver.
2021-09-13 17:20:07 -04:00
Fernando Sahmkow e7c8a0bb23 Vulkan: Blacklist Int8Float16 Extension on AMD on driver 21.9.1 2021-09-13 23:17:37 +02:00
Fernando S 1bb28dfe2c
Merge pull request #7001 from ameerj/wario-fix
vk_rasterizer: Fix dynamic StencilOp updating when two faces are enabled
2021-09-13 23:16:59 +02:00
Fernando Sahmkow e7ca37b1e5 Vulkan/Descriptors: Increase sets per pool on AMFD propietary driver. 2021-09-13 23:09:18 +02:00
Morph 3512cae623 common_funcs: Add enum flag bitwise shift operator overloads
This adds bitwise shift operator overloads (<<, >>, <<=, >>=) in the macro DECLARE_ENUM_FLAG_OPERATORS(type)
2021-09-13 16:01:20 -04:00
Ameer J d180fd7c36
Merge pull request #7000 from Morph1984/create-dir-comment
FS: Mark recursive CreateDirectory as inaccurate and temporary
2021-09-12 21:06:52 -04:00
ameerj 35e5a67a83 vk_swapchain: Use immediate present mode when mailbox is unavailable and FPS is unlocked
Allows drivers that do not support VK_PRESENT_MODE_MAILBOX_KHR the ability to present at a framerate higher than the monitor's refresh rate when the FPS is unlocked.
2021-09-12 20:32:23 -04:00
Mai M e4318d2207
Merge pull request #7002 from ameerj/vk-state-unused
vk_state_tracker: Remove unused function
2021-09-12 17:31:56 -04:00
ameerj 678f73069f vk_rasterizer: Fix dynamic StencilOp updating when two faces are enabled
This function was incorrectly using the stencil_two_side_enable register when dynamically updating the StencilOp.
2021-09-12 16:19:12 -04:00
ameerj 8e289ade15 vk_state_tracker: Remove unused function 2021-09-12 15:28:24 -04:00
Morph 727f607e00 FS: Mark recursive CreateDirectory as inaccurate and temporary 2021-09-12 14:06:01 -04:00
Morph 9248442bb2
Merge pull request #6948 from ameerj/amd-warp-fix
shaders: Fix warp instructions on 64-thread warp devices
2021-09-12 13:53:29 -04:00
Morph 4ab549e62a
Merge pull request #6975 from ogniK5377/acc-async-ctx
account: EnsureTokenIdCacheAsync
2021-09-12 12:03:10 -04:00
Morph f0f416e85c
Merge pull request #6974 from ogniK5377/fs-recursive-createdir
FS: Recursively create directories for CreateDirectory
2021-09-12 12:02:39 -04:00
Morph 9907302465
Merge pull request #6997 from ameerj/stop-emulation-confirmation
main: Apply confirm exit setting in exit locked scenarios
2021-09-12 12:01:57 -04:00
Morph 3428232bca
Merge pull request #6992 from german77/brains
hid/am: Stub SetTouchScreenConfiguration and implement GetNotificationStorageChannelEvent
2021-09-12 12:01:43 -04:00
Morph 74030eb427
Merge pull request #6987 from Morph1984/common-error
common: Move error handling functions out of common_funcs
2021-09-12 12:01:23 -04:00
Morph 47b6f522bd
Merge pull request #6986 from Morph1984/version-update
api_version: Update and add AtmosphereTargetFirmware
2021-09-12 12:01:11 -04:00
ameerj 188cf1aed2 main: Apply confirm exit setting in exit locked scenarios
Some titles set an exit lock through HLE, which prompts an exit confirmation when stopping emulation if the system is locked.
This change allows bypassing this confirmation if the setting to confirm exits has been disabled by the user.
2021-09-12 00:31:32 -04:00
Morph e67463df24 shader_environment: Add missing <algorithm> include 2021-09-11 17:19:16 -04:00
Morph 63b4c8f9f7 vk_descriptor_pool: Add missing <algorithm> include 2021-09-11 17:19:16 -04:00
Morph 76abf55f25 slot_vector: Add missing <algorithm> include 2021-09-11 17:19:15 -04:00
Morph 554c46d186 video_core/memory_manager: Add missing <algorithm> include 2021-09-11 17:19:15 -04:00
Morph 6f307f1521 kernel: Add missing <functional> include 2021-09-11 17:19:15 -04:00
Morph 4a6a73e887 file_sys/kernel_executable: Add missing <string> include 2021-09-11 17:19:14 -04:00
Morph ae028ddf22 codec: Add missing <string_view> include 2021-09-11 17:19:14 -04:00
Morph eb1e3f19bb common_funcs: Replace <algorithm> with <iterator> 2021-09-11 17:19:14 -04:00
Morph 290afc00d3 common: Move error handling to error.cpp/h
This allows us to avoid implicitly including <string> every time common_funcs.h is included.
2021-09-11 17:19:14 -04:00
Fernando S be4e192903
Merge pull request #6846 from ameerj/nvdec-gpu-decode
nvdec: Add GPU video decoding for all capable drivers and platforms
2021-09-11 23:11:32 +02:00
Fernando S 82c867164b
Merge pull request #6901 from ameerj/vk-clear-bits
vk_rasterizer: Only clear depth/stencil buffers when specified in attachment aspect mask
2021-09-11 22:36:22 +02:00
Fernando S ec6490f5ad
Merge pull request #6941 from ameerj/swapchain-srgb
vk_swapchain: Prefer linear swapchain format when presenting sRGB images
2021-09-11 22:36:03 +02:00
Fernando S 472aad69db
Merge pull request #6953 from ameerj/anv-semaphore
renderer_vulkan: Wait on present semaphore at queue submit
2021-09-11 22:35:52 +02:00
Fernando S 55854c807d
Merge pull request #6981 from ameerj/nvflinger-hb-format
nvflinger: Use external surface format for framebuffer creation
2021-09-11 22:35:25 +02:00
german77 9bddcdac69 am: Implement GetNotificationStorageChannelEvent 2021-09-10 12:24:50 -05:00
german77 a7bbd37f81 hid: Stub SetTouchScreenConfiguration 2021-09-10 12:24:28 -05:00
german77 5798537ce4 input_common: Enable steam controllers and 8 player support 2021-09-10 00:58:12 -05:00
Morph c9710f6c78 api_version: Update and add AtmosphereTargetFirmware 2021-09-10 01:10:47 -04:00
bunnei 7e9163779d
Merge pull request #6962 from vonchenplus/spirv_support_legacy_attribute
renderer_vulkan: Spirv support glsl  legacy attribute
2021-09-08 14:04:44 -07:00
Chloe 005b0e68db
Addressed issues
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-09-09 03:00:08 +10:00
Chloe Marcec 543081e4a1 Mark is_complete as atomic 2021-09-09 00:10:52 +10:00
Chloe Marcec 89958e27aa Addressed issues 2021-09-09 00:09:04 +10:00
Fernando S 6b16f7807e
Merge pull request #6980 from vonchenplus/fix_blend_equation_error
Fix blend equation enum error
2021-09-08 11:50:26 +02:00
Ameer J eb1ba45c39
Merge pull request #6971 from bunnei/buffer-queue-kevent
core: hle: service: buffer_queue: Improve management of KEvent.
2021-09-08 00:34:36 -04:00
Feng Chen b1e655f898 Detail adjustment 2021-09-08 10:30:00 +08:00
Feng Chen bbc1800c1b Detail adjustment 2021-09-08 09:53:10 +08:00
Feng Chen e5ca733722 Re-implement get unused location 2021-09-07 13:22:52 +08:00
Feng Chen 9cdf2383e9 Move attribute related definitions to spirv anonymous namespace 2021-09-07 12:34:35 +08:00
german77 4bc3c788f5 input_common: Add alternative string for joycons 2021-09-06 22:20:19 -05:00
ameerj 9e2bf49677 nvflinger: Use external surface format for framebuffer creation
The format member the IGBPBuffer may not always specify the correct desired format. Using the external format member ensures a valid format is provided when creating the framebuffer.

Fixes homebrew using the wrong framebuffer format.
2021-09-06 23:14:31 -04:00
Ameer J ab73787d8f
Merge pull request #6977 from Moonlacer/master
Second part of Golden's PR #6976
2021-09-06 22:58:23 -04:00
Feng Chen 0292374807 Fix blend equation enum error 2021-09-07 10:12:09 +08:00
Moonlacer bdd153bc0d Second part of Golden's PR 2021-09-06 15:25:40 -05:00
Matías Locatti 296fa4e06e
Rename all shader cache references to pipeline cache
After Hades, both OpenGL and Vulkan use a pipeline cache instead of single stages of the graphics pipeline. Renamed the Remove menu entries to match.
2021-09-06 15:53:04 -03:00
Chloe Marcec 9141816b10 address name shadowing with system 2021-09-06 22:13:51 +10:00
Chloe Marcec 4e2aa50cef account: EnsureTokenIdCacheAsync
Closes #2547, #6946
2021-09-06 21:16:21 +10:00
bunnei 51ccc29cdd
Merge pull request #6965 from bunnei/cpu_manager_jthread
core: cpu_manager: Use jthread.
2021-09-06 03:49:14 -07:00
Chloe Marcec 0b891c9245 FS: Recursively create directories for CreateDirectory
Originally we only created the parent directory, this caused issues for creating directories which also contained subdirectories, eg `/Folder1/Folder2`

This allows the ultimate mod manager homebrew to at least boot
2021-09-06 19:35:55 +10:00
Feng Chen 1de9e4e121 Dynamic get unused location 2021-09-06 10:46:03 +08:00
Feng Chen d994466a08 Implement intput and output fixed fnc textures 2021-09-06 10:36:45 +08:00
bunnei e05bfd2f54 core: hle: service: buffer_queue: Improve management of KEvent. 2021-09-04 22:25:46 -07:00
bunnei fb3e9314b9 core: hle: service: nvflinger/vi: Improve management of KEvent. 2021-09-03 21:53:00 -07:00
bunnei 25a97e0139 core: cpu_manager: Use jthread. 2021-09-03 19:05:41 -07:00
Feng Chen a7bbaa4897 Rename parameters 2021-09-03 23:52:20 +08:00
Feng Chen cf26f375ff Fix create GraphicsPipelines crash 2021-09-03 22:55:53 +08:00
ameerj 7d854fbdb0 renderer_vulkan: Wait on present semaphore at queue submit
The present semaphore is being signalled by the call to acquire the
swapchain image. This semaphore is meant to be waited on when rendering
to the swapchain image. Currently it is waited on when presenting, but
moving its usage to be waited on in the command buffer submission allows
for proper usage of this semaphore.

Fixes the device lost when launching titles on the Intel Linux Mesa driver.
2021-09-02 13:13:20 -04:00
Feng Chen 1e2a89d306 Add input/output location 2021-09-02 23:34:51 +08:00
bunnei b2572a56d3
Merge pull request #6900 from ameerj/attr-reorder
structured_control_flow: Add DemoteCombinationPass
2021-09-01 17:36:26 -07:00
german77 c57e0b3b24 common/logging: Add missing include 2021-09-01 19:13:33 -05:00
ameerj d956fb3c7c emit_glsl_warp: Fix shuffle ops for 64-thread warp sizes 2021-08-31 16:11:25 -04:00
ameerj 5b45dfe971 emit_glsl_warp: Fix ballot related ops for 64-thread warp sizes 2021-08-31 16:11:25 -04:00
ameerj a5d9dcf3d9 emit_spirv_warp: Fix shuffle ops for 64-thread warp sizes 2021-08-31 13:40:39 -04:00
ameerj 95213270ef emit_spirv_warp: Fix ballot related ops for 64-thread warp sizes 2021-08-31 13:40:12 -04:00
bunnei 956171f024
Merge pull request #6897 from FernandoS27/pineapple-does-not-belong-in-pizza
Project <tentative title>: Rework Garbage Collection.
2021-08-31 09:11:21 -07:00
Feng Chen 73b11f390e Add colorfront and txtcoord support 2021-09-01 00:07:25 +08:00
bunnei 122eb3cbd0
Merge pull request #6928 from ameerj/spirv-get-frontface
emit_spirv_context_get_set: Fix Get FrontFace return value
2021-08-30 18:16:31 -07:00
bunnei ec19d9594f
Merge pull request #6879 from ameerj/decoder-assert
vk_blit_screen: Fix non-accelerated texture size calculation
2021-08-30 15:24:04 -07:00
ameerj 907dfbea71 structured_control_flow: Skip reordering nested demote branches.
Nested demote branches add complexity with combining the condition if it has not been initialized yet. Skip them for the time being.
2021-08-30 11:46:25 -04:00
ameerj 4fda7f1c82 structured_control_flow: Conditionally invoke demote reorder pass
This is only needed on select drivers when a fragment shader discards/demotes.
2021-08-30 11:46:24 -04:00
Fernando Sahmkow fe0acec539 Garbage Collection: Make it more agressive on high priority mode. 2021-08-29 18:57:17 +02:00
Fernando Sahmkow ff48f06fb9 Garbage Collection: Adress Feedback. 2021-08-29 18:19:53 +02:00
bunnei 5f19b66189
Merge pull request #6905 from Morph1984/nifm-misc
nifm/network_interface: Cleanup and populate fields in GetCurrentNetworkProfile
2021-08-29 00:04:58 -07:00
ameerj 27f8f3333f vulkan_device: Enable VK_KHR_swapchain_mutable_format if available
Silences validation errors when creating sRGB image views of linear swapchain images
2021-08-29 02:03:36 -04:00
ameerj 3c65c8580f vk_swapchain: Prefer linear swapchain format when presenting sRGB images
Fixes broken sRGB when presenting from a secondary GPU.
2021-08-29 02:03:35 -04:00
bunnei 4e88989435
Merge pull request #6921 from ameerj/vp9-unused
vp9_types: Remove unusued VP9 info struct members
2021-08-28 22:20:09 -07:00
Morph 7d2265b6a8
Merge pull request #6927 from german77/ngct
ngct: Stub NGCT:U service
2021-08-28 23:03:29 -04:00
Fernando Sahmkow ba82bb359b Garbage Collection: enable as default, eliminate option. 2021-08-28 17:55:37 +02:00
Fernando Sahmkow d540d284b5 VideoCore: Rework Garbage Collection. 2021-08-28 17:54:12 +02:00
ameerj 862dc2b2b3 structured_control_flow: Add DemoteCombinationPass
Some drivers misread data when demotes are interleaved in the program. This moves demote branches to be checked at the end of the program.
Fixes "wireframe" issue in Pokemon SwSh on some drivers
2021-08-28 11:35:25 -04:00
german77 f134a5e56c ngct: Stub NGCT:U service 2021-08-27 14:15:34 -05:00
Morph 790a09bc93
Revert "logging: Display backtrace on crash" 2021-08-27 04:01:22 -04:00
Morph c1e2063c0d service: nifm: Populate fields in GetCurrentNetworkProfile
Populates the current_address, subnet_mask, and gateway fields from the selected network interface.
2021-08-27 02:10:59 -04:00
Morph 878d0225c5 service: nifm: Cleanup GetCurrentIpConfigInfo 2021-08-27 02:10:58 -04:00
Morph 871e1c6315 network_interface: Cleanup code 2021-08-27 02:10:58 -04:00
Morph a32a7dacf4 network_interface: Replace default return value with std::nullopt 2021-08-27 02:10:58 -04:00
ameerj 6e407c02d8 emit_spirv_context_get_set: Fix Get FrontFace return value
The IR expects GetAttribute to return an F32 value. This case was returning a U32 instead.
2021-08-26 21:37:34 -04:00
bunnei d10d480642
Merge pull request #6870 from yzct12345/trace-back-stack-back-stack-back
logging: Display backtrace on crash
2021-08-26 17:41:14 -07:00
bunnei 0c8594b225
Revert "kernel: Various improvements to scheduler" 2021-08-25 20:59:28 -07:00
ameerj eb2624ed65 vp9_types: Minor refactor of VP9 info structs. 2021-08-25 21:42:43 -04:00
ameerj 3de38c9a70 vp9_types: Remove unused Vp9PictureInfo members 2021-08-25 21:29:22 -04:00
Fernando S 3843995ceb
Merge pull request #6919 from ameerj/vk-int8-capability
vulkan_device: Add a check for int8 support
2021-08-25 23:46:08 +02:00
Ameer J de71a4d70d
Merge pull request #6894 from FernandoS27/bunneis-left-ear
GPU_MemoryManger: Fix GetSubmappedRange.
2021-08-25 16:50:03 -04:00
ameerj 4d535799eb vulkan_device: Add a check for int8 support
Silences validation errors when shaders use int8 without specifying its support to the API
2021-08-24 21:22:41 -04:00
ameerj 84b4ac5729 logging: Fix log filter during initialization
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value.

This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
2021-08-24 01:32:38 -04:00
Ameer J bed0c3c92a
Merge pull request #6878 from BreadFish64/optimize-GetHostThreadID
kernel: Optimize GetHostThreadID
2021-08-24 00:01:13 -04:00
bunnei 7eb4542c1d
Merge pull request #6912 from lioncash/plural
CMakeLists: Ensure proper numerusform tags are generated for pluralized translations
2021-08-23 16:40:31 -07:00
bunnei f65f8b9097
Merge pull request #6869 from yzct12345/shiny-logs-in-the-fireplace
logging: Simplify and make thread-safe
2021-08-22 20:40:18 -07:00
Lioncash 6fef91ce4c CMakeLists: Ensure proper numerusform tags are generated for pluralized translations
If we don't set an explicit source and target language for the base
english translation, then we'll generate an incorrect number of
<numerusform> tags (which Transifex doesn't like).
2021-08-22 11:52:37 -04:00
Morph c4a1d3cbf4 settings: Amend language_index maximum setting range
The maximum is now 17 with the addition of Brazilian Portuguese
2021-08-21 09:43:15 -04:00
ameerj e0397f00d0 vk_rasterizer: Only clear depth and stencil buffers when set in attachment aspect mask
Silences validation errors for clearing the depth/stencil buffers of framebuffer attachments that were not specified to have depth/stencil usage.
2021-08-21 02:37:15 -04:00
Ameer J bde6b899a1
Merge pull request #6888 from v1993/patch-3
video_core: eliminate constant ternary
2021-08-21 00:16:18 -04:00
bunnei 455e28790a
Merge pull request #6877 from MerryMage/dyn-ignore-asserts
dynarmic: Update and enable DYNARMIC_IGNORE_ASSERTS
2021-08-19 15:53:14 -07:00
Mai M 519978ce70
Merge pull request #6887 from v1993/patch-2
SPIR-V: Merge two ifs in EmitGetAttribute
2021-08-19 17:16:37 -04:00
Mai M 0821d95399
Merge pull request #6886 from Morph1984/error-code-64
applet_error: Fix 64-bit error code conversion
2021-08-19 17:15:49 -04:00
Fernando Sahmkow ef2066b272 GPU_MemoryManger: Fix GetSubmappedRange. 2021-08-19 22:57:22 +02:00
Valeri d82fc52cea
Replace QPoint with QPointF where applicable
Previously, floats were implicitly cast to integers
2021-08-19 23:16:58 +03:00
Valeri 40674b8e22
qt_software_keyboard: fix copy-paste error 2021-08-19 22:17:15 +03:00
Valeri 4fd655cb46
video_core: eliminate constant ternary
`via_header_index` is already checked above, so it would never be true in this branch
2021-08-19 21:22:05 +03:00
Morph 9cb376f8c2 applet_error: Fix 64-bit error code conversion 2021-08-19 13:16:48 -04:00
Valeri beb7305b73
SPIR-V: Merge two ifs in EmitGetAttribute 2021-08-19 20:13:46 +03:00
Valeri ab02addde3
Fix crash in logging in CreateStrayLayer
It was trying to log value of layer_id which is specifically known not to exist, potentially leading to segfault. Log display_id instead.
2021-08-19 19:33:07 +03:00
Valeri 0b3d12be40
Fix check is thread current in GetThreadContext
Misplaced break made it only check for the first core.
2021-08-19 16:46:30 +03:00
bunnei aa40084c24
Merge pull request #6832 from bunnei/scheduler-improvements
kernel: Various improvements to scheduler
2021-08-18 15:42:46 -07:00
ameerj b384129c63 h264: Lower max_num_ref_frames
GPU decoding seems to be more picky when it comes to the maximum number of reference frames.
2021-08-16 14:40:53 -04:00
ameerj cd016d3cb5 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
ameerj a832aa699f codec: Improve libav memory alloc and cleanup 2021-08-16 14:40:53 -04:00
ameerj bc3efb79cc codec: Fallback to CPU decoding if no compatible GPU format is found 2021-08-16 14:40:53 -04:00
lat9nq 92bc51b66a cmake: Add VDPAU and NVDEC support to FFmpeg
Adds {h264_,vp9_}{nvdec,vdpau} hwaccels.
2021-08-16 14:40:52 -04:00
ameerj 537c6ac8fe vk_blit_screen: Fix non-accelerated texture size calculation
Addresses the potential OOB access in UnswizzleTexture.
2021-08-16 14:28:10 -04:00
Fernando S 521e6ac174
Merge pull request #6863 from spholz/fix-lan-play
Fix LAN Play
2021-08-16 17:10:00 +02:00
BreadFish64 14e93f133a kernel: Optimize GetHostThreadID 2021-08-16 07:30:23 -05:00
Sönke Holz 356dbf4d1d network_interface: correct formatting 2021-08-16 12:18:19 +02:00
spholz dc47b5a5bf network_interface: fix mingw-w64 build 2021-08-16 12:06:35 +02:00
Sönke Holz 70419f7a17 network: retrieve subnet mask and gateway info 2021-08-16 10:32:25 +02:00
Merry 1770503185 xbyak: Update include path 2021-08-15 19:26:38 +01:00
bunnei 87d63b858a
Merge pull request #6861 from yzct12345/const-mempy-is-all-the-speed
decoders: Optimize memcpy for the other functions
2021-08-15 02:38:12 -07:00
bunnei aef0ca6f0d core: hle: kernel: Disable dispatch count tracking on single core.
- This would have limited value, and would be a mess to handle properly.
2021-08-14 02:14:19 -07:00
yzct12345 0ba521e634
threadsafe_queue: Fix deadlock
This fixes a lost wakeup in SPSCQueue. If the reader is in just the right position, the writer's notification will be lost and this will be a problem if the writer then does something to wait on the reader.

This was discovered to affect my upcoming stacktrace PR. I don't think any performance decrease will be noticeable because an uncontended mutex is smart enough to skip the syscall. This PR might also resolve some rare deadlocks but I don't know of any examples.
2021-08-13 19:22:51 +00:00
yzct12345 81ed54d13e
logging: Display backtrace on crash
This implements backtraces so we don't have to tell users how to use gdb anymore.

This prints a backtrace after abort or segfault is detected. It also fixes the log getting cut off with the last line containing only a bracket. This change lets us know what caused a crash not just what happened the few seconds before it.

I only know how to add support for Linux with GCC. Also this doesn't work outside of C/C++ such as in dynarmic or certain parts of graphics drivers. The good thing is that it'll try and just crash again but the stack frames are still there so the core dump will work just like before.
2021-08-13 18:58:35 +00:00
yzct12345 001675dced
logging: Simplify and make thread-safe
This simplifies the logging system.

This also fixes some lost messages on startup.

The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.

With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2021-08-13 18:39:45 +00:00
Sönke Holz 068c66672d configuration: fix mingw-w64 build 2021-08-13 12:39:14 +02:00
spholz deb65a5717 network: don't use reinterpret_cast in GetAvailableNetworkInterfaces 2021-08-13 11:58:34 +02:00
Sönke Holz e660334a21 network: fix mingw-w64 build
The header "combaseapi.h" of mingw-w64 defines "interface" as "struct".
2021-08-13 11:23:50 +02:00
Sönke Holz b18e1d031f network: don't use assert to check if no network interfaces are returned 2021-08-13 11:21:34 +02:00
bunnei 71d8d84b59
Merge pull request #6862 from german77/badsdl
input_common: Disable sdl raw input mode
2021-08-12 21:14:26 -07:00
Sönke Holz 0476751ee2 configuration: move network_interface include to source file 2021-08-13 02:48:39 +02:00
Sönke Holz a0c4c1a23a network: use Common::BitCast instead of std::bit_cast 2021-08-13 01:28:14 +02:00
Sönke Holz 8513e59431 network: narrow down scope of "result" in win32 code for
GetAvailableNetworkInterfaces
2021-08-13 00:37:03 +02:00
Sönke Holz 04ec426201 configuration: use tr instead of QStringLiteral for "None" item in
network interface combobox
2021-08-13 00:34:04 +02:00
Sönke Holz 771de32af1 network: use explicit bool conversions in GetAvailableNetworkInterfaces 2021-08-13 00:31:33 +02:00
Sönke Holz 765e97c347 network: initialize ip_addr in GetHostIPv4Address() 2021-08-13 00:28:44 +02:00
Sönke Holz acca8aca8c nifm: use operator*() instead of .value() to get value of std::optional 2021-08-13 00:24:33 +02:00
Sönke Holz 970d81abfc nifm: treat a missing host IP address as a non-critical error 2021-08-13 00:21:54 +02:00
spholz 78a8249593
Merge branch 'yuzu-emu:master' into fix-lan-play 2021-08-12 22:27:17 +02:00
Sönke Holz 21743daf38 network: correct formatting in network.cpp and network_interface.cpp 2021-08-12 22:15:48 +02:00
spholz 1e98e73828 configuration: add option to select network interface
This commit renames the "Services" tab to "Network" and adds a combobox that allows the user to select the network interface that yuzu should use. This new setting is now used to get the local IP address in Network::GetHostIPv4Address. This prevents yuzu from selecting the wrong network interface and thus using the wrong IP address. The return type of Network::GetHostIPv4Adress has also been changed.
2021-08-12 21:32:53 +02:00
bunnei 0509fe3377
Merge pull request #6838 from ameerj/sws-align
vic: Specify sws_scale height stride.
2021-08-12 11:28:33 -07:00
german77 2a2f0bfe9e input_common: Disable sdl raw input mode 2021-08-12 13:17:07 -05:00
ameerj 356e10898f codec: Replace deprecated av_init_packet usage 2021-08-12 01:28:01 -04:00
ameerj 659039ca6d nvdec: Implement GPU accelerated decoding for all platforms
Supplements the VAAPI intel gpu decoder by implementing the D3D11VA decoder for Windows, and CUVID/VDPAU for Nvidia and AMD on drivers linux respectively.
2021-08-12 01:28:01 -04:00
yzct12345 430255caf8
decoders: Templates allow memcpy optimizations 2021-08-12 04:45:25 +00:00
lat9nq 5be2d6fd28 settings: Fix MSVC issues
According to https://stackoverflow.com/questions/469508, we run into a
MSVC bug (since VS 2005) when using diamond inheritance for
RangedSetting.

This explicitly implements those functions in RangedSetting. GetValue is
implemented as just calling the inherited version. The explicit
converson operator is reimplemented. I opted for this over ignoring the
warning with a pragma since this specifies the inherited behavior, and I
have now less faith in MSVC to pick the right one.

In addition, we mark destructors as virtual to silence what I believe is
a fair MSVC compilation error.
2021-08-11 17:12:14 -04:00
bunnei e6b80c2cf8
Merge pull request #6776 from lat9nq/ranged-settings
settings: Implement settings ranges
2021-08-10 21:19:01 -07:00
Fernando S 6a082df427
Merge pull request #6820 from yzct12345/split-cache
texture_cache: Split out template definitions
2021-08-10 12:23:05 +02:00
Ameer J 9fbe188c01
Merge pull request #6837 from german77/no-pause-screenshot
main: Avoid stopping emulation when taking a screenshot
2021-08-09 23:49:48 -04:00
ameerj a779cede7c vic: Specify sws_scale height stride.
Silences a sws_scale runtime warning about unaligned strides.
2021-08-09 23:24:16 -04:00
bunnei 7df790f1ae
Merge pull request #6823 from yzct12345/memory-cleanup
memory: Clean up code
2021-08-09 17:09:56 -07:00
bunnei 3e3bd425c1
Merge pull request #6839 from ameerj/frame-cap-positon
configure_general: Swap positions of speed limit and frame limit options
2021-08-09 12:32:07 -07:00
Mai M 2da91ec75b
Merge pull request #6844 from ameerj/vp9-empty-frame
vp9: Ensure the first frame is complete
2021-08-08 19:02:39 -04:00
Fernando Sahmkow 23ca1eb82e yuzu-cmd/CMakeLists: Correct attribution for this function. 2021-08-08 20:24:53 +02:00
ameerj fa22695705 vp9: Ensure the first frame is complete
Silences a runtime error due to the first frame missing the frame data, and being set to hidden despite being a key-frame.
2021-08-08 13:49:00 -04:00
yzct12345 c4eafcc861
texture_cache: Address ameerj's review 2021-08-08 11:02:51 +00:00
Fernando S 859deda3bb
Merge pull request #6834 from K0bin/buffer-image-granularity
Respect Vulkan bufferImageGranularity
2021-08-08 11:57:40 +02:00
bunnei b023413c98
Merge pull request #6698 from german77/SDL_QoL
input_common: Improve SDL joystick and hide toggle option
2021-08-08 02:44:42 -07:00
bunnei 00358e2098
Merge pull request #6817 from gidoly/patch-1
Add description to fast gpu time option
2021-08-08 01:11:47 -07:00
ameerj 8e0cc3e59a configure_general: Swap positions of speed limit and frame limit options 2021-08-08 01:00:40 -04:00
german77 48b6d41f1b input_common: Improve SDL joystick and hide toggle option 2021-08-07 23:11:23 -05:00
bunnei 63325cafbe
Merge pull request #6827 from Morph1984/uuid-hash
common: uuid: Add hash function for UUID
2021-08-07 17:18:46 -07:00
Rodrigo Locatti d4cab35533 input_common: Fix data race on GC implementation 2021-08-07 16:46:26 -05:00
german77 acce512ae8 main: Avoid stopping emulation when taking a screenshot 2021-08-07 15:45:29 -05:00
bunnei bd0e1d3a25
Merge pull request #6830 from ameerj/nvdec-unimpld-codec
nvdec: Better logging for unimplemented codecs
2021-08-07 12:37:39 -07:00
bunnei 5060a97210 core: hle: kernel: k_thread: Mark KScopedDisableDispatch as nodiscard. 2021-08-07 12:33:31 -07:00
bunnei 9e3d1d865c core: cpu_manager: Use invalid core_id on init and simplify shutdown. 2021-08-07 12:33:07 -07:00
bunnei 99bc49e76e core: hle: service: buffer_queue: Improve management of KEvent. 2021-08-07 12:18:48 -07:00
bunnei 48a3496b93 core: hle: kernel: k_auto_object: Add GetName method.
- Useful purely for debugging.
2021-08-07 12:18:48 -07:00
bunnei 36cf96857e core: hle: service: nvflinger/vi: Improve management of KEvent. 2021-08-07 12:18:47 -07:00
bunnei 5051d3c415 core: hle: kernel: DisableDispatch on suspend threads. 2021-08-07 12:18:47 -07:00
bunnei 1798c3b6b0 core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling. 2021-08-07 12:18:47 -07:00
bunnei cbe4e32d38 core: cpu_manager: Use KScopedDisableDispatch. 2021-08-07 12:18:47 -07:00
bunnei 2dfb07388a core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate. 2021-08-07 12:18:47 -07:00
bunnei d1c502720d core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess. 2021-08-07 12:18:47 -07:00
bunnei 77ad64b97d core: hle: kernel: k_scheduler: Improve ScheduleImpl. 2021-08-07 12:18:47 -07:00
bunnei bedcf19710 core: hle: kernel: k_scheduler: Improve Unload. 2021-08-07 12:18:47 -07:00
bunnei 7569d6774d core: hle: kernel: k_process: DisableDispatch on main thread. 2021-08-07 12:18:47 -07:00
bunnei f2b0d28983 core: hle: kernel: k_handle_table: Use KScopedDisableDispatch as necessary. 2021-08-07 12:18:47 -07:00
bunnei 01af2f4162 core: hle: kernel: k_thread: Add KScopedDisableDispatch. 2021-08-07 12:18:47 -07:00
bunnei 2b9560428b core: hle: kernel: Ensure idle threads are closed before destroying scheduler. 2021-08-07 12:18:47 -07:00
bunnei 68eee94875 core: hle: kernel: Reflect non-emulated threads as core 3. 2021-08-07 12:18:47 -07:00
bunnei 5ea0d3629a core: cpu_manager: Use jthread. 2021-08-07 12:18:47 -07:00
Robin Kertels bb29dcb7f2
vulkan_memory_allocator: Respect bufferImageGranularity 2021-08-07 15:28:05 +02:00
bunnei 456adb95ff
Merge pull request #6795 from sankasan/cmd-remove-cursor-fullscreen
yuzu-cmd: hide mouse cursor when started fullscreen
2021-08-07 02:00:29 -07:00
bunnei bd1a764827
Merge pull request #6815 from german77/ui_improvements
settings_ui: Add emulated joystick position dot to controller preview
2021-08-06 23:54:23 -07:00
ameerj 928b64d2ce nvdec: Better logging for unimplemented codecs 2021-08-07 01:08:33 -04:00
bunnei 268b5764c7
Merge pull request #6791 from ameerj/astc-opt
astc_decoder: Various performance and memory optimizations
2021-08-06 21:45:24 -07:00
yzct12345 5f97f74a9a
memory: Address lioncash's review 2021-08-07 03:03:21 +00:00
yzct12345 70cc4c0f46
memory: Dedup Read and Write and fix logging bugs 2021-08-07 01:32:06 +00:00
yzct12345 e80323b8b0
texture_cache: Address ameerj's review 2021-08-07 01:27:47 +00:00
spholz 33ebe471e8
Merge branch 'yuzu-emu:master' into fix-lan-play 2021-08-07 02:55:19 +02:00
Sönke Holz ddeb8d854e network: GetAndLogLastError: ignore Errno::AGAIN
If non-blocking sockets are used, they generate a lot of Errno::AGAIN errors when they didn't receive any data. These errors shouldn't be logged.
2021-08-07 02:54:25 +02:00
bunnei f183668a87
Merge pull request #6799 from ameerj/vp9-fixes
nvdec: Fix VP9 reference frame refreshes
2021-08-06 17:46:46 -07:00
Sönke Holz dd5c41b5a6 network: GetCurrentIpConfigInfo: return host IP address
Service::NIFM::IGeneralService::GetCurrentIpConfigInfo currently hardcodes 192.168.1.100 as the IP address, which prevents LAN play from working correctly.
2021-08-07 02:17:02 +02:00
ameerj 156ea746a3 nvhost_nvdec_common: Remove BufferMap
This was mainly used to keep track of mapped buffers for later unmapping.  Since unmap is no longer implemented, this no longer seves a valuable purpose.
2021-08-06 20:11:12 -04:00
ameerj e3688f0627 vp9: Cleanup unused variables
With reference frames refreshes fix, we no longer need to buffer two frames in advance.
We can also remove other unused or otherwise unneeded variables.
2021-08-06 20:08:11 -04:00
ameerj a3f80a97a3 vp9: Fix reference frame refreshes
This resolves the artifacting when decoding VP9 streams.
2021-08-06 20:08:08 -04:00
ameerj cc8ac112fc nvhost_nvdec_common: Stub UnmapBuffer Ioctl
Skip unmapping nvdec buffers to avoid breaking the continuity of the VP9 reference frame addresses, and the risk of invalidating data before the async GPU thread is done with it.
2021-08-06 20:06:30 -04:00
Sönke Holz 652e5e3df0 network: fix fcntl cmds
F_SETFL/F_GETFL are the correct commands to set a socket to be non-blocking
2021-08-06 21:08:31 +02:00
bunnei 42d8e08f78
Merge pull request #6822 from yzct12345/clion-assert
assert: Avoid empty macros
2021-08-05 22:29:45 -07:00
Morph d20c5ac720 common: uuid: Add hash function for UUID
Used when UUID is a key in an unordered_map. The hash is produced by XORing the high and low 64-bits of the UUID together.
2021-08-06 00:41:55 -04:00
yzct12345 e611f522c2
memory: Clean up CopyBlock too 2021-08-05 21:09:08 +00:00
gidoly 8ba551e1cd Update configure_graphics_advanced.ui
add description too fast gpu time
2021-08-06 06:08:12 +09:00
yzct12345 02e98f6c93
texture_cache: Don't change copyright year 2021-08-05 20:52:12 +00:00
yzct12345 5566f3dbc0
texture_cache: Address ameerj's review 2021-08-05 20:46:24 +00:00
yzct12345 4edfa6ad8f
memory: Address lioncash's review 2021-08-05 20:29:43 +00:00
bunnei e1a92db519
Merge pull request #6813 from Morph1984/hex-string-to-uuid
common: uuid: Add hex string to UUID constructor
2021-08-05 13:29:11 -07:00
yzct12345 6df9611059
memory: Clean up code 2021-08-05 20:11:14 +00:00
yzct12345 7e846be376
assert: Verify formatting 2021-08-05 17:46:22 +00:00
yzct12345 346149dcf9
assert: Avoid empty macros 2021-08-05 17:21:56 +00:00
yzct12345 f9563c8f24
texture_cache: Split templates out 2021-08-05 13:52:30 +00:00
Mai M a1cb453470
Merge pull request #6819 from Morph1984/i-am-dumb
applet_swkbd: Include the null terminator in the buffer size calculation
2021-08-04 23:32:01 -04:00
Mai M 9a7d2e3659
Merge pull request #6818 from Morph1984/hex-util-bug
hex_util: Fix incorrect array size in AsArray
2021-08-04 23:31:04 -04:00
Morph f10dc35dd0 applet_swkbd: Include the null terminator in the buffer size calculation
Some games may interpret the read string as a null-terminated string instead of just reading the string up to buffer_size.
2021-08-04 22:32:09 -04:00
Morph 7b39215c8a hex_util: Fix incorrect array size in AsArray
Although this isn't used, this is a potential bug as HexStringToArray will perform an out-of-bounds read.
2021-08-04 22:16:29 -04:00
lat9nq be16d92060 config: Read connected setting for controllers
Currently yuzu will read the mapping but does not connect a controller
despite adding subsequent configurations for it. Read the `connected`
setting for now as a boolean like the Qt frontend.
2021-08-04 17:09:35 -04:00
german77 1fb158ce90 settings_ui: Add emulated joystick position dot to controller preview 2021-08-04 11:46:54 -05:00
Morph 705f111058 common: uuid: Add hex string to UUID constructor
This allows for easily converting a hex string into a Common::UUID, which is backed by a 128 bit unsigned integer.
2021-08-04 10:45:41 -04:00
yzct12345 2868d4ba84
nvdec: Implement VA-API hardware video acceleration (#6713)
* nvdec: VA-API

* Verify formatting

* Forgot a semicolon for Windows

* Clarify comment about AV_PIX_FMT_NV12

* Fix assert log spam from missing negation

* vic: Remove forgotten debug code

* Address lioncash's review

* Mention VA-API is Intel/AMD

* Address v1993's review

* Hopefully fix CMakeLists style this time

* vic: Improve cache locality

* vic: Fix off-by-one error

* codec: Async

* codec: Forgot the GetValue()

* nvdec: Address ameerj's review

* codec: Fallback to CPU without VA-API support

* cmake: Address lat9nq's review

* cmake: Make VA-API optional

* vaapi: Multiple GPU

* Apply suggestions from code review

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>

* nvdec: Address ameerj's review

* codec: Use anonymous instead of static

* nvdec: Remove enum and fix memory leak

* nvdec: Address ameerj's review

* codec: Remove preparation for threading

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-08-03 23:43:11 -04:00
Morph d16a337d98
Merge pull request #6805 from lat9nq/fix-user-profiles
config: Only read/write current_user on global config
2021-08-02 23:58:41 -04:00
lat9nq 6ab0c6a808 config: Only read/write current_user on global config 2021-08-02 18:29:24 -04:00
spholz e71f78d04c
network: fix ternary operator in Socket::SendTo 2021-08-02 20:12:12 +02:00
yzct12345 f56d0db5bd
decoders: Optimize swizzle copy performance (#6790)
This makes UnswizzleTexture up to two times faster. It is the main bottleneck in NVDEC video decoding.
2021-08-02 11:18:58 -04:00
san 3e26141483 yuzu-cmd: hide cursor when in fullscreen
Exposed the SDL_ShowCursor function to EmuWindow baseclass. When creating the window (GL or VK) in fullscreen it now automatically hides the cursor.
2021-08-01 21:46:13 +02:00
Malte Jürgens 381aacdbb1
game_list: Make game list folder icons smaller (#6762)
Makes the default game list folder icons 48x48 by default instead of 64x64, and allows for selecting small (24x24) and large (72x72) icon sizes.
2021-08-01 12:59:36 -04:00
Morph 3b4d427993 service: set: Correct copy amount in GetAvailableLanguageCodes 2021-08-01 11:59:52 -04:00
Fernando S 30f0b7cf31
Merge pull request #6720 from ameerj/vk-screenshot
renderer_vulkan: Implement screenshots
2021-08-01 13:31:33 +02:00
Ameer J db32c3762b
Merge pull request #6765 from ReinUsesLisp/y-negate-vk
vk_rasterizer: Flip viewport on Y_NEGATE
2021-08-01 01:47:37 -04:00
ameerj c439fc9be9 astc_decoder: Reduce workgroup size
This reduces the amount of over dispatching when there are odd dimensions (i.e. ASTC 8x5), which rarely evenly divide into 32x32.
2021-08-01 01:22:27 -04:00
ameerj 5ab8053511 astc_decoder: Compute offset swizzles in-shader
Alleviates the dependency on the swizzle table and a uniform which is constant for all ASTC texture sizes.
2021-08-01 01:22:26 -04:00
ameerj b2862e4772 astc_decoder: Make use of uvec4 for payload data 2021-07-31 22:28:04 -04:00
ameerj a75d70fa90 astc_decoder: Simplify Select2DPartition 2021-07-31 21:36:26 -04:00
ameerj 5665d05547 astc_decoder: Optimize the use EncodingData
This buffer was a list of EncodingData structures sorted by their bit length, with some duplication from the cpu decoder implementation.
We can take advantage of its sorted property to optimize its usage in the shader.

Thanks to wwylele for the optimization idea.
2021-07-31 21:36:26 -04:00
ameerj 15c0c213b1 astc.h: Move data to cpp implementation
Moves leftover values that are no longer used by the gpu decoder back to the cpp implementation.
2021-07-31 21:26:42 -04:00
lat9nq 3862511a9a settings: Use std::clamp where possible
Addresses PR review

Co-authored-by: PixelyIon <pixelyion@protonmail.com>
2021-07-31 17:20:12 -04:00
Morph 9143fe5d3a hle: api_version: Update HOS version to 12.1.0
Keeps us up to date with reporting the system version.
2021-07-31 14:39:49 -04:00
lat9nq e9cf08c241 settings: Remove unnecessary std::move usages
Addresses review feedback.

Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-07-30 18:44:50 -04:00
bunnei 47f13a9df4
Merge pull request #6752 from Morph1984/pt-br
service: ns, set: Add PT_BR (Brazilian Portuguese)
2021-07-30 14:42:11 -07:00
bunnei 2c7fdee7a7
Merge pull request #6775 from lat9nq/cmd-remove-global-core
emu_window: Remove global system instance
2021-07-30 13:28:24 -07:00
bunnei 7530594602
Merge pull request #6759 from ReinUsesLisp/pipeline-statistics
renderer_vulkan: Add setting to log pipeline statistics
2021-07-30 11:18:52 -07:00
lat9nq 7737bdfd1a settings: Fix function virtualization
Fixes a theoretical scenario where a Setting is using the BasicSetting's
GetValue function. In practice this probably only happens on yuzu-cmd,
where there is no need for a Setting's additional features. Need to fix
regardless.
2021-07-30 13:33:35 -04:00
lat9nq a1f19b61f8 settings: Implement setting ranges
Clamps the setting's values against the specified minimum and maximum
values.
2021-07-30 13:33:21 -04:00
lat9nq 335de3fdf5 emu_window: Remove global system instance
It was just the one in emu_window_sdl2, but since _gl and _vk inherit
from it, they all needed adjustments.

Leaves just the one auto system& in main().
2021-07-30 10:43:58 -04:00
Morph ba3d230421 applet_swkbd: Correct string buffer size calculation
The buffer size here does not include the initial 8 bytes.
2021-07-30 02:19:04 -04:00
Morph 275db94bb8 configure_system: Add Brazilian Portuguese to the list of languages 2021-07-30 02:15:53 -04:00
Morph 6ca8ed9e58 service: set: Correct 4.0.0 max_entries to 0x40 (64) instead of 17 2021-07-30 02:15:53 -04:00
Morph 21ff0a3d6e service: ns, set: Add PT_BR (Brazilian Portuguese) 2021-07-30 02:15:53 -04:00
Morph db07ca6c7f
Merge pull request #6767 from ReinUsesLisp/fold-float-pack
shader: Fold UnpackFloat2x16 and PackFloat2x16
2021-07-30 02:07:52 -04:00
bunnei a98f14e9b0
Merge pull request #6722 from ReinUsesLisp/xmad-opts
shader: Fold integer FMA from Nvidia's pattern
2021-07-29 18:45:37 -07:00
ReinUsesLisp 8c9febe8f7 shader: Fold UnpackFloat2x16 and PackFloat2x16
Simplifies the code a bit when possible. These instructions should be
no-ops codegen wise.
2021-07-29 21:22:52 -03:00
Ameer J 23b3333f72
Merge pull request #6751 from Morph1984/languagecode
service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese
2021-07-29 14:41:03 -04:00
bunnei 5acf020389
Merge pull request #6742 from Morph1984/uuid
common: uuid: Return a lower-case hex string in Format
2021-07-29 09:37:15 -07:00
ReinUsesLisp b185567a03 vk_rasterizer: Flip viewport on Y_NEGATE
Matches OpenGL's behavior. I don't believe this register flips geometry,
but we have to try to match behavior on both backends.
2021-07-29 02:17:53 -03:00
ameerj 7ac99bb127 renderers: Add explicit invert_y bool to screenshot callback
OpenGL and Vulkan images render in different coordinate systems. This allows us to specify the coordinate system of the screenshot within each renderer
2021-07-28 21:46:08 -04:00
ameerj 75e7f54fb0 renderer_vulkan: Implement screenshots 2021-07-28 21:45:55 -04:00
ameerj 548bac8989 vk_blit_screen: Add public CreateFramebuffer method 2021-07-28 21:43:02 -04:00
ameerj 1e6c5d323d vk_blit_screen: Make Draw method more generic
Allows specifying the framebuffer and render area dimensions, rather than being hard coded for the render window.
2021-07-28 21:37:30 -04:00
bunnei 124e3b4819
Merge pull request #6760 from ReinUsesLisp/fp16-collect
shader: Mark ConvertF16F32 and ConvertF32F16 as fp16 instructions
2021-07-28 14:55:06 -07:00
bunnei f771d92e44
Merge pull request #6758 from jbeich/fastmem
host_memory: enable fastmem on FreeBSD
2021-07-28 13:01:54 -07:00
bunnei d05e6003f0
Merge pull request #6700 from lat9nq/fullscreen-enum
general: Implement FullscreenMode enumeration
2021-07-28 11:36:42 -07:00
Morph 5593a3716e
Merge pull request #6671 from jls47/master
applets/web: Addressing QT Navigation issues in Linux
2021-07-27 22:46:27 -04:00
ReinUsesLisp 1bb46b7d64 shader: Mark ConvertF16F32 and ConvertF32F16 as fp16 instructions
Fixes instances where fp16 types are not declared on SPIR-V but they are
used. This shouldn't happen on master, as it's been uncovered by an
additional optimization pass.
2021-07-27 21:33:05 -03:00
ReinUsesLisp 3b006f4fe2 renderer_vulkan: Add setting to log pipeline statistics
Use VK_KHR_pipeline_executable_properties when enabled and available to
log statistics about the pipeline cache in a game.

For example, this is on Turing GPUs when generating a pipeline cache
from Super Smash Bros. Ultimate:

Average pipeline statistics
==========================================
Code size:       6433.167
Register count:    32.939

More advanced results could be presented, at the moment it's just an
average of all 3D and compute pipelines.
2021-07-27 21:29:24 -03:00
bunnei 92887a65f0
Merge pull request #6749 from lioncash/rtarget
render_target: Add missing initializer for size extent
2021-07-27 17:28:53 -07:00
bunnei 6053f2e1fe
Merge pull request #6730 from Morph1984/buf_to_stdstring
common: fs: fs_util: Add BufferToUTF8String
2021-07-27 15:50:54 -07:00
Jan Beich 353be2306c host_memory: Add workaround for FreeBSD 12
src/common/host_memory.cpp:360:14: error: use of undeclared identifier
      'memfd_create'
        fd = memfd_create("HostMemory", 0);
             ^
2021-07-27 20:15:23 +00:00
Jan Beich c4cd82fa7c host_memory: Enable Linux implementation on FreeBSD
HW.Memory <Critical> common/host_memory.cpp:HostMemory:492: Fastmem unavailable, falling back to VirtualBuffer for memory allocation
2021-07-27 20:09:43 +00:00
Rodrigo Locatti ab206d6378
Merge pull request #6748 from lioncash/engine-init
video_core/engine: Consistently initialize rasterizer pointers
2021-07-27 16:17:20 -03:00
Rodrigo Locatti 5da97c57cd
Merge pull request #6744 from lioncash/exc
exception: Make constructors explicit
2021-07-27 16:11:17 -03:00
bunnei 2717e79c74
Merge pull request #6745 from lioncash/copies
video_core: Remove some unused variables
2021-07-27 11:38:32 -07:00
jls47 ef29ed75b0 qt_web_browser: Fix lambda capture for HIDButton 2021-07-27 11:31:12 -04:00
jls47 3109d1c3db qt_web_browser: Focus on the first link element
Focusing on the first link element fixes element navigation upon loading the web applet in games such as Super Mario Odyssey
2021-07-27 11:31:11 -04:00
Morph a6359fe9ae service: ns: Remove unused ns_language header 2021-07-27 08:59:26 -04:00
Morph d7cd316a6c service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese 2021-07-27 08:54:41 -04:00
Lioncash 00e100de08 render_target: Add missing initializer for size extent
Everything else has a default constructor that does the straightforward
thing of initializing most members to a default value, except for the
size.

We explicitly initialize the size (and others, for consistency), to
prevent potential uninitialized reads from occurring. Particularly given
the largeish surface area that this struct is used in.
2021-07-27 07:41:21 -04:00
Lioncash f8964dd89a video_core/engine: Consistently initialize rasterizer pointers
Ensures all of the engines have consistent and deterministic
initialization of the rasterizer pointers.
2021-07-27 07:30:57 -04:00
Lioncash 8c82c594f0 vulkan_wrapper: Fix SetObjectName() always indicating objects as images
We should be using the passed in object type instead.
2021-07-27 07:19:15 -04:00
Lioncash ec56a17acd buffer_cache: Remove unused small_vector in CommitAsyncFlushesHigh()
Given this is non-trivial, the constructor is required to execute, so
this removes a bit of redundant codegen.
2021-07-27 06:24:44 -04:00
Lioncash 075a744e38 gl_shader_cache: Remove unused variable 2021-07-27 06:23:49 -04:00
Lioncash 296728ec46 vk_compute_pass: Remove unused captures
Resolves two compiler warnings.
2021-07-27 06:17:52 -04:00
Lioncash c27ddb44de exception: Make constructors explicit
Ensures that exception construction is always explicit.
2021-07-27 04:15:14 -04:00
Lioncash e490ddf327 exception: Make what() member function nodiscard 2021-07-27 04:14:32 -04:00
Lioncash 90f3678ada exception: Narrow down specific header
We can use the <exception> header instead of pulling in all of the
exception-style classes.
2021-07-27 04:09:18 -04:00
Morph f5f04cce01 common: fs: fs_util: Add BufferToUTF8String
Allows for direct conversion to std::string without having to convert std::u8string to std::string
2021-07-27 00:02:22 -04:00
Morph b9b48aee7d common: uuid: Return a lower-case hex string in Format 2021-07-26 23:54:59 -04:00
bunnei d6c799494c
Merge pull request #6696 from ameerj/speed-limit-rename
general: Rename "Frame Limit" references to "Speed Limit"
2021-07-26 18:51:00 -07:00
Rodrigo Locatti 7511f65e31
Merge pull request #6741 from ReinUsesLisp/stream-remove
vk_stream_buffer: Remove unused stream buffer
2021-07-26 20:35:01 -03:00
Rodrigo Locatti 1a94b3f452
Merge pull request #6740 from K0bin/hvv-fallback
Handle allocation failure in Staging buffer
2021-07-26 20:34:44 -03:00
Robin Kertels 75050c788c
vk_staging_buffer_pool: Fall back to host memory when allocation fails 2021-07-26 23:37:18 +02:00
Rodrigo Locatti c6991fa900
Merge pull request #6728 from ReinUsesLisp/null-buffer-usage
vk_buffer_cache: Add transform feedback usage to null buffer
2021-07-26 18:30:45 -03:00
Rodrigo Locatti 6c432d5349
Merge pull request #6729 from ReinUsesLisp/quad-indexed-barrier
vk_compute_pass: Fix pipeline barrier for indexed quads
2021-07-26 18:30:05 -03:00
ReinUsesLisp 5f9a4817a5 vk_stream_buffer: Remove unused stream buffer
Remove unused file.
2021-07-26 18:19:53 -03:00
Rodrigo Locatti c0f99558fb
Merge pull request #6724 from lioncash/nodisc-shader
shader_recompiler: Remove unnecessary [[nodiscard]] instances
2021-07-26 16:35:21 -03:00
Rodrigo Locatti de0b89792c
Merge pull request #6726 from lioncash/hguard
emit_spirv_instructions: Add missing header guard
2021-07-26 16:35:11 -03:00
Rodrigo Locatti 3d97f1e6cf
Merge pull request #6727 from lioncash/topology
emit_glasm: Fix LINESS_ADJACENCY typo in InputPrimitive()
2021-07-26 16:35:03 -03:00
Vamsi Krishna c05bbf375d
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
Rodrigo Locatti b2b3fcdccd
Merge pull request #6723 from lioncash/shader
object_pool: Add missing return in Chunk move assignment operator
2021-07-26 06:01:21 -03:00
Rodrigo Locatti 4afc2de129
Merge pull request #6725 from lioncash/control-token
control_flow: Fix duplicate switch case in OpcodeToken
2021-07-26 06:00:23 -03:00
ReinUsesLisp 771dcb2a56 vk_compute_pass: Fix pipeline barrier for indexed quads
Use an index buffer barrier instead of a vertex input read barrier.
2021-07-26 05:51:09 -03:00
ReinUsesLisp 27ed6e7c2b vk_buffer_cache: Add transform feedback usage to null buffer
Fixes bad API usages on Vulkan.
2021-07-26 05:49:37 -03:00
Lioncash 3e7813e49d emit_glasm: Fix LINESS_ADJACENCY typo in InputPrimitive()
This should be LINES_ADJACENCY
2021-07-26 04:44:56 -04:00
Lioncash c2915d9f2f emit_spirv_instructions: Add missing header guard 2021-07-26 04:28:35 -04:00
Lioncash 06ca911621 shader_recompiler: Remove unnecessary [[nodiscard]] instances
[[nodiscard]] doesn't do anything on functions with a void return type
and causes superfluous warnings.
2021-07-26 04:23:59 -04:00
Lioncash 0b67df1f7c control_flow: Fix duplicate switch case in OpcodeToken
This previously duplicated the case of the PBK case above it.
2021-07-26 04:16:34 -04:00
Lioncash 89ad9df0e9 object_pool: Add missing return in Chunk move assignment operator
Prevents undefined behavior from occurring.
2021-07-26 04:01:05 -04:00
ReinUsesLisp 66a0cedba3 shader: Fold integer FMA from Nvidia's pattern
Fold shaders doing "a * b + c" on integers from the pattern generated by
Nvidia's GL compiler.

On a somewhat complex compute shader it reduces the code size by 16
instructions from 2 matches on Turing GPUs.

On Intel as extracted from KHR_pipeline_executable_properties:
Before the optimization:
```
Instruction Count: 2057
Basic Block Count: 45
Scratch Memory Size: 14752
Spill Count: 232
Fill Count: 261
SEND Count: 610
Cycle Count: 11325
```

After the optimization:
```
Instruction Count: 2046
Basic Block Count: 44
Scratch Memory Size: 13728
Spill Count: 219
Fill Count: 268
SEND Count: 604
Cycle Count: 11367
```
2021-07-26 04:58:02 -03:00
ReinUsesLisp 09fb41dc63 shader: Use TryInstRecursive on XMAD multiply folding
Simplify a bit the logic.
2021-07-26 04:15:27 -03:00
ReinUsesLisp f6f0383b49 shader: Add TryInstRecursive utility to values 2021-07-26 01:31:05 -03:00
bunnei c09557acd8
Merge pull request #6697 from ameerj/fps-cap
config, nvflinger: Add FPS cap setting
2021-07-25 16:23:44 -07:00
lat9nq 09d6cc9943
Merge branch 'master' into fullscreen-enum 2021-07-25 15:31:33 -04:00
bunnei 7e272d3cd8
Merge pull request #6575 from FernandoS27/new_settings
Settings: Eliminate ASYNC & MULTICORE Toggles and add GPU Accuracy to  status bar
2021-07-25 11:45:45 -07:00
Morph b5c3cb8763
Merge pull request #6709 from ameerj/screenshot-path
main: Fix screenshot filepath construction
2021-07-25 14:41:38 -04:00
bunnei 98b26b6e12
Merge pull request #6585 from ameerj/hades
Shader Decompiler Rewrite
2021-07-25 11:39:04 -07:00
ameerj 9dd35b7b66 main: Fix screenshot filepath construction
The screenshot directory path returned does not have a trailing directory separator character. This caused screenshots to be saved in the parent directory of the configured screenshot directory.

This fixes that behavior
2021-07-25 14:24:08 -04:00
bunnei c2aaf51370
Merge pull request #6699 from lat9nq/common-threads
common: Publically link to pthreads
2021-07-25 10:43:11 -07:00
bunnei 84b9c42642
Merge pull request #6690 from ReinUsesLisp/dma-clear-fixups
buffer_cache: Misc fixups related to buffer clears
2021-07-24 01:27:50 -04:00
ameerj c80ae87b4e renderer_base: Removed redundant settings
use_framelimiter was not being used internally by the renderers.
set_background_color was always set to true as there is no toggle for the renderer background color, instead users directly choose the color of their choice.
2021-07-23 22:10:01 -04:00
ameerj 9dfbc9bdce general: Rename "Frame Limit" references to "Speed Limit"
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate.
This allows us to differentiate it from the fps unlocker setting.
2021-07-23 22:10:01 -04:00
ameerj 2c6e274b39 config, nvflinger: Add FPS cap setting
Allows finer tuning of the FPS limit.
2021-07-23 22:04:36 -04:00
bunnei 2656020608
Merge pull request #6551 from bunnei/improve-kernel-obj
Improve management of kernel objects
2021-07-23 21:23:56 -04:00
lat9nq d8b00fd863 configuration: Use combobox apply template where possible
We don't need to manually apply this setting now that a template can do
this for us.
2021-07-23 10:18:07 -04:00
lat9nq b11c81cc13 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 eb61824ea5 common: Publically link to pthreads
Common requires pthreads but does not refer to it when linking to other
modules. Fix this by linking to Threads where necessary.
2021-07-23 09:47:52 -04:00
ReinUsesLisp 7f13104c17 shader: Support out of bound local memory reads and immediate writes
Support ignoring immediate out of bound writes. Writing dynamically out
of bounds is not yet supported (e.g. R0+0x4).

Reading out of bounds yields zero. This is supported checking for the
size from the IR; if the input is immediate, the optimization passes
will drop it.
2021-07-22 21:51:41 -04:00
ReinUsesLisp a55ff22900 vulkan/blit_image: Commit descriptor sets within worker thread
Fixes race condition caused. The descriptor pool is not thread safe, so
we have to commit descriptor sets within the same thread.
2021-07-22 21:51:40 -04:00
ReinUsesLisp f6796cad9c vulkan_device: Blacklist Volta and older from VK_KHR_push_descriptor
Causes crashes on Link's Awakening intro. It's hard to debug if it's our
fault due to bugs in validation layers.
2021-07-22 21:51:40 -04:00
ReinUsesLisp a741513e65 qt: Remove "experimental" from asynchronous shader building UI 2021-07-22 21:51:40 -04:00
ReinUsesLisp 3c6d440015 Revert "renderers: Disable async shader compilation"
This reverts commit 4a152767286717fa69bfc94846a124a366f70065.
2021-07-22 21:51:40 -04:00
ReinUsesLisp 8381490a04 opengl: Fix asynchronous shaders
Wait for shader to build before configuring it, and wait for the shader
to build before sharing it with other contexts.
2021-07-22 21:51:40 -04:00
ReinUsesLisp 258f35515d shader_environment: Receive cache version from outside
This allows us invalidating OpenGL and Vulkan separately in the future.
2021-07-22 21:51:40 -04:00
ReinUsesLisp 4a82450c81 cmake: Remove shader cache version 2021-07-22 21:51:40 -04:00
ameerj 56478bc9ac shader: Fix disabled attribute default values 2021-07-22 21:51:40 -04:00
ameerj c9528282d9 gl_device: Simplify GLASM setting logic 2021-07-22 21:51:40 -04:00
ameerj 56c30dd9e0 glsl: Simplify FCMP emission 2021-07-22 21:51:40 -04:00
ameerj 79d2684261 glsl: Update TessellationControl gl_in
Adheres to GL_ARB_separate_shader_objects requirements
2021-07-22 21:51:40 -04:00
ReinUsesLisp e1ed218b41 renderer_opengl: Use ARB_separate_shader_objects
Ensures that states set for a particular stage are not attached to other
stages which may not need them.
2021-07-22 21:51:40 -04:00
ameerj fc7bed21b5 shader: Implement ISETP.X 2021-07-22 21:51:40 -04:00
ReinUsesLisp bf2956d77a shader: Avoid usage of C++20 ranges to build in clang 2021-07-22 21:51:40 -04:00
ameerj 94af0a00f6 glsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 2021-07-22 21:51:40 -04:00
ReinUsesLisp 8c166c68d4 gl_shader_cache: Properly implement asynchronous shaders 2021-07-22 21:51:40 -04:00
lat9nq 49946cf780 shader_recompiler, video_core: Resolve clang errors
Silences the following warnings-turned-errors:
-Wsign-conversion
-Wunused-private-field
-Wbraced-scalar-init
-Wunused-variable

And some other errors
2021-07-22 21:51:40 -04:00
ameerj 4e4b8775b5 main: Update Shader Cache menu options
This change adds two new context menu items to remove either the OpenGL or the Vulkan shader caches individually, and the provides the option to remove all caches for the selected title.
This also changes the behavior of the open shader cache option. Now it creates the shader cache directory for the title if it does not yet exist.
2021-07-22 21:51:40 -04:00
ameerj 41493fbe89 renderers: Fix clang formatting 2021-07-22 21:51:40 -04:00
ReinUsesLisp 2235a51b5d shader: Manually convert from array<u32> to bitset instead of using bit_cast 2021-07-22 21:51:40 -04:00
ameerj 8390286a89 renderers: Disable async shader compilation
The current implementation is prone to causing graphical issues. Disable until a better solution is implemented.
2021-07-22 21:51:40 -04:00
ReinUsesLisp be54aad1c4 maxwell_to_vk: Add R16_SNORM 2021-07-22 21:51:40 -04:00
lat9nq 18fb9bdfa8 configure_graphics: Mark SPIR-V as Experimental, Mesa only 2021-07-22 21:51:40 -04:00
ameerj 41c6cb70f9 glsl: Fix tracking of info.uses_shadow_lod 2021-07-22 21:51:40 -04:00
ameerj 11f04f1022 shader: Ignore global memory ops on devices lacking int64 support 2021-07-22 21:51:40 -04:00
lat9nq 55233c2861 vulkan_device: Add missing include algorithm 2021-07-22 21:51:40 -04:00
ameerj 7277d7fe96 vulkan_device: Blacklist ampere devices from float16 math 2021-07-22 21:51:40 -04:00
ameerj 57f222c56e dual_vertex_pass: Clang format 2021-07-22 21:51:40 -04:00
ameerj dbee32d302 gl_shader_cache: Fixes for async shaders 2021-07-22 21:51:40 -04:00
ReinUsesLisp 57171b23f9 vulkan_device: Enable VK_EXT_extended_dynamic_state on RADV 21.2 onward 2021-07-22 21:51:40 -04:00
ReinUsesLisp 8722668b3c emit_spirv: Workaround VK_KHR_shader_float_controls on fp16 Nvidia
Fix regression on Fire Emblem: Three Houses when using native fp16.
2021-07-22 21:51:40 -04:00
lat9nq 1b27a2b597 configure_graphics: Re-order vulkan device populating 2021-07-22 21:51:40 -04:00
lat9nq 2e5af95541 shader: GCC fmt 8.0.0 fixes 2021-07-22 21:51:40 -04:00
ameerj b9069c7891 shader: Account for 33-bit IADD3 scenario 2021-07-22 21:51:40 -04:00
ReinUsesLisp b21bf79bd2 shader: Only apply shift on register mode for IADD3 2021-07-22 21:51:39 -04:00
ReinUsesLisp fba6bd92d4 vk_rasterizer: Workaround bug in VK_EXT_vertex_input_dynamic_state
Workaround potential bug on Nvidia's driver where only updating high
attributes leaves low attributes out dated.
2021-07-22 21:51:39 -04:00
ReinUsesLisp 5643a909bc shader: Fix disabled and unwritten attributes and varyings 2021-07-22 21:51:39 -04:00
ameerj 65daec8b75 glsl: Fix shared and local memory declarations
account for the fact that program.*memory_size is in units of bytes.
2021-07-22 21:51:39 -04:00
ameerj 8289eb108f opengl: Implement LOP.CC
Used by MH:Rise
2021-07-22 21:51:39 -04:00
ReinUsesLisp f94f0be521 vk_graphics_pipeline: Implement smooth lines 2021-07-22 21:51:39 -04:00
ReinUsesLisp 57a8921e01 vk_graphics_pipeline: Implement line width 2021-07-22 21:51:39 -04:00
ReinUsesLisp 5b2b0634a1 spirv: Fix code emission when descriptor aliasing is unsupported
Fixes OpenGL.
2021-07-22 21:51:39 -04:00
lat9nq fb9b1787f8 video_core: Enable GL SPIR-V shaders 2021-07-22 21:51:39 -04:00
lat9nq 1152d66ddd 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 00fa09dc45 glsl: Declare local memory in main 2021-07-22 21:51:39 -04:00
ameerj f7352411f0 glsl: Add passthrough geometry shader support 2021-07-22 21:51:39 -04:00
ReinUsesLisp 8612b5fec5 shader: Use std::bit_cast instead of Common::BitCast for passthrough 2021-07-22 21:51:39 -04:00
ReinUsesLisp 8a3427a4c8 glasm: Add passthrough geometry shader support 2021-07-22 21:51:39 -04:00
ReinUsesLisp 7dafa96ab5 shader: Rework varyings and implement passthrough geometry shaders
Put all varyings into a single std::bitset with helpers to access it.

Implement passthrough geometry shaders using host's.
2021-07-22 21:51:39 -04:00
ReinUsesLisp 4f052a1f39 vk_graphics_pipeline: Implement conservative rendering 2021-07-22 21:51:39 -04:00
ReinUsesLisp ecd6b4356b shader: Only verify shader when graphics debugging is enabled 2021-07-22 21:51:39 -04:00
ReinUsesLisp 395bed3a0a shader: Unify shader stage types 2021-07-22 21:51:39 -04:00
lat9nq 257d2aab74 lower_int64_to_int32: Add missing include 2021-07-22 21:51:39 -04:00
ReinUsesLisp fb166b5ff4 shader: Emulate 64-bit integers when not supported
Useful for mobile and Intel Xe devices.
2021-07-22 21:51:39 -04:00
ReinUsesLisp d8d5501459 shader: Add int64 to int32 lowering pass 2021-07-22 21:51:39 -04:00
ReinUsesLisp 04ef2160f9 shader: Teach global memory base tracker to follow vectors 2021-07-22 21:51:39 -04:00
ReinUsesLisp 97e80dda55 shader: Add constant propagation to integer vectors 2021-07-22 21:51:39 -04:00
ameerj 27ca8a0e13 glsl: Better IAdd Overflow CC fix
This ensures the original operand values are not overwritten when being used in the overflow detection.
2021-07-22 21:51:39 -04:00
ReinUsesLisp 4397053d5c shader: Remove IAbs64 2021-07-22 21:51:39 -04:00
ameerj bc6e399ae3 glsl: Fix IADD CC 2021-07-22 21:51:39 -04:00
ameerj a7536825df shader_recompiler: Fix IADD3 input partitioning 2021-07-22 21:51:39 -04:00
ReinUsesLisp 808ef97a08 shader: Move loop safety tests to code emission 2021-07-22 21:51:39 -04:00
ReinUsesLisp 3877918e96 gl_graphics_pipeline: Fix assembly shaders check for transform feedbacks 2021-07-22 21:51:39 -04:00
ameerj cbce9ddd4a glsl: Remove frag color initialization 2021-07-22 21:51:39 -04:00
ameerj 3a2dd1b483 glasm: Implement SetAttribute ViewportMask 2021-07-22 21:51:39 -04:00
ReinUsesLisp 9bd0531384 gl_graphics_pipeline: Inline hash and operator== key functions 2021-07-22 21:51:39 -04:00
ReinUsesLisp f5db8c7440 gl_shader_cache: Check previous pipeline before checking hash map
Port optimization from Vulkan.
2021-07-22 21:51:39 -04:00
ReinUsesLisp 218dedca1f gl_graphics_pipeline: Port optimizations from Vulkan pipelines 2021-07-22 21:51:39 -04:00
ameerj 1c648f176c emit_glsl_special: Skip initialization of frag_color0
Fixes rendering in Devil May Cry without regressing Ori and the Blind Forest.
2021-07-22 21:51:38 -04:00
ReinUsesLisp 1d182fc0f5 shader: Calibrate loop safety threshold 2021-07-22 21:51:38 -04:00
ReinUsesLisp df9b7e18f5 buffer_cache: Fix debugging leftover 2021-07-22 21:51:38 -04:00
Morph cfbc85839d glsl: Add missing ; in EmitSetSampleMask
Fixes shader compilation in Okami HD
2021-07-22 21:51:38 -04:00
ReinUsesLisp 838d7e4ca5 buffer_cache: Fix size reductions not having in mind bind sizes
A buffer binding can change between shaders without changing the
shaders. This lead to outdated bindings on OpenGL.
2021-07-22 21:51:38 -04:00
ameerj 9e066dcb15 glsl: Fix output varying initialization when transform feedback is used 2021-07-22 21:51:38 -04:00
ameerj fcff19e0fa shaders: Allow shader notify when async shaders is disabled 2021-07-22 21:51:38 -04:00
ameerj a0365217f5 texture_pass: Fix is_read image qualification
Atomic operations are considered to have both read and write access. This was not  being accounted for.
2021-07-22 21:51:38 -04:00
ReinUsesLisp 0cd08b3e72 shader: Align constant buffer sizes to 16 bytes
WAR for AMD reading zeroes on uniform buffers of size 2.
2021-07-22 21:51:38 -04:00
ReinUsesLisp 59fead3a47 spirv: Properly handle devices without int8 and int16 2021-07-22 21:51:38 -04:00
ReinUsesLisp b5e78607ad spirv: Handle small storage buffer loads on devices with no support 2021-07-22 21:51:38 -04:00
ReinUsesLisp ca67077ca8 vk_graphics_pipeline: Use VK_KHR_push_descriptor when available
~51% faster on Nvidia compared to previous method.
2021-07-22 21:51:38 -04:00
ameerj ccbd24fe00 glsl: Fix cbuf component indexing bug falback 2021-07-22 21:51:38 -04:00
ReinUsesLisp 1091995f8e shader: Simplify MergeDualVertexPrograms 2021-07-22 21:51:38 -04:00
ReinUsesLisp 374eeda1a3 shader: Properly manage attributes not written from previous stages 2021-07-22 21:51:38 -04:00
ReinUsesLisp 892b8aa2ad glsl: Only declare fragment outputs on fragment shaders 2021-07-22 21:51:38 -04:00
ReinUsesLisp 0ffea97e2e shader: Split profile and runtime info headers 2021-07-22 21:51:38 -04:00
ReinUsesLisp cbbca26d18 shader: Add support for native 16-bit floats 2021-07-22 21:51:38 -04:00
ReinUsesLisp 376aa94819 shader: Rename maxwell/program.h to translate_program.h 2021-07-22 21:51:38 -04:00
ReinUsesLisp 69f9b97e7e vulkan_device: Blacklist VK_EXT_vertex_input_dynamic_state on Intel 2021-07-22 21:51:38 -04:00
ameerj 12ef06ba8b glsl: Obey need_declared_frag_colors to declare and initialize all frag_color
Fixes Ori and the blind forest title screen
2021-07-22 21:51:38 -04:00
ameerj d36f667bc0 glsl: Address rest of feedback 2021-07-22 21:51:38 -04:00
ameerj c5dfa0b630 glsl: Move gl_Position/generic attribute initialization to EmitProlgue 2021-07-22 21:51:38 -04:00
ameerj 3b339fbbf6 glsl: Conditionally use fine/coarse derivatives based on device support 2021-07-22 21:51:38 -04:00
ameerj 6eea88d614 glsl: Cleanup/Address feedback 2021-07-22 21:51:38 -04:00
ameerj 74f683787e gl_shader_cache: Implement async shaders 2021-07-22 21:51:38 -04:00
ameerj ae4e452759 glsl: Add Shader_GLSL logging 2021-07-22 21:51:38 -04:00
ameerj 6c6a451d6a glsl: Add LoopSafety instructions 2021-07-22 21:51:38 -04:00
ameerj a0d0704aff glsl: Conditionally add EXT_texture_shadow_lod 2021-07-22 21:51:38 -04:00
ameerj 5e7b2b9661 glsl: Add stubs for sparse queries and variable aoffi when not supported 2021-07-22 21:51:38 -04:00
ameerj 6aa1bf7b6f glsl: Implement legacy varyings 2021-07-22 21:51:38 -04:00
ameerj ff3de0fb6b gl_shader_cache: Remove const from pipeline source arguments 2021-07-22 21:51:38 -04:00
ameerj 413eb6983f gl_shader_cache: Move OGL shader compilation to the respective Pipeline constructor 2021-07-22 21:51:38 -04:00
ameerj 39c29664f9 glsl: Minor cleanup 2021-07-22 21:51:38 -04:00
ameerj 427a2596a1 glsl: Fix Cbuf getters for F32 type 2021-07-22 21:51:38 -04:00
ameerj 7c82f20b52 glsl: Add immediate index oob checking for Cbuf getters 2021-07-22 21:51:38 -04:00
ameerj 84c86e03cd glsl: Refactor GetCbuf functions to reduce code duplication 2021-07-22 21:51:38 -04:00
ameerj e81c73a874 glsl: Address more feedback. Implement indexed texture reads 2021-07-22 21:51:38 -04:00
ameerj 7d89a82a48 glsl: Remove Signed Integer variables 2021-07-22 21:51:38 -04:00
ameerj 4759db28d0 glsl: Address Rodrigo's feedback 2021-07-22 21:51:38 -04:00
ameerj 85399e119d glsl: Reorganize backend code, remove unneeded [[maybe_unused]] 2021-07-22 21:51:37 -04:00
ameerj e7c8f8911f glsl: Implement SampleId and SetSampleMask
plus some minor refactoring of implementations
2021-07-22 21:51:37 -04:00
ameerj d1a68f7997 glsl: Add gl_PerVertex in for GS 2021-07-22 21:51:37 -04:00
ameerj a926695234 glsl: Use existing tracking for enabling EXT_shader_image_load_formatted 2021-07-22 21:51:37 -04:00
ameerj 14bd73db36 glsl: Enable early fragment tests 2021-07-22 21:51:37 -04:00
ameerj 6650c4799d gl_rasterizer: Add texture fetch barrier for fragments
Fixes flicker seen in XC2
2021-07-22 21:51:37 -04:00
ameerj 3f31a547e0 glsl: Implement more attribute getters and setters 2021-07-22 21:51:37 -04:00
ameerj 8bb8bbf4ae glsl: Implement fswzadd
and wip nv thread shuffle impl
2021-07-22 21:51:37 -04:00
ameerj c542204113 glsl: Implement indexed attribute loads 2021-07-22 21:51:37 -04:00
ameerj 2a504b4765 glsl: Conditionally add GL_ARB_sparse_texture2 2021-07-22 21:51:37 -04:00
ameerj 970fc39d98 glsl: Rebase fixes 2021-07-22 21:51:37 -04:00
ameerj fc0db612ab glsl: Conditionally use GL_EXT_shader_image_load_formatted
Fix for SULD.D
2021-07-22 21:51:37 -04:00
ameerj fb839061fb glsl: Remove output generic indexing for geometry stage 2021-07-22 21:51:37 -04:00
ameerj 258106038e glsl: Allow dynamic tracking of variable allocation 2021-07-22 21:51:37 -04:00
ameerj 465903468e glsl: Implement barriers 2021-07-22 21:51:37 -04:00
ameerj 421847cf1e glsl: Implement image atomics and set layer
along with some more cleanup/oversight fixes
2021-07-22 21:51:37 -04:00
ameerj d41aef03c7 glsl: Fix image gather logic 2021-07-22 21:51:37 -04:00
ameerj 35e78d558d glsl: Add cbuf access workaround for devices with component indexing bug 2021-07-22 21:51:37 -04:00
ameerj 747b8556a4 glsl: Use textureGrad fallback when EXT_texture_shadow_lod is unsupported 2021-07-22 21:51:37 -04:00
ameerj d12f2b8ccf emit_glsl_image: Use immediate offsets when possible 2021-07-22 21:51:37 -04:00
ameerj 0a0b0a73d8 glsl: Fix <32-bit SSBO writes
and more cleanup
2021-07-22 21:51:37 -04:00
ameerj 34fdb6471d glsl: Cleanup and address feedback 2021-07-22 21:51:37 -04:00
ameerj 5355568a2d glsl: Refactor Global memory functions 2021-07-22 21:51:37 -04:00
ameerj a68fabf6d5 glsl: Increase NUM_VARS that can be allocated
needed for HW:AoC.
2021-07-22 21:51:37 -04:00
ameerj 8d8ce24f20 glsl: Implement Load/WriteGlobal
along with some other misc changes and fixes
2021-07-22 21:51:37 -04:00
ameerj af9696059c glsl: Implement Images 2021-07-22 21:51:37 -04:00
ameerj 6577a63d36 glsl: skip gl_ViewportIndex write if device does not support it 2021-07-22 21:51:37 -04:00
ameerj f4799e8fa1 glsl: Implement transform feedback 2021-07-22 21:51:37 -04:00
ameerj 31147ffe69 glsl: Yet another gl_ViewportIndex fix attempt 2021-07-22 21:51:37 -04:00
ameerj 9f3970f837 glsl: Add gl_ViewportIndex out attribute 2021-07-22 21:51:37 -04:00
lat9nq fc29de7d5b emit_glsl_context_get_set: Remove unused function 2021-07-22 21:51:37 -04:00
ameerj 59576b82a8 glsl: Fix precise variable declaration
and add some more separation in the shader for better debugability when dumped
2021-07-22 21:51:37 -04:00
ameerj 8c684b3e23 glsl: Implement tessellation shaders 2021-07-22 21:51:37 -04:00
ameerj c7d085b505 glsl: Implement ImageGradient and other texture function variants 2021-07-22 21:51:37 -04:00
ameerj 68d075d1e8 glsl: Fix atomic SSBO offsets
and implement misc getters
2021-07-22 21:51:37 -04:00
ameerj 19247ba4fa glsl: Implement geometry shaders 2021-07-22 21:51:37 -04:00
ameerj df53046d68 glsl: Use NotImplemented macro with function name output 2021-07-22 21:51:37 -04:00
ameerj 3a024b3026 glsl: Implement gl_ViewportIndex
SSBU now working
2021-07-22 21:51:37 -04:00
ameerj b7561226ed glsl: SHFL fix and prefer shift operations over divide in glsl shader 2021-07-22 21:51:37 -04:00
ameerj e10366974e glsl: Implement precise fp variable allocation 2021-07-22 21:51:37 -04:00
ameerj 14bfb4719a HACK glsl: Write defaults to unused generic attributes 2021-07-22 21:51:37 -04:00
ameerj 4b5a4ea72e glsl: Fix ssbo indexing and name shadowing between shader stages 2021-07-22 21:51:37 -04:00
ameerj 8ec0028e68 glsl: implement set clip distance
and missed a diff in emit_glsl relating to var alloc ref counting
2021-07-22 21:51:37 -04:00
ameerj 9f3ffb996b glsl: Rework var alloc to not assign unused results 2021-07-22 21:51:37 -04:00
ameerj 1269a0cf8b glsl: Rework variable allocator to allow for variable reuse 2021-07-22 21:51:37 -04:00
ameerj 9ccbd74991 glsl: Fix ATOM and implement ATOMS 2021-07-22 21:51:37 -04:00
ameerj 68ef3803bf glsl: Use gl_SubGroupInvocationARB 2021-07-22 21:51:36 -04:00
ameerj e35ffbbeb0 glsl: Implement VOTE for subgroup size potentially larger 2021-07-22 21:51:36 -04:00
ameerj 770b754afd glsl: Implement VOTE 2021-07-22 21:51:36 -04:00
ameerj 181a4ffdc4 glsl: Implement ST{LS} 2021-07-22 21:51:36 -04:00
ameerj 57d354b02c glsl: Implement more instructions used by SMO 2021-07-22 21:51:36 -04:00
ameerj 7df0815117 glsl: Implement more instructions used by SMO 2021-07-22 21:51:36 -04:00
ameerj 80eec85867 glsl: Fix GetAttribute return values
fixes font rendering issues as these were used to index into the ssbos
2021-07-22 21:51:36 -04:00
ameerj 1542f31e79 glsl: minor cleanup 2021-07-22 21:51:36 -04:00
ameerj 005eecffcd glsl: Fix and implement rest of cbuf access 2021-07-22 21:51:36 -04:00
ameerj 3047eb6688 glsl: Implement TXQ and other misc changes 2021-07-22 21:51:36 -04:00
ameerj 5fd92780b2 glsl: TLD4 implementation 2021-07-22 21:51:36 -04:00
ameerj 697eacd095 glsl: Implement TLD instruction 2021-07-22 21:51:36 -04:00
ameerj e4ba755705 glsl: Implement TEXS 2021-07-22 21:51:36 -04:00
ameerj 59a692e9ed glsl: Cleanup texture functions 2021-07-22 21:51:36 -04:00
lat9nq c9a25855bc shader_recompiler: GCC fixes 2021-07-22 21:51:36 -04:00
ameerj 7619b7d427 glsl: Implement TEX depth functions 2021-07-22 21:51:36 -04:00
ameerj 55e0211a5e glsl: Implement TEX ImageSample functions 2021-07-22 21:51:36 -04:00
ameerj b98de76ea8 glsl: Rework Shuffle emit instructions to align with SPIR-V 2021-07-22 21:51:36 -04:00
ameerj 8ba814efb2 glsl: Better Storage access and wip warps 2021-07-22 21:51:36 -04:00
ameerj 86d4a05cec glsl: Fix integer conversions, implement clamp CC 2021-07-22 21:51:36 -04:00
ameerj 21797efa54 glsl: Implement IADD CC 2021-07-22 21:51:36 -04:00
ameerj 453cd25da5 glsl: SSBO access fixes and wip SampleExplicitLod implementation. 2021-07-22 21:51:36 -04:00
ameerj f6bbc76336 glsl: WIP var forward declaration
to fix Loop control flow.
2021-07-22 21:51:36 -04:00
ameerj 2a71333716 glsl: Fix bindings, add some CC ops 2021-07-22 21:51:36 -04:00
ameerj 6674637853 glsl: remove unused headers 2021-07-22 21:51:36 -04:00
ameerj a752ec88d0 glsl: Implement derivatives and YDirection
plus some other misc additions/changed
2021-07-22 21:51:36 -04:00
ameerj ed14d31f66 glsl: Fix non-immediate buffer access
and many other misc implementations
2021-07-22 21:51:36 -04:00
ameerj d171083d53 glsl: textures wip 2021-07-22 21:51:36 -04:00
ameerj 3d086e6130 glsl: Implement some attribute getters and setters 2021-07-22 21:51:36 -04:00
ameerj 5399906c26 glsl: Track S32 atomics 2021-07-22 21:51:36 -04:00
ameerj b95716e543 glsl: Update phi node management 2021-07-22 21:51:36 -04:00
ameerj 67f881e714 glsl: Fix floating point compare ops
Logic for ordered/unordered ops was wrong.
2021-07-22 21:51:36 -04:00
ameerj bd24fa9713 glsl: Query GL Device for FP16 extension support 2021-07-22 21:51:36 -04:00
ameerj 3482df1176 glsl: Simply FP storage atomics 2021-07-22 21:51:36 -04:00
ameerj 9cc1b8a873 glsl: F16x2 storage atomics 2021-07-22 21:51:36 -04:00
ameerj 11ba190462 glsl: Revert ssbo aliasing. Storage Atomics impl 2021-07-22 21:51:36 -04:00
ameerj e99d01ff53 glsl: implement phi nodes 2021-07-22 21:51:36 -04:00
ameerj 3d9ecbe998 glsl: Wip storage atomic ops 2021-07-22 21:51:36 -04:00
ameerj df793fc049 glsl: Implement FCMP 2021-07-22 21:51:36 -04:00
ameerj cdde730219 glsl: Add a more robust fp formatter 2021-07-22 21:51:36 -04:00
ameerj ac7b0ebcb7 glsl: More FP fixes 2021-07-22 21:51:36 -04:00
ameerj 3064bde415 glsl: FP function fixes 2021-07-22 21:51:36 -04:00
ameerj 65c6f73e43 glsl: More FP instructions/fixes 2021-07-22 21:51:36 -04:00
ameerj 5e9095ef22 glsl: Add many FP32/64 instructions 2021-07-22 21:51:36 -04:00
ReinUsesLisp 53667ddd4e glsl: Fixup build issues 2021-07-22 21:51:36 -04:00
ameerj ef7bd53f18 glsl: Implement more Integer ops 2021-07-22 21:51:36 -04:00
ameerj 266a3d60e3 glsl: Implement BF* 2021-07-22 21:51:36 -04:00
ameerj 0f40b0e61c glsl: Implement a few Integer instructions 2021-07-22 21:51:36 -04:00
ameerj fb75d122a2 glsl: Use std::string_view for Emit function args. 2021-07-22 21:51:35 -04:00
ameerj 115c162b9a glsl: Pass IR::Inst& to Emit functions 2021-07-22 21:51:35 -04:00
ameerj 78f5eb90d7 glsl: INeg and IAdd negate tests 2021-07-22 21:51:35 -04:00
ameerj e221baccdd glsl: Reusable typed variables. IADD32 2021-07-22 21:51:35 -04:00
ameerj faf4cd72c5 glsl: Fix program linking and cbuf 2021-07-22 21:51:35 -04:00
ameerj 64337f004d glsl: Fix "reg" allocing
based on glasm with some tweaks
2021-07-22 21:51:35 -04:00
ameerj eaff1030de glsl: Initial backend 2021-07-22 21:51:35 -04:00
ReinUsesLisp 3d822faea1 spirv: Reduce log severity of mismatching denorm rules 2021-07-22 21:51:35 -04:00
ReinUsesLisp 7ac55c2a75 shader: Fix loop safety to SSA pass 2021-07-22 21:51:35 -04:00
ReinUsesLisp 8fb2048934 vk_rasterizer: Exit render passes on fragment barriers 2021-07-22 21:51:35 -04:00
Rodrigo Locatti dbf7cb9f90 vk_graphics_pipeline: Fix path with no VK_EXT_extended_dynamic_state 2021-07-22 21:51:35 -04:00
ReinUsesLisp 94e751f415 buffer_cache: Invalidate fast buffers on compute 2021-07-22 21:51:35 -04:00
ReinUsesLisp 61cd7dd301 shader: Add logging 2021-07-22 21:51:35 -04:00
lat9nq 373f75d944 shader: Add shader loop safety check settings
Also add a setting for enable Nsight Aftermath.
2021-07-22 21:51:35 -04:00
ReinUsesLisp 487057b8d2 shader: Comment why the array component is not read in TMML 2021-07-22 21:51:35 -04:00
ReinUsesLisp ba3bdf1d41 vulkan_device: Enable VK_EXT_vertex_input_dynamic_state 2021-07-22 21:51:35 -04:00
ReinUsesLisp 41cca8b8ad vk_pipeline_cache: Skip cached pipelines with different dynamic state 2021-07-22 21:51:35 -04:00
ameerj 5445799260 main: Fix Open Transferable Shader Cache context item
Opens the new shader cache directory location for the specified title, if it exists.
2021-07-22 21:51:35 -04:00
ameerj 3c125d4134 tmml: Remove index component from coords vec
The lod query functions exposed by the rendering API's do not make use of the texturearray layer indexing.
2021-07-22 21:51:35 -04:00
ReinUsesLisp ea038d6653 vulkan: Add VK_EXT_vertex_input_dynamic_state support
Reduces the number of total pipelines generated on Vulkan.
Tested on Super Smash Bros. Ultimate.
2021-07-22 21:51:35 -04:00
ReinUsesLisp cb78a1b494 shader: Reorder shader cache directories 2021-07-22 21:51:35 -04:00
ReinUsesLisp 3025b2f605 vk_rasterizer: Implement first index 2021-07-22 21:51:35 -04:00
ReinUsesLisp d554778311 vulkan: Use VK_EXT_provoking_vertex when available 2021-07-22 21:51:35 -04:00
ameerj d52bacf6f0 spirv/convert: Catch more signed operations oversights
The sign bit on integers of size < 32 was not properly preserved in casts
2021-07-22 21:51:35 -04:00
ReinUsesLisp 8554a644df spirv/convert: Catch more broken signed operations on Nvidia OpenGL
BitCast U32 to S32 before converting to float on drivers with broken
signed operations.
2021-07-22 21:51:35 -04:00
ameerj cd8427367e gl_buffer_cache: Use unorm internal formats for snorm texture buffer views
Fixes black textures in UE4 games
2021-07-22 21:51:35 -04:00
ReinUsesLisp 5befc0bf87 shader_environment: Fix local memory size calculations 2021-07-22 21:51:35 -04:00
ReinUsesLisp 60a96c49e5 buffer_cache: Fix copy based uniform bindings tracking 2021-07-22 21:51:35 -04:00
ameerj 15bdd27cac shader_environment: Add shader_local_memory_crs_size to local memory size
Fixes DOOM 2016 missing local memory
2021-07-22 21:51:35 -04:00
ReinUsesLisp 7eaa74ad23 gl_texture_cache: Create image storage views
Fixes SULD.D tests.
2021-07-22 21:51:35 -04:00
ReinUsesLisp b1ed64ac18 gl_shader_util: Move shader utility code to a separate file 2021-07-22 21:51:35 -04:00
ReinUsesLisp 12fe7210d2 gl_shader_cache: Store workers in shader cache object 2021-07-22 21:51:35 -04:00
ReinUsesLisp cffd4716c5 vk_pipeline_cache,shader_notify: Add shader notifications 2021-07-22 21:51:35 -04:00
ReinUsesLisp 48aad8dc05 vk_pipeline_cache: Add asynchronous shaders 2021-07-22 21:51:35 -04:00
ReinUsesLisp 2a0aeaa3d2 vk_rasterizer: Flush work on clear and dispatches 2021-07-22 21:51:34 -04:00
FernandoS27 c736b9ffab DMA: Restrict optimised path for BlockToLinear further. 2021-07-22 21:51:34 -04:00
ReinUsesLisp f45f7b5c2a vk_swapchain: Handle outdated swapchains
Fixes pixelated presentation on Intel devices.
2021-07-22 21:51:34 -04:00
FernandoS27 562af30181 shader: Fix VertexA Shaders. 2021-07-22 21:51:34 -04:00
ReinUsesLisp ec9a78885e shader: Add 2D and 3D variants to SUATOM and SURED
Used by Claybook.
2021-07-22 21:51:34 -04:00
ReinUsesLisp b02c78b276 vk_buffer_cache: Handle null texture buffers
Fixes a crash on Age of Calamity cutscenes.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 8f099af6a8 nsight_aftermath_tracker: Fix SPIR-V module writes 2021-07-22 21:51:34 -04:00
ReinUsesLisp 8c954fcaee vk_pipeline_cache: Set support_derivative_control to true 2021-07-22 21:51:34 -04:00
ReinUsesLisp 4f8b68fb04 shader: Avoid CPU side undefined behavior on I2F 2021-07-22 21:51:34 -04:00
ReinUsesLisp 79f2fe1a39 glasm: Use ARB_derivative_control conditionally 2021-07-22 21:51:34 -04:00
ReinUsesLisp 4a2361a1e2 buffer_cache: Reduce uniform buffer size from shader usage
Increases performance significantly on certain titles.
2021-07-22 21:51:34 -04:00
ReinUsesLisp e57ee3b7fd transform_feedback: Read buffer stride from index instead of layout 2021-07-22 21:51:34 -04:00
ReinUsesLisp 46bd362d0d fixed_pipeline_state: Use regular for loop instead of ranges for perf
MSVC generates better code for it.
2021-07-22 21:51:34 -04:00
ReinUsesLisp d26271b014 vk_swapchain: Avoid recreating the swapchain on each frame
Recreate only when requested (or sRGB is changed) instead of tracking
the frontend's size. That size is still used as a hint.
2021-07-22 21:51:34 -04:00
lat9nq 22f0c4f002 emit_glasm_context_get_set: Remove unused variable 2021-07-22 21:51:34 -04:00
ReinUsesLisp 5539b13c5a shader,glasm: Implement legacy texcoord loads 2021-07-22 21:51:34 -04:00
ReinUsesLisp cf9f88e5a7 glasm: Implement legacy varyings 2021-07-22 21:51:34 -04:00
ReinUsesLisp ac0f5d2ab6 shader: Track legacy varyings 2021-07-22 21:51:34 -04:00
ReinUsesLisp 05d41fa9b7 shader: Add support for "negative" and unaligned offsets
"Negative" offsets don't exist. They are shown as such due to a bug in
nvdisasm.

Unaligned offsets have been proved to read the aligned offset. For
example, when reading an U32, if the offset is 6, the offset read will
be 4.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 5d170de0b5 shader: Implement ISCADD32I 2021-07-22 21:51:34 -04:00
ReinUsesLisp adc43297c5 spirv: Fix output generics with components 2021-07-22 21:51:34 -04:00
ReinUsesLisp 1148a4eac7 vulkan: Conditionally use shaderInt16
Add support for Polaris AMD devices.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 77372443c3 vulkan: Enable depth bounds and use it conditionally
Intel devices pre-Xe don't support this.
2021-07-22 21:51:34 -04:00
ReinUsesLisp c44b16124f vk_buffer_cache: Add transform feedback usage to buffers 2021-07-22 21:51:34 -04:00
ReinUsesLisp 916ca74324 opengl: Declare fragment outputs even if they are not used
Fixes Ori and the Blind Forest's menu on GLASM. For some reason
(probably high level optimizations) it is not sanitized on SPIR-V for
OpenGL. Vulkan is unaffected by this change.
2021-07-22 21:51:34 -04:00
ReinUsesLisp a7e9756671 buffer_cache: Mark uniform buffers as dirty if any enable bit changes 2021-07-22 21:51:34 -04:00
ReinUsesLisp 329dea217d shader: Always initialize up reference in structure control flow
Fixes ubsan issue.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 99f2c31b64 vulkan_device: Enable float64 and int64 conditionally
Add Intel Xe support.
2021-07-22 21:51:34 -04:00
ReinUsesLisp d093522fac shader: Fix ImageWrite indexing 2021-07-22 21:51:34 -04:00
ReinUsesLisp d738ad4d0b spirv: Fix image and image buffer descriptor index usage 2021-07-22 21:51:34 -04:00
ReinUsesLisp eb8464cb3d glasm: Fix immediate texture coordinate 2021-07-22 21:51:34 -04:00
ReinUsesLisp 457dda69cc shader: Clang-format secondary textures 2021-07-22 21:51:34 -04:00
ReinUsesLisp 627161c38e shader: Fix secondary textures 2021-07-22 21:51:34 -04:00
ameerj dd39b87b0c shader: Adhere to disk shader cache setting 2021-07-22 21:51:34 -04:00
ReinUsesLisp b659212dbd shader: Fix TMML queries 2021-07-22 21:51:34 -04:00
ReinUsesLisp fbf5cdcba0 shader: Fix FSwizzleAdd folding when going through phi nodes 2021-07-22 21:51:34 -04:00
ReinUsesLisp 871c9f1ced shader/exception: Fix compilation errors on gcc 2021-07-22 21:51:34 -04:00
ReinUsesLisp b6c087496b glasm: Reduce reg allocation leaks from an exception to a log 2021-07-22 21:51:34 -04:00
ReinUsesLisp 56d4a9ebde texture_cache: Reduce invalid image/sampler error severity 2021-07-22 21:51:34 -04:00
ReinUsesLisp b7764c3a79 shader: Handle host exceptions 2021-07-22 21:51:34 -04:00
ReinUsesLisp 83db7abae6 glasm: Use integer lod for TXQ 2021-07-22 21:51:33 -04:00
ReinUsesLisp 3b595fe8b2 glasm: Prepare XFB from state instead of global registers 2021-07-22 21:51:33 -04:00
ReinUsesLisp e240a62017 glasm: Fix global memory fallbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp 8f3043c3cf Revert "glasm: Skip phi moves on undefined instructions"
Causes regressions on Bowser's Fury.
2021-07-22 21:51:33 -04:00
ReinUsesLisp 2aa30353b7 glasm: Remove unintentional '\n' on Undef32 2021-07-22 21:51:33 -04:00
ReinUsesLisp adb591a757 glasm: Use storage buffers instead of global memory when possible 2021-07-22 21:51:33 -04:00
ReinUsesLisp f58f79c85d glasm: Implement Y direction 2021-07-22 21:51:33 -04:00
ReinUsesLisp 586c785366 glasm: Skip phi moves on undefined instructions 2021-07-22 21:51:33 -04:00
ReinUsesLisp b9c8814ea9 glasm: Implement undef instructions 2021-07-22 21:51:33 -04:00
ReinUsesLisp 8763cc1ff7 glasm: Fix global memory callbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp a41b2ed391 gl_shader_cache: Add disk shader cache 2021-07-22 21:51:33 -04:00
ReinUsesLisp a49532c8eb video_core,shader: Clang-format fixes 2021-07-22 21:51:33 -04:00
ReinUsesLisp eacf18cce9 gl_shader_cache: Rename Program abstractions into Pipeline 2021-07-22 21:51:33 -04:00
ReinUsesLisp 48aafe0961 glasm: Release phi node registers after they are no longer needed 2021-07-22 21:51:33 -04:00
ReinUsesLisp 77ee733c3a glasm: Remove unintentionally committed fmt::prints 2021-07-22 21:51:33 -04:00
ReinUsesLisp 70c9281fbf glasm: Fix INeg32 on negative immediates 2021-07-22 21:51:33 -04:00
ReinUsesLisp 75fd0079db glasm: Remove unnecessary value types 2021-07-22 21:51:33 -04:00
ReinUsesLisp 379b305b4b glasm: Throw when there are register leaks 2021-07-22 21:51:33 -04:00
ReinUsesLisp ca05a13c62 glasm: Catch more register leaks
Add support for null registers. These are used when an instruction has
no usages.

This comes handy when an instruction is only used for its CC value, with
the caveat of having to invalidate all pseudo-instructions before
defining the instruction itself in the register allocator. This commits
changes this.

Workaround a bug on Nvidia's condition codes conditional execution using
branches.
2021-07-22 21:51:33 -04:00
ReinUsesLisp 9fbfe7d676 glasm: Fix usage counting on phi nodes 2021-07-22 21:51:33 -04:00
ReinUsesLisp 4017928213 gl_shader_cache: Do not flip tessellation on OpenGL 2021-07-22 21:51:33 -04:00
ReinUsesLisp 80884e3270 gl_graphics_program: Fix texture buffer bindings 2021-07-22 21:51:33 -04:00
ReinUsesLisp c721767bcc glasm: Implement global memory fallbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp 0794273870 glasm: Implement int64 add and subtract 2021-07-22 21:51:33 -04:00
lat9nq 7fdf0d7d33 emit_glasm_context_get_set: Remove unused variable 2021-07-22 21:51:33 -04:00
ReinUsesLisp e30d4fa976 glasm: Implement indirect attribute loads 2021-07-22 21:51:33 -04:00
ReinUsesLisp c8414e686f glasm: Implement image atomics 2021-07-22 21:51:33 -04:00
ReinUsesLisp 3a7ca6a7db glasm: Reorder unreachable image atomic insts
Reorder them to the bottom of the file for readability.
2021-07-22 21:51:33 -04:00
ReinUsesLisp e565eb361a glasm: Implement gl_Layer stores 2021-07-22 21:51:33 -04:00
ReinUsesLisp 89e341d56a glasm: Implement SampleId 2021-07-22 21:51:33 -04:00
ReinUsesLisp 77d8c44b68 glasm: Implement IsHelperInvocation 2021-07-22 21:51:33 -04:00
ReinUsesLisp ddf601919f glasm: Fix EmitVertex's optimization 2021-07-22 21:51:33 -04:00
ReinUsesLisp 1bccb43cbe gl_shader_cache: Conditionally use viewport mask 2021-07-22 21:51:33 -04:00
ReinUsesLisp c31521512f gl_shader_cache,glasm: Conditionally use typeless image reads extension 2021-07-22 21:51:33 -04:00
ReinUsesLisp df406246d9 gl_shader_cache: Improve GLASM error print logic 2021-07-22 21:51:33 -04:00
ReinUsesLisp 84feabac88 glasm: Implement forced early Z 2021-07-22 21:51:33 -04:00
ReinUsesLisp 6bc54e12a0 glasm: Set transform feedback state 2021-07-22 21:51:33 -04:00
ReinUsesLisp 69b910e9e7 video_core: Abstract transform feedback translation utility 2021-07-22 21:51:33 -04:00
ReinUsesLisp 7dadb2bef3 glasm: Simplify patch reads 2021-07-22 21:51:33 -04:00
ReinUsesLisp b382f57b28 glasm: Fix output patch reads
With this, Luigi's Mansion's sand renders properly.
2021-07-22 21:51:33 -04:00
ReinUsesLisp c07cc9d6a5 gl_shader_cache: Pass shader runtime information 2021-07-22 21:51:33 -04:00
ReinUsesLisp 9e7b6622c2 shader: Split profile and runtime information in separate structs 2021-07-22 21:51:33 -04:00
ameerj eb15667905 emit_glasm_context_get_and_set.cpp: Add missing semicolons 2021-07-22 21:51:33 -04:00
ReinUsesLisp 781a87175c glasm: Fix patch attribute declarations 2021-07-22 21:51:33 -04:00
ameerj 36d040da70 glasm: Implement FSWZADD 2021-07-22 21:51:33 -04:00
ReinUsesLisp 3da7b98d37 glasm: Implement PrimitiveId attribute read 2021-07-22 21:51:33 -04:00
ReinUsesLisp 394b96a2fe glasm: Implement clip distance stores 2021-07-22 21:51:32 -04:00
ReinUsesLisp a5d978e91e glasm: Fix tessellation input attributes 2021-07-22 21:51:32 -04:00
ReinUsesLisp 0d7d85c81e glasm: Add missing semicolon on tesscoord reading 2021-07-22 21:51:32 -04:00
ReinUsesLisp 48d4e26326 glasm: Fix tessellation headers 2021-07-22 21:51:32 -04:00
ReinUsesLisp 9ec2303ad6 glasm: Add tessellation shader declarations 2021-07-22 21:51:32 -04:00
ReinUsesLisp 2913ca811e glasm: Implement TessellationEvaluationPoint 2021-07-22 21:51:32 -04:00
ReinUsesLisp 54decced92 gl_shader_manager: Zero initialize current assembly programs 2021-07-22 21:51:32 -04:00
ReinUsesLisp c0e4074721 gl_shader_manager: Remove unintentionally committed #pragma 2021-07-22 21:51:32 -04:00
ReinUsesLisp a569ac418e glasm: Implement patch memory 2021-07-22 21:51:32 -04:00
ReinUsesLisp 164b8c1ec5 glasm: Fix InvocationId declaration 2021-07-22 21:51:32 -04:00
ReinUsesLisp d5db96386d glasm: Implement InvocationId 2021-07-22 21:51:32 -04:00
ReinUsesLisp 679e7146a7 glasm: Optimize EmitVertex into EMIT 2021-07-22 21:51:32 -04:00
ReinUsesLisp 79929be833 glasm: Implement geometry shader attribute reads 2021-07-22 21:51:32 -04:00
ReinUsesLisp 83cef0426b glasm: Properly declare attributes on geometry programs 2021-07-22 21:51:32 -04:00
ReinUsesLisp fad139a3e6 glasm: Declare geometry program headers 2021-07-22 21:51:32 -04:00
ReinUsesLisp 690b1841e6 renderer_opengl: State track compute assembly programs 2021-07-22 21:51:32 -04:00
ReinUsesLisp c5ca4fe451 renderer_opengl: State track assembly programs 2021-07-22 21:51:32 -04:00
ReinUsesLisp 0a54291c9c glasm: Fix potential aliasing bug on cube array samples 2021-07-22 21:51:32 -04:00
ReinUsesLisp 8fdb00a2b5 glasm: Implement ImageWrite 2021-07-22 21:51:32 -04:00
ReinUsesLisp dadd192b30 glasm: Implement ImageRead 2021-07-22 21:51:32 -04:00
ReinUsesLisp 3d0ffc6ad0 glasm: Implement EmitVertex and EndPrimitive 2021-07-22 21:51:32 -04:00
ReinUsesLisp f79cbbf814 glasm: Implement ImageGradient 2021-07-22 21:51:32 -04:00
ReinUsesLisp 291f220be3 glasm: Implement 64-bit shifts 2021-07-22 21:51:32 -04:00
ReinUsesLisp d957b3a8fe glasm: Implement barriers 2021-07-22 21:51:32 -04:00
ReinUsesLisp b60b3fa113 glasm: Fix compute stage name 2021-07-22 21:51:32 -04:00
ReinUsesLisp 96962c1d3c glasm: Fix phi instruction types 2021-07-22 21:51:32 -04:00
ReinUsesLisp 91a3c2c1c0 glasm: Implement PREC on relevant instructions 2021-07-22 21:51:32 -04:00
ReinUsesLisp accad56ee7 glasm: Implement stores to gl_ViewportIndex 2021-07-22 21:51:32 -04:00
ReinUsesLisp 2494dbe183 glasm: Implement gl_PointSize stores 2021-07-22 21:51:32 -04:00
ReinUsesLisp 9415c435fc glasm: Implement gl_PointCoord 2021-07-22 21:51:32 -04:00
ReinUsesLisp 12dcb9fcc2 glasm: Implement ImageQueryLod 2021-07-22 21:51:32 -04:00
ReinUsesLisp 4a22942f45 glasm: Implement ImageFetch 2021-07-22 21:51:32 -04:00
ameerj 3777592ada glasm: Implement IADD.CC 2021-07-22 21:51:32 -04:00
ReinUsesLisp 98ed8ff103 glasm: Implement BFE.CC 2021-07-22 21:51:32 -04:00
ReinUsesLisp 2e0d56da7e glasm: Implement SelectU1 2021-07-22 21:51:32 -04:00
ReinUsesLisp 85fc7e584e HACK: Bind stages before and after bindings
Works around a bug where program parameters are only applied to the
current stage, and this one wasn't bound at the moment.

Affects all SSBO usages on GLASM.
2021-07-22 21:51:32 -04:00
ReinUsesLisp e8ed904805 glasm: Implement gl_WorkGroupID 2021-07-22 21:51:32 -04:00
ReinUsesLisp 0a42277a4f glasm: Implement TXQ and improve texture info reads 2021-07-22 21:51:32 -04:00
ReinUsesLisp c560bf99c2 glasm: Implement gl_FrongFacing attribute 2021-07-22 21:51:32 -04:00
ReinUsesLisp 8b7d5912d6 glasm: Support textures used in more than one stage 2021-07-22 21:51:32 -04:00
ReinUsesLisp 3d3ed53511 glasm: Implement textureGather instructions 2021-07-22 21:51:32 -04:00
ReinUsesLisp 0fa421f82f glasm: Implement gl_FragDepth and gl_SampleMask stores 2021-07-22 21:51:32 -04:00
ReinUsesLisp 1ee7f8b943 glasm: Do not alias ConditionRef for now
Immediate condition refs where not handled correctly. Just move the
value for now.
2021-07-22 21:51:32 -04:00
ReinUsesLisp 9bb3e008c9 shader: Read branch conditions from an instruction
Fixes the identity removal pass.
2021-07-22 21:51:32 -04:00
ReinUsesLisp 4bad415bca glasm: Implement InstanceId and VertexId 2021-07-22 21:51:31 -04:00
ReinUsesLisp afcb140185 glasm: Add missing return value on move assignment 2021-07-22 21:51:31 -04:00
ReinUsesLisp fb3ba62b3a glasm: Fix aliased bitcasts ref counting 2021-07-22 21:51:31 -04:00
ReinUsesLisp f1b334b9f9 glasm: Remove unintentional comma on vector insert 2021-07-22 21:51:31 -04:00
ReinUsesLisp ec6fc5fe78 glasm: Implement TEX and TEXS instructions
Remove lod clamp from texture instructions with lod, as this is not
needed (nor supported).
2021-07-22 21:51:31 -04:00
ReinUsesLisp c42a6143a5 glasm: Add support for non-2D texture samples 2021-07-22 21:51:31 -04:00
ReinUsesLisp bee9fb0563 glasm: Reorder unreachable image instructions to the bottom 2021-07-22 21:51:31 -04:00
ReinUsesLisp e6b4d461d2 glasm: Add support for texture offsets 2021-07-22 21:51:31 -04:00
ReinUsesLisp bf2949df10 glasm: Improve texture sampling instructions 2021-07-22 21:51:31 -04:00
ReinUsesLisp db2f0f4108 emit_glasm: Enable ARB_draw_buffers when needed 2021-07-22 21:51:31 -04:00
ReinUsesLisp 3c06293e20 emit_glasm: Add support for reading position attributes 2021-07-22 21:51:31 -04:00
lat9nq f7a2340205 shader_recompiler: GCC fixes
Fixes members of unnamed union not being accessible, and one function
without a declaration.
2021-07-22 21:51:31 -04:00
ameerj d4f9c798d6 glasm: Implement rest of shared mem 2021-07-22 21:51:31 -04:00
ReinUsesLisp 258f2dec1b opengl: Initial (broken) support to GLASM shaders 2021-07-22 21:51:31 -04:00
ReinUsesLisp 776ab3ea12 shader: Use a non-trivial dummy to construct ASL node union 2021-07-22 21:51:31 -04:00
ReinUsesLisp 38e7b8c805 emit_spirv: Jump to loop body with local variable
Silence unused variable warning
2021-07-22 21:51:31 -04:00
ReinUsesLisp 464f13fe0b glasm: Implement derivative instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 9fb2ea08e8 glasm: Initial (broken) implementation of TEX on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 1f3446b47e glasm: Implement some graphics instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 31d402ee74 glasm: Add Void type to GLASM values 2021-07-22 21:51:31 -04:00
ReinUsesLisp 3764750339 glasm: Add graphics specific shader declarations to GLASM 2021-07-22 21:51:31 -04:00
ameerj 057dee4856 glasm: Implement local memory for glasm 2021-07-22 21:51:31 -04:00
ReinUsesLisp ab5dbe7c29 emit_spirv: Add missing block in case 2021-07-22 21:51:31 -04:00
ReinUsesLisp bf5e48ffe4 glasm: Initial implementation of phi nodes on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 0f88fb5d72 glasm: Write result to scalar on integer comparison instructions 2021-07-22 21:51:31 -04:00
ReinUsesLisp d4385c34e3 glasm: Declare NV_shader_thread_group when needed 2021-07-22 21:51:31 -04:00
ReinUsesLisp 568d813eea vk_update_descriptor: Properly initialize payload on the update descriptor queue 2021-07-22 21:51:31 -04:00
ReinUsesLisp d54d7de40e glasm: Rework control flow introducing a syntax list
This commit regresses VertexA shaders, their transformation pass has to
be adapted to the new control flow.
2021-07-22 21:51:31 -04:00
ameerj 7ff5851608 glasm: Implement Storage atomics
StorageAtomicExchangeU64 is failing test seemingly due to failure storing 64-bit
result into the register
2021-07-22 21:51:31 -04:00
ReinUsesLisp 8c81a20ace glasm: Ensure reg alloc order across compilers on GLASM
Use a struct constructor to serialize register allocation arguments to
ensure registers are allocated in the same order regardless of the
compiler used.

The A and B functions can be called in any order when passed as
arguments to "foo":

  foo(A(), B())

But the order is guaranteed for curly-braced constructor calls in
classes:

  Foo{A(), B()}

Use this to get consistent behavior.
2021-07-22 21:51:31 -04:00
ReinUsesLisp c917290497 glasm: Enable unintentionally disabled register aliasing on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 70fbede213 glasm: Review all GLASM insts to be aware of register aliasing 2021-07-22 21:51:31 -04:00
ReinUsesLisp c4fd6b55bc glasm: Implement shuffle and vote instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp decda4a2c7 glasm: Add MUFU instructions to GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 5b18a12df2 glasm: Implement IAbs64 and INeg64 on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 3b6a632237 shader: Add floating-point rounding to I2F 2021-07-22 21:51:31 -04:00
ReinUsesLisp 3f00a2ad3f glasm: Properly clamp Fp64 on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp deda89372f glasm: Fix register allocation when moving immediate on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 0839e46736 glasm: Implement SelectU64 on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 6237300e36 glasm: Fix clamps so the min value has priority on NAN on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 8eb72ff0dc glasm: Fix moving U64 immediates to registers in GLASM 2021-07-22 21:51:31 -04:00
ameerj 80813b1d14 glasm: Implement storage atomic ops 2021-07-22 21:51:31 -04:00
ReinUsesLisp ad61b47f80 glasm: Add conversion instructions to GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 7703d65f23 glasm: Add fp min/max insts and fix store for fp64 on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 43a448d98d glasm: Add logical instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 99352741af glasm: Remove duplicated Fp64 pack instructions on GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp 45ef62d3ba glasm: Remove unnecesary new white space on Clamp GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp b4953e79ee glasm: Add floating-point comparisons on GLASM 2021-07-22 21:51:30 -04:00
ameerj 6705f56029 emit_glasm: Implement more integer alu ops 2021-07-22 21:51:30 -04:00
ameerj 3e10709091 glasm: Reimplement bitwise ops and BFI/BFE 2021-07-22 21:51:30 -04:00
ReinUsesLisp 4502595bc2 glasm: Initial GLASM fp64 support 2021-07-22 21:51:30 -04:00
ReinUsesLisp 9f851e3832 glasm: Implement GLASM fp16 packing and move bitwise insns 2021-07-22 21:51:30 -04:00
ReinUsesLisp 4de65fbff4 glasm: Remove unused functions left from rebase 2021-07-22 21:51:30 -04:00
ReinUsesLisp 6358b0d0c1 glasm: Specify namespace when using FormatTo 2021-07-22 21:51:30 -04:00
ReinUsesLisp 939dab7120 glasm: Implement more GLASM composite instructions 2021-07-22 21:51:30 -04:00
ReinUsesLisp 01e18581b9 vk_pipeline_cache: Enable int8 and int16 types on Vulkan 2021-07-22 21:51:30 -04:00
ReinUsesLisp 1c9307969c glasm: Make GLASM aware of types 2021-07-22 21:51:30 -04:00
ameerj 934d300246 glasm: Use CMP.S for Select32
also fixes ADD and SUB to use U modifier
2021-07-22 21:51:30 -04:00
ameerj 68cc445b8e glasm: Implement more logical ops 2021-07-22 21:51:30 -04:00
ameerj 941c6dc740 glasm: Implement BFI, BFE
Along with implementations of common instructions along the way
2021-07-22 21:51:30 -04:00
ReinUsesLisp 3e841f6441 glasm: Use BitField instead of C bitfields 2021-07-22 21:51:30 -04:00
ReinUsesLisp 2b04b4d27f glasm: Remove unused argument in identity instructions on GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp dc02cb92e4 gl_rasterizer: Flush L2 caches before glFlush on GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp 2c81ad8311 glasm: Initial GLASM compute implementation for testing 2021-07-22 21:51:30 -04:00
ReinUsesLisp 6fd190d1ae glasm: Implement basic GLASM instructions 2021-07-22 21:51:30 -04:00
ReinUsesLisp c1ba685d9c glasm: Changes to GLASM register allocator and emit context 2021-07-22 21:51:30 -04:00
ReinUsesLisp 36f1586267 vk_scheduler: Use locks instead of SPSC a queue
This tries to fix a data race where we'd wait forever for the GPU.
2021-07-22 21:51:30 -04:00
ReinUsesLisp 56c47951c5 vk_query_cache: Wait before reading queries 2021-07-22 21:51:30 -04:00
ReinUsesLisp a515036604 vk_master_semaphore: Use fetch_add to increase master semaphore tick 2021-07-22 21:51:30 -04:00
ReinUsesLisp b10cf64c48 glasm: Add GLASM backend infrastructure 2021-07-22 21:51:30 -04:00
ameerj 09dc23f971 shader: ISET.X implementation 2021-07-22 21:51:30 -04:00
ReinUsesLisp bfa47539f6 gl_shader_cache: Remove code unintentionally committed 2021-07-22 21:51:30 -04:00
ReinUsesLisp b725db8709 shader: Fixup SPIR-V emit header namespaces 2021-07-22 21:51:30 -04:00
ReinUsesLisp bed090807a Move SPIR-V emission functions to their own header 2021-07-22 21:51:30 -04:00
FernandoS27 ee61ec2c39 shader: Optimize NVN Fallthrough 2021-07-22 21:51:30 -04:00
FernandoS27 153a77efee shader: Stub SR_AFFINITY 2021-07-22 21:51:30 -04:00
ameerj 7ecc6de56a shader: Implement Int32 SUATOM/SURED 2021-07-22 21:51:30 -04:00
ReinUsesLisp d621e96d0d shader: Initial OpenGL implementation 2021-07-22 21:51:30 -04:00
ReinUsesLisp 850b08a16c spirv: Be aware of NAN unaware drivers 2021-07-22 21:51:30 -04:00
ReinUsesLisp fde47152d9 spirv: Add SSBO read fallbacks when no aliasing is available 2021-07-22 21:51:29 -04:00
ReinUsesLisp fd913bceaf spirv: Add OpKill fallback to demote 2021-07-22 21:51:29 -04:00
ReinUsesLisp d2a0f9d7ad spirv: Do not enable ShaderLayer
This is enabled by an extension instead of the capability.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 2b434b74af spirv: Enable DemoteToHelperInvocationEXT only when supported 2021-07-22 21:51:29 -04:00
ReinUsesLisp cfd873275d spirv: Use OriginLowerLeft when requested 2021-07-22 21:51:29 -04:00
ReinUsesLisp bafe9e35a9 spirv: Only add image operands mask when needed 2021-07-22 21:51:29 -04:00
ReinUsesLisp d2e811db2e spirv: Workaround image unsigned offset bug
Workaround bug on Nvidia's OpenGL SPIR-V compiler when using unsigned
texture offsets.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 4ead714910 spirv: Add int8 and int16 capabilities only when supported 2021-07-22 21:51:29 -04:00
ReinUsesLisp 33bebc3412 spirv: Add integer clamping workarounds
Workaround more bugs on Nvidia's OpenGL SPIR-V compiler.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 7b03b97118 spirv: Implement int8 and int16 conversion fallbacks 2021-07-22 21:51:29 -04:00
ReinUsesLisp 48a17298d7 spirv: Support OpenGL uniform buffers and change bindings 2021-07-22 21:51:29 -04:00
ReinUsesLisp d5d6778ba5 spirv: Desambiguate descriptor names
Worksaround a bug on Nvidia's OpenGL SPIR-V compiler where names are
used for name matching.
2021-07-22 21:51:29 -04:00
ReinUsesLisp a46d91b1ef shader: Add OpenGL shader profile options 2021-07-22 21:51:29 -04:00
ReinUsesLisp 028f0033bd shader: Remove shader util 2021-07-22 21:51:29 -04:00
FernandoS27 c49d56c931 shader: Address feedback 2021-07-22 21:51:29 -04:00
FernandoS27 b541f5e5e3 shader: Implement VertexA stage 2021-07-22 21:51:29 -04:00
FernandoS27 da936d6ad8 shader: Implement delegation of Exit to dispatcher on CFG 2021-07-22 21:51:29 -04:00
ReinUsesLisp f4b82b8dd7 vk_graphics_pipeline: Fix texture buffer descriptors 2021-07-22 21:51:29 -04:00
ameerj fb14820c86 shader: Fix IADD3.CC 2021-07-22 21:51:29 -04:00
ReinUsesLisp 53acdda772 vk_scheduler: Allow command submission on worker thread
This changes how Scheduler::Flush works. It queues the current command
buffer to be sent to the GPU but does not do it immediately. The Vulkan
worker thread takes care of that. Users will have to use
Scheduler::Flush + Scheduler::WaitWorker to get the previous behavior.

Scheduler::Finish is unchanged.

To avoid waiting on work never queued, Scheduler::Wait sends the current
command buffer if that's what the caller wants to wait.
2021-07-22 21:51:29 -04:00
ReinUsesLisp c5425b38c1 vk_compute_pass: Fix -Wshadow warning 2021-07-22 21:51:29 -04:00
ReinUsesLisp 025b20f96a shader: Move pipeline cache logic to separate files
Move code to separate files to be able to reuse it from OpenGL. This
greatly simplifies the pipeline cache logic on Vulkan.

Transform feedback state is not yet abstracted and it's still
intrusively stored inside vk_pipeline_cache. It will be moved when
needed on OpenGL.
2021-07-22 21:51:29 -04:00
ReinUsesLisp ac8835659e vulkan: Defer descriptor set work to the Vulkan thread
Move descriptor lookup and update code to a separate thread. Delaying
this removes work from the main GPU thread and allows creating
descriptor layouts on another thread. This reduces a bit the workload
of the main thread when new pipelines are encountered.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 2f3c3dfc10 vulkan: Rework descriptor allocation algorithm
Create multiple descriptor pools on demand. There are some degrees of
freedom what is considered a compatible pool to avoid wasting large
pools on small descriptors.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 5ed871398b vk_graphics_pipeline: Generate specialized pipeline config functions and improve code 2021-07-22 21:51:29 -04:00
ReinUsesLisp f4ace63957 shader: Accelerate pipeline transitions and use dirty flags for shaders 2021-07-22 21:51:29 -04:00
ameerj 20e86fd615 shader: Fix BFE s32 undefined check
Our unit tests were hitting this exception.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 8fda599a31 vk_compute_pipeline: Fix index comparison oversight on compute texture buffers 2021-07-22 21:51:29 -04:00
ReinUsesLisp 50eb03382e shader: Fix error checking in bitfieldExtract and implement bitfieldInsert folding 2021-07-22 21:51:29 -04:00
ReinUsesLisp 0c0ee9d897 vulkan_device: Require shaderClipDistance and shaderCullDistance features 2021-07-22 21:51:29 -04:00
ReinUsesLisp 5b1b06f11e vk_graphics_pipeline: Guard against non-tessellation pipelines using patches 2021-07-22 21:51:29 -04:00
ReinUsesLisp 57464e3b72 shader: Fix storage type when reading patches on tess control 2021-07-22 21:51:29 -04:00
ReinUsesLisp d2b54c6e42 shader: Fix VMNMX selector B 2021-07-22 21:51:29 -04:00
Rodrigo Locatti 2dc86372c7 shader: Fix bugs and build issues on GCC 2021-07-22 21:51:29 -04:00
ReinUsesLisp 7a1f296cda shader: Fix render targets with null attachments 2021-07-22 21:51:29 -04:00
ReinUsesLisp 155be4a8d3 shader: Increase the maximum number of storage buffers
Compute shaders spill uniform buffers on storage buffers, increasing the
expected number.
2021-07-22 21:51:29 -04:00
ReinUsesLisp fe25f42403 shader: Remove identity removal pass for better build times 2021-07-22 21:51:29 -04:00
ReinUsesLisp 0c7230a606 shader: Add more strict validation the pass 2021-07-22 21:51:29 -04:00
ReinUsesLisp 25949b864c shader: Fix forward referencing identity instructions when inserting phi 2021-07-22 21:51:29 -04:00
ReinUsesLisp 92a01984e6 shader: Remove invalidated blocks in dead code elimination pass 2021-07-22 21:51:29 -04:00
ReinUsesLisp aece958c2b shader: Add missing UndoUse case for GetSparseFromOp 2021-07-22 21:51:29 -04:00
ReinUsesLisp 0ace34575c shader: Require dual source blending 2021-07-22 21:51:29 -04:00
ReinUsesLisp 21e3382830 shader: Simplify code in opcodes.h to fix Intellisense
Avoid using std::array to fix Intellisense not properly compiling this
code and disabling itself on all files that include it.

While we are at it, change the code to use u8 instead of size_t for the
number of instructions in an opcode.
2021-07-22 21:51:29 -04:00
ReinUsesLisp d10cf55353 shader: Implement indexed textures 2021-07-22 21:51:28 -04:00
ameerj 7a9dc78398 shader: Refactor atomic_operations_global_memory 2021-07-22 21:51:28 -04:00
ameerj 427951d6fe shader: add missing include guard in half_floating_point_helper.h 2021-07-22 21:51:28 -04:00
ReinUsesLisp c8f9772d65 shader: Fix gcc warnings 2021-07-22 21:51:28 -04:00
ReinUsesLisp 75dee55486 shader: Inline common Value getters 2021-07-22 21:51:28 -04:00
ReinUsesLisp 23182fa59c shader: Intrusively store in a block if it's sealed or not 2021-07-22 21:51:28 -04:00
ReinUsesLisp eed6da55b8 cmake: Link to common in shader_recompiler 2021-07-22 21:51:28 -04:00
ReinUsesLisp cc0fcd1b8d shader: Improve goto removal algorithm complexity
Find sibling node containing a nephew searching from the nephew itself
instead of the uncle.
2021-07-22 21:51:28 -04:00
ReinUsesLisp f66851e376 shader: Use memset to reset instruction arguments 2021-07-22 21:51:28 -04:00
ReinUsesLisp c84bbd9e44 shader: Inline common Value functions into the header 2021-07-22 21:51:28 -04:00
ReinUsesLisp 050e81500c shader: Move microinstruction header to the value header 2021-07-22 21:51:28 -04:00
ReinUsesLisp e4d1122082 shader: Move siblings check to a separate function and comment them out 2021-07-22 21:51:28 -04:00
ReinUsesLisp 4209828646 shader: Intrusively store register values in block for SSA pass 2021-07-22 21:51:28 -04:00
ReinUsesLisp 6944cabb89 shader: Inline common Opcode and Inst functions 2021-07-22 21:51:28 -04:00
ReinUsesLisp 4bbe530337 shader: Inline common IR::Block methods 2021-07-22 21:51:28 -04:00
ReinUsesLisp 24cc298660 shader: Use a small_vector for phi blocks 2021-07-22 21:51:28 -04:00
ReinUsesLisp 79c2e43fcd shader: Calculate number of arguments in an opcode at compile time 2021-07-22 21:51:28 -04:00
ReinUsesLisp dd860b684c shader: Implement D3D samplers 2021-07-22 21:51:28 -04:00
ReinUsesLisp a8d46a5eae shader: Add constant propagation for arithmetic right shifts 2021-07-22 21:51:28 -04:00
ReinUsesLisp 469f8bb857 shader: Simplify code for local memory 2021-07-22 21:51:28 -04:00
ReinUsesLisp 7018e524f5 shader: Add NVN storage buffer fallbacks
When we can't track the SSBO origin of a global memory instruction,
leave it as a global memory operation and assume these pointers are in
the NVN storage buffer slots, then apply a linear search in the shader's
runtime.
2021-07-22 21:51:28 -04:00
ReinUsesLisp 6325601947 spirv: Fix ViewportMask 2021-07-22 21:51:28 -04:00
ameerj 5b8afed871 spirv: Replace Constant/ConstantComposite with Const helper 2021-07-22 21:51:28 -04:00
FernandoS27 2999028976 shader: Address feedback 2021-07-22 21:51:28 -04:00
FernandoS27 881b33da3b shader: Implement F2F (Imm) 2021-07-22 21:51:28 -04:00
FernandoS27 21a878237b shader: Implement IADD3.CC/.X 2021-07-22 21:51:28 -04:00
FernandoS27 f69d0b91ff shader: Address feedback 2021-07-22 21:51:28 -04:00
FernandoS27 080857b60e shader: Add coarse derivatives 2021-07-22 21:51:28 -04:00
FernandoS27 04c459fc8d shader: Implement fine derivates constant propagation 2021-07-22 21:51:28 -04:00
FernandoS27 f18a6dd1bd shader: Implement SR_Y_DIRECTION 2021-07-22 21:51:28 -04:00
ReinUsesLisp 50f8007172 shader: Fix Phi node types 2021-07-22 21:51:28 -04:00
ReinUsesLisp 0a0818c025 shader: Fix memory barriers 2021-07-22 21:51:28 -04:00
ReinUsesLisp c9e4609d87 spirv: Fix implicit lod type 2021-07-22 21:51:28 -04:00
ReinUsesLisp 7cfa403683 spirv: Use explicit lods outside of fragment shaders 2021-07-22 21:51:28 -04:00
ReinUsesLisp dbbd4b5496 spirv: Use ConstOffset instead of Offset when possible 2021-07-22 21:51:28 -04:00
ameerj be431f5ed0 shader: Implement BFE and BFI CC
Fix two bugs in BFI.
2021-07-22 21:51:28 -04:00
ReinUsesLisp 80940b1706 shader: Implement SampleMask 2021-07-22 21:51:28 -04:00
ReinUsesLisp 95815a3883 shader: Implement PIXLD.MY_INDEX 2021-07-22 21:51:28 -04:00
ReinUsesLisp f3473c5143 spirv: Bitcast non-F32 output attributes to their type before store 2021-07-22 21:51:28 -04:00
ReinUsesLisp e3514bcd6b spirv: Implement ViewportMask with NV_viewport_array2 2021-07-22 21:51:28 -04:00
ReinUsesLisp 4657cf78fd spirv: Bitcast non-F32 attributes to F32 2021-07-22 21:51:27 -04:00
ReinUsesLisp b0f1255c8c shader: Implement PrimitiveId 2021-07-22 21:51:27 -04:00
ReinUsesLisp 183855e396 shader: Implement tessellation shaders, polygon mode and invocation id 2021-07-22 21:51:27 -04:00
ReinUsesLisp 34519d3fc6 shader: Mark atomic instructions as writes 2021-07-22 21:51:27 -04:00
lat9nq 7ae3ea6bee vk_pipeline_cache: Silence GCC warnings
Silences `-Werror=missing-field-initializers` due to missing
initializers.
2021-07-22 21:51:27 -04:00
ReinUsesLisp 416e1b7441 spirv: Implement image buffers 2021-07-22 21:51:27 -04:00
ReinUsesLisp d8ec99dada spirv: Implement Layer stores 2021-07-22 21:51:27 -04:00
FernandoS27 ab3831f6cb spirv: Fix alpha test 2021-07-22 21:51:27 -04:00
ameerj 6f4a1c8dcf spirv: Fix non-atomic 64-bit store 2021-07-22 21:51:27 -04:00
ameerj 6c512f4bff spirv: Implement alpha test 2021-07-22 21:51:27 -04:00
ReinUsesLisp b126987c59 shader: Implement transform feedbacks and define file format 2021-07-22 21:51:27 -04:00
ReinUsesLisp a83579b50a shader: Implement early Z tests 2021-07-22 21:51:27 -04:00
ReinUsesLisp 09165ae189 shader: Document and relax cache control on surface instructions 2021-07-22 21:51:27 -04:00
ReinUsesLisp fa75b9b062 spirv: Rework storage buffers and shader memory 2021-07-22 21:51:27 -04:00
ReinUsesLisp c070991def shader: Fix fixed pipeline point size on geometry shaders 2021-07-22 21:51:27 -04:00
ReinUsesLisp 2597cee85b shader: Add constant propagation for *&^| binary operations 2021-07-22 21:51:27 -04:00
ReinUsesLisp f263760c5a shader: Implement geometry shaders 2021-07-22 21:51:27 -04:00
ReinUsesLisp a6cef71cc0 shader: Implement OUT 2021-07-22 21:51:27 -04:00
lat9nq dd3432d357 internal_stage_buffer_entry_read: Remove pragma optimize off 2021-07-22 21:51:27 -04:00
ReinUsesLisp 4b0172f6de shader: Stub SR_INVOCATION_INFO 2021-07-22 21:51:27 -04:00
ReinUsesLisp f712084147 shader: Stub ISBERD 2021-07-22 21:51:27 -04:00
ReinUsesLisp 2516829e4c shader: Fix CC in I2I 2021-07-22 21:51:27 -04:00
ReinUsesLisp 23b8714732 spirv: Define StorageImageWriteWithoutFormat capability when used 2021-07-22 21:51:27 -04:00
ReinUsesLisp a33014022e pipeline_helper: Simplify descriptor objects initialization 2021-07-22 21:51:27 -04:00
ReinUsesLisp 415c7e46ed shader: Simplify FLO and throw on CC 2021-07-22 21:51:27 -04:00
ReinUsesLisp dfd5341d71 shader: Mark blocks with no end branch as unreachable 2021-07-22 21:51:27 -04:00
ReinUsesLisp 2ed80f6b1e shader: Implement LOP CC 2021-07-22 21:51:27 -04:00
ReinUsesLisp 5c61e860e4 shader: Implement SR_THREAD_KILL 2021-07-22 21:51:27 -04:00
ReinUsesLisp c9337a4ae4 shader: Apply sign bit in FCMP (imm) 2021-07-22 21:51:27 -04:00
ameerj 3db2b3effa shader: Implement ATOM/S and RED 2021-07-22 21:51:27 -04:00
ReinUsesLisp 479ca00071 nsight_aftermath_tracker: Report used shaders to Nsight Aftermath 2021-07-22 21:51:27 -04:00
ReinUsesLisp 106764a6d5 spirv: Move phi node patching to a separate function 2021-07-22 21:51:27 -04:00
ReinUsesLisp ab543f1821 spirv: Guard against typeless image reads on unsupported devices 2021-07-22 21:51:27 -04:00
ReinUsesLisp 9280cd649a shader: Move LaneId to the warp emission file and fix AMD 2021-07-22 21:51:27 -04:00
ReinUsesLisp 1030b612a3 vk_rasterizer: Request outside render pass execution context for compute 2021-07-22 21:51:27 -04:00
ReinUsesLisp e5e79648cf pipeline_helper: Add missing [[maybe_unused]] 2021-07-22 21:51:27 -04:00
ReinUsesLisp 2e71e4c5c0 spirv: Fix forward declarations on phi nodes 2021-07-22 21:51:27 -04:00
ReinUsesLisp d404b871d5 shader: Mark ImageWrite with side effects 2021-07-22 21:51:27 -04:00
FernandoS27 1be6705408 shader: Implement CC for ISET, FSET, PSET, CSET, and DSET
Throw when other instructions are missing CC.
2021-07-22 21:51:27 -04:00
ReinUsesLisp 8cea39b5a6 shader: Remove outdated comment in F2I 2021-07-22 21:51:27 -04:00
ReinUsesLisp 7cb2ab3585 shader: Implement SULD and SUST 2021-07-22 21:51:26 -04:00
ReinUsesLisp 094da34456 shader: Fix Windows build issues 2021-07-22 21:51:26 -04:00
lat9nq 5bfcafa0a2 shader: Address feedback + clang format 2021-07-22 21:51:26 -04:00
lat9nq 0bb85f6a75 shader_recompiler,video_core: Cleanup some GCC and Clang errors
Mostly fixing unused *, implicit conversion, braced scalar init,
fpermissive, and some others.

Some Clang errors likely remain in video_core, and std::ranges is still
a pertinent issue in shader_recompiler

shader_recompiler: cmake: Force bracket depth to 1024 on Clang
Increases the maximum fold expression depth

thread_worker: Include condition_variable

Don't use list initializers in control flow

Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
2021-07-22 21:51:26 -04:00
ReinUsesLisp 5cd3d00167 shader: Fix FCMP immediate variant 2021-07-22 21:51:26 -04:00
ReinUsesLisp 233e39bb7b shader: Fix dangling labels 2021-07-22 21:51:26 -04:00
ReinUsesLisp e9a91bc5cc shader: Interact texture buffers with buffer cache 2021-07-22 21:51:26 -04:00
ReinUsesLisp 56b92bd89c shader: Fix F2I 2021-07-22 21:51:26 -04:00
ReinUsesLisp ef88552224 shader: Fix TextureGrad 2021-07-22 21:51:26 -04:00
ReinUsesLisp 1f3eb601ac shader: Implement texture buffers 2021-07-22 21:51:26 -04:00
FernandoS27 dcaf0e9150 shader: Address feedback 2021-07-22 21:51:26 -04:00
FernandoS27 73cb17f41b shader: Implement indexed Position and ClipDistances 2021-07-22 21:51:26 -04:00
FernandoS27 1d51803169 shader: Implement indexed attributes 2021-07-22 21:51:26 -04:00
FernandoS27 0df7e509db shader: Implement AL2P 2021-07-22 21:51:26 -04:00
FernandoS27 20ba0ea0a9 shader: Fix BRX tracking 2021-07-22 21:51:26 -04:00
ReinUsesLisp bfeeb23ddc vk_pipeline_cache: Fix num of pipeline workers on weird platforms 2021-07-22 21:51:26 -04:00
ReinUsesLisp 417fb5d385 shader: Move recursive SSA rewrite to the heap 2021-07-22 21:51:26 -04:00
FernandoS27 72daa2a039 shader: Fix ShadowCube declaration type, set number of pipeline threads based on hardware 2021-07-22 21:51:26 -04:00
ReinUsesLisp 9e6fe430bd shader: Fix splits on blocks using indirect branches 2021-07-22 21:51:26 -04:00
ReinUsesLisp ffca21487f shader: Eliminate orphan blocks more efficiently 2021-07-22 21:51:26 -04:00
ReinUsesLisp da6cf2632c shader: Add subgroup masks 2021-07-22 21:51:26 -04:00
ReinUsesLisp fc93bc2abd shader: Implement BAR and fix memory barriers 2021-07-22 21:51:26 -04:00
ReinUsesLisp 85795de99f shader: Abstract breadth searches and use the abstraction 2021-07-22 21:51:26 -04:00
ReinUsesLisp 3f594dd86b shader: Reimplement GetCbufU64 as GetCbufU32x2
It may generate better code on some compilers and it's easier to handle.
2021-07-22 21:51:26 -04:00
ReinUsesLisp 5b3c6d59c2 vk_compute_pass: Fix compute passes 2021-07-22 21:51:26 -04:00
ReinUsesLisp 5ed68e83db shader: Remove atomic flags and use mutex + cond variable for pipelines 2021-07-22 21:51:26 -04:00
ReinUsesLisp 0b26f2b90e shader: Remove unused header in VOTE 2021-07-22 21:51:26 -04:00
ReinUsesLisp 6ff2e9ba09 vk_pipeline_cache: Remove unnecesary scope in pipeline cache locking 2021-07-22 21:51:26 -04:00
ReinUsesLisp 9a342f5605 shader: Rework global memory tracking to use breadth-first search 2021-07-22 21:51:26 -04:00
ReinUsesLisp c4aab5c40e shader: Fix fp16 merge when using native fp16 2021-07-22 21:51:26 -04:00
ReinUsesLisp ca7ebdc471 shader: Fix FADD32I 2021-07-22 21:51:26 -04:00
FernandoS27 e7700aad18 shader: Fix undetected bug from review 2021-07-22 21:51:26 -04:00
FernandoS27 ed6a1b1a3d shader: Address feedback 2021-07-22 21:51:26 -04:00
FernandoS27 80df541a08 shader: "Implement" NOP 2021-07-22 21:51:26 -04:00
FernandoS27 480dc0d5e6 vk_pipeline_cache: Small fixes to the pipeline cache 2021-07-22 21:51:26 -04:00
FernandoS27 baec84247f shader: Address Feedback 2021-07-22 21:51:26 -04:00
FernandoS27 45d547af11 shader: Implement SR_LaneId 2021-07-22 21:51:26 -04:00
FernandoS27 595806fb1c shader: Fix shared memory on cool drivers 2021-07-22 21:51:26 -04:00
FernandoS27 655f7a570a shader: Implement MEMBAR 2021-07-22 21:51:26 -04:00
FernandoS27 ecb30c9072 shader: Improve VOTE.VTG stub 2021-07-22 21:51:25 -04:00
FernandoS27 12f5f32098 shader: Mark SSBOs as written when they are 2021-07-22 21:51:25 -04:00
FernandoS27 d819ba4489 shader: Implement ViewportIndex 2021-07-22 21:51:25 -04:00
FernandoS27 fd496d0401 shader: Stub TLD4's PTP when it isn't constant 2021-07-22 21:51:25 -04:00
FernandoS27 5ed8f24384 shader: Stub VOTE.VTG 2021-07-22 21:51:25 -04:00
FernandoS27 bee8188799 shader: Fold composite extract 2021-07-22 21:51:25 -04:00
FernandoS27 c3bace756f shader: Fold comparisons and Pack/Unpack16 2021-07-22 21:51:25 -04:00
ReinUsesLisp b4a5e767d0 shader: Fix branches to visited virtual blocks 2021-07-22 21:51:25 -04:00
ReinUsesLisp d0a529683a vulkan: Serialize pipelines on a separate thread 2021-07-22 21:51:25 -04:00
ReinUsesLisp 8771639d1e vulkan: Create pipeline layouts in separate threads 2021-07-22 21:51:25 -04:00
ReinUsesLisp 2fc698b040 vulkan: Build pipelines in parallel at runtime
Wait from the worker thread for a pipeline to build before binding it to
the command buffer. This allows queueing pipelines to multiple threads.
2021-07-22 21:51:25 -04:00
ReinUsesLisp f1dd743731 shader: Fix dependency on identity removal pass 2021-07-22 21:51:25 -04:00
ReinUsesLisp 5f22cd89e2 shader: Fix constant propagation to use reverse post order 2021-07-22 21:51:25 -04:00
ReinUsesLisp eaafd53cfe shader: Implement LDG .U.128 as .128 2021-07-22 21:51:25 -04:00
ReinUsesLisp c826220733 shader: Unroll "using enum" for opcode declarations 2021-07-22 21:51:25 -04:00
ReinUsesLisp 0c933e20de vk_pipeline_cache: Name SPIR-V modules 2021-07-22 21:51:25 -04:00
ReinUsesLisp 09e1927b70 spirv: Remove unnecesary variable for clip distances 2021-07-22 21:51:25 -04:00
FernandoS27 0c4cf3b9eb shader: Implement ClipDistance 2021-07-22 21:51:25 -04:00
FernandoS27 67afdaf566 shader: Fix TXD 2021-07-22 21:51:25 -04:00
FernandoS27 4d0d29fc20 shader: Address feedback 2021-07-22 21:51:25 -04:00
ReinUsesLisp cb6fc03e55 shader: Always pass a lod for TexelFetch 2021-07-22 21:51:25 -04:00
FernandoS27 630273b629 shader: Implement TXD 2021-07-22 21:51:25 -04:00
FernandoS27 d5bfc63088 shader: Implement ImageGradient 2021-07-22 21:51:25 -04:00
FernandoS27 be3e94ae55 shader: Implement TMML partially 2021-07-22 21:51:25 -04:00
FernandoS27 613b48c4a2 shader,spirv: Implement ImageQueryLod. 2021-07-22 21:51:25 -04:00
FernandoS27 2c276ec6eb shader: Implement TLDS 2021-07-22 21:51:25 -04:00
FernandoS27 dc1a9a3bed shader: Implement TLD 2021-07-22 21:51:25 -04:00
ReinUsesLisp 7a1c14269e spirv: Add fixed pipeline point size 2021-07-22 21:51:25 -04:00
FernandoS27 9d7422d967 shader: Add PointCoord attribute 2021-07-22 21:51:25 -04:00
ameerj b7589fe115 shader: Add PointSize attribute 2021-07-22 21:51:25 -04:00
ReinUsesLisp 514a6b07ee shader: Store type of phi nodes in flags
This is needed because pseudo-instructions where invalidated.
2021-07-22 21:51:25 -04:00
ReinUsesLisp b0d5572abf shader: Fix indirect branches to scheduler instructions 2021-07-22 21:51:25 -04:00
ReinUsesLisp 55b960a20f spirv: Fix default output attribute initialization 2021-07-22 21:51:25 -04:00
ReinUsesLisp 12783f8105 shader: Add missing new lines 2021-07-22 21:51:25 -04:00
ameerj 6c51f49632 shader: Implement FSWZADD 2021-07-22 21:51:25 -04:00
FernandoS27 34aba9627a shader: Implement BRX 2021-07-22 21:51:25 -04:00
ReinUsesLisp 39a379632e shader: Fix alignment checks on RZ 2021-07-22 21:51:25 -04:00
ameerj 73af0d2e0d shader: Implement I2I CC 2021-07-22 21:51:25 -04:00
ameerj dbc1e5cde7 shader: Implement I2I SAT 2021-07-22 21:51:25 -04:00
ReinUsesLisp 3c758d9b53 vk_pipeline_cache: Fix size hashing of shaders 2021-07-22 21:51:25 -04:00
ameerj cd9f75e223 shader: Fix ISCADD logic for PO/CC 2021-07-22 21:51:25 -04:00
ReinUsesLisp e860870dd2 shader: Implement LDS, STS, LDL, and STS and use SPIR-V 1.4 when available 2021-07-22 21:51:25 -04:00
ameerj 84298ce191 shader: Implement ISCADD CC 2021-07-22 21:51:24 -04:00
ameerj 51475e21ba shader: Implement VMAD, VMNMX, VSETP 2021-07-22 21:51:24 -04:00
ReinUsesLisp 0e1b213fa7 shader: Add missing I2I exception when CC is used 2021-07-22 21:51:24 -04:00
ReinUsesLisp dbd882ddeb shader: Better interpolation and disabled attributes support 2021-07-22 21:51:24 -04:00
ReinUsesLisp 675a82416d spirv: Remove dependencies on Environment when generating SPIR-V 2021-07-22 21:51:24 -04:00
ReinUsesLisp cb6039ccea vk_pipeline_cache: Fix pipeline and shader caches 2021-07-22 21:51:24 -04:00
ReinUsesLisp f0031babeb shader: Implement front face 2021-07-22 21:51:24 -04:00
ReinUsesLisp a806b29cb9 shader: Fix structured control flow on KIL instructions
This could potentially leave unvisited blocks, leading to illegal phi
nodes.
2021-07-22 21:51:24 -04:00
FernandoS27 cdf0cc3869 shader: Fix TXQ 2021-07-22 21:51:24 -04:00
ReinUsesLisp ec005be99d shader: Fix rasterizer integration order issues 2021-07-22 21:51:24 -04:00
ReinUsesLisp 17063d16a3 shader: Implement TXQ and fix FragDepth 2021-07-22 21:51:24 -04:00
ReinUsesLisp d9c5bd9509 shader: Refactor PTP and other minor changes 2021-07-22 21:51:24 -04:00
FernandoS27 b5db38f50e shader: Add IR opcode for ImageFetch 2021-07-22 21:51:24 -04:00
FernandoS27 742d11c2ad shader: Implement TLD4.PTP 2021-07-22 21:51:24 -04:00
FernandoS27 981eb6f43b shader: Fix Array Indices in TEX/TLD4 2021-07-22 21:51:24 -04:00
FernandoS27 f5672777c8 shader: Implement FragDepth 2021-07-22 21:51:24 -04:00
FernandoS27 fda0835300 shader: Implement TLD4S. 2021-07-22 21:51:24 -04:00
FernandoS27 c7c518e280 shader: Implement TLD4 and TLD4_B 2021-07-22 21:51:24 -04:00
ameerj 32c5483beb shader: Implement SHFL 2021-07-22 21:51:24 -04:00
ReinUsesLisp 49e87ea8ab shader: Track first bindless argument instead of the instruction itself 2021-07-22 21:51:24 -04:00
ReinUsesLisp d3dad6b632 shader: Properly insert Prologue instruction 2021-07-22 21:51:24 -04:00