Commit Graph

14736 Commits

Author SHA1 Message Date
Rodrigo Locatti 08a0a98e5d Merge pull request #4218 from ogniK5377/opus-external
externals: Track opus as submodule instead of using conan
2020-07-04 01:32:54 -03:00
Ameer 670614dbf4 Address lioncash feedback: Log formatting, extern const PadButtonArray, little touch ups 2020-07-03 11:52:07 -04:00
bunnei 8df4d1186d Merge pull request #4175 from ReinUsesLisp/read-buffer
gl_buffer_cache: Copy to buffers created as STREAM_READ before downloading
2020-07-02 23:30:08 -04:00
bunnei 4ed74651e2 Merge pull request #3924 from ogniK5377/GetKeyCodeMap
Implement GetKeyCodeMap & GetKeyCodeMap2
2020-07-02 23:03:20 -04:00
bunnei 7186ddb29a Revert "cmake: fix fmt linking" 2020-07-02 22:53:12 -04:00
bunnei 90d6711f4a Merge pull request #4206 from RealJohnGalt/linkfix
cmake: fix fmt linking
2020-07-02 22:23:39 -04:00
bunnei b9821beecc Merge pull request #4193 from ogniK5377/GetIndirectLayerConsumerHandle-stub
am: Stub GetIndirectLayerConsumerHandle
2020-07-02 21:31:20 -04:00
bunnei 67a6a89822 Merge pull request #4192 from ogniK5377/acc-ListOpenContextStoredUsers-stub
acc: ListOpenContextStoredUsers partial stub
2020-07-02 20:36:54 -04:00
Ameer 33c08afba9 Fix unnecessary diffs 2020-07-02 16:51:16 -04:00
Ameer 12e679c39c Add LR triggers as axes, half press to initiate a press, add GC axis id in config, clarify some code blocks for better readability 2020-07-02 15:54:44 -04:00
Rodrigo Locatti d6569215b3 Merge pull request #4082 from Morph1984/mirror-once-clamp
maxwell_to_gl: Implement MirrorOnceClampOGL wrap mode using GL_MIRROR_CLAMP_EXT
2020-07-02 04:57:40 -03:00
VolcaEM 1b4a3851ca Rename two functions in NS
- Rename "GetShellEvent" to "GetShellEventHandle"
- Rename "LaunchApplicationFromHost" to "LaunchApplication"
2020-07-02 09:02:55 +02:00
VolcaEM 940c5932c7 Rename GetApplicationArea2 to GetApplicationAreaSize 2020-07-02 08:58:51 +02:00
Jan Beich c1bbc77b7c cmake: stop linking against QGL after 01a3b4f0de 2020-07-01 22:11:39 +00:00
ReinUsesLisp 308feff898 shader_cache: Fix use-after-free and orphan invalidation cache entries
This fixes some cases where entries could have been removed multiple
times reading freed memory. To address this issue this commit removes
duplicates from entries marked for removal and sorts out the removal
process to fix another use-after-free situation.

Another issue fixed in this commit is orphan invalidation cache entries.
Previously only the entries that were invalidated in the current
operations had its entries removed. This led to more use-after-free
situations when these entries were actually invalidated but referenced
an object that didn't exist.
2020-07-01 18:16:53 -03:00
Ameer 34e6084c8d Reset adapter state on init, fixes errors relating driver hang from unexpected unplug 2020-07-01 12:52:50 -04:00
David Marcec 73ca896cd6 Don't handle cycles late if stretcher is active
Timestretcher seems to be broken
2020-07-01 16:59:42 +10:00
David Marcec f0685697da audio: Improving audio timing for multicore/single core
Fixes the issue with needing the timestretcher for multicore.
2020-07-01 16:52:02 +10:00
David db7181fb16 Merge pull request #4217 from lioncash/prototype
key_manager: Make use of canonical deleted operator=
2020-07-01 16:13:14 +10:00
David Marcec 2961282fae externals: Track opus as submodule instead of using conan
Supersedes #4068 see for details.
2020-07-01 15:09:33 +10:00
LC ebc54570f3 Merge pull request #4208 from jbeich/freebsd
common: unbreak build on BSDs
2020-07-01 00:34:20 -04:00
Lioncash 1e362da176 key_manager: Correct casing of instance()
Our codebase uppercases member function names.
2020-07-01 00:28:50 -04:00
Lioncash 93f1d9435d key_manager: Delete move operations
Prevents the singleton from being moved from.
2020-07-01 00:24:38 -04:00
Lioncash e67ab9a1b7 key_manager: Make use of canonical deleted operator=
operator= typically returns a reference, it's not void.

While we're at it, we can correct the parameter formatting to adhere to the
codebase.
2020-07-01 00:21:31 -04:00
David 9d2a0f5f1a Merge pull request #3967 from FearlessTobi/keys-singleton
crypto: Make KeyManager a singleton class
2020-07-01 14:16:26 +10:00
bunnei 7a7942741f Merge pull request #4153 from ogniK5377/prepo-multibuf
prepo: : Don't read extra buffer from report unless passed
2020-06-30 22:37:13 -04:00
bunnei a23a2102e8 Merge pull request #4063 from FreddyFunk/game-version-in-title
Add game version to window title
2020-06-30 21:42:33 -04:00
bunnei 660954c6de Merge pull request #4166 from VolcaEM/quickstart-faq
Add "Open Quickstart Guide" and "FAQ" buttons to the Help menu
2020-06-30 19:03:47 -04:00
Jan Beich f3c5dda382 common: switch to nullptr for sysctl's empty new value 2020-06-30 23:00:18 +00:00
Ameer 0c6128cc3a Address feedback regarding increments, const vars, and general cleanup 2020-06-30 17:28:02 -04:00
Fernando Sahmkow ba11aa4c74 Merge pull request #4176 from ReinUsesLisp/compatible-formats
texture_cache: Check format compatibility before copying
2020-06-30 15:36:13 -04:00
Fernando Sahmkow 1e93bc33c0 Merge pull request #4157 from ReinUsesLisp/unified-turing
gl_device: Enable NV_vertex_buffer_unified_memory on Turing devices
2020-06-30 14:36:51 -04:00
Ameer ed72085227 fix implicit conversion of size_t type to int 2020-06-30 11:44:55 -04:00
Morph 9e0fd0beb0 maxwell_to_gl: Implement MirrorOnceClampOGL using GL_MIRROR_CLAMP_EXT
Like MirrorOnceBorder, this requires the GL_EXT_texture_mirror_clamp extension. This extension is unfortunately not available on Intel's drivers (both Windows proprietary and Linux Mesa). Use GL_MIRROR_CLAMP_TO_EDGE as a fallback if the extension is unavailable.
2020-06-30 02:40:14 -04:00
Rodrigo Locatti c78f246ebf Merge pull request #4191 from Morph1984/vertex-formats
maxwell_to_gl/vk: Reorder vertex formats
2020-06-30 03:30:00 -03:00
David ac1a57c28a macro: Add support for "middle methods" on the code cache (#4112)
Macro code is just uploaded sequentially from a starting address, however that does not mean the entry point for the macro is at that address. This PR adds preliminary support for executing macros in the middle of our cached code.
2020-06-30 02:32:24 -03:00
bunnei a21d49c9fe Merge pull request #4182 from Kewlan/fullscreen-hotkey-fix
hotkeys: Fix issues caused when changing the fullscreen hotkey
2020-06-29 23:11:57 -04:00
Jan Beich 3c13a49cbf common: add sysconf() fallback
src/common/memory_detect.cpp:15:10: fatal error: 'sys/sysinfo.h' file not found
 #include <sys/sysinfo.h>
          ^~~~~~~~~~~~~~~
2020-06-29 22:41:22 +00:00
Morph e2fb93cb46 maxwell_to_gl: Rename VertexType() to VertexFormat() 2020-06-29 11:48:38 -04:00
John Galt 1eacbe69be cmake: fix fmt linking
On gcc/ld, and clang/lld, fmt::v6 symbols are excluded, so linking
fails. This fixes the issue.

Note: This was included in the FindBoost changes I shared with
BlinkHawk, however only they were merged. I'm not sure if it was missed,
or if there was an issue with this part of the change.
2020-06-29 07:10:07 -04:00
Rodrigo Locatti 1711fe29f2 Merge pull request #4140 from ReinUsesLisp/validation-layers
renderer_vulkan: Update validation layer name and test before enabling
2020-06-29 02:12:38 -03:00
VolcaEM 33f6610f52 Remove duplicate functions 2020-06-29 04:22:38 +02:00
VolcaEM cd893f7ac4 Use decimal instead of hexadecimal
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-06-29 04:21:10 +02:00
VolcaEM 6d7c850936 Fix typo 2020-06-29 04:12:36 +02:00
VolcaEM a82dc6c91d Clang-format 2020-06-29 04:09:38 +02:00
VolcaEM 9338a6a1cf service: Update function tables 2020-06-29 04:01:34 +02:00
ReinUsesLisp a0226819e1 core_timing,scheduler: Use std::scoped_lock when possible
Simplifies the cognitive load of procedures using locks and makes locks
safe against exceptions.
2020-06-28 21:42:57 -03:00
bunnei 58f337e105 Merge pull request #3955 from FernandoS27/prometheus-2b
Remake Kernel Scheduling, CPU Management & Boot Management (Prometheus)
2020-06-28 12:37:50 -04:00
David Marcec 3804c6d1c0 ldr: Cleanup NRO & NRR structs 2020-06-28 20:54:37 +10:00
David 1989977382 Merge pull request #4026 from VolcaEM/ldr
ldr: Update NRR/NRO structs
2020-06-28 20:46:42 +10:00
David 33e9b11261 Merge pull request #4184 from VolcaEM/patch-9
grc: Update function table
2020-06-28 18:49:15 +10:00
David 475c9a1e3c Merge pull request #4185 from VolcaEM/patch-10
lbl: Update function table
2020-06-28 18:48:54 +10:00
David a6374c177a Merge pull request #4186 from VolcaEM/patch-11
ldn: Update function table
2020-06-28 18:48:28 +10:00
David 7b1dba2f84 Merge pull request #4187 from VolcaEM/patch-12
mig: Update function table
2020-06-28 18:48:15 +10:00
David 3d5f77c3cf Merge pull request #4188 from VolcaEM/patch-13
mm: Update function table
2020-06-28 18:47:55 +10:00
David 4abb01de75 Merge pull request #4189 from VolcaEM/patch-14
ncm: Update function table
2020-06-28 18:47:27 +10:00
David 9b9504bb8d Merge pull request #4190 from VolcaEM/patch-15
nfc: Update function table
2020-06-28 18:47:07 +10:00
David 48090dcdba Merge pull request #4183 from VolcaEM/patch-8
friend: Update function table
2020-06-28 18:46:40 +10:00
Morph 3a3949183e maxwell_to_vk: Reorder vertex formats and add A2B10G10R10 for all types except float 2020-06-28 02:57:10 -04:00
David Marcec 2864b1fb41 am: Stub GetIndirectLayerConsumerHandle
Needed by Monster Hunter Generations Ultimate
2020-06-28 16:51:28 +10:00
Morph 4c3146aeb4 maxwell_to_gl: Add 32 bit component sizes to (un)signed scaled formats
Add 32 bit component sizes to (un)signed scaled formats and group (un)signed normalized, scaled, and integer formats together.
2020-06-28 02:51:13 -04:00
David Marcec bbf7b72fbf acc: ListOpenContextStoredUsers partial stub
Needed by Baldur's Gate 1/2
2020-06-28 16:44:36 +10:00
Fernando Sahmkow 94a51e6b21 Core/Common: Address Feedback. 2020-06-27 18:20:06 -04:00
Fernando Sahmkow 7818e2ee11 NvFlinger: Clang Format. 2020-06-27 11:36:30 -04:00
Fernando Sahmkow 8ef375e772 Build System: Fix GCC & MINGW Build. 2020-06-27 11:36:28 -04:00
Fernando Sahmkow 8cd81eb66f SVC: Implement 32-bits wrappers and update Dynarmic. 2020-06-27 11:36:27 -04:00
Fernando Sahmkow 146bbc6189 SVC: Add GetCurrentProcessorNumber32, CreateTransferMemory32, SetMemoryAttribute32 2020-06-27 11:36:27 -04:00
Fernando Sahmkow fd631d72a6 ARM: Update Dynarmic and Setup A32 according to latest interface. 2020-06-27 11:36:26 -04:00
Fernando Sahmkow 75db328166 SVC: Add GetThreadPriority32 & SetThreadPriority32 2020-06-27 11:36:25 -04:00
Fernando Sahmkow a7be2fac83 ArmDynarmic32: Setup CNTPCT correctly 2020-06-27 11:36:24 -04:00
Fernando Sahmkow 78a23536d4 Audio: Correct buffer release for host timing. 2020-06-27 11:36:23 -04:00
Fernando Sahmkow 24e0d393e2 Common/Kernel: Corrections and small bug fixing. 2020-06-27 11:36:21 -04:00
Fernando Sahmkow fda5651072 Services/NvFlinger: Do vSync in a sepparate thread on Multicore. 2020-06-27 11:36:20 -04:00
Fernando Sahmkow 74c9ad1976 Common/NativeClockx86: Reduce native clock accuracy further. 2020-06-27 11:36:18 -04:00
Fernando Sahmkow 4df46e0525 Tests/CoreTiming: Correct host timing tests. 2020-06-27 11:36:17 -04:00
Fernando Sahmkow af0999c735 ARMDynarmicInterface: Correct GCC Build Errors. 2020-06-27 11:36:17 -04:00
Fernando Sahmkow e8d2bf1e17 Common/AtomicOps: Correct GCC Intrinsic argument ordering. 2020-06-27 11:36:16 -04:00
Fernando Sahmkow 555c4c238c Kernel: Correct Host Context on Threads and Scheduler. 2020-06-27 11:36:15 -04:00
Fernando Sahmkow 8d603539a4 YuzuQT: Hide Speed UI on Multicore. 2020-06-27 11:36:14 -04:00
Fernando Sahmkow adc86e3030 Clang Format. 2020-06-27 11:36:14 -04:00
Fernando Sahmkow 6cbdb64f3d ARMInterface/Externals: Update dynarmic and fit to latest version. 2020-06-27 11:36:13 -04:00
Fernando Sahmkow cce90e2672 ARMInterface: Correct rebase errors. 2020-06-27 11:36:12 -04:00
Fernando Sahmkow a4e7d0b106 CoreTiming: Correct rebase bugs and other miscellaneous things. 2020-06-27 11:36:11 -04:00
Fernando Sahmkow d98995c001 Core: Split Microprofile Dynarmic timing per Core 2020-06-27 11:36:10 -04:00
Fernando Sahmkow fb07639438 General: Tune the priority of main emulation threads so they have higher priority than less important helper threads. 2020-06-27 11:36:09 -04:00
Fernando Sahmkow b5f7040175 Dynarmic Interface: don't clear cache if JIT has not been created. 2020-06-27 11:36:08 -04:00
Fernando Sahmkow 543b6b315f General: Correct rebase, sync gpu and context management. 2020-06-27 11:36:08 -04:00
Fernando Sahmkow afb6d31c02 CoreTiming/CycleTimer: Correct Idling. 2020-06-27 11:36:07 -04:00
Fernando Sahmkow 9f7adff3d3 SingleCore: Correct ticks reset to be on preemption. 2020-06-27 11:36:06 -04:00
Fernando Sahmkow 6f0c873d48 General: Cleanup legacy code. 2020-06-27 11:36:05 -04:00
Fernando Sahmkow e95444c05a Kernel/svcBreak: Implement CacheInvalidation for Singlecore and correct svcBreak. 2020-06-27 11:36:04 -04:00
Fernando Sahmkow 1146679de6 Bootmanager/CPU_Manager: Correct shader caches and sync GPU on OpenGL. 2020-06-27 11:36:03 -04:00
Fernando Sahmkow b2109333c6 HLE_IPC: Correct HLE Event behavior on timeout. 2020-06-27 11:36:03 -04:00
Fernando Sahmkow 4132ba96da SingleCore: Improve Cycle timing Behavior and replace mutex in global scheduler for spinlock. 2020-06-27 11:36:02 -04:00
Fernando Sahmkow 3197d72996 FrameLimiting: Enable frame limiting for single core. 2020-06-27 11:36:01 -04:00
Fernando Sahmkow f0f2fc4243 SingleCore: Use Cycle Timing instead of Host Timing. 2020-06-27 11:36:01 -04:00
Fernando Sahmkow 21235cdab1 Scheduler: Correct Reload/Unload 2020-06-27 11:35:59 -04:00
Fernando Sahmkow 720858ba13 Thread: Release the ARM Interface on exitting. 2020-06-27 11:35:58 -04:00
Fernando Sahmkow db60ca2704 General: Move ARM_Interface into Threads. 2020-06-27 11:35:58 -04:00
Fernando Sahmkow 7b3b33a2e6 Core: Refactor ARM Interface. 2020-06-27 11:35:56 -04:00
Fernando Sahmkow 1cc7c426df X64 Clock: Reduce accuracy to be less or equal to guest accuracy. 2020-06-27 11:35:55 -04:00
Fernando Sahmkow c22d3e1e18 ARM/WaitTree: Better track the CallStack for each thread. 2020-06-27 11:35:54 -04:00
Fernando Sahmkow 96c996b6a0 SVC/ARM: Correct svcSendSyncRequest and cache ticks on arm interface. 2020-06-27 11:35:53 -04:00
Fernando Sahmkow 287ea2d3b4 SingleCore: Move Host Timing from a sepparate thread to main cpu thread. 2020-06-27 11:35:52 -04:00
Fernando Sahmkow 1bcceea736 GUI: Make multicore only work with Async and add GUI for multicore. 2020-06-27 11:35:52 -04:00
Fernando Sahmkow fc47857c3b ARM: Addapt to new Exclusive Monitor Interface. 2020-06-27 11:35:50 -04:00
Fernando Sahmkow 5f8acb6397 CPU_Manager: Correct stopping on SingleCore. 2020-06-27 11:35:49 -04:00
Fernando Sahmkow d03d00c9c2 Scheduler: Correct yielding interaction with SetThreadActivity. 2020-06-27 11:35:49 -04:00
Fernando Sahmkow b121009e03 General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running. 2020-06-27 11:35:48 -04:00
Fernando Sahmkow cb974be3ce General: Fix Stop function 2020-06-27 11:35:47 -04:00
Fernando Sahmkow 3869e55c27 Kernel: Rewind on SVC change. 2020-06-27 11:35:46 -04:00
Fernando Sahmkow 0963ff1ae9 Kernel: Preempt Single core on redudant yields. 2020-06-27 11:35:45 -04:00
Fernando Sahmkow ebb640e968 CPU_Manager: Unload/Reload threads on preemption on SingleCore 2020-06-27 11:35:43 -04:00
Fernando Sahmkow d2aa227e0d Synchronization: Correct wide Assertion. 2020-06-27 11:35:43 -04:00
Fernando Sahmkow cc2f7dcd08 General: Initial Setup for Single Core. 2020-06-27 11:35:42 -04:00
Fernando Sahmkow 65225cf61b Scheduler: Set last running time on thread. 2020-06-27 11:35:41 -04:00
Fernando Sahmkow 76daf8f672 Kernel: Corrections to TimeManager, Scheduler and Mutex. 2020-06-27 11:35:40 -04:00
Fernando Sahmkow 24bc1f020a Kernel: Fixes, corrections and asserts to scheduler and different svcs. 2020-06-27 11:35:40 -04:00
Fernando Sahmkow 5183094c24 Scheduler: Correct yields. 2020-06-27 11:35:39 -04:00
Fernando Sahmkow d9a0ea22bf Mutex: Revert workaround due to poor exclusive memory. 2020-06-27 11:35:38 -04:00
Fernando Sahmkow 5eac520ae3 ARM/Memory: Correct Exclusive Monitor and Implement Exclusive Memory Writes. 2020-06-27 11:35:37 -04:00
Fernando Sahmkow d2a2c5f57b SVC: WaitSynchronization add Termination Pending Result. 2020-06-27 11:35:36 -04:00
Fernando Sahmkow a9ed059a07 Scheduler: Remove arm_interface lock and a few corrections. 2020-06-27 11:35:35 -04:00
Fernando Sahmkow 119d9844db Yuzu/Debuggers: Correct Wait Tree for Paused threads. 2020-06-27 11:35:34 -04:00
Fernando Sahmkow 87117805c9 SVC: Correct SetThreadActivity. 2020-06-27 11:35:33 -04:00
Fernando Sahmkow c1f6b99653 SCC: Small corrections to CancelSynchronization 2020-06-27 11:35:33 -04:00
Fernando Sahmkow e5454c3665 Scheduler: Correct locking for hle threads. 2020-06-27 11:35:32 -04:00
Fernando Sahmkow 723a909ee9 Scheduler: Fix HLE Threads on guard 2020-06-27 11:35:31 -04:00
Fernando Sahmkow b80f252d11 Scheduler: Protect on closed threads. 2020-06-27 11:35:31 -04:00
Fernando Sahmkow e501cbe5b8 Scheduler: Correct assert. 2020-06-27 11:35:30 -04:00
Fernando Sahmkow c8e62451c6 Core: Correct rebase. 2020-06-27 11:35:29 -04:00
Fernando Sahmkow 8c30c20863 Scheduler: Release old thread fiber before trying to switch to the next thread fiber. 2020-06-27 11:35:28 -04:00
Fernando Sahmkow 7ad6af4bdb NVDRV: Remove frame limiting as Host Timing already takes care. 2020-06-27 11:35:28 -04:00
Fernando Sahmkow 4621b4b37a Mutex: Correct Result writting to clear exclusivity. 2020-06-27 11:35:26 -04:00
Fernando Sahmkow 7270076127 SVC: Correct svcWaitForAddress and svcSignalToAddress. 2020-06-27 11:35:25 -04:00
Fernando Sahmkow a3f7acb149 Scheduler: Correct Select Threads Step 2. 2020-06-27 11:35:24 -04:00
Fernando Sahmkow 47c01e68da Kernel: Corrections to Scheduling. 2020-06-27 11:35:23 -04:00
Fernando Sahmkow 5e26654c5a Kernel: Correct Signal on Thread Death and Setup Sync Objects on Thread for Debugging 2020-06-27 11:35:23 -04:00
Fernando Sahmkow da260b9d2e Core: Correct HLE Event Callbacks and other issues. 2020-06-27 11:35:22 -04:00
Fernando Sahmkow 04cb816f7a Process: Protect TLS region and Modules. 2020-06-27 11:35:21 -04:00
Fernando Sahmkow cd3d1798d8 General: Add Asserts 2020-06-27 11:35:21 -04:00
Fernando Sahmkow 78eeea9f17 General: Add better safety for JIT use. 2020-06-27 11:35:20 -04:00
Fernando Sahmkow 7932cf9617 SVC: Correct races on physical core switching. 2020-06-27 11:35:19 -04:00
Fernando Sahmkow 2c0431e5ed NVFlinger: Lock race condition between CPU, Host Timing, VSync. 2020-06-27 11:35:18 -04:00
Fernando Sahmkow 9140f5d1f3 SVC: Add locks to the memory management. 2020-06-27 11:35:18 -04:00
Fernando Sahmkow 6605f8acfa SVC: Correct WaitSynchronization, WaitProcessWideKey, SignalProcessWideKey. 2020-06-27 11:35:17 -04:00
Fernando Sahmkow 940422fd96 SVC: Cleanup old methods. 2020-06-27 11:35:16 -04:00
Fernando Sahmkow 64fe82af2e CPU_Manager: Reconfigre guest threads for dynamrmic downsides 2020-06-27 11:35:15 -04:00
Fernando Sahmkow 85ca7b2bdb SVC: Correct SendSyncRequest. 2020-06-27 11:35:14 -04:00
Fernando Sahmkow 5c70bfcef7 SVC: Correct ArbitrateUnlock 2020-06-27 11:35:14 -04:00
Fernando Sahmkow 8c9d258e66 SVC: Correct SignalEvent, ClearEvent, ResetSignal, WaitSynchronization, CancelSynchronization, ArbitrateLock 2020-06-27 11:35:13 -04:00
Fernando Sahmkow 71e008a336 SVC: Remove global HLE Lock. 2020-06-27 11:35:13 -04:00
Fernando Sahmkow b2fea85499 SVC: Correct GetThreadPriority, SetThreadPriority, GetThreadCoreMask, SetThreadCoreMask, GetCurrentProcessorNumber 2020-06-27 11:35:12 -04:00
Fernando Sahmkow 451344e9ae SVC: Correct CreateThread, StartThread, ExitThread, SleepThread. 2020-06-27 11:35:11 -04:00
Fernando Sahmkow fb1d75a788 HostTiming: Pause the hardware clock on pause. 2020-06-27 11:35:10 -04:00
Fernando Sahmkow 0fd333a248 AudioCore: Use nanoseconds instead of cycles for buffer time. 2020-06-27 11:35:10 -04:00
Fernando Sahmkow 9846f5822d General: Setup yuzu threads' microprofile, naming and registry. 2020-06-27 11:35:09 -04:00
Fernando Sahmkow 63bd59669f CPU_Manager: remove debugging code. 2020-06-27 11:35:08 -04:00
Fernando Sahmkow 71cb697314 YuzuCMD/Tester: Correct execution 2020-06-27 11:35:07 -04:00
Fernando Sahmkow 7ee76003ad General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host 
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and 
Suspended State, Recreates the bootmanager, Initializes Multicore 
system.
2020-06-27 11:35:06 -04:00
David a83f0b607e Merge pull request #3396 from FernandoS27/prometheus-1
Implement SpinLocks, Fibers and a Host Timer
2020-06-28 01:34:07 +10:00
VolcaEM a1e5cfa4b6 nfc: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/NFC_services
2020-06-27 13:09:36 +02:00
VolcaEM c696867643 ncm: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/NCM_services

ILocationResolver's 16, 17, 18 and 19 have unofficial names
2020-06-27 13:05:22 +02:00
VolcaEM d75e36dca8 mm: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/Display_services
2020-06-27 12:59:01 +02:00
VolcaEM 1df981bf33 mig: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/Migration_services
2020-06-27 12:53:59 +02:00
VolcaEM 66442ce8fd ldn: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/LDN_services
2020-06-27 12:50:56 +02:00
VolcaEM 87f8989359 Oops (fix typo) 2020-06-27 12:45:42 +02:00
VolcaEM 9a04fa1cf8 lbl: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/Backlight_services
2020-06-27 12:43:33 +02:00
VolcaEM 26855d7906 grc: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/GRC_services
2020-06-27 12:41:21 +02:00
VolcaEM ee12f6f61e friend: Update function table 2020-06-27 12:39:10 +02:00
Kewlan eac502f442 Fix issues caused when changing the fullscreen hotkey 2020-06-27 11:30:32 +02:00
bunnei d3c8f5d4c8 Merge pull request #4097 from kevinxucs/kevinxucs/device-pixel-scaling-float
Fix framebuffer size on fractional scaling display
2020-06-27 02:49:07 -04:00
bunnei 286418bf01 Merge pull request #4164 from Kewlan/mute-audio-hotkey
hotkeys: Add a "Mute Audio" hotkey
2020-06-27 02:47:13 -04:00
bunnei c5f5483ee1 Merge pull request #4158 from Morph1984/caps
caps: Use enum classes and check struct sizes on compile time
2020-06-27 00:09:32 -04:00
Ameer J 21ae845d69 left const auto&, comment punctuation.
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2020-06-26 23:46:49 -04:00
bunnei c9acff2600 Merge pull request #4152 from ogniK5377/ipc-err
Mark invalid IPC buffers as ASSERT_OR_EXECUTE_MSG
2020-06-26 23:37:19 -04:00
bunnei 615e5630bf Merge pull request #4154 from ogniK5377/swkbd-nullptr
Prevent nullptr dereference on swkbd error case
2020-06-26 23:25:04 -04:00
bunnei 7048f18d87 Merge pull request #4147 from ReinUsesLisp/hset2-imm
shader/half_set: Implement HSET2_IMM
2020-06-26 23:14:56 -04:00
David f546eac9f3 Merge pull request #4178 from VolcaEM/patch-6
es: Update function table
2020-06-27 13:05:12 +10:00
VolcaEM 92f8bc1bf8 Use better names for "Unknown"s 2020-06-27 02:48:29 +02:00
VolcaEM 70e34fdba0 Update function names 2020-06-27 02:43:22 +02:00
David Marcec b412e8b952 btm: Give better names for unknown functions 2020-06-27 10:42:46 +10:00
VolcaEM 4cf402a109 btdrv: Update function table (#4174)
* btdrv: Update function table
2020-06-26 20:34:29 -04:00
VolcaEM 29e3f101d9 bpc: Update function tables (#4173)
* bpc: Update function tables

This was based on Switchbrew page: https://switchbrew.org/wiki/PCV_services
2020-06-26 20:33:55 -04:00
VolcaEM 866f06f078 bcat: Update function tables and add missing classes (#4172)
* bcat: Update function tables and add missing classes
2020-06-26 20:33:25 -04:00
VolcaEM 690e4b86ae am: Update function tables and add missing classes (#4169)
* am: Update function tables and add missing classes

* Remove comments (1/5)

* Remove comments (2/5)

* Remove comments (3/5)

* Remove comments (4/5)

* Remove comments (5/5)

* Remove unused classes (1/2)

* Remove unused classes (2/2)
2020-06-26 20:32:26 -04:00
VolcaEM 9052b62380 aoc: Update function table (#4170)
* aoc: Update function table

* Remove comments
2020-06-26 20:31:44 -04:00
LC 1b10d314f4 Merge pull request #4177 from VolcaEM/patch-5
btm: Update function tables
2020-06-26 20:30:59 -04:00
VolcaEM 4aa69a35d9 eupld: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/Error_Upload_services
2020-06-27 02:25:04 +02:00
VolcaEM 1824af3f63 es: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/ETicket_services
2020-06-27 02:17:51 +02:00
VolcaEM c6e7f72cb1 Update FAQ function name (2/2) 2020-06-27 02:14:29 +02:00
VolcaEM 873e6fc739 Update FAQ function name (1/2) 2020-06-27 02:13:34 +02:00
VolcaEM aa2672fb2c btm: Update function tables
This was based on Switchbrew page: https://switchbrew.org/wiki/BTM_services

"No comment" edition
2020-06-27 01:57:48 +02:00
ReinUsesLisp eab8a5a9db vk_rasterizer: Use nullptr for <pSizes> in CmdBindVertexBuffers2EXT
Disable this temporarily.
2020-06-26 20:57:22 -03:00
ReinUsesLisp b9ac739607 vk_pipeline_cache: Avoid hashing and comparing dynamic state when possible
With extended dynamic states, some bytes don't have to be collected from
the pipeline key, hence we can avoid hashing and comparing them on
lookups.
2020-06-26 20:57:22 -03:00
ReinUsesLisp 031f7b3b26 vulkan/fixed_pipeline_state: Move state out of individual structures 2020-06-26 20:57:22 -03:00
ReinUsesLisp 049837aae0 vk_rasterizer: Use VK_EXT_extended_dynamic_state 2020-06-26 20:57:22 -03:00
ReinUsesLisp 0a32575e27 renderer_vulkan/wrapper: Add VK_EXT_extended_dynamic_state functions 2020-06-26 20:55:15 -03:00
ReinUsesLisp 8e8bfc9365 fixed_pipeline_state: Add requirements for VK_EXT_extended_dynamic_state
This moves dynamic state present in VK_EXT_extended_dynamic_state to a
separate structure in FixedPipelineState. This is structure is at the
bottom allowing us to hash and memcmp only when the extension is not
supported.
2020-06-26 20:55:15 -03:00
ReinUsesLisp bcf4665fb0 vk_device: Enable VK_EXT_extended_dynamic_state when available 2020-06-26 20:55:15 -03:00
ReinUsesLisp 26144f794f texture_cache: Test format compatibility before copying
Avoid illegal copies. This intercepts the last step of a copy to avoid
generating validation errors or corrupting the driver on some instances.

We can create views and emit copies accordingly in future commits and
remove this last-step validation.
2020-06-26 20:52:22 -03:00
bunnei 7fa55a24f2 Merge pull request #4144 from FernandoS27/tt-fix
TextureCache: Fix case where layer goes off bound.
2020-06-26 19:02:39 -04:00
bunnei 2a1df7b66e Merge pull request #4111 from ReinUsesLisp/preserve-contents-vk
vk_rasterizer: Don't preserve contents on full screen clears
2020-06-26 18:48:12 -04:00
ReinUsesLisp 23e0009a41 video_core/compatible_formats: Table to test if two formats are legal to view or copy
Add a flat table to test if it's legal to create a texture view between
two formats or copy betweem them.

This table is based on ARB_copy_image and ARB_texture_view. Copies are
more permissive than views.
2020-06-26 19:28:11 -03:00
ReinUsesLisp 95c7c7db0a gl_buffer_cache: Copy to buffers created as STREAM_READ before downloading
After marking buffers as resident, Nvidia's driver seems to take a
slow path. To workaround this issue, copy to a STREAM_READ buffer and
then call GetNamedBufferSubData on it.

This is a temporary solution until we have asynchronous flushing.
2020-06-26 16:58:40 -03:00
VolcaEM cfd829e6ac Update function name again 2020-06-26 18:51:12 +02:00
VolcaEM c50c165d3c Update function name (2/2) 2020-06-26 18:50:28 +02:00
VolcaEM 032cf4330e Update function name (1/2) 2020-06-26 18:49:57 +02:00
Fernando Sahmkow fda14542cb Common: Fix non-conan build 2020-06-26 12:25:19 -04:00
Morph d8df8d84ae caps_u: Fix GetAlbumContentsFileListForApplication stub 2020-06-26 08:35:21 -04:00
Morph 851a3a8638 caps: Use enum classes and check struct sizes on compile time 2020-06-26 08:35:21 -04:00
Morph 9b4a5f297b caps: Update copyright headers
Updated to "yuzu Emulator Project"
2020-06-26 08:35:21 -04:00
Kewlan 3fcf2f201c Add a "Mute Audio" hotkey 2020-06-26 06:03:29 +02:00
bunnei 257cf13b70 Merge pull request #4159 from ogniK5377/mem-manager-dumb-assert
memory_manager: Remove useless assertion
2020-06-25 22:53:13 -04:00
Rodrigo Locatti f7c871b8ca Merge pull request #4151 from ReinUsesLisp/gl-invalidations
gl_shader_cache: Avoid use after move for program size
2020-06-25 21:05:27 -03:00
Ameer J eb06e3e8bf const& to button in button array
Co-authored-by: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
2020-06-25 19:46:50 -04:00
Ameer 677a07c253 Stop reading loop if error is encountered 2020-06-25 19:31:51 -04:00
VolcaEM 9d72389b35 Clang-format again 2020-06-25 23:44:41 +02:00
VolcaEM b16bfe629d Clang-format 2020-06-25 23:40:53 +02:00
VolcaEM f9233dc922 Remove unnecessary newline 2020-06-25 23:38:38 +02:00
VolcaEM 967cbf1f36 Merge branch 'master' into quickstart-faq 2020-06-25 23:34:37 +02:00
VolcaEM d0647a7ae9 Fix typo 2: electric boogaloo 2020-06-25 23:32:43 +02:00
VolcaEM c8d6e50b05 Use QUrl (2/2) 2020-06-25 23:31:01 +02:00
VolcaEM d82f550d12 Use QUrl (1/2) 2020-06-25 23:28:38 +02:00
VolcaEM 002d762b78 Fix formatting 2020-06-25 23:18:54 +02:00
VolcaEM 5590f4775e Fix typo 2020-06-25 23:07:58 +02:00
VolcaEM a6150263c9 Add "Open Quickstart Guide" and "FAQ" buttons to the Help menu
While we're at it, also refactor the function used by OnOpenModsPage to be compatible with other URLs
2020-06-25 23:02:33 +02:00
bunnei c5dfaa7e9a Merge pull request #4136 from VolcaEM/mods
Add a "Open Mods Page" button to the GUI
2020-06-25 15:10:18 -04:00
Rodrigo Locatti 9587c299f3 Merge pull request #4160 from ogniK5377/IsASTCSupported-fix
gl_device: Fix IsASTCSupported to scan all targets instead of just GL_TEXTURE_2D
2020-06-25 15:58:09 -03:00
David fbc30df353 Merge pull request #4141 from Morph1984/SevenSixAxisSensor
hid: Stub a series of "SevenSixAxisSensor" service commands
2020-06-25 19:37:39 +10:00
David Marcec 589135df53 gl_device: Fix IsASTCSupported
Other targets were never actually checked
2020-06-25 19:12:56 +10:00
David Marcec 442900456e memory_manager: Remove useless assertion
num_pages is an std::size_t. It will always be >= 0
2020-06-25 16:35:58 +10:00
ReinUsesLisp 9f411bbb41 gl_device: Enable NV_vertex_buffer_unified_memory on Turing devices
Once we make sure not to corrupt Nvidia's driver, we can safely use
resident buffers on Turing devices.

See GitHub pull request #4156
2020-06-25 01:28:47 -03:00
Morph 3e0ff59a63 hid: Stub a series of "SevenSixAxisSensor" service commands
- Used by Captain Toad: Treasure Tracker Update 1.3.0

While we're at it, fix the input parameters for SetIsPalmaAllConnectable and SetPalmaBoostMode
2020-06-24 11:57:39 -04:00
bunnei 889171282d Merge pull request #4105 from ReinUsesLisp/resident-buffers
gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness
2020-06-24 11:40:30 -04:00
Ameer 7c10c568da padbutton enum class and struct initiailization 2020-06-24 11:39:30 -04:00
bunnei 12a5f5af5d Merge pull request #4083 from Morph1984/B10G11R11F
decode/image: Implement B10G11R11F
2020-06-24 11:02:38 -04:00
David Marcec 4b9812e7bb Prevent nullptr dereference on swkbd error case 2020-06-25 00:25:15 +10:00
David Marcec bf4e6b3cba prepo: : Don't read extra buffer from report unless passed
Prepo doesn't always pass a secondary buffer, we assume it always does which leads to a bad read.
2020-06-24 23:01:00 +10:00
Fernando Sahmkow 0aa8c2d9e6 Merge pull request #4046 from ogniK5377/macro-hle-prod
Add support for HLEing Macros
2020-06-24 09:01:00 -04:00
David Marcec df001e73c2 Mark invalid IPC buffers as ASSERT_OR_EXECUTE_MSG
Previously if applications would send faulty buffers(example homebrew) it would lead to us returning uninitalized data. Switching from ASSERT_MSG to ASSERT_OR_EXECUTE_MSG allows us to have a fail safe to prevent crashes but also continue execution without introducing undefined behavior
2020-06-24 22:50:27 +10:00
ReinUsesLisp 3b1a5ead5c buffer_cache: Use buffer methods instead of cache virtual methods 2020-06-24 02:36:14 -03:00
ReinUsesLisp d636cb75f3 gl_stream_buffer: Use InvalidateBufferData instead unmap and map
Making the stream buffer resident increases GPU usage significantly on
some games. This seems to be addressed invalidating the stream buffer
with InvalidateBufferData instead of using a Unmap + Map (with
invalidation flags).
2020-06-24 02:36:14 -03:00
ReinUsesLisp aee540a7c9 gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness
Switch games are allowed to bind less data than what they use in a
vertex buffer, the expected behavior here is that these values are read
as zero. At the moment of writing this only D3D12, OpenGL and NVN through
NV_vertex_buffer_unified_memory support vertex buffer with a size limit.

In theory this could be emulated on Vulkan creating a new VkBuffer for
each (handle, offset, length) tuple and binding the expected data to it.
This is likely going to be slow and memory expensive when used on the
vertex buffer and we have to do it on all draws because we can't know
without analyzing indices when a game is going to read vertex data out
of bounds.

This is not a problem on OpenGL's BufferAddressRangeNV because it takes
a length parameter, unlike Vulkan's CmdBindVertexBuffers that only takes
buffers and offsets (the length is implicit in VkBuffer). It isn't a
problem on D3D12 either, because D3D12_VERTEX_BUFFER_VIEW on
IASetVertexBuffers takes SizeInBytes as a parameter (although I am not
familiar with robustness on D3D12).

Currently this only implements buffer ranges for vertex buffers,
although indices can also be affected. A KHR_robustness profile is not
created, but Nvidia's driver reads out of bound vertex data as zero
anyway, this might have to be changed in the future.

- Fixes SMO random triangles when capturing an enemy, getting hit, or
looking at the environment on certain maps.
2020-06-24 02:36:14 -03:00
ReinUsesLisp 0669209db6 gl_buffer_cache: Mark buffers as resident
Make stream buffer and cached buffers as resident and query their
address. This allows us to use GPU addresses for several proprietary
Nvidia extensions.
2020-06-24 02:36:14 -03:00
ReinUsesLisp 6a2fd26768 gl_device: Expose NV_vertex_buffer_unified_memory except on Turing
Expose NV_vertex_buffer_unified_memory when the driver supports it.

This commit adds a function the determine if a GL_RENDERER is a Turing
GPU. This is required because on Turing GPUs Nvidia's driver crashes
when the buffer is marked as resident or on DeleteBuffers. Without a
synchronous debug output (single threaded driver), it's likely that
the driver will crash in the first blocking call.
2020-06-24 02:36:14 -03:00
ReinUsesLisp 87a760f000 gl_stream_buffer: Always use a non-coherent buffer 2020-06-24 02:35:33 -03:00
ReinUsesLisp 5ddd3e5df0 gl_stream_buffer: Always use persistent memory maps
yuzu no longer supports platforms without persistent maps.
2020-06-24 02:35:33 -03:00
Rodrigo Locatti ba83472879 Merge pull request #4129 from Morph1984/texture-shadow-lod-workaround
gl_shader_decompiler: Workaround textureLod when GL_EXT_texture_shadow_lod is not available
2020-06-24 01:51:15 -03:00
David Marcec 1dee0b9436 Move GetKeyCodeMapImpl to an anonymous namespace 2020-06-24 13:05:08 +10:00
David Marcec 2ca26e7d61 addressed issues 2020-06-24 12:18:33 +10:00
David Marcec 55161a702b clear mme draw mode
We already draw, so we can clear it
2020-06-24 12:09:04 +10:00
David Marcec da2cbc76fc Addressed issues 2020-06-24 12:09:03 +10:00
David Marcec e5adcda905 Fix constbuffer for 0217920100488FF7 2020-06-24 12:09:02 +10:00
David Marcec 74e48d2a98 Macro HLE support 2020-06-24 12:09:01 +10:00
David Marcec 8ce11701a9 Fixed logging output 2020-06-24 12:07:41 +10:00
David Marcec 55b6b3cada Implement GetKeyCodeMap & GetKeyCodeMap2
Closes #3919
2020-06-24 12:05:52 +10:00
bunnei b465ef400e Merge pull request #4138 from Morph1984/GyroscopeZeroDriftMode
hid: Implement Get/ResetGyroscopeZeroDriftMode
2020-06-23 21:56:16 -04:00
ReinUsesLisp 0c086bfa66 gl_shader_cache: Avoid use after move for program size
All programs had a size of zero due to this bug, skipping invalidations.

While we are at it, remove some unused forward declarations.
2020-06-23 22:54:42 -03:00
bunnei 93d5407c96 Merge pull request #4128 from lioncash/move2
software_keyboard: Eliminate trivial redundant copies
2020-06-23 18:24:15 -04:00
Ameer 39ca7c675c cleanup check access, read, and factory GetNextInput funcs. Use size rather than magic number 2020-06-23 17:37:15 -04:00
bunnei 2fb935ef32 Merge pull request #4127 from lioncash/dst-typo
texture_cache: Fix incorrect address used in a DeduceSurface() call
2020-06-23 15:59:37 -04:00
bunnei 237174d899 Merge pull request #3948 from Morph1984/log-cpu-instructions
main/common: Log/append AVX/FMA to the Host CPU string if available and add AVX512 detection
2020-06-23 15:19:47 -04:00
Ameer ef0b52563d Fix deallocation of GC Adapter 2020-06-23 12:47:58 -04:00
Morph c4ca93ac19 yuzu_tester: Silence type conversion warning 2020-06-22 22:56:15 -04:00
Morph e9bee77481 lm: Silence no return value warning 2020-06-22 22:55:32 -04:00
Ameer e8c8a5bafd Small quality of life indication that mapped button is GC 2020-06-22 22:02:50 -04:00
ReinUsesLisp 43e5214413 shader/half_set: Implement HSET2_IMM
Add HSET2_IMM. Due to the complexity of the encoding avoid using
BitField unions and read the relevant bits from the code itself.
This is less error prone.
2020-06-22 20:51:18 -03:00
Ameer f071a70fec std::array and const reference passing of non-trivial objects 2020-06-22 18:11:59 -04:00
ameerj 14bb562028 Update src/input_common/main.cpp
Co-authored-by: LC <mathew1800@gmail.com>

update libusb submodule (hopefully windows build error fixed)
2020-06-22 17:05:50 -04:00
VolcaEM b9e6687af0 account: Update function tables and add missing classes (#4145)
* account: Update function tables and add missing classes

* clang-format

* Add missing "public"

* Add missing public again

* Add missing final
2020-06-22 16:03:26 -04:00
Fernando Sahmkow 57926f80c0 TextureCache: Fix case where layer goes off bound.
The returned layer is expected to be between 0 and the depth of the
surface, anything larger is off bounds.
2020-06-22 11:37:40 -04:00
unknown c352c30597 Reorder variables to comply with the Auzure build pipeline 2020-06-22 15:56:41 +02:00
Morph 75e120056f arm_dynarmic_64: Log the instruction when an exception is raised 2020-06-22 07:00:24 -04:00
Morph 393197f37c arm_dynarmic_32: Log under Core_ARM instead of HW_GPU 2020-06-22 06:59:41 -04:00
Rodrigo Locatti 5384c348b3 Merge pull request #4110 from ReinUsesLisp/direct-upload-sets
vk_update_descriptor: Upload descriptor sets data directly
2020-06-22 05:02:13 -03:00
ReinUsesLisp ec8465e843 renderer_vulkan: Update validation layer name and test before enabling
Update validation layer string to VK_LAYER_KHRONOS_validation.

While we are at it, properly check for available validation layers
before enabling them.
2020-06-22 04:10:45 -03:00
Ameer 5479427335 Tidy up the pointers, use pair over tuple where appropriate 2020-06-21 23:56:56 -04:00
Ameer a0f8f1dc5e fix for sleep using stl 2020-06-21 22:58:53 -04:00
bunnei d3ac9705d2 Merge pull request #4122 from lioncash/hide
video_core: Eliminate some variable shadowing
2020-06-21 22:38:04 -04:00
bunnei 24f69a8260 Merge pull request #4126 from lioncash/noexcept
vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
2020-06-21 22:36:14 -04:00
bunnei a14e4ddda9 Merge pull request #4134 from FearlessTobi/port-5322
Port citra-emu/citra#5322: "Fix: fatal error CVT1100 when compiling manifest file"
2020-06-21 22:35:17 -04:00
Ameer 92a812d815 shared_ptr for the GC adapter class, constexpr constants 2020-06-21 21:50:58 -04:00
Ameer 4a54dc6bbf std::arrays where appropriate, clear q in adapter class, other touch ups 2020-06-21 21:17:46 -04:00
Ameer 5ebed7b1bb fix include thread 2020-06-21 21:17:46 -04:00
Ameer eddf2d0f4e Singleton GC Adapter class, remove globals, fix naming convention
Fix clang formatting

Manual fix for configure_input_player formatting

Add missing lib usb cmake command
2020-06-21 21:17:07 -04:00
Morph eaa3067fa8 hid: Implement Get/ResetGyroscopeZeroDriftMode
- Used by Captain Toad Treasure Tracker
2020-06-21 16:25:41 -04:00
Ameer 77ae7fe5dd Clang Formatting 2020-06-21 15:31:57 -04:00
Ameer 243dbee81e Cleanup after linter 2020-06-21 13:02:43 -04:00
Ameer dbe1ad4fe4 GC Adapter Implementation 2020-06-21 12:36:28 -04:00
VolcaEM fc68fb9ff5 Correct function name (2/2) 2020-06-21 18:10:23 +02:00
VolcaEM 7f61427719 Correct function name (1/2) 2020-06-21 18:09:14 +02:00
VolcaEM ba50f8b8e6 Clang-format 2020-06-21 06:17:46 +02:00
VolcaEM 2d1d304a4d Remove unnecessary conversion 2020-06-21 06:16:03 +02:00
VolcaEM 5e324ef05d Address review comment by Lioncash
Co-authored-by: LC <mathew1800@gmail.com>
2020-06-21 06:12:23 +02:00
VolcaEM b453eca31f Add a "Open Mods Page" button to the GUI 2020-06-21 06:09:28 +02:00
Morph 11ea8fa16b gl_shader_decompiler: Enable GL_EXT_texture_shadow_lod if available
Enable GL_EXT_texture_shadow_lod if available. If this extension is not available, such as on Intel/AMD proprietary drivers, use textureGrad as a workaround.
2020-06-20 23:02:29 -04:00
Morph a6aa5f526c gl_device: Check for GL_EXT_texture_shadow_lod 2020-06-20 22:14:32 -04:00
bunnei 02e70bc2b9 Merge pull request #4120 from lioncash/arb
gl_arb_decompiler: Avoid several string copies
2020-06-20 22:11:49 -04:00
FearlessTobi 18fed8039b Fix: fatal error CVT1100 when compiling manifest file
Occurs when doing a local compile in MSVC build. The compiler I'm using is as below:
Microsoft Visual Studio Community 2019 Preview
Version 16.6.0 Preview 5.0

Fixes this error:
CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

I have put 0 since previous name was 1. If have other names in mind, please let me know.

Co-Authored-By: dragios <dragios@users.noreply.github.com>
2020-06-21 03:11:23 +02:00
MerryMage 0192b77e5b macro_jit_x64: Use ecx for shift register
shl/shr only accept cl as their second argument
2020-06-20 22:24:05 +01:00
Lioncash 096ce9a75e texture_cache: Fix incorrect address used in a DeduceSurface() call
Previously the source was being deduced twice in a row.
2020-06-20 14:11:28 -04:00
merry c71866674a Merge pull request #4125 from lioncash/macro-shift
macro_jit_x64: Amend readability of Compile_ExtractShiftLeftRegister()
2020-06-20 16:08:23 +01:00
merry 86a0258abc Merge pull request #4123 from lioncash/unused-var
macro_jit_x64: Remove unused variable
2020-06-20 16:07:58 +01:00
Lioncash 5f8e8ba92d software_keyboard: Eliminate trivial redundant copies
We can just make use of moves here to get rid of two redundant copies
2020-06-20 01:06:10 -04:00
Morph 9c5847125f main: Append AVX and FMA instructions to cpu string
Append AVX and FMA instructions to cpu string if the host cpu supports them
2020-06-20 00:31:37 -04:00
Morph 5482a4a272 common/telemetry: Add AVX512 to telemetry 2020-06-20 00:31:37 -04:00
Morph d0a762a6a8 common/cpu_detect: Add AVX512 detection 2020-06-20 00:31:37 -04:00
Morph 1e9be249e1 decode/image: Implement B10G11R11F
- Used by Kirby Star Allies
2020-06-20 00:28:30 -04:00
bunnei 7612c56cff Merge pull request #4099 from MerryMage/macOS-build
Fix compilation on macOS
2020-06-19 23:31:04 -04:00
Lioncash 64418ecaee gl_arb_decompiler: Avoid several string copies
Variables that are marked as const cannot have the move constructor
invoked when returning from a function (the move constructor requires a
non-const variable so it can "steal" the resources from it.
2020-06-19 23:09:16 -04:00
Lioncash 9ba25c342f vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
Check() can throw an exception if the Vulkan result isn't successful.

We remove the check so that std::terminate isn't outright called and
allows for better debugging (should it ever actually fail).
2020-06-19 23:01:59 -04:00
Lioncash 909f289531 macro_jit_x64: Correct readability of Compile_ExtractShiftLeftImmediate()
Previously dst wasn't being used.
2020-06-19 22:57:23 -04:00
Lioncash d7fa20d641 macro_jit_x64: Correct readability of Compile_ExtractShiftLeftRegister()
Previously dst wasn't being used.
2020-06-19 22:56:55 -04:00
Lioncash a99150a132 macro_jit_x64: Remove unused variable
Removes a completely unused label and marks another variable as unused,
given it seems like it has potential uses in the future.
2020-06-19 22:10:45 -04:00
Lioncash 693ec509d7 memory_manager: Eliminate variable shadowing
Renames some variables to prevent ones in inner scopes from shadowing
outer-scoped variables.

The Copy* functions have no shadowing, but we rename them anyways to
remain consistent with the other functions.
2020-06-19 22:02:58 -04:00
bunnei d235ebeaf6 Merge pull request #4113 from ogniK5377/boxcat-disable
Fix compilation when not building with boxcat
2020-06-19 21:59:59 -04:00
David Marcec 55654b5a12 Add translation of "Current Boxcat Events" 2020-06-20 11:57:51 +10:00
Lioncash f8e0f67e22 macro_jit_x64: Eliminate variable shadowing in Compile_ProcessResult()
We can reduce the capture scope so that it's not possible for both "reg"
variables to clash with one another.

While we're at it, we can prevent unnecessary copies while we're at it.
2020-06-19 21:57:44 -04:00
Lioncash 8e0a422ec3 buffer_cache: Eliminate local variable shadowing
We can just make use of the instance in the scope above this one.
2020-06-19 21:55:02 -04:00
bunnei 938e563cd7 Merge pull request #4087 from MerryMage/macrojit-inline-Read
macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValue
2020-06-19 21:32:07 -04:00
MerryMage b26ff8fa86 input_common/motion_emu: Remove redundant move
Named return value optimization automatically applies here.
2020-06-19 14:29:59 +01:00
MerryMage 38f25284c8 input_common/keyboard: Remove redundant move
Named return value optimization automatically applies here.
2020-06-19 14:29:36 +01:00
MerryMage b8983782ca mii_model: Remove redundant std::move
Named return value optimization automatically applies here.
2020-06-19 14:29:09 +01:00
David Marcec 39ef4c6d57 Fix compilation when not building with boxcat
Fixes compilation when trying to build without boxcat enabled
2020-06-19 22:17:56 +10:00
MerryMage 82b575087f macro_jit_x64: Remove unused function Read 2020-06-19 11:39:41 +01:00
bunnei 8ccd0aa8af Merge pull request #4080 from ogniK5377/audren-RendererInfo
audren: Implement RendererInfo
2020-06-19 01:02:30 -04:00
bunnei 9aecde9446 Merge pull request #4090 from MerryMage/macrojit-bugs
macro_jit_x64: Optimization correctness
2020-06-18 22:28:17 -04:00
ReinUsesLisp 3c9d7c54d9 vk_rasterizer: Don't preserve contents on full screen clears
There's no need to load contents from the CPU when a clear resets all
the contents of the underlying memory. This is already implemented on
OpenGL and the texture cache.
2020-06-18 18:18:33 -03:00
Rodrigo Locatti 1856dc775a Merge pull request #4081 from Morph1984/maxwell-to-gl-vk
maxwell_to_gl/vk: Miscellaneous changes
2020-06-18 17:51:41 -03:00
ReinUsesLisp 31e538de2a vk_update_descriptor: Upload descriptor sets data directly
Instead of copying to a temporary payload before sending the update task
to the worker thread, insert elements to the payload directly.
2020-06-18 17:47:19 -03:00
Fernando Sahmkow 02fe399e26 Tests/HostTiming: Correct GCC Compile error. 2020-06-18 16:29:28 -04:00
Fernando Sahmkow 51a1732324 Common/Fiber: Address Feedback and Correct Memory leaks. 2020-06-18 16:29:27 -04:00
Fernando Sahmkow cffae9c733 Common/Fiber: Implement Rewind on Boost Context. 2020-06-18 16:29:27 -04:00
Fernando Sahmkow f28670cd46 Common/uint128: Correct MSVC Compilation in old versions. 2020-06-18 16:29:26 -04:00
Fernando Sahmkow f39a9f6efa Common/Fiber: Document fiber interexchange. 2020-06-18 16:29:26 -04:00
Fernando Sahmkow 1460bdc5ab Common/Fiber: Implement Rewinding. 2020-06-18 16:29:25 -04:00
Fernando Sahmkow a42b226559 Common/Fiber: Additional corrections to f_context. 2020-06-18 16:29:25 -04:00
Fernando Sahmkow 89c691725c Common/Fiber: Correct f_context based Fibers. 2020-06-18 16:29:24 -04:00
Fernando Sahmkow b71488b850 Host Timing: Correct clang format. 2020-06-18 16:29:23 -04:00
Fernando Sahmkow a427bf72ea HostTiming: Correct rebase and implement AddTicks. 2020-06-18 16:29:22 -04:00
Fernando Sahmkow e7f5b1f1d3 Core/HostTiming: Allow events to be advanced manually. 2020-06-18 16:29:22 -04:00
Fernando Sahmkow 564713fb46 Common/Tests: Address Feedback 2020-06-18 16:29:21 -04:00
Fernando Sahmkow 4e9a9e584c Common: Make MinGW build use Windows Fibers instead of fcontext_t 2020-06-18 16:29:20 -04:00
Fernando Sahmkow 09d2ffa663 Common/Tests: Clang Format. 2020-06-18 16:29:19 -04:00
Fernando Sahmkow 91f138bd19 Common: Correct fcontext fibers. 2020-06-18 16:29:19 -04:00
Fernando Sahmkow 0c789667d9 Common: Refactor & Document Wall clock. 2020-06-18 16:29:18 -04:00
Fernando Sahmkow ee32067b10 Common: Implement WallClock Interface and implement a native clock for x64 2020-06-18 16:29:17 -04:00
Fernando Sahmkow ab76c0e296 Tests: Add base tests to host timing 2020-06-18 16:29:17 -04:00
Fernando Sahmkow e99a10917e Core: Implement a Host Timer. 2020-06-18 16:29:16 -04:00
Fernando Sahmkow a1e7931d20 Common: Polish Fiber class, add comments, asserts and more tests. 2020-06-18 16:29:15 -04:00
Fernando Sahmkow 279ff1c0ff Tests: Add tests for fibers and refactor/fix Fiber class 2020-06-18 16:29:15 -04:00
Fernando Sahmkow 353166d648 Common: Implement a basic Fiber class. 2020-06-18 16:29:14 -04:00
Fernando Sahmkow b1b01a33bd Common: Implement a basic SpinLock class 2020-06-18 16:29:13 -04:00
ReinUsesLisp a0cbf4f4e8 arm_dynarmic_32: Fix implicit conversion error in SetTPIDR_EL0
On MSVC builds we treat conversion warnings as errors.
2020-06-18 16:52:15 -03:00
MerryMage 638087a937 bootmanager: Remove references to OpenGL for macOS
OpenGL macOS headers definitions clash heavily with each other
2020-06-18 15:47:44 +01:00
MerryMage 23d63c30e1 memory_manager: Explicitly specifcy std::min<size_t> 2020-06-18 15:47:44 +01:00
MerryMage 042bb8824b shared_font: Service::NS::EncryptSharedFont takes a size_t& 2020-06-18 15:47:44 +01:00
MerryMage 470ba358f9 vk_rasterizer: BindTransformFeedbackBuffersEXT accepts a size of type VkDeviceSize 2020-06-18 15:47:44 +01:00
MerryMage abf5dd9d60 renderer_vulkan: Fix macOS GetBundleDirectory reference 2020-06-18 15:47:44 +01:00
MerryMage ce9c74b4df memory_util: boost hashes are size_t
* boost::hash_value returns a size_t
* boost::hash_combine takes a size_t& argument
2020-06-18 15:47:43 +01:00
MerryMage 61ba55fcc1 Rename PAGE_SHIFT to PAGE_BITS
macOS header files #define PAGE_SHIFT
2020-06-18 15:47:43 +01:00
VolcaEM 8cd49f28a3 Move SHA256Hash to its original position
It's not needed to have it in its previous position anymore
2020-06-18 15:45:47 +02:00
Morph 5874c2da9c vk_sampler_cache: Emulate GL_LINEAR/NEAREST minification filters
Emulate GL_LINEAR/NEAREST minification filters using minLod = 0 and maxLod = 0.25 during sampler creation
2020-06-18 04:56:31 -04:00
Morph 687473de86 maxwell_to_vk: Reorder filter cases and correct mipmap_filter=None
maxwell_to_vk: Reorder filtering modes to start with None, then Nearest, then Linear.
maxwell_to_vk: Logs filter modes under UNREACHABLE_MSG instead of UNIMPLEMENTED_MSG, since any unknown filter modes are invalid and not unimplemented.
maxwell_to_vk: Return VK_SAMPLER_MIPMAP_MODE_NEAREST instead of VK_SAMPLER_MIPMAP_MODE_LINEAR when mipmap_filter is None with the description from the VkSamplerCreateInfo(3) man page.
2020-06-18 04:56:31 -04:00
Morph 1cff2bea24 maxwell_to_gl: Miscellaneous changes
maxwell_to_gl: Log unimplemented features under UNIMPLEMENTED_MSG instead of LOG_ERROR to bring into parity with maxwell_to_vk
maxwell_to_gl: Deduplicate logging in VertexType(), merging them into one.

maxwell_to_gl: Return GL_NEAREST instead of GL_LINEAR if an unknown texture filter mode is encountered.
maxwell_to_gl: Log the mipmap filter mode if an unknown value is passed in.
maxwell_to_gl: Reorder filtering modes to start with None, then Nearest, then Linear.
2020-06-18 04:56:31 -04:00
Rodrigo Locatti 846a6cd005 Merge pull request #4092 from Morph1984/image-bindings
gl_device: Reserve 4 image bindings for fragment stage
2020-06-18 04:59:48 -03:00
MerryMage c0be8dd9d8 macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValue 2020-06-17 17:17:08 +01:00
MerryMage 8055a71e00 arm_dynarmic_cp15: Implement CNTPCT 2020-06-17 17:10:24 +01:00
MerryMage 0ac9600204 arm_dynarmic_cp15: Update CP15 2020-06-17 17:10:24 +01:00
MerryMage fc1c12b2c9 arm_dynarmic_32: InterpreterFallback should never happen 2020-06-17 17:10:24 +01:00
bunnei ad5d93f79b Merge pull request #4086 from MerryMage/abi
xbyak_abi: Cleanup
2020-06-17 11:20:52 -04:00
MerryMage 3585126153 macro_jit_x64: Optimization implicitly assumes same destination 2020-06-17 10:36:36 +01:00
MerryMage b12de7b4e5 macro_jit_x64: Should not skip zero registers for certain ALU ops
The code generated for these ALU ops assume src_a and src_b are always valid.
2020-06-17 10:36:34 +01:00
Kaiwen Xu fd55281d8a Fix framebuffer size on fractional scaling display. 2020-06-16 20:45:20 -07:00
bunnei 0a2ef33c8a Merge pull request #4089 from MerryMage/macrojit-cleanup-1
macro_jit_x64: Cleanup
2020-06-16 23:44:48 -04:00
bunnei 7c767d7dbf Merge pull request #4041 from ReinUsesLisp/arb-decomp
gl_arb_decompiler: Implement an assembly shader decompiler
2020-06-16 14:56:23 -04:00
VolcaEM 85a247d6cf Remove unnecessary pragmas 2020-06-16 20:28:44 +02:00
VolcaEM 1f2f16c656 Revert IsValidNRO refactor but make it more readable 2020-06-16 20:24:58 +02:00
bunnei 4f35f3b78f Merge pull request #3966 from Morph1984/hide-internal-resolution-ui
yuzu/frontend: Remove internal resolution option
2020-06-16 14:12:17 -04:00
VolcaEM 18b88119d2 Update assert string 2020-06-16 15:57:02 +02:00
Morph 0c9a78da75 gl_device: Reserve at least 4 image bindings for fragment stage
Due to the limitation of GL_MAX_IMAGE_UNITS being low (8) on Intel's and Nvidia's proprietary drivers, we have to reserve an appropriate amount of image bindings for each of the stages. So far games have been observed to use 4 image bindings on the fragment stage (Kirby Star Allies) and 1 on the vertex stage (TWD series).
No games thus far in my limited testing used more than 4 images concurrently and across all currently active programs.
This fixes shader compilation errors on Kirby Star Allies on OpenGL (GLSL/GLASM)
2020-06-16 03:03:07 -04:00
Rodrigo Locatti 9621372d41 Merge pull request #4066 from ReinUsesLisp/shared-ptr-buf
buffer_cache: Avoid passing references of shared pointers and misc style changes
2020-06-15 22:29:32 -03:00
MerryMage 482bc63e56 macro_jit_x64: Remove NEXT_PARAMETER
Not required, as PARAMETERS can just be incremented directly.
2020-06-15 21:19:38 +01:00
MerryMage 7cfec874c6 macro_jit_x64: Remove unused function Compile_WriteCarry 2020-06-15 21:19:38 +01:00
MerryMage 666a023957 macro_jit_x64: Select better registers
All registers are now callee-save registers.

RBX and RBP selected for STATE and RESULT because these are most commonly accessed; this is to avoid the REX prefix.
RBP not used for STATE because there are some SIB restrictions, RBX emits smaller code.
2020-06-15 21:19:38 +01:00
MerryMage e95fadc8ec macro_jit_x64: Remove REGISTERS
Unnecessary since this is just an offset from STATE.
2020-06-15 21:00:59 +01:00
MerryMage 0679fbb750 macro_jit_x64: Remove JITState::parameters
This can be passed in as an argument instead.
2020-06-15 20:55:02 +01:00
MerryMage 6c2fe67af2 macro_jit_x64: Remove METHOD_ADDRESS_64
Unnecessary variable.
2020-06-15 20:51:33 +01:00
MerryMage 7ef7a520ca macro_jit_x64: Remove RESULT_64
This Reg64 codepath has the exact same behaviour as the Reg32 one.
2020-06-15 20:35:08 +01:00
MerryMage f0054fb284 xbyak_abi: Prefer returning a struct to using out parameters in ABI_CalculateFrameSize 2020-06-15 19:07:11 +01:00
MerryMage 10e9220ec6 xbyak_abi: Register indexes should be unsigned 2020-06-15 19:07:11 +01:00
MerryMage f60ab4ab14 xbyak_abi: Remove *GPS variants of stack manipulation functions 2020-06-15 18:59:54 +01:00
MerryMage c1f6eaf06b xbyak_abi: Fix ABI_PushRegistersAndAdjustStack
Pushing GPRs twice.
2020-06-15 18:59:01 +01:00
ReinUsesLisp 0f1f859a40 video_core/macro_jit_x64: Remove initializer in member variable
Fix build time issues on gcc. Confirmed through asan that avoiding this
initialization is safe.
2020-06-15 05:17:55 -03:00
bunnei 1a0de59d23 Merge pull request #4070 from ogniK5377/GetTPCMasks-fix
nvdrv: Fix GetTPCMasks for ioctl3
2020-06-14 20:12:45 -04:00
VolcaEM 68a7d8fb09 Clang-format again 2020-06-14 19:41:28 +02:00
VolcaEM 26b0ef5ce0 Use consistent variable names 2020-06-14 19:37:44 +02:00
VolcaEM a01b0de19a Clang-format 2020-06-14 19:34:58 +02:00
VolcaEM 2ae60c8949 Make assert strings consistent 2020-06-14 19:30:08 +02:00
VolcaEM f801c273eb Attempt to fix crashes in SSBU and refactor IsValidNRO 2020-06-14 19:28:39 +02:00
bunnei c8c4bdf3c1 Merge pull request #4069 from ogniK5377/total-phys-mem
kernel: Account for system resource size for memory usage
2020-06-14 00:44:34 -04:00
bunnei a784923393 Merge pull request #4064 from ReinUsesLisp/invalidate-buffers
gl_rasterizer: Mark vertex buffers as dirty after buffer cache invalidation
2020-06-14 00:29:16 -04:00
bunnei 8d47f26be9 Merge pull request #4049 from ReinUsesLisp/separate-samplers
shader/texture: Join separate image and sampler pairs offline
2020-06-13 13:48:27 -04:00
David Marcec eea2cabf83 audren: Implement RendererInfo
Fixes ZLA softlock
2020-06-13 14:04:28 +10:00
bunnei 14e7eb328e Merge pull request #3986 from ReinUsesLisp/shader-cache
shader_cache: Implement a generic runtime shader cache
2020-06-12 23:14:48 -04:00
bunnei b717bb09f2 Merge pull request #4010 from ogniK5377/reserve-always-break
kernel: ResourceLimit::Reserve remove useless while loop
2020-06-12 22:30:19 -04:00
ReinUsesLisp 83a1e1abd4 gl_arb_decompiler: Implement FSwizzleAdd 2020-06-11 22:12:07 -03:00
ReinUsesLisp 805d48c67e gl_arb_decompiler: Implement an assembly shader decompiler
Emit code compatible with NV_gpu_program5.
This should emit code compatible with Fermi, but it wasn't tested on
that architecture. Pascal has some issues not present on Turing GPUs.
2020-06-11 22:12:07 -03:00
ReinUsesLisp d2993294bb yuzu/configuration: Show assembly shaders check box 2020-06-10 19:04:53 -03:00
David Marcec f57da2d9f9 nvdrv: Fix GetTPCMasks for ioctl3
Fixes animal crossing svcBreak on launch
2020-06-10 18:36:42 +10:00
David Marcec 97ad3cd3ee kernel: Account for system resource size for memory usage
GetTotalPhysicalMemoryAvailableWithoutSystemResource & GetTotalPhysicalMemoryUsedWithoutSystemResource seem to subtract the resource size from the usage.
2020-06-10 14:49:00 +10:00
bunnei 316cf3a251 Merge pull request #4027 from ReinUsesLisp/3d-slices
texture_cache: Implement rendering to 3D textures
2020-06-09 21:52:15 -04:00
ReinUsesLisp 26abf8ce57 buffer_cache: Avoid passing references of shared pointers and misc style changes
Instead of using as template argument a shared pointer, use the
underlying type and manage shared pointers explicitly. This can make
removing shared pointers from the cache more easy.

While we are at it, make some misc style changes and general
improvements (like insert_or_assign instead of operator[] + operator=).
2020-06-09 18:30:49 -03:00
ReinUsesLisp 498ca060cf gl_rasterizer: Mark vertex buffers as dirty after buffer cache invalidation
Vertex buffers bindings become invalid after the stream buffer is
invalidated. We were originally doing this, but it got lost at some
point.

- Fixes Animal Crossing: New Horizons, but it affects everything.
2020-06-08 20:24:16 -03:00
ReinUsesLisp 8d4c441b48 buffer_cache: Return stream buffer invalidation in Map instead of Unmap
We have to invalidate whatever cache is being used before uploading the
data, hence it makes more sense to return this on Map instead of Unmap.
2020-06-08 20:22:31 -03:00
unknown 6954d559ae Add game versio to title bar 2020-06-08 23:58:04 +02:00
bunnei 9c5239f695 Merge pull request #4040 from ReinUsesLisp/nv-transform-feedback
gl_rasterizer: Use NV_transform_feedback for XFB on assembly shaders
2020-06-08 16:18:33 -04:00
bunnei de3a9d3053 Merge pull request #4052 from ReinUsesLisp/debug-output
renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabled
2020-06-08 10:16:41 -04:00
ReinUsesLisp d109c27594 texture_cache: Port original code management for 2D vs 3D textures
Handle blits to images as 2D, even when they have block depth.

- Fixes rendering issues on Luigi's Mansion 3
2020-06-08 05:02:22 -03:00
ReinUsesLisp 9a6cba3e44 texture_cache: Simplify blit code 2020-06-08 05:01:44 -03:00
ReinUsesLisp 4db9771559 texture_cache: Handle 3D texture blits with one layer 2020-06-08 05:01:00 -03:00
ReinUsesLisp 77fbdd7e1d texture_cache: Implement rendering to 3D textures
This allows rendering to 3D textures with more than one slice.
Applications are allowed to render to more than one slice of a texture
using gl_Layer from a VTG shader.

This also requires reworking how 3D texture collisions are handled, for
now, this commit allows rendering to slices but not to miplevels. When a
render target attempts to write to a mipmap, we fallback to the previous
implementation (copying or flushing as needed).

- Fixes color correction 3D textures on UE4 games (rainbow effects).
- Allows Xenoblade games to render to 3D textures directly.
2020-06-08 05:01:00 -03:00
Rodrigo Locatti a36918e60b Merge pull request #4034 from ReinUsesLisp/storage-texels
vk_rasterizer: Implement storage texels and atomic image operations
2020-06-07 18:43:24 -03:00
ReinUsesLisp 90dc00bc39 rasterizer_cache: Remove files and includes
The rasterizer cache is no longer used. Each cache has its own generic
implementation optimized for the cached data.
2020-06-07 04:32:57 -03:00
ReinUsesLisp 471f777b9d vk_pipeline_cache: Use generic shader cache
Trivial port the generic shader cache to Vulkan.
2020-06-07 04:32:57 -03:00
ReinUsesLisp 2c1d7bde15 gl_shader_cache: Use generic shader cache
Trivially port the generic shader cache to OpenGL.
2020-06-07 04:32:57 -03:00
ReinUsesLisp dac8591368 shader_cache: Implement a generic shader cache
Implement a generic shader cache for fast lookups and invalidations.
Invalidations are cheap but expensive when a shader is invalidated.

Use two mutexes instead of one to avoid locking invalidations for
lookups and vice versa. When a shader has to be removed, lookups are
locked as expected.
2020-06-07 04:32:32 -03:00
Morph d594106360 yuzu/frontend: Remove internal resolution option 2020-06-06 15:56:14 -04:00
ReinUsesLisp dad31ce0fb gl_device: Black list NVIDIA 443.24 for fast buffer uploads
Skip fast buffer uploads on Nvidia 443.24 Vulkan beta driver on OpenGL.
This driver throws the following error when calling BufferSubData or
BufferData on buffers that are candidates for fast constant buffer
uploads. This is the equivalens to push constants on Vulkan, except that
they can access the full buffer. The error:

Unknown internal debug message. The NVIDIA OpenGL driver has encountered
an out of memory error. This application might
behave inconsistently and fail.

If this error persists on future drivers, we might have to look deeper
into this issue. For now, we can black list it and log it as a temporary
solution.
2020-06-06 02:56:42 -03:00
ReinUsesLisp ef2d1b806d renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabled
Avoids logging when it's not relevant. This can potentially reduce
driver's internal thread overhead.
2020-06-05 21:21:12 -03:00
bunnei 55d09a4d29 Merge pull request #4013 from ReinUsesLisp/skip-no-xfb
vk_rasterizer: Skip transform feedbacks when extension is unavailable
2020-06-05 11:14:36 -04:00
ReinUsesLisp 2f28ac0ada shader/texture: Join separate image and sampler pairs offline
Games using D3D idioms can join images and samplers when a shader
executes, instead of baking them into a combined sampler image. This is
also possible on Vulkan.

One approach to this solution would be to use separate samplers on
Vulkan and leave this unimplemented on OpenGL, but we can't do this
because there's no consistent way of determining which constant buffer
holds a sampler and which one an image. We could in theory find the
first bit and if it's in the TIC area, it's an image; but this falls
apart when an image or sampler handle use an index of zero.

The used approach is to track for a LOP.OR operation (this is done at an
IR level, not at an ISA level), track again the constant buffers used as
source and store this pair. Then, outside of shader execution, join
the sample and image pair with a bitwise or operation.

This approach won't work on games that truly use separate samplers in a
meaningful way. For example, pooling textures in a 2D array and
determining at runtime what sampler to use.

This invalidates OpenGL's disk shader cache :)

- Used mostly by D3D ports to Switch
2020-06-05 00:24:51 -03:00
bunnei f46e366cdc service: nvhost_vic: Ignore Submit commands. 2020-06-04 22:32:28 -04:00
Zach Hilman a283b0672d nvdrv: Stub nvdec/vic ioctls to bypass nvdec movies 2020-06-04 22:32:28 -04:00
ReinUsesLisp b435bff43e shader/track: Move bindless tracking to a separate function 2020-06-04 23:02:55 -03:00
bunnei eb1b451f94 Merge pull request #4031 from Morph1984/fix-gs-outputs
gl_shader_decompiler: Fix geometry shader outputs on Intel drivers
2020-06-04 15:18:51 -04:00
bunnei 2db3e7456a Merge pull request #4044 from ogniK5377/handle-not-signalled-err
Downgrade "handle not signaled" error to trace
2020-06-04 12:23:40 -04:00
bunnei 8bf40a4abc Merge pull request #4009 from ogniK5377/macro-jit-prod
video_core: Implement Macro JIT
2020-06-04 11:40:52 -04:00
David Marcec 07db67b406 Downgrade "handle not signaled" error to trace
clogs logs quite a bit
2020-06-04 22:27:15 +10:00
David Marcec 9eb0c2c15e Default init labels and use initializer list for macro engine 2020-06-04 22:23:07 +10:00
bunnei 27cde89e41 Merge pull request #4039 from FearlessTobi/port-5376
Port citra-emu/citra#5376: "Actually save the input when clearing/resetting to default"
2020-06-03 21:49:31 -04:00
ReinUsesLisp a3c41b2263 gl_rasterizer: Use NV_transform_feedback for XFB on assembly shaders
NV_transform_feedback, NV_transform_feedback2 and
ARB_transform_feedback3 with NV_transform_feedback interactions allows
implementing transform feedbacks as dynamic state.

Maxwell implements transform feedbacks as dynamic state, so using these
extensions with TransformFeedbackStreamAttribsNV allows us to properly
emulate transform feedbacks without having to recompile shaders when the
state changes.
2020-06-03 20:22:12 -03:00
bunnei 6da7788907 Merge pull request #4012 from ReinUsesLisp/mipmap-overlaps
texture_cache: Handle overlaps with multiple subresources
2020-06-03 12:17:25 -04:00
David Marcec cb42f51dc1 Mark parameters as const 2020-06-03 16:33:38 +10:00
FearlessTobi 81f825ac0a Actually save the input when clearing/resetting to default
Co-Authored-By: xperia64 <xperiancedapps@gmail.com>
2020-06-03 05:17:34 +02:00
bunnei 4ae9d7fc57 Merge pull request #4014 from ReinUsesLisp/astc-nvidia
gl_device: Avoid devices with CAVEAT_SUPPORT on ASTC
2020-06-02 17:43:33 -04:00
bunnei 8efb6eff3f Merge pull request #4032 from VolcaEM/xpad
hid: Stub GetXpadIDs
2020-06-02 16:46:47 -04:00
bunnei 2bdd9689f6 Merge pull request #4006 from ReinUsesLisp/squash-ubos
glsl: Squash constant buffers into a single SSBO when we hit the limit
2020-06-02 14:58:50 -04:00
VolcaEM 50bf4c70cd Address review comments 2020-06-02 17:54:10 +02:00
LC 50e8e86908 Merge pull request #4016 from ReinUsesLisp/invocation-info
shader/other: Fix hardcoded value in S2R INVOCATION_INFO
2020-06-02 09:47:53 -04:00
LC 5603a9b1e0 Merge pull request #4033 from ReinUsesLisp/vk-r16ui
maxwell_to_vk: Add R16UI image format
2020-06-02 09:42:49 -04:00
David Marcec d9082de7ea Pass by reference instead of copying parameters 2020-06-02 16:37:06 +10:00
ReinUsesLisp cdc76c7bc2 vk_shader_decompiler: Implement atomic image operations
Implement atomic operations on images.
On GLSL these are atomicImage* functions (e.g. atomicImageAdd).
2020-06-02 02:20:02 -03:00
ReinUsesLisp 9e8584146e vk_rasterizer: Implement storage texels
This is the equivalent of an image buffer on OpenGL.

- Used by Octopath Traveler
2020-06-02 02:16:33 -03:00
ReinUsesLisp 6ae8c1fb05 maxwell_to_vk: Add R16UI image format
- Used by Octopath Traveler
2020-06-02 02:15:20 -03:00
bunnei dddc3a07b5 Merge pull request #4001 from ReinUsesLisp/avoid-copies
buffer_cache: Avoid copying twice on certain cases
2020-06-01 16:59:17 -04:00
bunnei 25e850e83c Merge pull request #3998 from ReinUsesLisp/init-3d
maxwell_3d: Initialize more registers to their expected value
2020-06-01 16:11:56 -04:00
Morph dec37934ac gl_shader_decompiler: Declare gl_Layer and gl_ViewportIndex within gl_PerVertex for vertex and tessellation shaders 2020-06-01 15:35:44 -04:00
Morph 310779568f gl_shader_decompiler: Fix geometry shader outputs for Intel drivers
On Intel's proprietary drivers, gl_Layer and gl_ViewportIndex are not allowed members of gl_PerVertex block, causing the shader to fail to compile. Fix this by declaring these variables outside of gl_PerVertex.
2020-06-01 15:34:05 -04:00
Rodrigo Locatti 627295fa9d Merge pull request #4005 from ReinUsesLisp/g24r8
format_lookup_table: Implement G24S8 format as S8Z24
2020-06-01 16:07:58 -03:00
bunnei 26beb58fe3 Merge pull request #3996 from ReinUsesLisp/front-faces
fixed_pipeline_state,gl_rasterizer: Swap negative viewport checks for front faces
2020-06-01 14:04:35 -04:00
VolcaEM f42797d852 Clang-format 2020-06-01 19:42:54 +02:00
VolcaEM 998bfbb573 hid: Stub GetXpadIDs
Allows Minecraft: Nintendo Switch Edition (a.k.a. old Minecraft) to boot and go ingame
2020-06-01 19:38:44 +02:00
ReinUsesLisp 3e834b2d82 gl_device: Avoid devices with CAVEAT_SUPPORT on ASTC
This avoids using Nvidia's ASTC decoder on OpenGL.
The last time it was profiled, it was slower than yuzu's decoder.

While we are at it, fix a bug in the texture cache when native ASTC is
not supported.
2020-05-31 21:34:34 -03:00
ReinUsesLisp 9228db1925 glsl: Squash constant buffers into a single SSBO when we hit the limit
Avoids compilation errors at the cost of shader build times and runtime
performance when a game hits the limit of uniform buffers we can use.
2020-05-31 21:33:49 -03:00
bunnei 5da79d86bf Merge pull request #3930 from ReinUsesLisp/animal-borders
vk_rasterizer: Implement constant attributes
2020-05-31 18:40:17 -04:00
bunnei 8e9a359db5 Merge pull request #3958 from FernandoS27/gl-debug
OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled
2020-05-31 17:04:27 -04:00
bunnei 2f9185afcd Merge pull request #3999 from ReinUsesLisp/opt-tex-cache
texture_cache: Optimize GetSurfacesInRegion
2020-05-31 17:02:29 -04:00
VolcaEM 6f126bb803 Add comment to nrr_kind
According to Atmosphére (c7026b9094/libraries/libstratosphere/include/stratosphere/ro/ro_types.hpp), nrr_kind (Atmosphére calls it "type") is 7.0.0+
2020-05-31 19:12:09 +02:00
VolcaEM 9390c0c271 ldr: Update NRR/NRO structs
This was based on Switchbrew pages:

https://switchbrew.org/wiki/NRR

https://switchbrew.org/wiki/NRO
2020-05-31 18:49:51 +02:00
Morph 1f9a5e734c gl_device: Enable compute shaders for Intel proprietary drivers
Previously we were disabling compute shaders on Intel's proprietary driver due to broken compute. This has been fixed in the latest Intel drivers. Re-enable compute for Intel proprietary drivers and remove the check for broken compute.
2020-05-31 03:21:07 -04:00
bunnei 51b91cc0d9 Merge pull request #3982 from ReinUsesLisp/membar-cts
shader/other: Implement MEMBAR.CTS
2020-05-30 11:51:42 -04:00
ReinUsesLisp b62b8c8a5d shader/other: Fix hardcoded value in S2R INVOCATION_INFO
Geometry shaders built from Nvidia's compiler check for bits[16:23] to
be less than or equal to 0 with VSETP to default to a "safe" value of
0x8000'0000 (safe from hardware's perspective). To avoid hitting this
path in the shader, return 0x00ff'0000 from S2R INVOCATION_INFO.

This seems to be the maximum number of vertices a geometry shader can
emit in a primitive.
2020-05-30 01:49:14 -03:00
ReinUsesLisp 1ce820a58c texture_cache: More relaxed reconstruction
Only reupload textures when they've not been modified from the GPU.
2020-05-29 23:56:52 -03:00
David Marcec 65b5d2dca6 Favor switch case over jump table
Easier to read and will emit a jump table automatically.
2020-05-30 12:23:58 +10:00
David Marcec 05eeb7de3d Implement macro JIT 2020-05-30 11:40:04 +10:00
David Marcec 4686c15c03 Add xbyak external 2020-05-30 10:55:27 +10:00
ReinUsesLisp 5e4a740410 texture_cache: Only copy textures that were modified from host 2020-05-29 20:12:46 -03:00
ReinUsesLisp c60d814104 texture_cache: Reload textures when number of resources mismatch 2020-05-29 20:10:58 -03:00
bunnei dc5f625c7f Merge pull request #4007 from ReinUsesLisp/reduce-logs
maxwell_3d: Reduce severity of logs that can be spammed
2020-05-29 17:29:17 -04:00
ReinUsesLisp 80f687a811 vk_rasterizer: Skip transform feedbacks when extension is unavailable
Avoids calling transform feedback procedures when
VK_EXT_transform_feedback is not available.
2020-05-29 03:05:29 -03:00
ReinUsesLisp 4686947d38 texture_cache: Handle overlaps with multiple subresources
Implement more surface reconstruct cases. Allow overlaps with more than
one layer and mipmap and copies all of them to the new texture.

- Fixes textures moving around objects on Xenoblade games
2020-05-29 02:57:30 -03:00
David Marcec 55b534c5a0 kernel: ResourceLimit::Reserve remove useless while loop
Timeout is a u64, it will always be >= 0
2020-05-29 13:48:01 +10:00
bunnei f984cf489f Merge pull request #3991 from ReinUsesLisp/depth-sampling
texture_cache: Implement depth stencil texture swizzles
2020-05-28 23:33:38 -04:00
bunnei b3a0868b53 Merge pull request #4002 from lat9nq/fix-nix-mod-directories
patch_manager: Add support for case-sensitivity on Linux
2020-05-28 22:36:39 -04:00
ReinUsesLisp d1e0f2095c maxwell_3d: Reduce severity of logs that can be spammed
These logs were killing performance on some games when they were
spammed. Reduce them to Debug severity.
2020-05-28 18:23:25 -03:00
ReinUsesLisp 454954bcf0 format_lookup_table: Implement G24S8 format as S8Z24 2020-05-28 17:16:07 -03:00
lat9nq 9d08039623 Make copying directory string more concise 2020-05-28 13:33:50 -04:00
lat9nq 2ad3571453 Address requested changes 2020-05-28 13:30:22 -04:00
bunnei 595b97a0d7 Merge pull request #3993 from ReinUsesLisp/fix-zla
gl_shader_manager: Unbind GLSL program when binding a host pipeline
2020-05-28 12:15:22 -04:00
lat9nq 2adc5f524d *nix systems can read any-case patch directories
Changes many patch_manager functions to use a case-less variant of
GetSubdirectory. Fixes patches not showing up on *nix systems when
patch directories are named with odd cases, i.e. `exeFS'.
2020-05-27 23:12:56 -04:00
bunnei 78af11f39d Merge pull request #3954 from Morph1984/log-memory-amount
main: Log host system memory parameters
2020-05-27 22:58:51 -04:00
ReinUsesLisp fb620ba4be buffer_cache: Avoid copying twice on certain cases
Avoid copying to a staging buffer on non-granular memory addresses.
Add a callable argument to StreamBufferUpload to be able to copy to the
staging buffer directly from ReadBlockUnsafe.
2020-05-27 23:05:50 -03:00
ReinUsesLisp eccf9098ae texture_cache: Use unordered_map::find instead of operator[] on hot code 2020-05-27 17:59:04 -03:00
bunnei cd2ce9ed2d Merge pull request #3961 from Morph1984/bgra8_srgb
maxwell_to_vk: Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM
2020-05-27 16:44:22 -04:00
ReinUsesLisp fa6a64eb72 texture_cache: Use small vector for surface vectors
This avoids most heap allocations when collecting surfaces into a
vector.
2020-05-27 17:31:14 -03:00
ReinUsesLisp de665d6485 maxwell_3d: Initialize line widths
Initialize line widths to avoid setting a line width of zero.
2020-05-27 16:53:43 -03:00
ReinUsesLisp 2dba4bc34f maxwell_3d: Initialize polygon modes
NVN expects this to be initialized as Fill, otherwise games that never
bind a rasterizer state will log an invalid polygon mode.
2020-05-27 16:52:52 -03:00
Morph e9bacfbe8b Fix macOS code and change "Swapfile" to "Swap" 2020-05-27 11:21:59 -04:00
ReinUsesLisp 6e0420fe20 shader/other: Implement MEMBAR.CTS
This silences an assertion we were hitting and uses workgroup memory
barriers when the game requests it.
2020-05-27 00:19:45 -03:00
ReinUsesLisp 387b7926c0 texture_cache: Fix layered null surfaces
Null texture cubes were not considered arrays, causing issues on Vulkan
and OpenGL when creating views.
2020-05-26 17:50:08 -03:00
ReinUsesLisp 11f626f034 gl_texture_cache: Implement small texture view cache for swizzles
This fixes cases where the texture swizzle was applied twice on the same
draw to a texture bound to two different slots.
2020-05-26 17:50:08 -03:00
ReinUsesLisp ed74f3008b texture_cache: Implement depth stencil texture swizzles
Stop ignoring image swizzles on depth and stencil images.

This doesn't fix a known issue on Xenoblade Chronicles 2 where an OpenGL
texture changes swizzles twice before being used. A proper fix would be
having a small texture view cache for this like we do on Vulkan.
2020-05-26 17:44:50 -03:00
ReinUsesLisp d748723a77 gl_rasterizer: Port front face flip check from Vulkan
While Vulkan was assuming we had no negative viewports, OpenGL code
was assuming we had them. Port the old code from Vulkan to OpenGL,
checking if the first viewport is negative before flipping faces.

This is not a complete implementation since we only check for the first
viewport to be negative. That said, unless a game is using Vulkan,
OpenGL and NVN games should be fine here, and we can always compare with
our Vulkan backend to see if there's a difference.
2020-05-26 16:33:50 -03:00
ReinUsesLisp c4b6e36a00 fixed_pipeline_state: Remove unnecessary check for front faces flip
The check to flip faces when viewports are negative were a left over
from the old OpenGL code. This is not required on Vulkan where we have
negative viewports.
2020-05-26 16:32:27 -03:00
bunnei cb82125d87 Merge pull request #3981 from ReinUsesLisp/bar
shader/other: Implement BAR.SYNC 0x0
2020-05-26 14:40:13 -04:00
bunnei 54a3697cac Merge pull request #3980 from ReinUsesLisp/red-op
shader/memory: Implement non-addition operations in RED
2020-05-26 12:50:41 -04:00
ReinUsesLisp 1188c79557 gl_shader_manager: Unbind GLSL program when binding a host pipeline
Fixes regression in Link's Awakening caused by a075bbcf36
2020-05-26 04:20:39 -03:00
bunnei 2736532246 Merge pull request #3978 from ReinUsesLisp/write-rz
shader_decompiler: Visit source nodes even when they assign to RZ
2020-05-25 21:31:33 -04:00
bunnei e3855321f7 Merge pull request #3905 from FernandoS27/vulkan-fix
Correct a series of crashes and intructions on Async GPU and Vulkan Pipeline
2020-05-24 15:23:38 -04:00
bunnei 83ef89fc45 Merge pull request #3964 from ReinUsesLisp/arb-integration
renderer_opengl: Add assembly program code paths
2020-05-24 00:34:12 -04:00
bunnei 9995a05e94 Merge pull request #3979 from ReinUsesLisp/thread-group
shader/other: Implement thread comparisons (NV_shader_thread_group)
2020-05-24 00:33:06 -04:00
bunnei 6d46de49c3 Merge pull request #3975 from ReinUsesLisp/fast-bufcache
buffer_cache: Replace boost::icl::interval_map with boost::intrusive::set
2020-05-24 00:32:44 -04:00
Tobias 4234de3fd7 yuzu/discord_impl: Update the applicationID (#3977) 2020-05-22 18:26:26 +02:00
ReinUsesLisp 5db0df833a shader/other: Implement BAR.SYNC 0x0
Trivially implement this particular case of BAR. Unless games use OpenCL
or CUDA barriers, we shouldn't hit any other case here.
2020-05-21 23:20:43 -03:00
ReinUsesLisp c5d03c7ff1 shader/memory: Implement non-addition operations in RED
Trivially implement these instructions. They are used in Astral Chain.
2020-05-21 23:19:46 -03:00
ReinUsesLisp d4ba9c4fe5 shader/other: Implement thread comparisons (NV_shader_thread_group)
Hardware S2R special registers match gl_Thread*MaskNV. We can trivially
implement these using Nvidia's extension on OpenGL or naively stubbing
them with the ARB instructions to match. This might cause issues if the
host device warp size doesn't match Nvidia's. That said, this is
unlikely on proper shaders.

Refer to the attached url for more documentation about these flags.
https://www.khronos.org/registry/OpenGL/extensions/NV/NV_shader_thread_group.txt
2020-05-21 23:18:37 -03:00
ReinUsesLisp 20f8c8dfff shader_decompiler: Visit source nodes even when they assign to RZ
Some operations like atomicMin were ignored because they returned were
being stored to RZ. This operations have a side effect and it was being
ignored.
2020-05-21 23:16:03 -03:00
ReinUsesLisp 262aea9b19 vk_shader_decompiler: Don't assert for void returns
Atomic instructions can be used without returning anything and this is
valid code. Remove the assert.
2020-05-21 23:16:03 -03:00
ReinUsesLisp 9223dc7a10 buffer_cache: Remove unused boost headers 2020-05-21 16:44:00 -03:00
ReinUsesLisp f8678b635a map_interval: Add interval allocator and drop hack
Drop the std::list hack to allocate memory indefinitely.

Instead use a custom allocator that keeps references valid until
destruction. This allocates fixed chunks of memory and puts pointers in
a free list. When an allocation is no longer used put it back to the
free list, this doesn't heap allocate because std::vector doesn't change
the capacity. If the free list is empty, allocate a new chunk.
2020-05-21 16:44:00 -03:00
ReinUsesLisp 4d06e9f5cc buffer_cache: Use boost::container::small_vector for maps in range
Most overlaps in the buffer cache only contain one mapped address.
We can avoid close to all heap allocations once the buffer cache is
warmed up by using a small_vector with a stack size of one.
2020-05-21 16:44:00 -03:00
ReinUsesLisp 7a45f97357 buffer_cache: Use boost::intrusive::set for caching
Instead of using boost::icl::interval_map for caching, use
boost::intrusive::set. interval_map is intended as a container where the
keys can overlap with one another; we don't need this for caching
buffers and a std::set-like data structure that allows us to search with
lower_bound is enough.
2020-05-21 16:44:00 -03:00
ReinUsesLisp c7f9bceb80 buffer_cache: Remove shared pointers
Removing shared pointers is a first step to be able to use intrusive
objects and keep allocations close to one another in memory.
2020-05-21 16:02:54 -03:00
ReinUsesLisp 3460d01352 buffer_cache: Minor style changes
Minor style changes. Mostly done so I avoid editing it while doing other
changes.
2020-05-21 16:02:20 -03:00
VolcaEM 4f1136dfca clang-format 2020-05-21 10:43:55 +02:00
VolcaEM f7d23b21d0 nifm: correct assert in CreateTemporaryNetworkProfile
This has been wrong since bd66646f8b
I haven't found a game that called this function (and I haven't tried this on a real Switch), and because of this I haven't been able to check if the number in assert OR the string in the assert is wrong, but one of the two is wrong:
NetworkProfileData is 0x18E, while SfNetworkProfileData is 0x17C, according to Switchbrew
Switchbrew doesn't officially say that NetworkProfileData's size is 0x18E but it's possible to calculate its size since Switchbrew provides the size and the offset of all the components of NetworkProfileData (which isn't currently implemented in yuzu, alongside SfNetworkProfileData)
NetworkProfileData documentation: https://switchbrew.org/wiki/Network_Interface_services#NetworkProfileData
SfNetworkProfileData documentation: https://switchbrew.org/wiki/Network_Interface_services#SfNetworkProfileData
Since I trust ogniK's work on reversing NIFM, I'd assume this was just a typo in the string
2020-05-21 10:23:53 +02:00
bunnei 9d095bbb06 Merge pull request #3946 from ogniK5377/sysverdat-10-0-2
file_sys: Update SystemVersion archive to version 10.0.2
2020-05-20 19:21:27 -04:00
FearlessTobi 5e9e8073a0 crypto: Make KeyManager a singleton class
Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list.
With this change, it is only loaded once.
On my system, this decreased game list loading times by a factor of 20.
2020-05-20 21:28:16 +02:00
ReinUsesLisp a075bbcf36 renderer_opengl: Add assembly program code paths
Add code required to use OpenGL assembly programs based on
NV_gpu_program5. Decompilation for ARB programs is intended to be added
in a follow up commit. This does **not** include ARB decompilation and
it's not in an usable state.

The intention behind assembly programs is to reduce shader stutter
significantly on drivers supporting NV_gpu_program5 (and other required
extensions). Currently only Nvidia's proprietary driver supports these
extensions.

Add a UI option hidden for now to avoid people enabling this option
accidentally.

This code path has some limitations that OpenGL compatibility doesn't
have:
- NV_shader_storage_buffer_object is limited to 16 entries for a single
OpenGL context state (I don't know if this is an intended limitation, an
specification issue or I am missing something). Currently causes issues
on The Legend of Zelda: Link's Awakening.
- NV_parameter_buffer_object can't bind buffers using an offset
different to zero. The used workaround is to copy to a temporary buffer
(this doesn't happen often so it's not an issue).

On the other hand, it has the following advantages:
- Shaders build a lot faster.
- We have control over how floating point rounding is done over
individual instructions (SPIR-V on Vulkan can't do this).
- Operations on shared memory can be unsigned and signed.
- Transform feedbacks are dynamic state (not yet implemented).
- Parameter buffers (uniform buffers) are per stage, matching NVN and
hardware's behavior.
- The API to bind and create assembly programs makes sense, unlike
ARB_separate_shader_objects.
2020-05-19 18:00:04 -03:00
ReinUsesLisp 541a254c2e yuzu: Add frontend settings for assembly shaders
Add settings for assembly shaders. Currently hidden to avoid users from
accidentally enabled them.
2020-05-19 17:53:17 -03:00
bunnei 3b781db425 Merge pull request #3926 from ogniK5377/keyboard-states
hid: Clear keyboard states & fix logic issue
2020-05-19 15:55:14 -04:00
Morph e54e7d322e maxwell_to_vk: Add format B8G8R8A8_SRGB
Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM
Used by Bravely Default II
2020-05-18 13:02:09 -04:00
Fernando Sahmkow b9eff4d004 OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled.
This commit aims to help easing debugging of driver crashes without
having to modify existing code.
2020-05-17 21:45:09 -04:00
Morph c02daca95c main: Log host system memory parameters
Logs both physical memory and swapfile sizes, this is useful for support.
2020-05-17 14:45:12 -04:00
bunnei c5fbedf14c Merge pull request #3665 from bunnei/device-save
FS: Improve emulation of device saves
2020-05-16 12:39:58 -04:00
bunnei c04e78c136 Merge pull request #3945 from ogniK5377/nvflinger-pixformat
nv_flinger: Use enum for pixel format instead of u32
2020-05-16 02:00:50 -04:00
David Marcec d50dd8f7a0 file_sys: Update SystemVersion archive to version 10.0.2 2020-05-16 13:56:06 +10:00
David Marcec 97c023e3f0 nv_flinger: Use enum for pixel format instead of u32 2020-05-16 13:47:55 +10:00
David Marcec 67d7c0f45e DmaPusher: Remove dead code in step 2020-05-16 12:42:27 +10:00
bunnei 738e2cca7c Merge pull request #3942 from ReinUsesLisp/flush-and-invalidate
vk_rasterizer: Match OpenGL's FlushAndInvalidate behavior
2020-05-15 21:34:07 -04:00
ReinUsesLisp 635a3add8b vk_rasterizer: Match OpenGL's FlushAndInvalidate behavior
Match OpenGL's behavior. This can fix or simplify bisecting issues on
Vulkan.
2020-05-15 20:40:08 -03:00
Morph eedbf90664 frontend: Set minimum window size to 640x360 instead of 1280x720 (#3413) 2020-05-15 22:22:27 +02:00
bunnei 9e03fc2e29 Merge pull request #3927 from jroweboy/fix-bug
Frontend: Remove tracking for context wrapper
2020-05-14 00:07:38 -04:00
bunnei 84bd1a0189 Merge pull request #3757 from ogniK5377/better-voice-mixing
audio_renderer: Better voice mixing and 6 channel downmixing
2020-05-13 22:46:41 -04:00
bunnei bcfcfaca32 Merge pull request #3909 from bunnei/timezone
Improve time zone support
2020-05-13 21:41:45 -04:00
bunnei b0d4fdb600 Merge pull request #3899 from ReinUsesLisp/float-comparisons
shader_ir: Add separate instructions for ordered and unordered comparisons and fix NE on GLSL
2020-05-13 09:51:14 -04:00
ReinUsesLisp a7c7f48177 vk_rasterizer: Implement constant attributes
Constant attributes (in OpenGL known disabled attributes) are not
supported on Vulkan, even with extensions. To emulate this behavior we
return zero on reads from disabled vertex attributes in shader code.
This has no caching cost because attribute formats are not dynamic state
on Vulkan and we have to store it in the pipeline cache anyway.

- Fixes Animal Crossing: New Horizons terrain borders
2020-05-13 04:36:47 -03:00
ReinUsesLisp 305164eaac vk_rasterizer: Remove buffer check in attribute selection
This was a left over from OpenGL when disabled buffers where not properly
emulated. We no longer have to assert this as it is checked in vertex
buffer initialization.
2020-05-13 04:36:47 -03:00
bunnei 053399a553 time_zone: Use std::chrono::seconds for strong typing. 2020-05-12 18:44:07 -04:00
James Rowe 99f5c3ca7f Frontend: Remove tracking for context wrapper 2020-05-11 23:50:03 -06:00
David Marcec e6886a756c hid: Clear keyboard states & fix logic issue
Previously we never cleared the states of the entries and the key would stay held down, also looping over the key bytes for each key lead to setting every bit for the key state instead of the key we wanted
2020-05-12 12:40:50 +10:00
bunnei 250593c05d Merge pull request #3816 from ReinUsesLisp/vk-rasterizer-enable
vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
2020-05-11 18:22:51 -04:00
bunnei f42b9c0a85 hle: service: time_zone_manager: Use current time zone setting. 2020-05-11 17:55:25 -04:00
bunnei 7aadcb796c common: Add module to get the current time zone. 2020-05-11 17:51:26 -04:00
bunnei 8588ac0645 core: settings: Add a setting for time zone. 2020-05-11 17:50:07 -04:00
David Marcec 9f8eb0c39a fix logic error & scale sample volume based on voice volume 2020-05-11 12:56:15 -04:00
David Marcec 7965018e64 pass by const ref instead 2020-05-11 12:56:15 -04:00
David Marcec de00a5eb8c audio_renderer: Better voice mixing and 6 channel downmixing
Supersedes #3738 and #3321
2020-05-11 12:56:15 -04:00
bunnei ee3b9071b5 service: fsp_srv: Stub implementation of OpenMultiCommitManager. 2020-05-11 12:54:30 -04:00
bunnei 3439618956 yuzu: game_list: Fix 'Open Save Data Location' for device saves. 2020-05-11 12:54:30 -04:00
bunnei 97e2eb439c file_sys: savefata_factory: Update to support DeviceSaveData. 2020-05-11 12:54:30 -04:00
bunnei f870a935d4 file_sys: control_metadata: Expose device_save_data_size. 2020-05-11 12:54:30 -04:00
David Marcec 26bd4978a3 Stub SendKeyboardLockKeyEvent
Needed for Puchikon 4 SmileBASIC 1.0.0
2020-05-12 01:01:50 +10:00
ReinUsesLisp f39591b20a gl_shader_decompiler: Properly emulate NaN behaviour on NE
"Not equal" operators on GLSL seem to behave as unordered when we expect
an ordered comparison.

Manually emulate this checking for LGE values (numbers, not-NaNs).
2020-05-10 02:59:33 -03:00
Fernando Sahmkow 66035b1641 RasterizerCache: Correct documentation. 2020-05-09 21:03:39 -04:00
Fernando Sahmkow 5c9ab7d1e2 VkPipelineCache: Use a null shader on invalid address. 2020-05-09 20:51:34 -04:00
Fernando Sahmkow a14e93d0ba VideoCore: Use SyncGuestMemory mechanism for Shader/Pipeline Cache invalidation. 2020-05-09 19:25:29 -04:00
Rodrigo Locatti bab843f4e9 Merge pull request #3839 from Morph1984/r8g8ui
texture: Implement R8G8UI
2020-05-09 05:28:55 -03:00
ReinUsesLisp d8598a8717 shader_ir: Separate float-point comparisons in ordered and unordered
This allows us to use native SPIR-V instructions without having to
manually check for NAN.
2020-05-09 04:55:15 -03:00
bunnei c8a4398fe8 Merge pull request #3842 from makigumo/maxwell_to_vk_vertexattribute_signed_int
maxwell_to_vk: implement missing signed int formats
2020-05-09 00:36:09 -04:00
James Rowe 2991e7441a Replace externals with Conan (#3735)
* Remove git submodules that will be loaded through conan

* Move custom Find modules to their own folder

* Use conan for downloading missing external dependencies

* CI: Change the yuzu source folder user to the user that the containers run on

* Attempt to remove dirty mingw build hack

* Install conan on the msvc build

* Only set release build type when using not using multi config generator

* Re-add qt bundled to workaround an issue with conan qt not downloading prebuilt binaries

* Add workaround for submodules that use legacy CMAKE variables

* Re-add USE_BUNDLED_QT on the msvc build bot
2020-05-08 17:09:29 -04:00
bunnei 4fb531a576 Merge pull request #3885 from ReinUsesLisp/viewport-swizzles
video_core: Implement viewport swizzles with NV_viewport_swizzle
2020-05-08 15:16:53 -04:00
bunnei 58bda1c7b8 Merge pull request #3879 from lioncash/global2
hle_ipc: Eliminate core memory globals
2020-05-07 19:13:34 -04:00
bunnei 2a51a66227 Merge pull request #3884 from ReinUsesLisp/border-colors
vk_sampler_cache: Use VK_EXT_custom_border_color when available
2020-05-07 12:18:53 -04:00
FearlessTobi 32bb64a0ec Menubar: fix mouse tracking bug
Co-Authored-By: Vitor K <vitor-k@users.noreply.github.com>
2020-05-06 22:14:52 +02:00
bunnei a1d3586e60 Merge pull request #3815 from FernandoS27/command-list-2
GPU: More optimizations to GPU Command List Processing and DMA Copy Optimizations
2020-05-05 17:12:42 -04:00
bunnei 09789af434 Merge pull request #3881 from lioncash/mem-warning
kernel/memory: Resolve several compiler warnings
2020-05-05 15:41:18 -04:00
bunnei 97607e0675 Update src/video_core/gpu.cpp
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-05-05 15:39:44 -04:00
bunnei 58b467877c Update src/video_core/gpu.cpp
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-05-05 15:39:37 -04:00
ReinUsesLisp aa86309d15 vk_sampler_cache: Use VK_EXT_custom_border_color when available
This should fix grass interactions on Breath of the Wild on Vulkan.
It is currently untested against validation layers.

Nvidia's Windows 443.09 beta driver or Linux 440.66.12 is required for
now.
2020-05-04 20:49:23 -03:00
bunnei c52483e3c3 Merge pull request #3880 from lioncash/encoding
kernel/memory: Amend potential encoding warnings
2020-05-04 18:50:29 -04:00
ReinUsesLisp 1f5d41ac05 vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzle 2020-05-04 18:31:17 -03:00
ReinUsesLisp 9054f86f03 gl_rasterizer: Implement viewport swizzles with NV_viewport_swizzle 2020-05-04 17:51:30 -03:00
ReinUsesLisp ff7b0d7329 maxwell_3d: Add viewport swizzles 2020-05-04 17:50:59 -03:00
bunnei f79198dea0 Merge pull request #3843 from ogniK5377/GetPopFromGeneralChannelEvent
am: IHomeMenuFunctions:GetPopFromGeneralChannelEvent
2020-05-04 16:20:11 -04:00
bunnei 8cab30959a Merge pull request #3637 from FearlessTobi/port-5094
Port citra-emu/citra#5094: "yuzu: Option to hide mouse on inactivity"
2020-05-03 23:16:19 -04:00
bunnei 5da1786107 Merge pull request #3822 from ogniK5377/GetAccountId
acc: Return a unique value per account for GetAccountId
2020-05-03 23:15:03 -04:00
Lioncash 12b81f2581 kernel/memory: Remove #pragma once within cpp file
This isn't necessary in a cpp file and will cause warnings on clang.
2020-05-03 13:42:07 -04:00
Lioncash 0bf0d27552 kernel/memory: Remove unused includes
Prevents header churn and needing to recompile these files if these
headers are ever changed in the future.
2020-05-03 13:41:18 -04:00
Lioncash 0bb99454ed kernel/memory: Remove unused variables in memory_block_manager
Prevents unused variable warnings.
2020-05-03 13:36:20 -04:00
Lioncash 42d43335c9 kernel/memory: Make use of std::array consistently in address_space_info
This allows tuning standard library implementations to enable or disable
range checks at runtime, which is nicer for debugging.
2020-05-03 13:34:24 -04:00
Lioncash e09098b981 kernel/memory: Resolve -Wshadow warnings
Prevents variable name clashing.
2020-05-03 13:29:42 -04:00
Lioncash a93929b23a kernel/memory: Amend potential encoding warnings
While èis generally representable in some language encodings, in some
it isn't and will result in compilation warnings occurring. To remain
friendly with other language's codepages on Windows, we normalize it to
an ASCII e.
2020-05-03 13:01:03 -04:00
Lioncash ccfac6d992 hle_ipc: Eliminate core memory globals
We can just pass the required instances into the constructor of the
request, eliminating all usages of the global system accessor.
2020-05-03 12:57:40 -04:00
Morph 970c8f1ccc settings: Add anisotropic filtering level to the yuzu configuration log (#3875) 2020-05-03 17:42:17 +02:00
bunnei 99075400e3 Merge pull request #3808 from ReinUsesLisp/wait-for-idle
{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
2020-05-03 02:43:18 -04:00
Mat M b504d5ef51 Merge pull request #3872 from FearlessTobi/reopen-3792
input_common: fix build when SDL2 is disabled
2020-05-03 01:01:11 -04:00
bunnei d4f7e52238 Merge pull request #3871 from lioncash/semi
readable_event: Remove unnecessary semicolon in Signal()
2020-05-02 23:38:36 -04:00
bunnei 4597cd841f Merge pull request #3824 from ogniK5377/GetDisplayVersion
am: Properly implement GetDisplayVersion
2020-05-02 23:35:38 -04:00
bunnei 6173ba77f8 Update src/core/hle/service/am/am.cpp
Co-authored-by: Mat M. <mathew1800@gmail.com>
2020-05-02 23:35:31 -04:00
FearlessTobi 358d645018 input_common: fix build when SDL2 is disabled 2020-05-02 21:47:17 +02:00
Lioncash 918b439e26 readable_event: Remove unnecessary semicolon in Signal()
Resolves a -Wextra-semi warning.

While we're at it, we can invert the branch to form a guard clause,
unindenting all of the contained code.
2020-05-02 14:07:31 -04:00
bunnei 21316625ba Merge pull request #3811 from ogniK5377/audin-init
audin:u: ListAudioIns, OpenAudioIn, ListAudioInsAuto, OpenAudioInAuto, ListAudioInsAutoFiltered, OpenAudioInProtocolSpecified
2020-05-02 13:11:52 -04:00
bunnei 22e6bc0ea0 Merge pull request #3819 from ogniK5377/err-log2
kernel: Don't fail silently
2020-05-02 02:51:50 -04:00
bunnei 18a1e885a1 Merge pull request #3732 from lioncash/header
vulkan: Remove unnecessary includes
2020-05-02 01:36:57 -04:00
bunnei 716a999346 Merge pull request #3809 from ReinUsesLisp/empty-index
vk_rasterizer: Skip index buffer setup when vertices are zero
2020-05-02 01:21:57 -04:00
ReinUsesLisp 02e6cc9247 vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
We can simply enable rasterizer discard matching the current pipeline
key.
2020-05-02 01:47:25 -03:00
bunnei 33a218bea2 Merge pull request #3693 from ReinUsesLisp/clean-samplers
shader/texture: Support multiple unknown sampler properties
2020-05-02 00:45:41 -04:00
Mat M e2164f8aa7 Merge pull request #3859 from jbeich/clang
Unbreak build with Clang < 10
2020-05-01 23:39:12 -04:00
bunnei 3b6efbe7ef Merge pull request #3833 from qwell/caps_su-32-stub
Add stub for caps:su SetShimLibraryVersion
2020-05-01 23:34:05 -04:00
bunnei 75b8a3e356 Merge pull request #3821 from ogniK5377/InitializeApplicationInfo-fix
acc: Fix InitializeApplicationInfo
2020-05-01 22:06:05 -04:00
bunnei afb0785293 Merge pull request #3812 from ogniK5377/lisst-qualified-users
account: ListQualifiedUsers
2020-05-01 22:05:37 -04:00
Jan Beich 1d30ce7b5b fixed_pipeline_state: explicitly use template keyword after be8742e286
In file included from src/video_core/renderer_opengl/renderer_opengl.cpp:25:
In file included from src/./video_core/renderer_opengl/gl_rasterizer.h:26:
In file included from src/./video_core/renderer_opengl/gl_fence_manager.h:11:
src/./video_core/fence_manager.h:91:32: error: use 'template' keyword
      to treat 'Write' as a dependent template name
                memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload());
                               ^
                               template
src/./video_core/fence_manager.h:137:32: error: use 'template'
      keyword to treat 'Write' as a dependent template name
                memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload());
                               ^
                               template
2020-05-01 23:38:23 +00:00
David Marcec 1d2ebbf8fe nvdrv: Fix GetGpuTime stack corruption
IoctlGetGpuTime should be 16 bytes, not 8.
2020-05-02 00:14:37 +10:00
David Marcec e433e24ed4 am: IHomeMenuFunctions:GetPopFromGeneralChannelEvent
QLaunch 1.0.0
2020-05-01 11:20:43 +10:00
Dan 712c96db1a maxwell_to_vk: implement missing signed int formats 2020-04-30 23:39:16 +02:00
Jason Parker 9cdcfd80fc caps:su Stub out SetShimLibraryVersion
Used by Animal Crossing: New Horizons when trying to take a picture.
2020-04-30 15:16:53 -04:00
Mat M 1acf3384c1 Merge pull request #3823 from ogniK5377/setvrmode
am: IsVrModeEnabled & SetVrModeEnabled fixes
2020-04-30 13:39:16 -04:00
Mat M 83fd54762b Merge pull request #3830 from ogniK5377/GetFriendInvitationStorageChannelEvent
am: GetFriendInvitationStorageChannelEvent
2020-04-30 13:38:35 -04:00
Mat M 354fd09052 Merge pull request #3835 from ogniK5377/GetFreeSpaceSize-GetTotalSpaceSize
fs-srv: GetFreeSpaceSize & GetTotalSpaceSize
2020-04-30 13:37:43 -04:00
Mat M fc4b536a7e Merge pull request #3832 from ogniK5377/nim-eca-CreateServerInterface
nim: CreateServerInterface, CreateAccessorInterface, CreateAsyncInterface
2020-04-30 13:36:04 -04:00
Mat M 74595956c2 Merge pull request #3831 from ogniK5377/caps-su-names
caps: Add missing service names to caps:su
2020-04-30 13:32:53 -04:00
Morph 6665cd04f1 texture: Implement R8G8UI
- Used by The Walking Dead: The Final Season
2020-04-30 13:19:36 -04:00
bunnei 656fc982e0 Merge pull request #3825 from ogniK5377/psm-no-warn
psm: Mark as debug instead of warning
2020-04-30 13:11:11 -04:00
bunnei 6a57e5fc49 Merge pull request #3807 from ReinUsesLisp/fix-depth-clamp
maxwell_3d: Fix depth clamping register
2020-04-30 13:07:31 -04:00
bunnei e043a955f1 Merge pull request #3799 from ReinUsesLisp/iadd-cc
shader: Implement P2R CC, IADD Rd.CC and IADD.X
2020-04-30 12:56:36 -04:00
bunnei 2765bb73a2 Merge pull request #3805 from ReinUsesLisp/preserve-contents
texture_cache: Reintroduce preserve_contents accurately
2020-04-30 12:56:19 -04:00
bunnei e20f3161a3 Merge pull request #3788 from FernandoS27/revert
Revert: shader_decode: Fix LD, LDG when track constant buffer.
2020-04-30 12:55:39 -04:00
David Marcec 053fabf414 fs-srv: GetFreeSpaceSize & GetTotalSpaceSize
Closes #3533

Turns out the functions were already implemented but just never added
2020-04-30 23:59:57 +10:00
David Marcec 9acd88ff71 nim: CreateServerInterface, CreateAccessorInterface, CreateAsyncInterface
Closes #3026
2020-04-30 23:10:20 +10:00
David Marcec 66f74349f0 caps: Add missing service names to caps:su
SetShimLibraryVersion, SaveScreenShotEx1 & SaveScreenShotEx2 were missing
2020-04-30 22:51:06 +10:00
David Marcec 5da10e6ec0 am: GetFriendInvitationStorageChannelEvent
Closes #3829
2020-04-30 22:37:26 +10:00
David Marcec b1d4271c5d psm: Mark as debug instead of warning
No point to emulate battery life. However options are broken out if we ever want to add a setting for it
2020-04-29 22:39:49 +10:00
David Marcec 22298a3b2d am: Properly implement GetDisplayVersion
Properly implement IApplicationFunctions::GetDisplayVersion
2020-04-29 22:13:56 +10:00
David Marcec 70e12c713e am: IsVrModeEnabled & SetVrModeEnabled fixes
Return the proper state of vr mode for IsVrModeEnabled
We should not return an error for SetVrModeEnabled. When VR Mode is turned on, it signals to lbl to turn vr mode on, not return an error code
2020-04-29 21:48:58 +10:00
David Marcec 3d475a655b acc: Return a unique value per account for GetAccountId 2020-04-29 21:09:53 +10:00
David Marcec 485cb3ac34 acc: Fix InitializeApplicationInfo
We're not suppose to pop a u64, should just read the sent pid and check that
2020-04-29 20:49:35 +10:00
David Marcec 4f69eb7061 kernel: Don't fail silently 2020-04-29 14:53:53 +10:00
Lioncash a35345d217 vulkan: Remove unnecessary includes
Reduces some header churn and reduces rebuilds when some header
internals change.

While we're at it we can also resolve a missing include in buffer_cache.
2020-04-28 21:54:46 -04:00
bunnei 153e6fccb2 Merge pull request #3771 from benru/dump-romfs-with-updates
Dump RomFS command to include Updates
2020-04-28 21:54:06 -04:00
Mat M 83a5463c10 Merge pull request #3818 from ogniK5377/err-log
Don't fail silently for vi, sm, set and ns services
2020-04-28 21:41:13 -04:00
Mat M 661193a566 Merge pull request #3783 from lioncash/pointer
physical_core: Make use of std::make_unique instead of std::make_shared in ctor
2020-04-28 21:38:02 -04:00
David Marcec 63b73587b7 Don't fail silently for vi, sm, set and ns services 2020-04-29 11:15:21 +10:00
ReinUsesLisp 8d28a56a6c shader/arithmetic_integer: Fix tracking issue in temporary
This temporary is not needed as we mark Rd.CC + IADD.X as unimplemented.
It caused issues when tracking global buffers.
2020-04-28 17:14:53 -03:00
Fernando Sahmkow 9f9e662f1f Clang Format and Documentation. 2020-04-28 14:02:51 -04:00
Fernando Sahmkow 4d2b23d3c5 MaxwellDMA: Optimize micro copies. 2020-04-28 13:44:14 -04:00
bunnei 510842d827 Merge pull request #3784 from ReinUsesLisp/shader-memory-util
shader/memory_util: Deduplicate code
2020-04-28 12:05:50 -04:00
David Marcec 45ece975bf kernel: Bad GetInfo ids should not be marked as stubs
As we currently match hardware and don't return a successful result, these should be marked as errors instead of warnings and as stubs.
2020-04-29 01:17:59 +10:00
David Marcec fecc4a4a01 Updated comment to reflect ListQualifiedUsers better 2020-04-29 01:13:03 +10:00
David Marcec 0af061e175 style: Change AMs & Glues error codes to be dec instead of hex
Consistency for the rest of the error codes in the codebase
2020-04-29 00:49:49 +10:00
David Marcec b680569dd3 marked stubs 2020-04-29 00:43:05 +10:00
David Marcec 36302b6e20 account: ListQualifiedUsers
Closes #2844
2020-04-29 00:37:47 +10:00
David Marcec f3209e7baa Audin:u ListAudioIns, OpenAudioIn, ListAudioInsAuto, OpenAudioInAuto, ListAudioInsAutoFiltered, OpenAudioInProtocolSpecified
Closes #2874
2020-04-29 00:19:07 +10:00
ReinUsesLisp 6e79375f46 vk_rasterizer: Skip index buffer setup when vertices are zero
Xenoblade 2 invokes a draw call with zero vertices.
This is likely due to indirect drawing (glDrawArraysIndirect).

This causes a crash in the staging buffer pool when trying to create a
buffer with a size of zero. To workaround this, skip index buffer setup
entirely when the number of indices is zero.
2020-04-28 02:24:33 -03:00
ReinUsesLisp 8835d40024 {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
Drop MemoryBarrier from the buffer cache and use Maxwell3D's register
WaitForIdle.

To implement this on OpenGL we just call glMemoryBarrier with the
necessary bits.

Vulkan lacks this synchronization primitive, so we set an event and
immediately wait for it. This is not a pretty solution, but it's what
Vulkan can do without submitting the current command buffer to the queue
(which ends up being more expensive on the CPU).
2020-04-28 02:18:12 -03:00
Fernando Sahmkow 4c11487d1e VideoCore/GPU: Delegate subchannel engines to the dma pusher. 2020-04-27 22:07:21 -04:00
Fernando Sahmkow b916b58702 VideoCore/Engines: Refactor Engines CallMethod. 2020-04-27 21:47:58 -04:00
ReinUsesLisp b82e61dff0 maxwell_3d: Fix depth clamping register
Using deko3d as reference:
4e47ba0013/source/maxwell/gpu_3d_state.cpp (L42)

We were using bits 3 and 4 to determine depth clamping, but these are
the same both enabled and disabled:

state->depthClampEnable ? 0x101A : 0x181D

The same happens on Nvidia's OpenGL driver, where they do something like
this (default capabilities, GL 4.5 compatibility):

(state & DEPTH_CLAMP) != 0 ? 0x201a : 0x281c

There's always a difference between the first bits in this register, but
bit 11 is consistently disabled on both deko3d/NVN and OpenGL. This
commit changes yuzu's behaviour to use bit 11 to determine depth
clamping.

- Fixes depth issues on Super Mario Odyssey's intro.
2020-04-27 20:50:14 -03:00
bunnei 27dc83efa6 Merge pull request #3785 from ogniK5377/set-buffer-count-unit
vi: Don't let uninitialized data pass as a response for SetBufferCount
2020-04-27 17:10:28 -04:00
Fernando Sahmkow fe8ea9e0c9 Merge pull request #3766 from ReinUsesLisp/renderpass-cache-key
vk_renderpass_cache: Pack renderpass cache key and unify keys
2020-04-27 16:05:14 -04:00
Fernando Sahmkow 2043198e50 Merge pull request #3756 from ReinUsesLisp/integrated-devices
vk_memory_manager: Remove unified memory model flag
2020-04-27 16:04:22 -04:00
Mat M ba644d9560 Merge pull request #3797 from slashiee/hid-stub
services: hid: Stub StopSevenSixAxisSensor.
2020-04-27 15:37:08 -04:00
bunnei d952b2e1da Merge pull request #3742 from FernandoS27/command-list
Optimize GPU Command Lists and Introduce Fast GPU Time Option
2020-04-27 00:18:46 -04:00
ReinUsesLisp 8e3af5d3ca texture_cache: Reintroduce preserve_contents accurately
This reverts commit 1f1e80c67d.

preserve_contents proved to be a meaningful optimization. This commit
reintroduces it but properly implemented on OpenGL.

We have to make sure the clear removes all the previous contents of the
image.

It's not currently implemented on Vulkan because we can do smart things
there that's preferred to be introduced in a separate commit.
2020-04-26 19:53:02 -03:00
bunnei f5bd43b7f0 Merge pull request #3795 from vitor-k/fix-folder
Fix "Port citra-emu/citra#4956: "Fixes to game list sorting" #3611"
2020-04-26 13:55:26 -04:00
bunnei c9b8476b99 Merge pull request #3744 from lioncash/table2
service: Update function tables
2020-04-26 04:15:47 -04:00
Rodrigo Locatti 0f7a89c2ef Merge pull request #3753 from ReinUsesLisp/ac-vulkan
{gl,vk}_rasterizer: Add lazy default buffer maker and use it for empty buffers
2020-04-26 01:55:43 -03:00
ReinUsesLisp 9b433b2467 shader/memory_util: Deduplicate code
Deduplicate code shared between vk_pipeline_cache and gl_shader_cache as
well as shader decoder code.

While we are at it, fix a bug in gl_shader_cache where compute shaders
had an start offset of a stage shader.
2020-04-26 01:38:51 -03:00
bunnei ed2f950518 Merge pull request #3791 from Kewlan/hotkey-config-plus
configuration: Add Restore Default and Clear options to hotkeys
2020-04-26 00:33:08 -04:00
bunnei cc25a04993 Merge pull request #3761 from Kewlan/stick-modifier-slider
configure_input_player: Use slider to edit modifier scale
2020-04-25 22:55:41 -04:00
ReinUsesLisp 7442f21c5b shader/arithmetic_integer: Fix edge case and mark IADD.X Rd.CC as unimplemented
IADD.X Rd.CC requires some extra logic that is not currently
implemented. Abort when this is hit.
2020-04-25 22:58:33 -03:00
ReinUsesLisp 45cb8fc72a shader/arithmetic_integer: Change IAdd to UAdd to avoid signed overflow
Signed integer addition overflow might be undefined behavior. It's free
to change operations to UAdd and use unsigned integers to avoid
potential bugs.
2020-04-25 22:57:54 -03:00
ReinUsesLisp 6404cd824b shader/arithmetic_integer: Implement IADD.X
IADD.X takes the carry flag and adds it to the result. This is generally
used to emulate 64-bit operations with 32-bit registers.
2020-04-25 22:56:11 -03:00
ReinUsesLisp 7e8f51273c shader/arithmetic_integer: Implement CC for IADD 2020-04-25 22:55:26 -03:00
ReinUsesLisp 26dc95c7bc decode/register_set_predicate: Implement CC
P2R CC takes the state of condition codes and puts them into a register.
We already have this implemented for PR (predicates). This commit
implements CC over that.
2020-04-25 22:54:42 -03:00
ReinUsesLisp 491e2cbfd7 decode/register_set_predicate: Use move for shared pointers
Avoid atomic counters used by shared pointers.
2020-04-25 22:54:14 -03:00
M&M 381eed14f6 services: hid: Stub StopSevenSixAxisSensor.
- Used by The Legend of Zelda: Breath of the Wild v1.6.0
2020-04-25 15:38:56 -07:00
Vitor Kiguchi de072fd257 Fix the mistake in the port and update the comment for clarity 2020-04-25 15:01:20 -03:00
bunnei 6cd0fc2a95 Merge pull request #3721 from ReinUsesLisp/sort-devices
vulkan/wrapper: Sort physical devices
2020-04-25 03:27:40 -04:00
bunnei 05a54192f8 Merge pull request #3734 from ReinUsesLisp/half-float-mods
decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
2020-04-25 00:41:43 -04:00
bunnei 01c26ad131 Merge pull request #3780 from lioncash/process
svc: Re-add MapProcessCodeMemory/UnmapProcessCodeMemory
2020-04-24 23:22:26 -04:00
ReinUsesLisp 88a6c10687 vk_rasterizer: Pack texceptions and color formats on invalid formats
Sometimes for unknown reasons NVN games can bind a render target format
of 0. This may be a yuzu bug.

With the commits before this the formats were specified without being
"packed", assuming all formats and texceptions will be written like in
the color_attachments vector.

To address this issue, iterate all render targets and pack them as they
are valid. This way they will match color_attachments.

- Fixes validation errors and graphical issues on Breath of the Wild.
2020-04-24 22:21:29 -03:00
Kewlan 37b1427ea9 Add Restore Defaults and Clear options to hotkeys 2020-04-24 23:50:26 +02:00
bunnei d1294ad83b Merge pull request #3749 from ReinUsesLisp/lea-imm
shader/arithmetic_integer: Fix LEA_IMM encoding
2020-04-24 14:30:13 -04:00
Fernando Sahmkow b19e1d2c09 Revert: shader_decode: Fix LD, LDG when track constant buffer. 2020-04-24 11:00:54 -04:00
Markus Wick 1acd6b34e9 Fix -Wdeprecated-copy warning. 2020-04-24 09:33:04 +02:00
Markus Wick ac24f0506c Fix -Werror=conversion error. 2020-04-24 09:33:04 +02:00
David Marcec efe3e5c7c6 vi: Don't let uninitialized data pass as a response for SetBufferCount
Currently SetBufferCount doesn't write to the out buffer which then contains uninitialized data. This leads to non-zero data which leads to responding with different error codes
2020-04-24 17:24:58 +10:00
bunnei 957454cfa5 Merge pull request #3760 from Morph1984/trailing-filedir-separator
frontend/filesystem: Add a trailing separator to the string path
2020-04-24 01:44:32 -04:00
Lioncash dca9c90af3 physical_core: Make use of std::make_unique instead of std::make_shared in ctor
We can also allow unicorn to be constructed in 32-bit mode or 64-bit
mode to satisfy the need for both interpreter instances.

Allows this code to compile successfully of non x86-64 architectures.
2020-04-24 00:20:58 -04:00
Rodrigo Locatti 25bd2ba359 Merge pull request #3777 from lioncash/warn
page_table: Remove unused captures
2020-04-23 21:47:54 -03:00
Rodrigo Locatti eef3218a82 Merge pull request #3778 from lioncash/unused-var
svc: Remove unused variable
2020-04-23 21:47:24 -03:00
Lioncash 9a5a6ebe0a shared_memory: Amend doxygen reference
Amends the parameter to match the documentation reference.

Resolves a -Wdocumentation warning with clang.
2020-04-23 18:42:14 -04:00
Lioncash 224d3c6b9d svc: Re-add MapProcessCodeMemory/UnmapProcessCodeMemory
These were lost in the re-implementation of the virtual memory manager.
2020-04-23 18:12:04 -04:00
Lioncash 2fc4351547 svc: Remove unused variable
Since the VMM refactor, this is no longer used or needed.
2020-04-23 17:53:26 -04:00
Lioncash a881161d3c page_table: Remove unused captures
Any time the lambda function is called, the permission being used in the
capture would be passed in as an argument to the lambda, so the capture
is unnecessary.
2020-04-23 17:33:08 -04:00
ReinUsesLisp 3e808936a8 decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
The encoding for negation and absolute value was wrong.
Extracting is now done manually. Similar instructions having different
encodings is the rule, not the exception. To keep sanity and readability
I preferred to extract the desired bit manually.

This is implemented against nxas:
8dbc389957/table.h (L68)

That is itself tested against nvdisasm (Nvidia's official disassembler).
2020-04-23 18:29:38 -03:00
ReinUsesLisp 0034e6310d shader/texture: Support multiple unknown sampler properties
This allows deducing some properties from the texture instruction before
asking the runtime. By doing this we can handle type mismatches in some
instructions from the renderer instead of the shader decoder.

Fixes texelFetch issues with games using 2D texture instructions on a 1D
sampler.
2020-04-23 18:04:13 -03:00
ReinUsesLisp c9b4c56d69 shader_ir: Turn classes into data structures 2020-04-23 18:00:06 -03:00
ReinUsesLisp f78f26b75a vk_rasterizer: Fix framebuffer creation validation errors
Framebuffer creation was ignoring the number of color attachments.
2020-04-23 17:34:16 -03:00
ReinUsesLisp ab7eae6fff vk_pipeline_cache: Unify pipeline cache keys into a single operation
This allows us to call Common::CityHash and std::memcmp only once for
GraphicsPipelineCacheKey. While we are at it, do the same for compute.
2020-04-23 17:34:16 -03:00
ReinUsesLisp 7b76c67803 vk_renderpass_cache: Pack renderpass cache key to 12 bytes 2020-04-23 17:34:16 -03:00
Rodrigo Locatti d23435c112 Merge pull request #3768 from H27CK/cmd-title-fmt
Fix format error in performance statistics
2020-04-23 16:14:33 -03:00
bunnei da893629a0 kernel: memory: Improve implementation of device shared memory. (#3707)
* kernel: memory: Improve implementation of device shared memory.

* fixup! kernel: memory: Improve implementation of device shared memory.

* fixup! kernel: memory: Improve implementation of device shared memory.
2020-04-23 11:37:12 -04:00
Fernando Sahmkow 0cf32d6184 Clang Format. 2020-04-23 08:52:58 -04:00
Fernando Sahmkow c8f4549d43 GPU: Add Fast GPU Time Option. 2020-04-23 08:52:57 -04:00
Fernando Sahmkow 9311983f3d Maxwell3D: Process Macros on MultiMethod. 2020-04-23 08:52:56 -04:00
Fernando Sahmkow ef3a0ae64a DMAPusher: Propagate multimethod writes into the engines. 2020-04-23 08:52:55 -04:00
Ben Russell 616289e6b5 Update src/yuzu/main.cpp with missing const
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-04-23 13:10:06 +01:00
Ben Russell b14e413c35 Dump RomFS command to include Updates
Patch the RomFS with the selected updates before dumping. Previously the resulting RomFS only contained data from the original title.

To dump the RomFS without updates the user can disable the update under Properties before choosing Dump RomFS.
2020-04-23 13:06:18 +01:00
bunnei 7b07b97735 Merge pull request #3730 from lioncash/time
service/time: Remove reliance on the global system accessor
2020-04-23 02:41:38 -04:00
bunnei 9c753735c5 Merge pull request #3697 from lioncash/declarations
CMakeLists: Enable -Wmissing-declarations on Linux builds
2020-04-23 02:18:52 -04:00
Kewlan 0e86640777 Edit modifier_scale with the deadzone slider 2020-04-23 06:32:39 +02:00
H27CK dece9ce075 Fix format error in performance statistics
Formatting
2020-04-23 04:31:26 +02:00
bunnei c916ad62e7 Merge pull request #3677 from FernandoS27/better-sync
Introduce Predictive Flushing and Improve ASYNC GPU
2020-04-22 22:09:38 -04:00
Mat M dfd7bb2971 Merge pull request #3767 from ReinUsesLisp/point-size-pipeline
vk_pipeline_cache: Fix unintentional memcpy into optional
2020-04-22 21:20:14 -04:00
ReinUsesLisp 910decd9cb vk_pipeline_cache: Fix unintentional memcpy into optional
The intention behind this was to assign a float to from an uint32_t, but
it was unintentionally being copied directly into the std::optional.

Copy to a temporary and assign that temporary to std::optional. This can
be replaced with std::bit_cast<float> once we are in C++20.
2020-04-22 21:36:05 -03:00
Fernando Sahmkow e211e30093 GL_Fence_Manager: use GL_TIMEOUT_IGNORED instead of a loop, 2020-04-22 20:34:32 -04:00
bunnei a8a37d9d06 Merge pull request #3725 from MerryMage/fpcr
thread: FPCR.FZ is likely not 1 (and FPCR.RMode = TieAway and FPCR.DN = 0)
2020-04-22 19:49:13 -04:00
Fernando Sahmkow 19c4890fd0 Merge pull request #3763 from H27CK/vk-cmd
Add missing ;
2020-04-22 17:43:42 -04:00
H27CK bcfc119c3b Add missing ; 2020-04-22 23:36:21 +02:00
bunnei 0882be2275 Merge pull request #3758 from H27CK/vk-cmd
Introduce dummy context for yuzu-cmd VK support
2020-04-22 12:37:01 -04:00
Fernando Sahmkow 9fe7972120 Merge pull request #3653 from ReinUsesLisp/nsight-aftermath
renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
2020-04-22 11:39:01 -04:00
Fernando Sahmkow 02e55a28eb Address Feedback. 2020-04-22 11:36:27 -04:00
Fernando Sahmkow 491aea4a91 Async GPU: Correct flushing behavior to be similar to old async GPU behavior. 2020-04-22 11:36:26 -04:00
Fernando Sahmkow 64b69273f5 MaxwellDMA: Correct copying on accuracy level. 2020-04-22 11:36:25 -04:00
Fernando Sahmkow d9f1d5a4fd ShaderCache/PipelineCache: Cache null shaders. 2020-04-22 11:36:25 -04:00
Fernando Sahmkow ea522da8b5 Address Feedback. 2020-04-22 11:36:24 -04:00
Fernando Sahmkow ae2b3f2b64 Fix GCC error. 2020-04-22 11:36:23 -04:00
Fernando Sahmkow 38631f6cc3 Correct Linux Compile Error. 2020-04-22 11:36:22 -04:00
Fernando Sahmkow 7007675b65 Clang format. 2020-04-22 11:36:22 -04:00
Fernando Sahmkow bde001bbf6 QueryCache: Only do async flushes on async gpu. 2020-04-22 11:36:21 -04:00
Fernando Sahmkow 8aeb603988 Async GPU: Only do reactive flushing on Extreme Level. 2020-04-22 11:36:20 -04:00
ReinUsesLisp 0b9454849d vk_fence_manager: Initial implementation 2020-04-22 11:36:19 -04:00
Fernando Sahmkow 3769318042 QueryCache: Implement Async Flushes. 2020-04-22 11:36:18 -04:00
Fernando Sahmkow 1966f1d948 OpenGL: Guarantee writes to Buffers. 2020-04-22 11:36:18 -04:00
Fernando Sahmkow 7986c97ed2 GPU: Implement Flush Requests for Async mode. 2020-04-22 11:36:17 -04:00
Fernando Sahmkow af9f901764 FenceManager: Manage syncpoints and rename fences to semaphores. 2020-04-22 11:36:16 -04:00
Fernando Sahmkow 87ddc6a29f BufferCache: Refactor async managing. 2020-04-22 11:36:15 -04:00
Fernando Sahmkow 967f5cec17 FenceManager: Implement async buffer cache flushes on High settings 2020-04-22 11:36:15 -04:00
Fernando Sahmkow 6092308fe4 Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan. 2020-04-22 11:36:14 -04:00
Fernando Sahmkow 2ee68ad8e4 GPU: Fix rebase errors. 2020-04-22 11:36:13 -04:00
Fernando Sahmkow b2787048d1 Rasterizer: Disable fence managing in synchronous gpu. 2020-04-22 11:36:12 -04:00
Fernando Sahmkow e7195b5f87 ThreadManager: Sync async reads on accurate gpu. 2020-04-22 11:36:12 -04:00
Fernando Sahmkow 10dcdb2ed9 FenceManager: Implement should wait. 2020-04-22 11:36:11 -04:00
Fernando Sahmkow be8742e286 GPU: Implement a Fence Manager. 2020-04-22 11:36:10 -04:00
Fernando Sahmkow 802fabe3ab OpenGL: Implement Fencing backend. 2020-04-22 11:36:10 -04:00
Fernando Sahmkow 3d2b5222df TextureCache: Flush linear textures after finishing rendering. 2020-04-22 11:36:09 -04:00
Fernando Sahmkow fda21f5a93 GPU: Delay Fences. 2020-04-22 11:36:08 -04:00
Fernando Sahmkow de53bc96c0 BufferCache: Implement OnCPUWrite and SyncGuestHost 2020-04-22 11:36:07 -04:00
Fernando Sahmkow c689dc6804 GPU: Refactor synchronization on Async GPU 2020-04-22 11:36:06 -04:00
Fernando Sahmkow 0a62525e65 Texture Cache: Implement OnCPUWrite and SyncGuestHost 2020-04-22 11:36:05 -04:00
Fernando Sahmkow c213fd218b UI: Replasce accurate GPU option for GPU Accuracy Level 2020-04-22 11:36:04 -04:00
Morph a96e7a02ee Add a trailing separator to the string path
Fixes #3643
2020-04-22 07:33:14 -04:00
H27CK 112337e740 Init SDL info structure and add dummy context 2020-04-22 07:47:21 +02:00
bunnei 4df0d483c4 Merge pull request #3699 from FearlessTobi/port-5185
Port citra-emu/citra#5185: "gdbstub: Fix some gdbstub jankiness"
2020-04-21 22:26:10 -04:00
ReinUsesLisp 88b092e717 vk_memory_manager: Remove unified memory model flag
All drivers (even Intel) seem to have a device local memory type that is
not host visible. Remove this flag so all devices follow the same path.

This fixes a crash when trying to map to host device local memory on
integrated devices.
2020-04-21 22:06:38 -03:00
bunnei e1fd985d73 Merge pull request #3714 from lioncash/copies
gl_shader_decompiler: Avoid copies where applicable
2020-04-21 20:16:02 -04:00
bunnei 0ff5fd28d6 Merge pull request #3745 from bunnei/fix-homebrew-load
Fix process memory initialization for ELF and NRO
2020-04-21 18:59:16 -04:00
ReinUsesLisp 00bef5d0d3 vk_rasterizer: Add lazy default buffer maker and use it for empty buffers
Introduce a default buffer getter that lazily constructs an empty
buffer. This is intended to match OpenGL's buffer 0.

Use this for disabled vertex and uniform buffers.

While we are at it, include vertex buffer usages for staging buffers to
silence validation errors.
2020-04-21 19:55:52 -03:00
ReinUsesLisp b33a0c0d5f gl_rasterizer: Fix buffers without size
On NVN buffers can be enabled but have no size. According to deko3d and
the behavior we see in Animal Crossing: New Horizons these buffers get
the special address of 0x1000 and limit themselves to 0xfff.

Implement buffers without a size by binding a null buffer to OpenGL
without a side.

1d1930beea/source/maxwell/gpu_3d_vbo.cpp (L62-L63)
2020-04-21 19:55:44 -03:00
Rodrigo Locatti 89ba13c7d2 Merge pull request #3718 from ReinUsesLisp/better-pipeline-state
fixed_pipeline_state: Pack structure, use memcmp and CityHash on it
2020-04-21 18:17:58 -03:00
bunnei 4d282dce35 Merge pull request #3698 from lioncash/warning
General: Resolve minor assorted warnings
2020-04-21 14:11:18 -04:00
bunnei 9e478ddcec Merge pull request #3724 from bunnei/fix-unicorn
core: arm_unicorn: Fix interpret fallback by temporarily mapping instruction page.
2020-04-20 23:28:23 -04:00
David c95dd42b72 audio_renderer: Preliminary BehaviorInfo (#3736)
* audio_renderer: Preliminary BehaviorInfo

* clang format

* Fixed IsRevisionSupported

* fixed IsValidRevision

* Fixed logic error & spelling errors & crash

* Addressed issues
2020-04-20 22:57:30 -04:00
bunnei 0c9e8b581e Merge pull request #3695 from ReinUsesLisp/default-attributes
maxwell_3d: Initialize format attributes constant as one
2020-04-20 21:40:18 -04:00
ReinUsesLisp 6da525c8d2 shader/arithmetic_integer: Fix LEA_IMM encoding
The operand order in LEA_IMM was flipped compared to nvdisasm. Fix that
using nxas as reference:

8dbc389957/table.h (L122)
2020-04-20 21:54:59 -03:00
Mat M fe0364e257 Merge pull request #3733 from ambasta/patch-2
Initialize quad_indexed_pass before uint8_pass
2020-04-20 20:36:46 -04:00
bunnei 405c9b15c9 loader: nro: Fix process initialization using ProgramMetadata default. 2020-04-20 18:19:45 -04:00
bunnei 8ef209a529 loader: elf: Fix process initialization using ProgramMetadata default. 2020-04-20 18:19:45 -04:00
bunnei 4dbf21a6cf file_sys: program_metadata: Add a helper function for generating reasonable default metadata.
- We need this for homebrew process initialization.
2020-04-20 18:19:45 -04:00
Lioncash d73e0ef309 service: Update function tables
Keeps the service function tables up to date.

Updated based off information on SwitchBrew.
2020-04-20 15:53:49 -04:00
Mat M 70d6c5b246 Merge pull request #3739 from MerryMage/disable_cpu_opt
dynarmic: Add option to disable CPU JIT optimizations
2020-04-20 14:19:18 -04:00
FearlessTobi 45243e63d8 npad: Lower log level for VibrateController to Debug 2020-04-20 18:44:57 +02:00
FearlessTobi f1135379fd audren: Lower log level for RequestUpdateImpl to Debug 2020-04-20 18:44:41 +02:00
Fernando Sahmkow 555a1273c9 Merge pull request #3700 from ReinUsesLisp/stream-buffer-sizes
vk_stream_buffer: Fix out of memory on boot on recent Nvidia drivers
2020-04-20 09:37:42 -04:00
MerryMage 0bbafff3db dynarmic: Add option to disable CPU JIT optimizations 2020-04-20 13:36:26 +01:00
bunnei 2f257f51a9 Merge pull request #3712 from lioncash/remove
service: Remove unused RequestParser instances
2020-04-20 01:04:04 -04:00
bunnei 42f889f2a2 Merge pull request #3709 from lioncash/am
am: Resolve ineffective moves
2020-04-20 00:15:00 -04:00
FearlessTobi 1a242a4ac7 yuzu: Option to hide mouse on inactivity
Co-Authored-By: Vitor K <vitor-k@users.noreply.github.com>
2020-04-20 04:21:58 +02:00
Amit Prakash Ambasta 7915dc7ac9 Initialize quad_indexed_pass before uint8_pass
Fixes Werror=reorder in gcc
2020-04-20 04:53:52 +05:30
Rodrigo Locatti f6d7a8dab7 Merge pull request #3729 from lioncash/globals
dma_pusher: Remove reliance on the global system instance
2020-04-19 19:12:40 -03:00
bunnei a39273cb95 Merge pull request #3694 from ReinUsesLisp/indexed-quads
vk_compute_pass: Implement indexed quads
2020-04-19 16:52:40 -04:00
Lioncash 8bcb8b177c service/time: Remove reliance on the global system accessor
Eliminates usages of the global system accessor and instead passes the
existing system instance into the interfaces.
2020-04-19 16:31:28 -04:00
Lioncash 8a37c63b9e dma_pusher: Remove reliance on the global system instance
With this, the video core is now has no calls to the global system
instance at all.
2020-04-19 16:12:08 -04:00
bunnei 67cb130051 Merge pull request #3686 from lioncash/table
texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
2020-04-19 15:33:33 -04:00
bunnei 2aacd00137 Merge pull request #3696 from lioncash/cast-size
hle_ipc: Remove std::size_t casts where applicable
2020-04-19 14:24:15 -04:00
MerryMage 5451c81b74 thread: FPCR.FZ is likely not 1 2020-04-19 08:37:20 +01:00
bunnei 7892effd22 Merge pull request #3655 from FearlessTobi/ui-retext-yuzu
yuzu/main: Add better popup texts and remove duplicated actions
2020-04-19 02:16:50 -04:00
bunnei 5122792d3f Merge pull request #3679 from lioncash/track
track: Eliminate redundant copies
2020-04-19 01:22:47 -04:00
bunnei 5ce3dc16a5 core: arm_unicorn: Fix interpret fallback by temporarily mapping instruction page. 2020-04-19 00:53:23 -04:00
Jan Beich cc5e71c5ad renderer_vulkan: assume X11 if not Windows/macOS after 30bbdc653c
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateInstance:131: Presentation not supported on this platform
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateSurface:378: Presentation not supported on this platform
Core <Critical> core/core.cpp:Load:199: Failed to initialize system (Error 5)!
2020-04-19 00:32:23 +00:00
ReinUsesLisp fcbe714435 vulkan/wrapper: Sort physical devices
Sort discrete GPUs over the rest, Nvidia over AMD, AMD over Intel, Intel
over the rest. This gives us a somewhat consistent order when Optimus
is removed (renderdoc does this when it's attached).

This can break the configuration of users with an Intel GPU that
manually remove Optimus on yuzu. That said, it's a very unlikely to
happen.
2020-04-18 21:31:15 -03:00
ReinUsesLisp 98266da47c fixed_pipeline_state: Hash and compare the whole structure
Pad FixedPipelineState's size to 384 bytes to be a multiple of 16.

Compare the whole struct with std::memcmp and hash with CityHash. Using
CityHash instead of a naive hash should reduce the number of collisions.
Improve used type traits to ensure this operation is safe.

With these changes the improvements to the hashable pipeline state are:

Optimized structure
Hash:            89 ns
Comparison:     103 ns
Construction*:  164 ns
Struct size:    384 bytes

Original structure
Hash:           148 ns
Equal:          174 ns
Construction*:  281 ns
Size:          1384 bytes

* Attribute state initialization is not measured

These measures are averages taken with std::chrono::high_accuracy_clock
on MSVC shipped on Visual Studio 16.6.0 Preview 2.1.
2020-04-18 19:57:26 -03:00
ReinUsesLisp 89c816a3cf fixed_pipeline_state: Pack blending state
Reduce FixedPipelineState's size to 364 bytes.
2020-04-18 19:23:35 -03:00
ReinUsesLisp d74b3a5a50 fixed_pipeline_state: Pack rasterizer state
Reduce FixedPipelineState's size to 600 bytes.
2020-04-18 19:22:57 -03:00
ReinUsesLisp cc6af27ae7 fixed_pipeline_state: Pack depth stencil state
Reduce FixedPipelineState's size to 632 bytes.
2020-04-18 19:22:11 -03:00
ReinUsesLisp fd2f04bbdc fixed_pipeline_state: Pack attribute state
Reduce FixedPipelineState's size from 1384 to 664 bytes
2020-04-18 19:21:19 -03:00
Mat M 63fb1421a5 Merge pull request #3716 from bunnei/fix-another-impl-fallthrough
video_core: gl_shader_decompiler: Fix implicit fallthrough errors.
2020-04-18 15:17:52 -04:00
bunnei 6613cbfc35 video_core: gl_shader_decompiler: Fix implicit fallthrough errors. 2020-04-18 15:15:21 -04:00
bunnei 610f78e1eb Merge pull request #3710 from lioncash/nso
loader/nso: Resolve moves not occurring in DecompressSegment
2020-04-18 14:44:42 -04:00
Mat M fb321bdb18 Merge pull request #3715 from bunnei/fix-impl-fallthrough
service: hid: npad: Fix implicit fallthrough errors.
2020-04-18 14:44:20 -04:00
bunnei f220140e8a service: hid: npad: Fix implicit fallthrough errors. 2020-04-18 14:41:08 -04:00
bunnei 32fd01e339 Merge pull request #3713 from lioncash/time
service/time: Minor changes
2020-04-17 21:04:43 -04:00
bunnei 8044966cf4 Merge pull request #3711 from lioncash/cast
memory/slab_heap: Make use of static_cast over reinterpret_cast
2020-04-17 21:04:11 -04:00
Lioncash e302cb8c36 gl_shader_decompiler: Avoid copies where applicable
Avoids unnecessary reference count increments where applicable and also
avoids reallocating a vector.

Unlikely to make a huge difference, but given how trivial of an
amendment it is, why not?
2020-04-17 20:48:52 -04:00
Lioncash de87fe690e time/system_clock_core: Remove unnecessary initializer
This is already initialized within the class body.
2020-04-17 20:04:06 -04:00
Lioncash 8c0589239b service/time: Mark IsStandardNetworkSystemClockAccuracySufficient as const
This doesn't modify internal member state.
2020-04-17 20:02:45 -04:00
Lioncash 30af9f0d5c service/time: Add virtual destructors where applicable
Many of these implementations are used to implement a polymorphic
interface. While not directly used polymorphically, this prevents
virtual destruction from ever becoming an issue.
2020-04-17 19:59:31 -04:00
Lioncash 5f25db88b1 service: Remove unused RequestParser instances
These aren't used, so they should be removed to reduce compilation
warnings.
2020-04-17 19:47:43 -04:00
bunnei 9611466c66 Merge pull request #3630 from benru/open-windows-network-files
common/file_util: Allow access to files on network shares
2020-04-17 19:47:11 -04:00
Lioncash ac3ff8c9ba memory/slab_heap: Make use of static_cast over reinterpret_cast
Casting from void* with static_cast is permitted by the standard, so we
can just make use of that instead.
2020-04-17 19:38:59 -04:00
Lioncash d0569a0865 loader/nso: Resolve moves not occurring in DecompressSegment
Given the std::vector was const, an automatic move out of the function
could not occur.

We can allow automatic return value optimizations to occur by making the
buffer non-const.
2020-04-17 19:26:50 -04:00
Lioncash 972240e94a am: Resolve ineffective moves
Previously const objects were being std::moved, which results in no move
actually occurring. This resolves that.
2020-04-17 19:22:46 -04:00
Markus Wick d8d02fa184 video_code: Fix implicit switch fallthrough.
Since yesterday, this breaks the build on linux.
So let's fix it.
2020-04-17 23:43:35 +02:00
ReinUsesLisp 153845bba3 vk_stream_buffer: Fix out of memory on boot on recent Nvidia drivers
Nvidia recently introduced a new memory type for data streaming
(awesome!), but yuzu was assuming that all heaps had enough memory
for the assumed stream buffer size (256 MiB).

This worked fine on AMD but Nvidia's new memory heap was smaller than
256 MiB. This commit changes this assumption and allocates a bit less
than the size of the preferred heap, with a maximum of 256 MiB (to avoid
allocating all system memory on integrated devices).

- Fixes a crash on NVIDIA 450.82.0.0
2020-04-17 18:12:48 -03:00
Fernando Sahmkow 74ce229ca5 Merge pull request #3703 from yuzu-emu/revert-3656-glsl-full-decompile
Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL"
2020-04-17 17:08:41 -04:00
Fernando Sahmkow c2bd9f729c Merge pull request #3672 from lioncash/null
file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
2020-04-17 17:02:35 -04:00
Rodrigo Locatti aed8e57a1b Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL" 2020-04-17 17:41:48 -03:00
bunnei 66cb8ee64f Merge pull request #3666 from bunnei/new-vmm
Implement a new virtual memory manager
2020-04-17 16:33:08 -04:00
bunnei d392c4e552 Merge pull request #3682 from lioncash/uam
gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
2020-04-17 01:24:08 -04:00
bunnei 4cdbd44f51 core: hle: Address various feedback & code cleanup.
- Should be no functional changes.
2020-04-17 00:59:36 -04:00
bunnei 2e718b26c8 core: device_memory: Remove incorrect usage of constexpr. 2020-04-17 00:59:36 -04:00
bunnei bdf7501e7b memory: Add copyright notice for Atmosphere where applicable. 2020-04-17 00:59:35 -04:00
bunnei 0cf0195874 kernel: Remove old VMManager class. 2020-04-17 00:59:35 -04:00
bunnei a48860f7ba loader: nso: Fix loader size and arguments. 2020-04-17 00:59:35 -04:00
bunnei 9b2526392a loader: elf/kip/nro: Updates for new VMM. 2020-04-17 00:59:35 -04:00
bunnei 0707404f34 service: ldr: Updates for new VMM.
- Includes removing some service impls. that are untested.
2020-04-17 00:59:35 -04:00
bunnei 27b5b6c36f kernel: memory: page_table: Simplify GetPhysicalAddr impl. 2020-04-17 00:59:35 -04:00
bunnei 6b40850b9a kernel: svc: Updates for new VMM.
- Includes removing some SVC impls. that are untested.
2020-04-17 00:59:34 -04:00
bunnei 8a67b3058e core: memory: Fix memory access on page boundaries.
- Fixes Super Smash Bros. Ultimate.
2020-04-17 00:59:34 -04:00
bunnei 5a461a7482 video_core: memory_manager: Updates for Common::PageTable changes. 2020-04-17 00:59:34 -04:00
bunnei 43321c1a69 core: memory: Updates for new VMM. 2020-04-17 00:59:34 -04:00
bunnei 08445bbd37 common: page_table: Update to use VirtualBuffer and simplify. 2020-04-17 00:59:34 -04:00
bunnei b592621ffe core: gdbstub: Updates for new VMM. 2020-04-17 00:59:34 -04:00
bunnei 93828bffc2 core: reporter: Updates for new VMM. 2020-04-17 00:59:33 -04:00
bunnei 88324e3513 memory: cheat_engine: Updates for new VMM. 2020-04-17 00:59:33 -04:00
bunnei 27ec77ef89 arm_test_common: Updates for new VMM. 2020-04-17 00:59:33 -04:00
bunnei 5fd6e219ea kernel: process: Updates for new VMM. 2020-04-17 00:59:33 -04:00
bunnei 7e1001c2d3 service: pl_u: Update for new shared memory layout. 2020-04-17 00:59:33 -04:00
bunnei 38b51e2ffe service: time: Update for new shared memory layout. 2020-04-17 00:59:33 -04:00
bunnei 410667d72a service: hid: Update for new shared memory layout. 2020-04-17 00:59:33 -04:00
bunnei 6d110ee83c service: irs: Update for new shared memory layout. 2020-04-17 00:59:32 -04:00
bunnei 15e751e36c kernel: resource_limit: Reserve physical memory. 2020-04-17 00:59:32 -04:00
bunnei 76a040f50d kernel: Initialize memory layout for new VMM. 2020-04-17 00:59:32 -04:00
bunnei 769f8cbf79 core: system: Rename GetDeviceManager -> DeviceManager.
- More consistent with other system components.
2020-04-17 00:59:32 -04:00
bunnei d04147e731 kernel: transfer_memory: Refactor for new VMM. 2020-04-17 00:59:32 -04:00
bunnei 89776f7ef7 core: Construct/Destruct DeviceMemory on Init/Shutdown. 2020-04-17 00:59:32 -04:00
bunnei 9edd67f475 kernel: shared_memory: Refactor for new VMM. 2020-04-17 00:59:32 -04:00
bunnei 5b2cf55742 core: device_memory: Update to use VirtualBuffer class. 2020-04-17 00:59:31 -04:00
bunnei 273f8b5fc7 common: Add VirtualBuffer class, to abstract memory virtualization. 2020-04-17 00:59:31 -04:00
bunnei 6ef844fab3 kernel: errors: Add ERR_OUT_OF_RESOURCES. 2020-04-17 00:59:31 -04:00
bunnei 1717cdf811 kernel: process_capability: Update to use Memory::PageTable. 2020-04-17 00:59:31 -04:00
bunnei 6fe68ddea2 kernel: memory: Add PageTable class, to manage process address space. 2020-04-17 00:59:31 -04:00
bunnei ea8bc8e759 kernel: memory: Add MemoryLayout class, to build physical memory layout. 2020-04-17 00:59:31 -04:00
bunnei 9b912d155a kernel: memory: Add MemoryManager class, to manage page heaps. 2020-04-17 00:59:30 -04:00
bunnei 227e9ac5d7 kernel: memory: Add MemoryBlockManager class, to manage memory blocks. 2020-04-17 00:59:30 -04:00
bunnei 036f2f9176 kernel: memory: Add PageHeap class, to manage a heap of pages. 2020-04-17 00:59:30 -04:00
bunnei b013b110bc kernel: memory: Add PageLinkedList class, to manage a list of pages. 2020-04-17 00:59:30 -04:00
bunnei b94f043b7b kernel: memory: Add system_control code, which will be used for ASLR support. 2020-04-17 00:59:30 -04:00
bunnei 72d1cda09a physical_memory: Add missing include for <vector>. 2020-04-17 00:59:30 -04:00
bunnei 91a38e3fa8 kernel: memory: Add MemoryBlock class, for managing memory blocks and their state. 2020-04-17 00:59:29 -04:00
bunnei eadd36d143 kernel: memory: Add memory_types.h, for things that are commonly used in memory code. 2020-04-17 00:59:29 -04:00
bunnei 91b899ff00 kernel: memory: Add SlabHeap class, for managing memory heaps.
- This will be used for TLS pages, among other things.
2020-04-17 00:59:29 -04:00
bunnei 9fd238a0f8 kernel: memory: Add AddressSpaceInfo class, for managing the memory address space. 2020-04-17 00:59:29 -04:00
bunnei ea806268fa core: device_manager: Add a simple class to manage device RAM. 2020-04-17 00:59:29 -04:00
bunnei a7b2390b73 dynarmic: Enable strict alignment checks.
- Also add a missing include.
2020-04-17 00:59:29 -04:00
bunnei b2b0f85b7d common: scope_exit: Implement mechanism for canceling a scope exit. 2020-04-17 00:59:28 -04:00
bunnei 5b9e69e7fe core: memory: Move to Core::Memory namespace.
- helpful to disambiguate Kernel::Memory namespace.
2020-04-17 00:59:28 -04:00
bunnei 94e00fbb3f common: alignment: Add a helper function for generic alignment checking. 2020-04-17 00:59:28 -04:00
bunnei a10f82b62d core: kernel: Add svc_types header to include SVC-specific types. 2020-04-17 00:59:28 -04:00
bunnei ed940661a8 core: kernel: Move SVC to its own namesapce. 2020-04-17 00:59:28 -04:00
bunnei bdd81bdebf kernel: resource_limit: Improvements to implementation. 2020-04-17 00:59:27 -04:00
bunnei 9006c82b27 loader: nso: Fix loading of static objects to be properly sized and aligned. 2020-04-17 00:59:27 -04:00
bunnei f9a8cc03c3 common: common_funcs: Add a macro for defining enum flag operators. 2020-04-17 00:59:27 -04:00
bunnei 365f14cd2c process: SetupMainThread: Zero out argument on process start. 2020-04-17 00:11:50 -04:00
bunnei 1be8e24189 arm_interface: Ensure ThreadContext is zero'd out. 2020-04-17 00:11:50 -04:00
Lioncash b5c04e2bca CMakeLists: Make missing declarations a compile-time error
Ensures that our code always has its linkage explicit.
2020-04-16 23:43:41 -04:00
Lioncash eaeb4520f7 General: Resolve warnings related to missing declarations 2020-04-16 23:43:34 -04:00
MerryMage b3a0ce058f gdbstub: Fix some gdbstub jankiness
1. Ensure that register information available to gdbstub is most up-to-date.
2. There's no reason to check for current_thread == thread when emitting a trap.
   Doing this results in random hangs whenever a step happens upon a thread switch.
2020-04-17 05:41:43 +02:00
bunnei f0b4b5be4c Merge pull request #3671 from lioncash/switch
kernel/thread: Resolve -Wswitch warnings
2020-04-16 23:30:32 -04:00
Lioncash 3c70e27d64 key_manager: Resolve missing field initializer warning 2020-04-16 22:45:44 -04:00
Lioncash 5eae660cba decode/memory: Resolve unused variable warning
Only the first element of the returned pair is ever used.
2020-04-16 22:45:44 -04:00
Lioncash ade1bb1e95 decode/texture: Resolve unused variable warnings.
Some variables aren't used, so we can remove these.

Unfortunately, diagnostics are still reported on structured bindings
even when annotated with [[maybe_unused]], so we need to unpack the
elements that we want to use manually.
2020-04-16 22:45:41 -04:00
Lioncash ef5b809b0d decode/texture: Collapse loop down into std::generate
Same behavior, less code.
2020-04-16 22:29:07 -04:00
Lioncash e50ca6a64f decode/texture: Eliminate trivial missing field initializer warnings
We can just specify the initializers.
2020-04-16 22:27:21 -04:00
Lioncash bcc5066cfe time_zone_manager: Resolve sign conversion warnings
ttis and ats will never exceed the length of INT32_MAX in our case, so
this is safe.
2020-04-16 22:23:59 -04:00
Lioncash 09eb6f9991 CMakeLists: Enable -Wmissing-declarations on Linux builds
Allows catching cases where internal linkage isn't specified for helper
functions when they should be marked as such.
2020-04-16 22:07:16 -04:00
Lioncash f8fe53c9f9 hle_ipc: Remove std::size_t casts where applicable
These were added in the change that enabled -Wextra on linux builds so
as not to introduce interface changes in the same change as a
build-system flag addition.

Now that the flags are enabled, we can freely change the interface to
make these unnecessary.
2020-04-16 22:02:10 -04:00
bunnei 7a4ed2581d Merge pull request #3673 from lioncash/extra
CMakeLists: Specify -Wextra on linux builds
2020-04-16 21:12:33 -04:00
ReinUsesLisp 4ef04832a8 maxwell_3d: Initialize format attributes constant as one
nouveau expects this to be true but it doesn't set it.
2020-04-16 21:15:07 -03:00
ReinUsesLisp 14ab5c4b65 vk_compute_pass: Implement indexed quads
Implement indexed quads (GL_QUADS used with glDrawElements*) with a
compute pass conversion.

The compute shader converts from uint8/uint16/uint32 indices to uint32.
The format is passed through push constants to avoid having different
variants of the same shader.

- Used by Fast RMX
- Used by Xenoblade Chronicles 2 (it still has graphical due to
synchronization issues on Vulkan)
2020-04-16 21:12:32 -03:00
Fernando Sahmkow 7a9b83b658 Merge pull request #3600 from ReinUsesLisp/no-pointer-buf-cache
buffer_cache: Return handles instead of pointer to handles
2020-04-16 19:58:13 -04:00
Markus Wick 3567e464d2 externals: Move LibreSSL linking to httplib.
Neither core nor web_services use OpenSSL nor LibreSSL.
However they need to link them as it's a requirement of httplib.
So let's declare this within httplib instead of core and web_services.
2020-04-16 16:46:33 +02:00
Markus Wick ea1146eba0 input_common: Use the CMake target instead of the variable. 2020-04-16 16:42:59 +02:00
Rodrigo Locatti 50a1a6e6a9 Merge pull request #3659 from bunnei/time-calc-standard-user
service: time: Implement CalculateStandardUserSystemClockDifferenceByUser.
2020-04-16 02:51:57 -03:00
ReinUsesLisp c1ad40a3cb buffer_cache: Return handles instead of pointer to handles
The original idea of returning pointers is that handles can be moved.
The problem is that the implementation didn't take that in mind and made
everything harder to work with. This commit drops pointer to handles and
returns the handles themselves. While it is still true that handles can
be invalidated, this way we get an old handle instead of a dangling
pointer.

This problem can be solved in the future with sparse buffers.
2020-04-16 02:33:34 -03:00
Rodrigo Locatti 35686128d2 Merge pull request #3689 from lioncash/unused-var
decode/shift: Remove unused variable within Shift()
2020-04-16 02:05:54 -03:00
Rodrigo Locatti 8f0f9da12b Merge pull request #3688 from lioncash/nequal
surface_view: Add missing operator!= to ViewParams
2020-04-16 01:39:51 -03:00
Rodrigo Locatti 151a4e5a7d Merge pull request #3680 from lioncash/static
gl_device: Mark stage_swizzle as constexpr
2020-04-16 01:26:23 -03:00
Rodrigo Locatti e63ea9ed26 Merge pull request #3687 from lioncash/constness
surface_base: Make IsInside() a const member function
2020-04-16 01:22:50 -03:00
Rodrigo Locatti f43b6f7ebe Merge pull request #3685 from lioncash/copies
control_flow: Make use of std::move in TryInspectAddress()
2020-04-16 01:22:40 -03:00
Lioncash 3e1772a6af decode/shift: Remove unused variable within Shift()
Removes a redundant variable that is already satisfied by the IsFull()
utility function.
2020-04-16 00:16:06 -04:00
Lioncash adae1cbaeb surface_view: Add missing operator!= to ViewParams
Provides logical symmetry to the interface.
2020-04-16 00:03:12 -04:00
Lioncash 4ce2aaa9d2 surface_base: Make IsInside() a const member function
This doesn't modify internal state, so this can be made const.
2020-04-15 23:59:35 -04:00
bunnei 8b21c8e59a Merge pull request #3683 from lioncash/docs
video_core: Amend doxygen comment references
2020-04-15 23:54:58 -04:00
Lioncash 61329ad0be texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
Previously these were all using the red component to derive the indices,
which is definitely not intentional.
2020-04-15 23:50:46 -04:00
Lioncash 38b955a3ff control_flow: Make use of std::move in TryInspectAddress()
Eliminates redundant atomic reference count increments and decrements.
2020-04-15 23:31:22 -04:00
Lioncash 3c3928a5f7 video_core: Amend doxygen comment references
Fixes broken documentation references.
2020-04-15 22:33:29 -04:00
Lioncash 32069ff923 decode/image: Fix typo in assert in GetComponentSize() 2020-04-15 22:29:51 -04:00
Lioncash 5e32ba4080 gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
Avoids potential invalid junk data from being read.
2020-04-15 22:20:06 -04:00
Lioncash b4b58a359b decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()
The components' sizes were mismatched. This corrects that.
2020-04-15 22:10:44 -04:00
Lioncash 4efb85bb2e gl_device: Mark stage_swizzle as constexpr
Previously this was mutable even though it shouldn't be.
2020-04-15 21:59:13 -04:00
Lioncash 7ff67fc798 track: Eliminate redundant copies
Two variables can be references, while two others can be std::moved.
Makes for 4 less atomic reference count increments and decrements.
2020-04-15 21:50:09 -04:00
Lioncash 02e095313a CMakeLists: Specify -Wextra on linux builds
Allows reporting more cases where logic errors may exist, such as
implicit fallthrough cases, etc.

We currently ignore unused parameters, since we currently have many
cases where this is intentional (virtual interfaces).

While we're at it, we can also tidy up any existing code that causes
warnings. This also uncovered a few bugs as well.
2020-04-15 21:33:46 -04:00
Rodrigo Locatti 45b5676187 Merge pull request #3649 from FernandoS27/3d-fix
Texture Cache: Read current data when flushing a 3D segment.
2020-04-15 17:06:55 -03:00
Fernando Sahmkow d06795c08a Merge pull request #3612 from ReinUsesLisp/red
shader/memory: Implement RED.E.ADD and minor changes to ATOM
2020-04-15 15:03:49 -04:00
Lioncash 77b0e8a37d file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
It's undefined behavior to pass a null pointer to std::fread and
std::fwrite, even if the length passed in is zero, so we must perform
the precondition checking ourselves.

A common case where this can occur is when passing in the data of an
empty std::vector and size, as an empty vector will typically have a
null internal buffer.

While we're at it, we can move the implementation out of line and add
debug checks against passing in nullptr to std::fread and std::fwrite.
2020-04-15 14:43:37 -04:00
Lioncash 6ea751d910 CMakeLists: Make -Wreorder a compile-time error
This can result in silent logic bugs within code, and given the amount
of times these kind of warnings are caused, they should be flagged at
compile-time so no new code is submitted with them.
2020-04-15 14:14:41 -04:00
Lioncash 0f32ae2140 kernel/thread: Resolve -Wswitch warnings 2020-04-15 13:48:14 -04:00
Mat M ee439fb0fc Merge pull request #3662 from ReinUsesLisp/constant-attrs
gl_rasterizer: Implement constant vertex attributes
2020-04-15 11:54:50 -04:00
Fernando Sahmkow 09ba659a78 Texture Cache: Read current data when flushing a 3D segment.
This PR corrects flushing of 3D segments when data of other segments is
mixed, this aims to preserve the data in place.
2020-04-15 11:46:17 -04:00
Mat M 077ffb29fd Merge pull request #3668 from ReinUsesLisp/vtx-format-16ui
maxwell_to_vk: Add uint16 vertex formats
2020-04-15 11:43:52 -04:00
Mat M 49ce503b37 Merge pull request #3656 from ReinUsesLisp/glsl-full-decompile
gl_shader_cache: Use CompileDepth::FullDecompile on GLSL
2020-04-15 03:17:46 -04:00
Mat M 650a97d635 Merge pull request #3654 from ReinUsesLisp/fix-fb-attach
gl_texture_cache: Fix layered texture attachment base level
2020-04-15 03:17:18 -04:00
Mat M daa5388d9d Merge pull request #3663 from ReinUsesLisp/fcmp-rc
shader/arithmetic: Add FCMP_CR variant
2020-04-15 03:16:56 -04:00
Mat M c9a10a9698 Merge pull request #3664 from ReinUsesLisp/fe3h-black-squares
Revert "gl_shader_decompiler: Implement merges with bitfieldInsert"
2020-04-15 03:14:28 -04:00
ReinUsesLisp 9db905ec1d maxwell_to_vk: Add uint16 vertex formats 2020-04-15 04:06:30 -03:00
ReinUsesLisp f643910f7b maxwell_to_vk: Add missing breaks
Avoid invalid fallbacks.
2020-04-15 04:05:33 -03:00
ReinUsesLisp ffc83d1a57 vk_blit_screen: Initialize all members in VkPipelineViewportStateCreateInfo
When the dynamic state is specified, pViewports and pScissors are
ignored, quoting the specification:

  pViewports is a pointer to an array of VkViewport structures, defining
  the viewport transforms. If the viewport state is dynamic, this member
  is ignored.

That said, AMD's proprietary driver itself seem to read it regardless of
what the specification says.
2020-04-15 03:30:08 -03:00
Rodrigo Locatti 3fad4fea35 Merge pull request #3657 from ReinUsesLisp/viewport-zero
vk_rasterizer: Default to 1 viewports with a size of 0
2020-04-15 01:51:17 -03:00
Fernando Sahmkow 52144a9a23 Texture Cache: Only do buffer copies on accurate GPU. (#3634)
This is a simple optimization as Buffer Copies are mostly used for texture recycling. They are, however, useful when games abuse undefined behavior but most 3D APIs forbid it.
2020-04-14 23:21:00 -04:00
bunnei ba413f9277 service: time: Implement CalculateStandardUserSystemClockDifferenceByUser.
- Used by Animal Crossing: New Horizons.
2020-04-14 22:28:41 -04:00
ReinUsesLisp f5a23c9bb3 Revert "gl_shader_decompiler: Implement merges with bitfieldInsert"
This reverts commit ff90ce2ed6.

Apparently the first approach using floats instead of bitfieldInert
worked better for Fire Emblem: Three Houses. Reverting to get that
behavior back.
2020-04-14 21:24:33 -03:00
ReinUsesLisp ffceca76c9 shader/arithmetic: Add FCMP_CR variant
Adds another variant of FCMP.
2020-04-14 19:11:04 -03:00
Zach Hilman 136e9aebfd Merge pull request #3660 from bunnei/friend-blocked-users
service: friend: Stub IFriendService::GetBlockedUserListIds.
2020-04-14 16:59:46 -04:00
ReinUsesLisp 501c92a17f gl_rasterizer: Implement constant vertex attributes
Credits go to gdkchan from Ryujinx for finding constant attributes are
used in retail games.
2020-04-14 17:58:53 -03:00
bunnei 72c1dd467d file_sys: patch_manager: Return early when there are no layers to apply. 2020-04-14 16:25:55 -04:00
bunnei 7ecacdfa3b service: friend: Stub IFriendService::GetBlockedUserListIds.
- This is safe to stub, as there should be no adverse consequences from reporting no blocked users.
2020-04-14 16:20:51 -04:00
ReinUsesLisp a1ea6948e2 vk_rasterizer: Default to 1 viewports with a size of 0
Silence validation layer errors.
2020-04-14 04:44:34 -03:00
ReinUsesLisp ab33a2bebc gl_shader_cache: Use CompileDepth::FullDecompile on GLSL
From my testing on a Splatoon 2 shader that takes 3800ms on average to
compile changing to FullDecompile reduces it to 900ms on average.

The shader decoder will automatically fallback to a more naive method if
it can't use full decompile.
2020-04-14 01:34:20 -03:00
ReinUsesLisp c4dc51f168 renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
Adds optional support for Nsight Aftermath. It is enabled through
ENABLE_NSIGHT_AFTERMATH in cmake. A path to the SDK has to be provided
by the environment variable NSIGHT_AFTERMATH_SDK.

Nsight Aftermath allows an application to generate "minidumps" of the
GPU state when a device loss happens. By analysing these on Nsight we
can know what a game was doing and why it triggered a device loss.

The dump is generated inside %APPDATA%\yuzu\log\gpucrash and this
directory is deleted every time a new instance is initialized with
Nsight enabled.

To enable it on yuzu there has a to be a driver and device capable of
running Nsight Aftermath on Vulkan. That means only Turing based GPUs
on the latest stable driver, beta drivers won't work for now.

It is manually enabled in Configuration>Debug>Enable Graphics Debugging
because when using all debugging capabilities there is a runtime cost.
2020-04-14 00:39:21 -03:00
FearlessTobi 51f128f2d5 yuzu/main: Add better popup texts and remove duplicated actions
Makes popup texts more compact and clear and also links our quickstart guide now.
Also removes OnMenuSelectEmulatedDirectory from the File dropdown, as the action already exists in the Filesystem tab and provides better visual feedback there.
2020-04-14 02:56:22 +02:00
ReinUsesLisp 855faaf4a0 gl_texture_cache: Fix layered texture attachment base level
The base level is already included in the texture view. If we specify
the base level in the texture again, this will end up in the incorrect
level and potentially out of bounds.
2020-04-13 18:24:56 -03:00
ReinUsesLisp d351b10ad3 renderer_vulkan: Remove Nvidia checkpoints 2020-04-13 17:33:59 -03:00
ReinUsesLisp 8809b9fe3c renderer_vulkan: Catch device losses in more places 2020-04-13 17:33:59 -03:00
Rodrigo Locatti f2f2262c5e Merge pull request #3636 from ReinUsesLisp/drop-vk-hpp
renderer_vulkan: Drop Vulkan-Hpp
2020-04-13 17:08:04 -03:00
Mat M 9427ae1c54 Merge pull request #3651 from ReinUsesLisp/line-widths
gl_rasterizer: Implement line widths and smooth lines
2020-04-13 10:19:59 -04:00
Mat M 127f1c2606 Merge pull request #3638 from ReinUsesLisp/remove-preserve-contents
texture_cache: Remove preserve_contents
2020-04-13 10:19:01 -04:00
Mat M e638d5dc3a Merge pull request #3631 from ReinUsesLisp/more-astc
texture/astc: More small ASTC optimizations
2020-04-13 10:17:32 -04:00
Mat M 22b39e5855 Merge pull request #3619 from ReinUsesLisp/i2i
shader/conversion: Implement I2I sign extension, saturation and selection
2020-04-13 10:17:07 -04:00
Mat M da605928d3 Merge pull request #3627 from ReinUsesLisp/layered-view
gl_texture_cache: Attach view instead of base texture for layered attchments
2020-04-13 10:16:18 -04:00
Mat M b39aedd84a Merge pull request #3646 from ReinUsesLisp/fix-glsl-turing
gl_shader_decompiler: Improve generated code in HMergeH*
2020-04-13 10:15:12 -04:00
Mat M 7c46c4325d Merge pull request #3633 from ReinUsesLisp/clean-texdec
shader/texture: Remove type mismatches management from shader decoder
2020-04-13 10:13:05 -04:00
ReinUsesLisp cbbaeeb630 gl_rasterizer: Implement line widths and smooth lines
Implements "legacy" features from OpenGL present on hardware such as
smooth lines and line width.
2020-04-13 01:30:34 -03:00
ReinUsesLisp ff90ce2ed6 gl_shader_decompiler: Implement merges with bitfieldInsert
This also fixes Turing issues but it avoids doing more bitcasts. This
should improve the generated code while also avoiding more points where
compilers can flush floats.
2020-04-12 22:39:59 -03:00
bunnei bd114e97fc Merge pull request #3606 from ReinUsesLisp/nvflinger
service/vi: Partially implement BufferQueue disconnect
2020-04-12 11:44:48 -04:00
Fernando Sahmkow 1b20368a0a Merge pull request #3578 from ReinUsesLisp/vmnmx
shader/video: Partially implement VMNMX
2020-04-12 10:44:03 -04:00
Mat M 2b2dd95065 Merge pull request #3644 from ReinUsesLisp/msaa
video_core: Add MSAA registers in 3D engine and TIC
2020-04-12 09:11:44 -04:00
ReinUsesLisp aa15f5854c gl_shader_decompiler: Improve generated code in HMergeH*
Avoiding bitwise expressions, this fixes Turing issues in shaders using
half float merges that affected several games.
2020-04-12 05:06:55 -03:00
ReinUsesLisp 44e1a2c490 shader/video: Partially implement VMNMX
Implements the common usages for VMNMX. Inputs with a different size
than 32 bits are not supported and sign mismatches aren't supported
either.

VMNMX works as follows:
It grabs Ra and Rb and applies a maximum/minimum on them (this is
defined by .MX), having in mind the input sign. This result can then be
saturated. After the intermediate result is calculated, it applies
another operation on it using Rc. These operations are merges,
accumulations or another min/max pass.

This instruction allows to implement with a more flexible approach GCN's
min3 and max3 instructions (for instance).
2020-04-12 00:34:42 -03:00
ReinUsesLisp 17b14be027 video_core: Add MSAA registers in 3D engine and TIC
This adds the registers used for multisampling. It doesn't implement
anything for now.
2020-04-12 00:21:27 -03:00
Rodrigo Locatti 912162d42d Merge pull request #3635 from FernandoS27/buffer-free
Buffer queue: Correct behavior of free buffer.
2020-04-11 17:58:15 -03:00
bunnei 8e7f6dafb5 Merge pull request #3611 from FearlessTobi/port-4956
Port citra-emu/citra#4956: "Fixes to game list sorting"
2020-04-11 12:44:36 -04:00
ReinUsesLisp 1f1e80c67d texture_cache: Remove preserve_contents
preserve_contents was always true. We can't assume we don't have to
preserve clears because scissored and color masked clears exist.

This removes preserve_contents and assumes it as true at all times.
2020-04-11 01:51:02 -03:00
ReinUsesLisp 40ef0d3b28 renderer_vulkan: Drop Vulkan-Hpp 2020-04-10 22:49:02 -03:00
bunnei aeac4d2d60 Merge pull request #3594 from ReinUsesLisp/vk-instance
yuzu: Drop SDL2 and Qt frontend Vulkan requirements
2020-04-10 20:06:55 -04:00
Fernando Sahmkow 7d65c9c9ea Buffer queue: Correct behavior of free buffer.
This corrects the behavior of free buffer after witnessing it in an
unrelated hardware test. I haven't found any games affected by it but in
name of better accuracy we'll correct such behavior.
2020-04-10 16:44:28 -04:00
bunnei 54b4a4a82e Merge pull request #3607 from FearlessTobi/input-kms
yuzu/configuration: Fix input profiles and a wrong assert
2020-04-10 00:39:48 -04:00
ReinUsesLisp f35703f7cd service/vi: Partially implement BufferQueue disconnect 2020-04-10 01:00:50 -03:00
ReinUsesLisp 57a3007e29 shader/texture: Remove type mismatches management from shader decoder
Since commit 9fce105f45 we handle type mismatches from the CPU.
We don't need to hack our shader decoder due to game bugs anymore.

Removed in this commit.
2020-04-10 00:57:32 -03:00
Fernando Sahmkow 9ec9f7a92c Merge pull request #3623 from ReinUsesLisp/renderdoc-bind-spam
qt/bootmanager: Remove unnecessary glBindFramebuffer
2020-04-09 18:02:17 -04:00
Fernando Sahmkow 59991f3513 Merge pull request #3622 from ReinUsesLisp/srgb-texture-border
video_core/texture: Use a LUT to convert sRGB texture borders
2020-04-09 18:01:48 -04:00
ReinUsesLisp cc5d2bc965 astc: Hard code bit depth changes to 8 and use fast replicate 2020-04-09 18:37:12 -03:00
Rodrigo Locatti dcd672b1a6 Merge pull request #3610 from FernandoS27/gpu-caches
Refactor all the GPU Caches to use VAddr for cache addressing
2020-04-09 17:59:21 -03:00
Ben Russell 7d2d0ee1a3 common/file_util: Allow access to files on network shares
On Windows, network shares use paths like \\server\share\file which were
being broken by FileUtil::SanitizePath() removing double slashes.

Changed the code in SanitizePath to permit a double-backslash if it
occurs at the start of a filepath (on Windows only).
2020-04-09 18:48:28 +01:00
ReinUsesLisp ac81541a37 astc: Use boost's static_vector to avoid heap allocations 2020-04-09 05:27:57 -03:00
ReinUsesLisp a648629d8a astc: Implement a fast precompiled alternative for Replicate 2020-04-09 03:58:25 -03:00
ReinUsesLisp 10d59444d9 astc: Move Replicate to a constexpr LUT when possible 2020-04-09 03:35:07 -03:00
ReinUsesLisp 14ea2ced5b astc: Make InputBitStream constexpr 2020-04-09 02:54:05 -03:00
ReinUsesLisp 2f105bd298 astc: OutputBitStream style changes and make it constexpr 2020-04-09 02:37:51 -03:00
bunnei 85d89e0758 Merge pull request #3601 from ReinUsesLisp/some-shader-encodings
video_core/shader: Add some instruction and S2R encodings
2020-04-09 00:17:39 -04:00
ReinUsesLisp 5ee9b93d2a gl_texture_cache: Attach view instead of base texture for layered attachments
This way we are not ignoring the base layer of the current texture.
2020-04-08 22:20:25 -03:00
Fernando Sahmkow cacbe85d13 VkRasterizer: Eliminate Legacy code. 2020-04-08 18:59:09 -04:00
Fernando Sahmkow 99e0ffe21b Memory: Correct GCC errors. 2020-04-08 18:09:16 -04:00
Fernando Sahmkow f00f6bbdb6 Memory: Address Feedback. 2020-04-08 13:40:46 -04:00
Fernando Sahmkow 3e7aecbd3c GPUMemoryManager: Improve safety of memory reads. 2020-04-08 12:08:06 -04:00
Kewlan 6de648726f Place SL and SR in the right most column. 2020-04-08 11:34:16 +02:00
bunnei 23aec6a93b Merge pull request #3572 from FearlessTobi/port-5127
Port citra-emu/citra#5127: "common: Port some changes from dolphin"
2020-04-07 23:48:16 -04:00
ReinUsesLisp 087aadbfae qt/bootmanager: Remove unnecessary glBindFramebuffer
Presentation context always has GL_DRAW_FRAMEBUFFER_BINDING as zero.
There is no need to bind the default framebuffer constantly.

According to Nsight this was using ~0.7ms per frame and it broke
renderdoc captures.
2020-04-07 20:51:56 -03:00
ReinUsesLisp 8591cb316a video_core/textures: Move GetMaxAnisotropy to cpp file 2020-04-07 20:47:31 -03:00
ReinUsesLisp 8a031dc233 video_core/texture: Use a LUT to convert sRGB texture borders
This is a reversed look up table extracted from
https://gist.github.com/rygorous/2203834#file-gistfile1-cpp-L41-L62

that is used in
04d4e9e587/source/maxwell/tsc_generate.cpp (L38)

Games usually bind 0xFD expecting a float texture border of 1.0f.
The conversion previous to this commit was multiplying the uint8 sRGB
texture border color by 255. This is close to 1.0f but when that
difference matters, some graphical glitches appear.

This look up table is manually changed in the edges, clamping towards
0.0f and 1.0f.

While we are at it, move this logic to its own translation unit.
2020-04-07 20:38:14 -03:00
Zach Hilman 4bc0b7c50c Merge pull request #3621 from SilverBeamx/fullnamefix
Log version and about section version fix
2020-04-07 17:16:23 -04:00
SilverBeamx 2830688673 Addressed feedback: switched to snake case and fixed clang-format errors 2020-04-07 22:59:09 +02:00
bunnei 738e281da2 Merge pull request #3599 from ReinUsesLisp/revert-3499
Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"
2020-04-07 16:51:41 -04:00
SilverBeamx 860dd241cf Addressed feedback: removed CMake hack in favor of building the necessary strings via the supplied title format 2020-04-07 22:41:45 +02:00
ReinUsesLisp 30bbdc653c yuzu: Drop SDL2 and Qt frontend Vulkan requirements
Create Vulkan instances and surfaces from the Vulkan backend.
2020-04-07 16:32:19 -03:00
Rodrigo Locatti 43f13f7fa1 Merge pull request #3489 from namkazt/patch-2
shader: implement SULD.D bits32/64
2020-04-07 16:21:09 -03:00
Nguyen Dac Nam ca3161ee7e address nit. 2020-04-07 18:29:30 +07:00
ReinUsesLisp 3140098db9 renderer_vulkan: Query device names from the backend 2020-04-07 02:23:23 -03:00
ReinUsesLisp c56cdc3384 common/dynamic_library: Import and adapt helper from Dolphin 2020-04-07 02:23:23 -03:00
ReinUsesLisp dbebae0027 shader/conversion: Implement I2I sign extension, saturation and selection
Reimplements I2I adding sign extension, saturation (clamp source value
to the destination), selection and destination sizes that are not 32
bits wide.

It doesn't implement CC yet.
2020-04-07 02:19:44 -03:00
Nguyen Dac Nam e2349b001e Apply suggestions from code review
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2020-04-07 07:55:49 +07:00
enler d7dc7964f1 file_sys: fix LayeredFS error when loading some games made with… (#3602)
* fix LayeredFS error when loading some games made with the Unity
2020-04-07 02:03:32 +02:00
Fernando Sahmkow 3390d627b8 Clang Format. 2020-04-06 09:23:08 -04:00
Fernando Sahmkow 02f2fa510d Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing. 2020-04-06 09:23:07 -04:00
Fernando Sahmkow 6c9f7db8af Query Cache: Use VAddr instead of physical memory for adressing. 2020-04-06 09:23:07 -04:00
Fernando Sahmkow 3728c7160f Buffer Cache: Use vAddr instead of physical memory. 2020-04-06 09:23:06 -04:00
Fernando Sahmkow 5b66d2bf74 Texture Cache: Use vAddr instead of physical memory for caching. 2020-04-06 09:23:05 -04:00
Fernando Sahmkow 5cc292ac3c GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
Fernando Sahmkow 3a6baefff4 Merge pull request #3513 from ReinUsesLisp/native-astc
video_core: Use native ASTC when available
2020-04-06 09:21:11 -04:00
namkazy a18e88be44 shader_decode: SULD.D using std::pair instead of out parameter 2020-04-06 13:46:55 +07:00
namkazy 319f68c624 shader_decode: SULD.D avoid duplicate code block. 2020-04-06 13:34:06 +07:00
namkazy a6e264cd58 shader_decode: SULD.D fix conversion error. 2020-04-06 13:26:58 +07:00
namkazy ca16317add shader_decode: SULD.D implement bits64 and reverse shader ir init method to removed shader stage. 2020-04-06 13:09:19 +07:00
ReinUsesLisp d222e63967 shader/memory: Implement RED.E.ADD
Implements a reduction operation. It's an atomic operation that doesn't
return a value.

This commit introduces another primitive because some shading languages
might have a primitive for reduction operations.
2020-04-06 02:24:47 -03:00
ReinUsesLisp e38cbb78ad shader/memory: Add "using std::move" 2020-04-06 02:18:14 -03:00
ReinUsesLisp e50c604505 shader/memory: Minor fixes in ATOM 2020-04-06 00:54:22 -03:00
FearlessTobi afde397c81 yuzu: Fixes to game list sorting
Should fix citra-emu/citra#4593.
As the issue might not be entirely clear, I'll offer a short explanation from what I understood from it and found from experimentation.

Currently yuzu offers the user the option to change the text that's displayed in the "Name" column in the game list. Generally, it is expected that the items are sorted based on the displayed text, but yuzu would sort them by title instead.

Made it so that an access to SortRole returns the same as DisplayRole.
There shouldn't be any UI changes, only change in behaviour.

Also fixes a bug with directory sorting, where having the directories out of order would enable you to try to "move up" to the addDirectory button, which would crash the emulator.

Co-Authored-By: Vitor K <vitor-k@users.noreply.github.com>
2020-04-06 03:12:17 +02:00
Fernando Sahmkow f6d6689b13 Merge pull request #3592 from ReinUsesLisp/ipa
shader_decompiler: Remove FragCoord.w hack and change IPA implementation
2020-04-05 19:29:40 -04:00
Fernando Sahmkow 5e8119cf04 Merge pull request #3589 from ReinUsesLisp/fix-clears
gl_rasterizer: Mark cleared textures as dirty
2020-04-05 19:29:26 -04:00
namkazy d61a333362 silent warning (conversion error) 2020-04-05 16:02:07 +07:00
namkazy 15366b7474 shader_decode: SULD.D -> SINT actually same as UNORM. 2020-04-05 15:18:42 +07:00
namkazy 615eecd94e shader_decode: SULD.D fix decode SNORM component 2020-04-05 14:46:43 +07:00
namkazy dbd8cf0304 clang-format 2020-04-05 12:57:50 +07:00
namkazy c26cea4ad2 shader_decode: get sampler descriptor from registry. 2020-04-05 12:54:48 +07:00
FearlessTobi f86ff79a7f yuzu/configuration: Only assert that all buttons exist when we are handling the click for a button device
This fixes failed assertions that were present in yuzu master code for 18 months.
2020-04-05 07:16:09 +02:00
FearlessTobi 662362d6fe yuzu/configure_input_simple: Fix "Docked Joycons" controller profile
This was incorrectly using PlayerIndex 1 when calling the ConfigureDialog.
2020-04-05 07:14:35 +02:00
namkazy 8990c9a814 tweaking. 2020-04-05 10:31:32 +07:00
Nguyen Dac Nam 524c42bec8 clang-format 2020-04-05 10:31:31 +07:00
namkazy 2799ef5f43 cleanup unuse params 2020-04-05 10:31:31 +07:00
namkazy 35995111c9 cleanup debug code. 2020-04-05 10:31:30 +07:00
namkazy 2f42b04ae5 reimplement get component type, uncomment mistaken code 2020-04-05 10:31:30 +07:00
namkazy d4038bf4ae remove disable optimize 2020-04-05 10:31:30 +07:00
namkazy e4402955e4 [wip] reimplement SULD.D 2020-04-05 10:31:29 +07:00
namkazy 67d9d397d2 add shader stage when init shader ir 2020-04-05 10:31:29 +07:00
Nguyen Dac Nam 731b0dbebc clang-fix 2020-04-05 10:31:28 +07:00
Nguyen Dac Nam 4c3ddd9c99 shader: image - import PredCondition 2020-04-05 10:31:27 +07:00
Nguyen Dac Nam 9f407fad5e shader: SULD.D bits32 implement more complexer method. 2020-04-05 10:31:27 +07:00
Nguyen Dac Nam 06fa4a3a41 shader: SULD.D import StoreType 2020-04-05 10:31:26 +07:00
Nguyen Dac Nam 94fecd1b68 shader: implement SULD.D bits32 2020-04-05 10:31:26 +07:00
ReinUsesLisp bcca6c3fce shader/other: Add error message for some S2R registers 2020-04-04 03:46:07 -03:00
ReinUsesLisp 2eef8d7249 shader_bytecode: Rename MOV_SYS to S2R 2020-04-04 03:37:51 -03:00
ReinUsesLisp 1163fe0034 shader_bytecode: Add encoding for BAR 2020-04-04 03:36:21 -03:00
ReinUsesLisp fc4fc348bc shader_ir: Add error message for EXIT.FCSM_TR 2020-04-04 03:34:08 -03:00
ReinUsesLisp 8a635a351b shader_bytecode: Add encoding for VOTE.VTG 2020-04-04 03:28:11 -03:00
ReinUsesLisp 0bb29489f4 Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"
This reverts commit 56fc1688f6, reversing
changes made to ad5120c595.

It causes regressions in several games.
2020-04-04 00:02:26 -03:00
bunnei a8b66a6b61 Merge pull request #3579 from Kewlan/reorder-shoulder
configuration: Reorder shoulder buttons
2020-04-03 11:28:14 -04:00
Fernando Sahmkow a2fb02c1e2 Merge pull request #3563 from bunnei/fix-ldr-memstate
services: ldr: Fix MemoryState for read/write regions of NROs.
2020-04-03 10:14:56 -04:00
ReinUsesLisp ab3a1db282 shader/memory: Silence no return value warning
Silences a warning about control paths not all returning a value.
2020-04-02 03:34:27 -03:00
Rodrigo Locatti 5bd5340d17 Merge pull request #3552 from jroweboy/single-context
Refactor Context management (Fixes renderdoc on opengl issues)
2020-04-02 01:38:25 -03:00
ReinUsesLisp d66cae7bd5 shader_decompiler: Remove FragCoord.w hack and change IPA implementation
Credits go to gdkchan and Ryujinx. The pull request used for this can
be found here: https://github.com/Ryujinx/Ryujinx/pull/1082

yuzu was already using the header for interpolation, but it was missing
the FragCoord.w multiplication described in the linked pull request.
This commit finally removes the FragCoord.w == 1.0f hack from the shader
decompiler.

While we are at it, this commit renames some enumerations to match
Nvidia's documentation (linked below) and fixes component declaration
order in the shader program header (z and w were swapped).

https://github.com/NVIDIA/open-gpu-doc/blob/master/Shader-Program-Header/Shader-Program-Header.html
2020-04-01 21:48:55 -03:00
ReinUsesLisp c7472afb1d gl_texture_cache: Fix software ASTC fallback 2020-04-01 01:44:15 -03:00
ReinUsesLisp d97580b02a vk_device: Add missing ASTC queries 2020-04-01 01:14:04 -03:00
ReinUsesLisp abb4d942b0 video_core: Use native ASTC when available 2020-04-01 01:14:04 -03:00
ReinUsesLisp d740491a9b gl_device: Detect if ASTC is reported and expose it 2020-04-01 01:14:04 -03:00
Rodrigo Locatti 44c1492086 Merge pull request #3591 from ReinUsesLisp/vk-wrapper-part2
renderer_vulkan/wrapper: Add a Vulkan wrapper (part 2 of 2)
2020-03-31 22:14:26 -03:00
Vitor K 41ea723cba common: Port some changes from dolphin (#5127)
* IOFile: Make the move constructor and move assignment operator noexcept

Certain parts of the standard library try to determine whether or not a
transfer operation should either be a copy or a move. The prevalent notion
of move constructors/assignment operators is that they should not throw,
they simply move an already existing resource somewhere else.

This is typically done with 'std::move_if_noexcept'. Like the name says,
if a type's move constructor is noexcept, then the functions retrieves an
r-value reference (for move semantics), or an l-value (for copy semantics)
if it is not noexcept.

As IOFile deletes the copy constructor and copy assignment operators,
using IOFile with certain parts of the standard library can fail in
unexcepted ways (especially when used with various container
implementations). This prevents that.

* fix various instances of -1 being assigned to unsigned types

* do not assign in conditional statements

* File/IOFile: Check _tfopen_s properly

* common/file_util.cpp: address review comments

Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
Co-authored-by: Sepalani <sepalani@hotmail.fr>
2020-04-01 02:58:42 +02:00
ReinUsesLisp 83b47aa0d9 renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapper 2020-03-31 21:32:08 -03:00
ReinUsesLisp c3332558df renderer_vulkan/wrapper: Add command buffer handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp 010a965e64 renderer_vulkan/wrapper: Add physical device handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp 319737fd89 renderer_vulkan/wrapper: Add device handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp a04066352b renderer_vulkan/wrapper: Add swapchain handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp cea9fdab2e renderer_vulkan/wrapper: Add fence handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp 00c88c7d6d renderer_vulkan/wrapper: Add device memory handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp e84b3a9f71 renderer_vulkan/wrapper: Add pool handles 2020-03-31 21:32:07 -03:00
ReinUsesLisp 2ed17b8c92 renderer_vulkan/wrapper: Add buffer and image handles 2020-03-31 21:32:07 -03:00
ReinUsesLisp 01bf15ce40 renderer_vulkan/wrapper: Add queue handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp 467a8c3285 renderer_vulkan/wrapper: Add instance handle 2020-03-31 21:32:07 -03:00
Morph bda37c4bb4 capsrv: Split Capture services into individual files and stub GetAlbumContentsFileListForApplication (#3571)
* Organize capture services into individual files

* Stub GetAlbumContentsFileListForApplication

* Address feedback
2020-03-31 19:16:36 -04:00
Fernando Sahmkow 207bfbf720 Merge pull request #3561 from ReinUsesLisp/f2f-conversion
shader/conversion: Fix F2F rounding operations with different sizes
2020-03-31 14:45:02 -04:00
Fernando Sahmkow 8a4af4f128 Merge pull request #3577 from ReinUsesLisp/lea
shader/lea: Fix LEA implementation
2020-03-31 14:36:07 -04:00
ReinUsesLisp 89f68281ff gl_rasterizer: Mark cleared textures as dirty
Fixes a potential edge case where cleared textures read from the CPU
were not flushed.
2020-03-31 05:51:56 -03:00
Rodrigo Locatti 00dde9cf72 Merge pull request #3506 from namkazt/patch-9
shader_decode: Implement partial ATOM/ATOMS instr
2020-03-31 00:56:28 -03:00
Nguyen Dac Nam e0add44428 clang-format 2020-03-31 08:08:06 +07:00
Nguyen Dac Nam 455a771f6c shader_decode: fix by suggestion 2020-03-31 08:02:44 +07:00
Rodrigo Locatti 8fa9aa08f7 Merge pull request #3566 from ReinUsesLisp/vk-wrapper-part1
renderer_vulkan/wrapper: Add a Vulkan wrapper (part 1 of 2)
2020-03-30 21:57:36 -03:00
bunnei bf2221c7f7 Merge pull request #3560 from ReinUsesLisp/fix-stencil
gl_rasterizer: Synchronize stencil testing on clears
2020-03-30 17:03:07 -04:00
James Rowe e345e46a98 Frontend: Don't call DoneCurrent if the context isnt already current 2020-03-30 14:57:42 -06:00
namkazy 5961fe334c clang-format 2020-03-30 20:46:21 +07:00
namkazy 39880b6fcb gl_decompiler: min/max op not implement yet 2020-03-30 18:48:22 +07:00
namkazy fd7fb7c1b7 shader_decode: ATOM/ATOMS: add function to avoid code repetition 2020-03-30 18:47:50 +07:00
namkazy 3a65713029 shader_decode: merge GlobalAtomicOp to AtomicOp 2020-03-30 18:47:00 +07:00
Nguyen Dac Nam 3809c15721 shader_decode: implement ATOM operation for S32 and U32 2020-03-30 17:44:48 +07:00
namkazy 93a5b51a1f clang-format 2020-03-30 17:44:48 +07:00
Nguyen Dac Nam e57c348d6e shader_decode: implement ATOMS instr partial. 2020-03-30 17:44:46 +07:00
Nguyen Dac Nam 2095823163 vk_decompiler: add atomic op and handler function. 2020-03-30 17:44:45 +07:00
Nguyen Dac Nam f3880c13fa gl_decompiler: add atomic op 2020-03-30 17:44:45 +07:00
Nguyen Dac Nam cf457eafff shader: node - update correct comment 2020-03-30 17:44:44 +07:00
Nguyen Dac Nam 407064c658 shader_decode: add Atomic op for common usage 2020-03-30 17:44:44 +07:00
Kewlan f2a6ce9b8c Re-order the shoulder buttons both in the configuration menu, and in the code. 2020-03-29 14:37:23 +02:00
bunnei e842f70c4a Merge pull request #3568 from bunnei/time-calcspan
services: time: Implement CalculateSpanBetween.
2020-03-29 00:03:55 -04:00
bunnei 183ef674cf Merge pull request #3545 from FearlessTobi/audren-rev
audio_core: Accept Audren REV8
2020-03-28 22:08:19 -04:00
ReinUsesLisp 1f7c51a57b shader_bytecode: Fix I2I_IMM encoding 2020-03-28 18:49:07 -03:00
bunnei 3660347e8d Merge pull request #3562 from perillamint/vrsvc
am: Implement VR related APIs
2020-03-28 13:32:52 -04:00
bunnei ef0ece15ec Merge pull request #3569 from bunnei/hid-stub
services: hid: Stub InitializeSevenSixAxisSensor.
2020-03-28 04:10:45 -04:00
ReinUsesLisp 3a42c2f3d5 renderer_vulkan/wrapper: Address feedback 2020-03-28 04:09:02 -03:00
ReinUsesLisp 74b1f71109 shader/lea: Simplify generated LEA code 2020-03-28 03:55:04 -03:00
bunnei b8545d56e2 Merge pull request #3573 from FearlessTobi/port-5089
Port citra-emu/citra#5089: "Set render window's focus policy to Qt::StrongFocus"
2020-03-28 01:48:46 -04:00
FearlessTobi 3a72973e13 yuzu: fix the stuck in fullscreen mode bug
Co-Authored-By: Valentin Vanelslande <vvanelslandedev@gmail.com>
2020-03-28 02:31:35 +01:00
ReinUsesLisp fda10c4b0b shader/lea: Fix op_a and op_b usages
They were swapped.
2020-03-27 18:37:20 -03:00
ReinUsesLisp ca9309bc07 shader/lea: Remove const and use move when possible 2020-03-27 18:36:38 -03:00
Vitor K e70d051a63 Set render window to also accept focus via tabbing (Qt::StrongFocus) (#5089) 2020-03-27 22:25:01 +01:00
Fernando Sahmkow 79259972f3 Merge pull request #3565 from ReinUsesLisp/image-format
engines/const_buffer_engine_interface: Store image format and types
2020-03-27 14:08:54 -04:00
bunnei c84586b412 services: hid: Stub InitializeSevenSixAxisSensor.
- Used by Super Smash Bros. Ultimate v7.0.0.
2020-03-27 10:48:01 -04:00
bunnei 748ddc628c services: time: Implement CalculateSpanBetween.
- Used by Super Smash Bros. Ultimate.
2020-03-27 10:42:13 -04:00
perillamint 133948067c am: Implement VR related APIs
Implement (and stub) VR related APIs in AM sysmodule.

This fixes issue #2938
2020-03-27 18:22:28 +09:00
ReinUsesLisp f606c9cf1e renderer_vulkan/wrapper: Add owning handles 2020-03-27 03:21:04 -03:00
ReinUsesLisp 7eaae70c4b renderer_vulkan/wrapper: Add pool allocations owning templated class 2020-03-27 03:21:04 -03:00
ReinUsesLisp 4ef176e737 renderer_vulkan/wrapper: Add owning handle templated class 2020-03-27 03:21:04 -03:00
ReinUsesLisp f4281513d9 renderer_vulkan/wrapper: Add destroy and free overload set 2020-03-27 03:21:04 -03:00
ReinUsesLisp 17a033ce78 renderer_vulkan/wrapper: Add dispatch table and loaders 2020-03-27 03:21:04 -03:00
ReinUsesLisp d1edc121e1 renderer_vulkan/wrapper: Add exception class 2020-03-27 03:21:04 -03:00
ReinUsesLisp a12fd8f995 renderer_vulkan/wrapper: Add ToString function for VkResult 2020-03-27 03:21:03 -03:00
ReinUsesLisp 2cad825ec7 renderer_vulkan/wrapper: Add Vulakn wrapper and a span helper
The intention behind a Vulkan wrapper is to drop Vulkan-Hpp.

The issues with Vulkan-Hpp are:
- Regular breaks of the API.
- Copy constructors that do the same as the aggregates (fixed recently)
- External dynamic dispatch that is hard to remove
- Alias KHR handles with non-KHR handles making it impossible to use
smart handles on Vulkan 1.0 instances with extensions that were included
on Vulkan 1.1.
- Dynamic dispatchers silently change size depending on preprocessor
definitions. Different files will have different dispatch definitions,
generating all kinds of hard to debug memory issues.

In other words, Vulkan-Hpp is not "production ready" for our needs and
this wrapper aims to replace it without losing RAII and exception
safety.
2020-03-27 03:13:18 -03:00
ReinUsesLisp 8993217f01 engines/const_buffer_engine_interface: Store image format type
This information is required to properly implement SULD.B. It might also
be handy for all image operations, since it would allow us to implement
them on devices that require the image format to be specified (on
desktop, this would be AMD on OpenGL and Intel on OpenGL and Vulkan).
2020-03-27 00:36:22 -03:00
Dan b41d1895d7 maxwell_to_vk: implement signedscaled vertex formats 2020-03-27 00:14:19 +01:00
bunnei 5577e90843 Merge pull request #3453 from FearlessTobi/remove-pause-lock
yuzu: Remove exit lock for game pausing
2020-03-26 16:42:57 -04:00
bunnei 7ee7aa21b1 services: ldr: Fix MemoryState for read/write regions of NROs.
- Fixes #3541, used by Final Fantasy VIII Remastered.
2020-03-26 15:52:59 -04:00
James Rowe c935a1a475 Address review and fix broken yuzu-tester build 2020-03-25 23:32:42 -06:00
ReinUsesLisp 82d53d445a shader/conversion: Fix F2F rounding operations with different sizes
Rounding operations only matter when the conversion size of source and
destination is the same, i.e. .F16.F16, .F32.F32 and .F64.F64.

When there is a mismatch (.F16.F32), these bits are used for IEEE
rounding, we don't emulate this because GLSL and SPIR-V don't support
configuring it per operation.
2020-03-26 01:58:49 -03:00
ReinUsesLisp 6df25c4b2e gl_rasterizer: Update stencil test regardless of it being disabled 2020-03-26 01:08:14 -03:00
ReinUsesLisp 90b050f9f4 gl_rasterizer: Synchronize stencil testing on clears 2020-03-26 00:51:47 -03:00
bunnei 2647e03b76 Merge pull request #3544 from makigumo/myfork/patch-2
xmad: fix clang build error
2020-03-25 19:29:16 -04:00
bunnei b769578c49 Merge pull request #3520 from ReinUsesLisp/legacy-varyings
gl_shader_decompiler: Implement legacy varyings
2020-03-25 19:27:51 -04:00
James Rowe b37d69e5e1 Frontend/GPU: Refactor context management
Changes the GraphicsContext to be managed by the GPU core. This
eliminates the need for the frontends to fool around with tricky
MakeCurrent/DoneCurrent calls that are dependent on the settings (such
as async gpu option).

This also refactors out the need to use QWidget::fromWindowContainer as
that caused issues with focus and input handling. Now we use a regular
QWidget and just access the native windowHandle() directly.

Another change is removing the debug tool setting in FrameMailbox.
Instead of trying to block the frontend until a new frame is ready, the
core will now take over presentation and draw directly to the window if
the renderer detects that its hooked by NSight or RenderDoc

Lastly, since it was in the way, I removed ScopeAcquireWindowContext and
replaced it with a simple subclass in GraphicsContext that achieves the
same result
2020-03-24 21:03:42 -06:00
bunnei 84f3e27ffa Merge pull request #3524 from FearlessTobi/port-5106
Port citra-emu/citra#5106: "gdbstub: Ensure gdbstub doesn't drop packets crucial to initialization"
2020-03-24 16:50:58 -04:00
Fernando Sahmkow 83de432f8c Merge pull request #3543 from ReinUsesLisp/gl-depth-range
gl_rasterizer: Use transformed viewport for depth ranges
2020-03-23 12:00:21 -04:00
Fernando Sahmkow 562e9e8aad Merge pull request #3542 from namkazt/patch-10
Implement MME shadow RAM
2020-03-23 12:00:01 -04:00
FearlessTobi 23a8887526 sm/controller: Increase PointerBufferSize
This increases the PointerBufferSize as a lager one is required by some services.
This change is still not hw-accurate, but it is proven to work in Ryujinx.

Instead of using a hardcoded size, we should figure out the specific values for each service in the future. Some of them can be taken from Atmosphere: https://github.com/Atmosphere-NX/Atmosphere/search?q=PointerBufferSize.
2020-03-23 03:19:30 +01:00
FearlessTobi c0ebdd00cc audio_core: Accept Audren REV8
According to Ryujinx, REV8 only added changes on Performance buffer and Wavebuffer DSP command generation.

As we don't support any of those, we can just increment the revision number for now.
2020-03-23 03:07:14 +01:00
makigumo 4a1a5ea61e xmad: fix clang build error 2020-03-23 00:09:31 +01:00
bunnei fb767310ca Merge pull request #3477 from FearlessTobi/webapplet-shit
core/web_browser: Allow WebApplet to exit gracefully when an error occurs
2020-03-22 13:11:02 -04:00
namkazy fa1b60cc8c apply replay logic to all writes. remove replay from MacroInterpreter::Send (@fincs) 2020-03-22 22:25:44 +07:00
FearlessTobi 1c7dcf3858 core/web_browser: Allow WebApplet to exit gracefully when an error occurs
Currently, yuzu just freezes when an error occurs while Initializing the WebApplet.
From a user perspective, this obviously isn't great as the game just softlocks.
With this change, yuzu will call the Finalize method, so to the game it seems like as the user just exited the WebApplet normally.

This works around https://github.com/yuzu-emu/yuzu/issues/2852.
2020-03-22 16:01:13 +01:00
namkazy 51e13ff50c maxwell_3d: change declaration order 2020-03-22 13:41:16 +07:00
namkazy 30112fcb3c maxwell_3d: init shadow_state 2020-03-22 13:35:11 +07:00
ReinUsesLisp e800c76c4b gl_rasterizer: Use transformed viewport for depth ranges
Implement depth ranges using the transformed viewport instead of the
generic one. This matches the current Vulkan implementation but doesn't
support negative depth ranges. An update to glad is required for this.
2020-03-22 03:26:07 -03:00
namkazy e89c5935f4 maxwell_3d: this seem more correct. 2020-03-22 12:02:54 +07:00
namkazy 854fb1ed2b maxwell_3d: update comments for shadow ram usage 2020-03-22 11:35:26 +07:00
Nguyen Dac Nam 03a6cfea40 marco_interpreter: write hw value when shadow ram requested 2020-03-22 10:53:41 +07:00
Nguyen Dac Nam 771d117869 maxwell_3d: track shadow ram ctrl and hw reg value 2020-03-22 10:53:41 +07:00
Nguyen Dac Nam f2d9dacfed maxwell_3d: implement MME shadow RAM 2020-03-22 10:53:35 +07:00
bunnei b2a4758420 Merge pull request #3531 from makigumo/yuzu_master
set: implement GetRegionCode
2020-03-21 22:49:28 -04:00
bunnei 1429f883b2 Merge pull request #3525 from FearlessTobi/linux-compile-error
input_common/udp: Fix Linux build by using a backwards compatible way of error checking
2020-03-21 16:04:45 -04:00
bunnei 4847e70c4b Merge pull request #3526 from FearlessTobi/bcat-disable
bcat: Disable Boxcat backend by default
2020-03-20 13:01:28 -04:00
bunnei 4785b963c3 Merge pull request #3505 from namkazt/patch-8
shader_decode: implement XMAD mode CSfu
2020-03-19 17:41:01 -04:00
Dan d5c239a047 set: implement GetRegionCode 2020-03-19 10:37:42 +01:00
bunnei 32ef3d9487 Merge pull request #3527 from FearlessTobi/output-mode
yuzu: Save sound output mode and set it to Stereo by default
2020-03-18 23:19:22 -04:00
Mat M 025b4cba8b Merge pull request #3535 from ReinUsesLisp/gcc-warnings
video_core: Silence misc warnings
2020-03-18 20:09:32 -04:00
ReinUsesLisp b57cce9264 vk_texture_cache: Silence misc warnings 2020-03-18 20:03:19 -03:00
ReinUsesLisp f2554e753c vk_staging_buffer_pool: Silence unused constant warning 2020-03-18 20:03:19 -03:00
ReinUsesLisp bcf04aa8ba vk_rasterizer: Remove unused variable 2020-03-18 20:03:19 -03:00
ReinUsesLisp da4ea99c9b vk_pipeline_cache: Remove unused variable 2020-03-18 20:03:19 -03:00
ReinUsesLisp 8cbe1d9de4 maxwell_to_vk: Sielence -Wswitch warning 2020-03-18 20:03:19 -03:00
ReinUsesLisp c332b80516 gl_shader_decompiler: Remove deprecated function and its usages 2020-03-18 20:03:19 -03:00
ReinUsesLisp b5c3cf8e24 gl_rasterizer: Silence misc warnings 2020-03-18 20:03:19 -03:00
ReinUsesLisp 07b52b1307 kepler_compute: Remove unused variables 2020-03-18 20:03:19 -03:00
ReinUsesLisp e656938a5a time_zone_content_manager: Fix out of bounds read
There were cases where raw_data didn't contain enough
space to hold the zero terminator.

This was caught with -fsanitize=address.
2020-03-18 19:06:16 -03:00
ReinUsesLisp d8191c0d7f input_common/udp: Fix clang build issues 2020-03-18 04:30:26 -03:00
ReinUsesLisp dc0beee3a1 astc: Fix clang build issues 2020-03-18 04:30:25 -03:00
ReinUsesLisp 704373040f gl_shader_decompiler: Don't redeclare gl_VertexID and gl_InstanceID 2020-03-18 01:28:41 -03:00
Mat M 23ad5098af Merge pull request #3510 from FernandoS27/dirty-write
DirtyFlags: relax need to set render_targets as dirty
2020-03-17 17:29:22 -04:00
Mat M d37d59aa68 Merge pull request #3509 from ReinUsesLisp/astc-opts
astc: General changes and optimizations
2020-03-17 17:28:49 -04:00
Mat M a5e46cf5ec Merge pull request #3518 from ReinUsesLisp/scissor-clears
vk_rasterizer: Implement scissor clears and layered clears
2020-03-17 17:27:15 -04:00
Mat M 70d8c1fc9a Merge pull request #3519 from ReinUsesLisp/int-formats
maxwell_to_vk: Implement RG32 and RGB32 integer vertex formats
2020-03-17 17:26:16 -04:00
FearlessTobi 918657de2e yuzu: Save sound output mode and set it to Stereo by default 2020-03-17 19:03:00 +01:00
bunnei f31280affc Merge pull request #3498 from ReinUsesLisp/texel-fetch-glsl
gl_shader_decompiler: Add layer component to texelFetch
2020-03-17 10:53:38 -04:00
FearlessTobi cdbb3accde bcat: Disable Boxcat backend by default
This commit disables the Boxcat backend by default for new users of yuzu.

There's several reasons as to why this is done:
1. Boxcat currently only actually has an impact on 3 games and doesn't influence any core mechanics of them
2. It causes a plethora of issues when enabled such as games like Crash Team Racing, Diablo 3 and Tales of Vesperia not booting at all or hanging
3. It causes https://github.com/yuzu-emu/yuzu/issues/2957 to happen. This makes the configuration menu totally unusable for many Linux users of yuzu

I think those points show that currently the negative impact of Boxcat outweighs its benefits and should therefore be disabled by default.
For users who are eager to use the extra features provided by it, they can still just turn it on in the settings.
2020-03-17 15:24:26 +01:00
FearlessTobi a38b732a6c input_common/udp: Fix Linux build by using a backwards compatible way of error checking
Should fix https://github.com/yuzu-emu/yuzu/issues/3487.

error_code::failed is a function which has been introduced in Boost 1.69.
This version of boost hasn't landed in most major distros yet.
2020-03-17 12:29:25 +01:00
Gauvain "GovanifY" Roussel-Tarbouriech fc6dfe012c gdbstub: small logic bug fix with defer_start 2020-03-17 11:18:39 +01:00
Gauvain "GovanifY" Roussel-Tarbouriech 32ebfa66fe gdbstub: Ensure gdbstub doesn't drop packets crucial to initialization 2020-03-17 11:18:13 +01:00
ReinUsesLisp 36e48da114 renderer_opengl: Move some logic to an anonymous namespace 2020-03-16 04:03:34 -03:00
ReinUsesLisp 018df6f10f renderer_opengl: Detect Nvidia Nsight as a debugging tool
Use getenv to detect Nsight.
2020-03-16 03:59:08 -03:00
Rodrigo Locatti d8c5c77329 Merge pull request #3515 from ReinUsesLisp/vertex-vk-assert
vk_rasterizer: Fix vertex range assert
2020-03-15 21:26:54 -03:00
Rodrigo Locatti 3a6abba3ef Merge pull request #3501 from ReinUsesLisp/rgba16-snorm
video_core: Implement RGBA16_SNORM
2020-03-15 21:24:53 -03:00
Rodrigo Locatti 944d38efc8 Merge pull request #3502 from namkazt/patch-3
shader_decode: Reimplement BFE instructions
2020-03-15 21:23:04 -03:00
Rodrigo Locatti 131bdfdc6d Merge pull request #3503 from makigumo/patch-2
maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32
2020-03-15 21:21:38 -03:00
ReinUsesLisp c71e618ddb gl_shader_decompiler: Implement legacy varyings
Legacy varyings are special attributes carried over in hardware from
the OpenGL 1 and OpenGL 2 days. These were generally used instead of the
generic attributes we use today. They are deprecated or removed from
most APIs, but Nvidia still ships them in hardware.

To implement these, this commit maps them 1:1 to OpenGL compatibility.
2020-03-15 21:03:59 -03:00
ReinUsesLisp bba58f7272 shader/shader_ir: Track usage in input attribute and of legacy varyings 2020-03-15 21:01:52 -03:00
ReinUsesLisp fd3d4d53e1 shader/shader_ir: Fix clip distance usage stores 2020-03-15 20:53:14 -03:00
ReinUsesLisp 4ff3d8e72f shader/shader_ir: Change declare output attribute to a switch 2020-03-15 20:49:35 -03:00
Rodrigo Locatti a1ee0278e2 Merge pull request #3512 from bunnei/fix-renderdoc
renderer_opengl: Keep frames synchronized when using a GPU debugger.
2020-03-15 19:28:43 -03:00
ReinUsesLisp 90b246ce5c maxwell_to_vk: Implement RG32 and RGB32 integer vertex formats 2020-03-15 18:51:49 -03:00
ReinUsesLisp e992509e8f vk_rasterizer: Implement layered clears 2020-03-15 18:37:19 -03:00
makigumo f22915ad99 vk_shader_decompiler: fix linux build 2020-03-15 18:00:14 +01:00
ReinUsesLisp fdf6c69bd1 vk_rasterizer: Fix vertex range assert
End can be equal to start in CalculateVertexArraysSize. This is quite
common when the vertex size is zero.
2020-03-15 04:04:17 -03:00
ReinUsesLisp df65a82f3c vk_rasterizer: Reimplement clears with vkCmdClearAttachments 2020-03-15 03:40:41 -03:00
bunnei 6ae05a9a45 renderer_opengl: Keep presentation frames in lock-step when GPU debugging.
- Fixes renderdoc with OpenGL renderer.
2020-03-14 17:45:01 -04:00
bunnei dc916f35ad gl_device: Add option to check GL_EXT_debug_tool. 2020-03-14 17:39:29 -04:00
bunnei 4be989abc0 Merge pull request #3508 from FernandoS27/page-table
PageTable: move backing addresses to a children class as the CPU page table does not need them.
2020-03-14 16:50:27 -04:00
Fernando Sahmkow 51ceb14a65 DirtyFlags: relax need to set render_targets as dirty
The texture cache already takes care of setting a render target to dirty 
when invalidated.
2020-03-14 11:47:33 -04:00
Fernando Sahmkow a261944a6a Merge pull request #3500 from ReinUsesLisp/incompatible-types
texture_cache: Report incompatible textures as black
2020-03-14 09:49:05 -04:00
Fernando Sahmkow 56fc1688f6 Merge pull request #3499 from ReinUsesLisp/depth-2d-array
texture_cache/surface_params: Force depth=1 on 2D textures
2020-03-14 09:48:39 -04:00
Fernando Sahmkow 34be867080 PageTable: move backing addresses to a children class as the CPU page table does not need them.
This PR aims to reduce the memory usage in the CPU page table by moving
GPU specific parameters into a child class. This saves 1Gb of Memory for
most games.
2020-03-14 09:43:57 -04:00
ReinUsesLisp 5c892bc5fd astc: Fix typos from search and replace 2020-03-14 01:05:20 -03:00
ReinUsesLisp 932c96f2b0 astc: Minor changes to InputBitStream 2020-03-14 00:45:54 -03:00
ReinUsesLisp c96749415c astc: Pass val in Replicate by copy 2020-03-14 00:13:58 -03:00
ReinUsesLisp 83bdac46d1 astc: Call std::vector:reserve on decodedClolorValues to avoid reallocating 2020-03-14 00:09:56 -03:00
Nguyen Dac Nam 2cd41ab020 clang-format 2020-03-14 10:07:40 +07:00
Nguyen Dac Nam d13e860a08 nit 2020-03-14 09:57:24 +07:00
ReinUsesLisp 8412a20f00 astc: Call std::vector::reserve on texelWeightValues to avoid reallocating 2020-03-13 23:52:51 -03:00
ReinUsesLisp fdbedfa8ef astc: Create a LUT at compile time for encoding values 2020-03-13 23:40:02 -03:00
ReinUsesLisp bac05076fd astc: Make IntegerEncodedValue a trivial structure 2020-03-13 22:49:28 -03:00
ReinUsesLisp ddd428097d astc: Make IntegerEncodedValue constructor constexpr 2020-03-13 22:36:45 -03:00
ReinUsesLisp 9aad3e84f0 astc: Make IntegerEncodedValue trivially copyable 2020-03-13 22:30:31 -03:00
ReinUsesLisp 0672618026 astc: Rename C types to common_types 2020-03-13 22:28:51 -03:00
ReinUsesLisp a3969886ca astc: Move Popcnt to an anonymous namespace and make it constexpr 2020-03-13 22:26:48 -03:00
ReinUsesLisp 0d8b0fe402 astc: Use common types instead of stdint.h integer types 2020-03-13 22:22:27 -03:00
ReinUsesLisp d9645551bc astc: Use 'enum class' instead of 'enum' for EIntegerEncoding 2020-03-13 22:20:12 -03:00
ReinUsesLisp 00de4b82b4 vk/gl_shader_decompiler: Silence assertion on compute 2020-03-13 18:33:05 -03:00
ReinUsesLisp 289e443898 vk_shader_decompiler: Fix default varying regression 2020-03-13 18:33:05 -03:00
ReinUsesLisp e7dfc5d8a3 maxwell_3d: Add padding words to XFB entries
Use INSERT_UNION_PADDING_WORDS instead of alignas to ensure a size
requirement.
2020-03-13 18:33:05 -03:00
ReinUsesLisp dcb8702efe gl_shader_decompiler: Fix implicit conversion errors 2020-03-13 18:33:05 -03:00
Rodrigo Locatti bae039e59c vk_shader_decompiler: Fix implicit type conversion
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-13 18:33:05 -03:00
ReinUsesLisp dd16e198e3 vk_rasterizer: Implement transform feedback binding zero 2020-03-13 18:33:05 -03:00
ReinUsesLisp 3d1d9650b9 vk_shader_decompiler: Add XFB decorations to generic varyings 2020-03-13 18:33:05 -03:00
ReinUsesLisp 5cf97a4a19 vk_device: Enable VK_EXT_transform_feedback when available 2020-03-13 18:33:05 -03:00
ReinUsesLisp ccf434d1f4 vk_device: Shrink formatless capability name size 2020-03-13 18:33:05 -03:00
ReinUsesLisp 8838f3322c shader/transform_feedback: Expose buffer stride 2020-03-13 18:33:05 -03:00
ReinUsesLisp fb404d9818 vk_shader_decompiler: Use registry for specialization 2020-03-13 18:33:05 -03:00
ReinUsesLisp fcc4b81079 gl_rasterizer: Implement transform feedback bindings 2020-03-13 18:33:04 -03:00
ReinUsesLisp 7e6d501452 gl_shader_decompiler: Decorate output attributes with XFB layout
We sometimes have to slice attributes in different parts. This is needed
for example in instances where the game feedbacks 3 components but
writes 4 from the shader (something that is possible with
GL_NV_transform_feedback).
2020-03-13 18:33:04 -03:00
ReinUsesLisp cb05500d6c shader/transform_feedback: Add host API friendly TFB builder 2020-03-13 18:33:04 -03:00
Rodrigo Locatti e836473754 Merge branch 'master' into shader-purge 2020-03-13 16:44:06 -03:00
bunnei 4ee2a50537 Merge pull request #3491 from ReinUsesLisp/polygon-modes
gl_rasterizer: Implement polygon modes and fill rectangles
2020-03-13 10:08:57 -04:00
Nguyen Dac Nam 12b08c1725 nit & remove some optional param 2020-03-13 20:47:38 +07:00
Nguyen Dac Nam 0a64ee04e3 shader_decode: implement XMAD mode CSfu 2020-03-13 19:01:49 +07:00
makigumo 2b56ec192d fix formatting 2020-03-13 11:37:24 +01:00
makigumo f00372cc31 maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32 2020-03-13 11:26:13 +01:00
Nguyen Dac Nam a9e6b48dc0 clang-format 2020-03-13 15:38:57 +07:00
Nguyen Dac Nam be63f9a0a2 Apply suggestions from code review
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-13 15:35:15 +07:00
Nguyen Dac Nam edabb9957a shader_decode: BFE add ref of reverse parallel method. 2020-03-13 14:20:18 +07:00
Nguyen Dac Nam 8b2bc366f8 shader_decode: implement BREV on BFE
Implement reverse parallel follow: https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
2020-03-13 14:13:31 +07:00
Nguyen Dac Nam 3f688622d7 shader_bytecode: update BFE instructions struct. 2020-03-13 12:52:16 +07:00
Nguyen Dac Nam 339b95dfa1 node_helper: add IBitfieldExtract case 2020-03-13 12:50:32 +07:00
Nguyen Dac Nam 86eb7ea0c7 shader_decode: Reimplement BFE instructions 2020-03-13 12:48:01 +07:00
ReinUsesLisp 7fe1da4478 gl_shader_decompiler: Initialize gl_Position on vertex shaders 2020-03-12 23:31:06 -03:00
Fernando Sahmkow b028bc272e Merge pull request #3483 from namkazt/patch-1
vk_rasterizer: fix mistype on SetupGraphicsImages
2020-03-12 22:10:48 -04:00
Fernando Sahmkow 4ea067bde4 Merge pull request #3480 from ReinUsesLisp/vk-disabled-ubo
vk_rasterizer: Support disabled uniform buffers
2020-03-12 22:09:49 -04:00
ReinUsesLisp 2bfe536e83 gl_shader_decompiler: Add missing {} on smem GLSL emission 2020-03-12 21:50:37 -03:00
ReinUsesLisp 25cfbc7786 video_core: Implement RGBA16_SNORM
Implement RGBA16_SNORM with the current API. Nothing special here.
2020-03-12 21:42:33 -03:00
ReinUsesLisp 9fce105f45 texture_cache: Report incompatible textures as black
Some games bind incompatible texture types to certain types.
For example Astral Chain binds a 2D texture with 1 layer (non-array) to
a cubemap slot (that's how it's used in the shader). After testing this
in hardware, the expected "undefined behavior" is to report all pixels
as black.

We already have a path for reporting black textures in the texture
cache. When textures types are incompatible, this commit binds these
kind of textures. This is done on the API agnostic texture cache so no
extra code has to be inserted on OpenGL or Vulkan.

As a side effect, this fixes invalidations of ASTC textures on Astral
Chain. This happened because yuzu detected a cube texture and forced
6 faces, generating a texture larger than what the TIC reported.
2020-03-12 18:22:05 -03:00
ReinUsesLisp 2337a2fdbc texture_cache/surface_params: Force depth=1 on 2D textures
Sometimes games will sample a 2D array TIC with a 2D access in the
shader. This causes bad interactions with the rest of the texture cache.
To emulate what the game wants to do, force a depth=1 on 2D textures
(not 2D arrays) and let the texture cache handle the rest.
2020-03-12 18:11:42 -03:00
ReinUsesLisp df815e0784 gl_shader_decompiler: Add layer component to texelFetch
TexelFetch was not emitting the array component generating invalid GLSL.
2020-03-12 18:10:29 -03:00
bunnei 586bdc38b0 Merge pull request #3497 from FernandoS27/microprogfile-extend
Small corrections and features to microprofile
2020-03-12 12:14:03 -04:00
bunnei c59b8e9e8f Merge pull request #3496 from vitor-k/remove-enum
framebuffer_layout.h: drop the use of enum for screen dimensions
2020-03-12 12:00:39 -04:00
Fernando Sahmkow babc572a47 NVFlinger: Do the microprofile Flip after processing a valid frame. 2020-03-12 10:52:44 -04:00
ReinUsesLisp ba8c1c6d1e gl_shader_decompiler: Fix regression in render target declarations
A previous commit introduced a way to declare as few render targets as
possible. Turns out this introduced a regression in some games.
2020-03-12 05:01:20 -03:00
bunnei 91dab10af0 Merge pull request #3494 from ReinUsesLisp/fix-cs-pipeline
gl_shader_manager: Fix interaction between graphics and compute
2020-03-11 13:51:54 -04:00
Vitor Kiguchi d28c202e1d framebuffer_layout.h: drop the use of enum for screen dimensions.
+clang format
2020-03-11 14:22:28 -03:00
ReinUsesLisp 37c5dadbc3 gl_shader_manager: Fix interaction between graphics and compute
After a compute shader was set to the pipeline, no graphics shader was
invoked again. To address this use glUseProgram to bind compute shaders
(without state tracking) and call glUseProgram(0) when transitioning out
of it back to the graphics pipeline.
2020-03-11 01:04:52 -03:00
bunnei 6aa4b40cb7 Merge pull request #3458 from FearlessTobi/voice-issues
cubeb_sink: Don't discard other channels when performing downmixing
2020-03-10 22:18:37 -04:00
ReinUsesLisp 96fdbc638a gl_rasterizer: Implement polygon modes and fill rectangles 2020-03-09 20:39:58 -03:00
ReinUsesLisp 207b9ba28c engines/maxwell_3d: Add TFB registers and store them in shader registry 2020-03-09 18:40:53 -03:00
ReinUsesLisp 4dcb56ddbd shader/registry: Address feedback 2020-03-09 18:40:53 -03:00
ReinUsesLisp 00e790c3de gl_shader_decompiler: Add identifier to decompiled code 2020-03-09 18:40:53 -03:00
ReinUsesLisp 8c2bf4879f gl_shader_decompiler: Roll back to GLSL core 430
RenderDoc won't build shaders if we use GLSL compatibility.
2020-03-09 18:40:53 -03:00
ReinUsesLisp 7a93d38e0f const_buffer_engine_interface: Store component types
This is required for Vulkan. Sampling integer textures with float
handles is illegal.
2020-03-09 18:40:53 -03:00
ReinUsesLisp 1f4e8db223 yuzu/loading_screen: Remove unused shader progress mode 2020-03-09 18:40:53 -03:00
ReinUsesLisp 25cfb69c40 gl_shader_cache: Reduce registry consistency to debug assert
Registry consistency is something that practically can't happen and it
has a measurable runtime cost. Reduce it to a DEBUG_ASSERT.
2020-03-09 18:40:07 -03:00
ReinUsesLisp 776aa5bdf9 shader/registry: Cache tessellation state 2020-03-09 18:40:07 -03:00
ReinUsesLisp 22052e73de shader/registry: Store graphics and compute metadata
Store information GLSL forces us to provide but it's dynamic state in
hardware (workgroup sizes, primitive topology, shared memory size).
2020-03-09 18:40:07 -03:00
ReinUsesLisp 99be31c902 video_core: Rename "const buffer locker" to "registry" 2020-03-09 18:40:06 -03:00
ReinUsesLisp 8021ee48a3 gl_shader_cache: Rework shader cache and remove post-specializations
Instead of pre-specializing shaders and then post-specializing them,
drop the later and only "specialize" the shader while decoding it.
2020-03-09 18:40:06 -03:00
Rodrigo Locatti 8d86741eb9 Merge pull request #3301 from ReinUsesLisp/state-tracker
video_core: Remove gl_state and use a state tracker based on dirty flags
2020-03-09 18:34:37 -03:00
ReinUsesLisp b8e43cb17c textures: Fix anisotropy hack
Previous code could generate an anisotropy value way higher than x16.
2020-03-08 15:59:38 -03:00
FearlessTobi 3f2f75021e cubeb_sink: Don't discard other channels when performing downmixing
Previously, when performing downmixing, we would discard all channels except the left and right one.
This implementation respects them when mixing down to Stereo.
It is taken from this document: http://www.atsc.org/wp-content/uploads/2015/03/A52-201212-17.pdf.

Fixes Luigis Mansion 3 cutscene and Bayonetta audio.
2020-03-08 03:16:06 -04:00
bunnei 978cd350dd Merge pull request #3452 from Morph1984/anisotropic-filtering
frontend/Graphics: Add "Advanced" graphics tab and experimental Anisotropic Filtering support
2020-03-07 22:28:35 -05:00
Nguyen Dac Nam 9516f0923c vk_reasterizer: fix mistype on SetupGraphicsImages
This should use Maxwell3D engine. Fixed some GPU error on Kirby and maybe other games.
2020-03-08 10:06:59 +07:00
bunnei 437d6b6dc6 Merge pull request #3481 from ReinUsesLisp/abgr5-storage
maxwell_to_vk: Remove Storage capability for A1B5G5R5U
2020-03-07 19:51:33 -05:00
ReinUsesLisp ee8ef2998d vk_rasterizer: Support disabled uniform buffers 2020-03-06 18:47:51 -03:00
ReinUsesLisp 09820ecef0 maxwell_to_vk: Remove Storage capability for A1B5G5R5U 2020-03-06 18:47:27 -03:00
bunnei bd02dfb94a Merge pull request #3463 from ReinUsesLisp/vk-toctou
vk_swapchain: Silence TOCTOU race condition
2020-03-05 19:38:42 -05:00
bunnei 3a32c37deb Merge pull request #3479 from jroweboy/dont-log-on-no-input
Minor fixes for udp input
2020-03-05 15:09:48 -05:00
bunnei cb84f86f3d Merge pull request #3451 from ReinUsesLisp/indexed-textures
vk_shader_decompiler: Implement indexed textures
2020-03-05 11:42:46 -05:00
bunnei 2349ab9dc6 Merge pull request #3469 from namkazt/patch-1
shader_decode: Fix LD, LDG when track constant buffer
2020-03-04 23:10:01 -05:00
bunnei a157ecf76c Merge pull request #3478 from bunnei/a32
Refactoring to boot A32 games
2020-03-04 20:37:51 -05:00
James Rowe 37cf312477 input/udp - Add minor error handling to prevent bad input from crashing 2020-03-03 23:46:05 -07:00
bunnei 6c42a3b9de Merge pull request #3455 from ReinUsesLisp/attr-scaled
video_core: Implement more scaled attribute formats
2020-03-03 22:46:20 -05:00
James Rowe 166ba99e3e Frontend/SDL - Provide proper default for UDP input
When the default file is read in, the settings default value is only used
when the key is missing. As it was, the key existed, but the value was empty string
causing it to accept that as a value to pass into the core
2020-03-03 20:05:42 -07:00
James Rowe f40becae29 input/udp - Dont log on invalid packet received 2020-03-03 19:52:16 -07:00
bunnei 36c4c33bb8 core: hle: Implement separate A32/A64 SVC interfaces. 2020-03-02 21:52:03 -05:00
bunnei 048ac77adc core: Implement separate A32/A64 ARM interfaces. 2020-03-02 21:51:57 -05:00
bunnei 9b0419ce67 core: loader: Remove check for 32-bit. 2020-03-02 21:43:15 -05:00
bunnei 9137455d86 core: dynarmic: Add CP15 from Citra. 2020-03-02 21:43:15 -05:00
bunnei 07f23df4cb Merge pull request #3464 from FernandoS27/jit-fix
ARM_Interface: Cache the JITs instead of deleting/recreating.
2020-03-02 21:41:43 -05:00
Nguyen Dac Nam 5658f77467 nit: move comment to right place. 2020-02-29 13:50:10 +07:00
bunnei 17b972f3bf Merge pull request #3448 from bunnei/fix-audio-interp-2
audio_core: interpolate: Improvements to fix audio crackling.
2020-02-28 16:07:10 -05:00
ReinUsesLisp f391be4227 video_core/dirty_flags: Address feedback 2020-02-28 17:56:43 -03:00
ReinUsesLisp a440a79146 renderer_opengl: Fix edge-case where alpha testing might cull presentation 2020-02-28 17:56:43 -03:00
ReinUsesLisp 950450fd8a gl_texture_cache: Remove blending disable on blits
Blending doesn't affect blits. Rasterizer discard does, update the
commentaries.
2020-02-28 17:56:43 -03:00
ReinUsesLisp 1a5c68bbef gl_rasterizer: Don't disable blending on clears
Blending doesn't affect clears.
2020-02-28 17:56:43 -03:00
ReinUsesLisp 3de883d37b dirty_flags: Deduplicate code between OpenGL and Vulkan 2020-02-28 17:56:43 -03:00
ReinUsesLisp a8c9550a12 vk_rasterizer: Pass Maxwell registers to dynamic updates 2020-02-28 17:56:43 -03:00
ReinUsesLisp 2eb2855b05 state_tracker: Remove type traits with named structures 2020-02-28 17:56:43 -03:00
ReinUsesLisp 59db5829f5 vk_state_tracker: Implement dirty flags for stencil properties 2020-02-28 17:56:43 -03:00
ReinUsesLisp b06a3534ea vk_state_tracker: Implement dirty flags for depth bounds 2020-02-28 17:56:43 -03:00
ReinUsesLisp 4c4bd85947 vk_state_tracker: Implement dirty flags for blend constants 2020-02-28 17:56:43 -03:00
ReinUsesLisp 1ccf5ba777 vk_state_tracker: Implement dirty flags for depth bias 2020-02-28 17:56:43 -03:00
ReinUsesLisp ff0c2cb0a4 vk_state_tracker: Implement dirty flags for scissors 2020-02-28 17:56:43 -03:00
ReinUsesLisp 69db1cd1f9 vk_state_tracker: Initial implementation
Add support for render targets and viewports.
2020-02-28 17:56:43 -03:00
ReinUsesLisp f903c3800e gl_rasterizer: Remove num vertex buffers magic number 2020-02-28 17:56:43 -03:00
ReinUsesLisp b7af0cc2ee gl_rasterizer: Only apply polygon offset clamp if enabled 2020-02-28 17:56:43 -03:00
ReinUsesLisp 6ea3b6253e gl_state_tracker: Implement dirty flags for depth clamp enabling 2020-02-28 17:56:43 -03:00
ReinUsesLisp 084a112d6c gl_rasterizer: Disable scissor 0 when scissor is not used on clear 2020-02-28 17:56:43 -03:00
ReinUsesLisp a48930ac7c gl_rasterizer: Notify depth mask changes on clear 2020-02-28 17:56:43 -03:00
ReinUsesLisp f6e5b9e775 gl_rasterizer: Minor sort changes to clearing 2020-02-28 17:56:42 -03:00
ReinUsesLisp 31daa97fce maxwell_3d: Use two tables instead of three for dirty flags 2020-02-28 17:56:42 -03:00
ReinUsesLisp 5d75921b0f gl_state_tracker: Track state of index buffers 2020-02-28 17:56:42 -03:00
ReinUsesLisp 085cca1a2c gl_state_tracker: Implement dirty flags for clip control 2020-02-28 17:56:42 -03:00
ReinUsesLisp de5a81846d gl_state_tracker: Implement dirty flags for point sizes 2020-02-28 17:56:42 -03:00
ReinUsesLisp cd63e8d770 gl_state_tracker: Implement dirty flags for fragment color clamp 2020-02-28 17:56:42 -03:00
ReinUsesLisp d01d671249 gl_state_tracker: Implement dirty flags for logic op 2020-02-28 17:56:42 -03:00
ReinUsesLisp 5c2d6d7e60 gl_state_tracker: Implement dirty flags for sRGB 2020-02-28 17:56:42 -03:00
ReinUsesLisp 68b8e45c90 gl_state_tracker: Implement dirty flags for rasterize enable 2020-02-28 17:56:42 -03:00
ReinUsesLisp ec5b0560cb gl_state_tracker: Implement dirty flags for multisample 2020-02-28 17:56:42 -03:00
ReinUsesLisp 491ccb08df gl_state_tracker: Implement dirty flags for alpha testing 2020-02-28 17:56:42 -03:00
ReinUsesLisp 2ccac5964f gl_state_tracker: Implement dirty flags for polygon offsets 2020-02-28 17:56:42 -03:00
ReinUsesLisp aaf414a81b gl_state_tracker: Implement dirty flags for primitive restart 2020-02-28 17:56:42 -03:00
ReinUsesLisp 0b99bf70d8 gl_state_tracker: Implement dirty flags for stencil testing 2020-02-28 17:56:42 -03:00
ReinUsesLisp 7a7310e569 gl_state_tracker: Implement depth dirty flags 2020-02-28 17:56:42 -03:00
ReinUsesLisp 1ce88e6353 gl_state_tracker: Implement dirty flags for front face and culling 2020-02-28 17:56:42 -03:00
ReinUsesLisp eac75695c3 gl_state_tracker: Implement dirty flags for blending 2020-02-28 17:56:42 -03:00
ReinUsesLisp 25ff66b197 gl_state_tracker: Implement dirty flags for clip distances and shaders 2020-02-28 17:56:42 -03:00
ReinUsesLisp a5ee496714 gl_state_tracker: Add dirty flags for buffers and divisors 2020-02-28 17:56:42 -03:00
ReinUsesLisp e94ea8758d maxwell_3d: Change write dirty flags to a bitset 2020-02-28 17:56:42 -03:00
ReinUsesLisp 8798448c7b gl_state_tracker: Implement dirty flags for vertex formats 2020-02-28 17:56:42 -03:00
ReinUsesLisp edb6fe5200 gl_state_tracker: Implement dirty flags for color masks 2020-02-28 17:56:42 -03:00
ReinUsesLisp 587dff21dc gl_state_tracker: Implement dirty flags for scissors 2020-02-28 17:56:42 -03:00
ReinUsesLisp fb114073d3 gl_state_tracker: Implement dirty flags for viewports 2020-02-28 17:56:41 -03:00
ReinUsesLisp 52973c9b53 renderer_opengl: Reintroduce dirty flags for render targets 2020-02-28 17:56:41 -03:00
ReinUsesLisp 95596b787e maxwell_3d: Flatten cull and front face registers 2020-02-28 17:56:41 -03:00
ReinUsesLisp 005f5ca883 video_core: Reintroduce dirty flags infrastructure 2020-02-28 17:56:41 -03:00
ReinUsesLisp 02ae826edd gl_state: Remove completely 2020-02-28 17:56:35 -03:00
ReinUsesLisp 486721cb6c gl_state: Remove program tracking 2020-02-28 17:52:14 -03:00
ReinUsesLisp 24cb363eb8 gl_state: Remove framebuffer tracking 2020-02-28 17:52:10 -03:00
ReinUsesLisp 49725f0472 gl_state: Remove image tracking 2020-02-28 17:36:40 -03:00
ReinUsesLisp 3e8bde451d gl_state: Remove texture and sampler tracking 2020-02-28 17:35:58 -03:00
ReinUsesLisp 0b17608266 gl_state: Remove blend state tracking 2020-02-28 17:34:43 -03:00
ReinUsesLisp ca3cf56db5 gl_state: Remove stencil test tracking 2020-02-28 17:32:05 -03:00
ReinUsesLisp 6e186f819b gl_state: Remove clip control tracking 2020-02-28 17:31:57 -03:00
ReinUsesLisp 8b76fc1fff gl_state: Remove clip distances tracking 2020-02-28 17:26:26 -03:00
ReinUsesLisp 86936bcf40 gl_state: Remove rasterizer disable tracking 2020-02-28 17:25:28 -03:00
ReinUsesLisp b810da8400 gl_state: Remove viewport and depth range tracking 2020-02-28 17:25:18 -03:00
ReinUsesLisp 0b91f473a0 gl_state: Remove scissor test tracking 2020-02-28 17:00:23 -03:00
ReinUsesLisp 715ae82639 gl_state: Remove color mask tracking 2020-02-28 16:59:17 -03:00
ReinUsesLisp e96c0d880a gl_state: Remove clamp framebuffer color tracking
This commit doesn't reset it for screen draws because clamping doesn't
change anything there.
2020-02-28 16:58:30 -03:00