summaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-12-07hle: kernel: Remove unnecessary virtual specifier on CancelWait.bunnei6-14/+14
2021-12-07hle: kernel: service_thread: Force stop threads on destruction.bunnei1-1/+7
2021-12-07hle: kernel: k_light_lock: Implement CancelWait.bunnei1-5/+10
- Fixes a crash in Megadimension Neptunia VII.
2021-12-07hle: kernel: service_thread: Use std::jthread.bunnei1-18/+19
- Fixes a potential deadlock on service thread shutdown.
2021-12-07hle: kernel: k_thread: Skip reschedule on DisableDispatch with SC.bunnei1-0/+5
2021-12-07hle: kernel: k_thread: Rename sleeping_queue -> wait_queue.bunnei2-17/+13
2021-12-07hle: kernel: svc: Fix deadlock that can occur with single core.bunnei1-10/+8
2021-12-07hle: kernel: k_thread: Treat dummy threads as a special type.bunnei2-1/+4
2021-12-07hle: kernel: fix timing on thread preemptionFernandoS271-4/+2
2021-12-07hle: kernel: fix scheduling ops from HLE host thread.FernandoS271-3/+3
2021-12-07hle: kernel: Add a flag for indicating that the kernel is currently shutting down.bunnei6-0/+49
2021-12-07hle: kernel: KSynchronizationObject: Fix variable shadowing.bunnei1-8/+8
2021-12-07hle: kernel: Cleanup to match coding style.bunnei6-26/+21
2021-12-07hle: kernel: KProcess: Improvements for thread pinning.bunnei2-8/+26
2021-12-07hle: kernel: KThreadQueue: Remove deprecated code.bunnei1-63/+0
2021-12-07hle: kernel: KConditionVariable: Various updates & simplifications.bunnei2-121/+65
2021-12-07hle: kernel: KThread: Migrate to updated KThreadQueue (part 2).bunnei1-29/+19
2021-12-07hle: kernel: KThread: Migrate to updated KThreadQueue (part 1).bunnei3-60/+71
2021-12-07hle: kernel: KConditionVariable: Migrate to updated KThreadQueue.bunnei1-12/+55
2021-12-07hle: kernel: KServerSession: Migrate to updated KThreadQueue.bunnei2-5/+11
2021-12-07hle: kernel: KLightConditionVariable: Migrate to updated KThreadQueue.bunnei3-54/+87
2021-12-07hle: kernel: KLightLock: Migrate to updated KThreadQueue.bunnei2-35/+36
2021-12-07hle: kernel: KAddressArbiter: Migrate to updated KThreadQueue.bunnei1-43/+39
2021-12-07hle: kernel: KThread: Remove tracking of sync object from threads.bunnei6-41/+21
2021-12-07hle: kernel: Update KThreadQueue and migrate KSynchronizationObject.bunnei8-75/+251
2021-12-07core: hle: kernel: Disable dispatch count tracking on single core.bunnei3-5/+14
- This would have limited value, and would be a mess to handle properly.
2021-12-07core: hle: kernel: k_thread: Mark KScopedDisableDispatch as nodiscard.bunnei1-1/+1
2021-12-07core: cpu_manager: Use invalid core_id on init and simplify shutdown.bunnei1-7/+3
2021-12-07core: hle: kernel: k_auto_object: Add GetName method.bunnei1-0/+4
- Useful purely for debugging.
2021-12-07core: hle: kernel: DisableDispatch on suspend threads.bunnei1-0/+3
2021-12-07core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling.bunnei1-14/+9
2021-12-07core: cpu_manager: Use KScopedDisableDispatch.bunnei1-7/+8
2021-12-07core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate.bunnei1-6/+2
2021-12-07core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess.bunnei1-5/+0
2021-12-07core: hle: kernel: k_scheduler: Improve ScheduleImpl.bunnei1-6/+7
2021-12-07core: hle: kernel: k_scheduler: Improve Unload.bunnei1-17/+29
2021-12-07core: hle: kernel: k_process: DisableDispatch on main thread.bunnei1-0/+1
2021-12-07core: hle: kernel: k_handle_table: Use KScopedDisableDispatch as necessary.bunnei2-0/+8
2021-12-07core: hle: kernel: k_thread: Add KScopedDisableDispatch.bunnei2-1/+47
2021-12-07core: hle: kernel: Ensure idle threads are closed before destroying scheduler.bunnei3-24/+22
2021-12-07core: hle: kernel: Reflect non-emulated threads as core 3.bunnei7-14/+17
2021-12-06service/hid: Stub SetNpadCaptureButtonAssignment and ClearNpadCaptureButtonAssignmentgerman772-2/+35
Used by ring fit adventure 1.2.0
2021-12-06loader: Support loading subsdk{8,9}jam1garner1-2/+3
2021-12-05general: Add missing copyright noticesameerj5-0/+20
2021-12-05core/hid: Add missing controller typegerman771-0/+2
2021-12-05core/hid: Ensure only valid npad are connectedgerman778-88/+147
2021-12-04native_clock: Wait for less time in EstimateRDTSCFrequencyMorph1-18/+18
In my testing, waiting for 200ms provided the same level of precision as the previous implementation when estimating the RDTSC frequency. This significantly improves the yuzu executable launch times since we reduced the wait time from 3 seconds to 200 milliseconds.
2021-12-03video_core/cmake: link against libva explicitly ...liushuyu1-0/+1
... to fix build on Flatpak (and self-builds)
2021-12-03video_core/codecs: more fixes for VAAPI detection ...liushuyu1-63/+25
* skip impersonated VAAPI implementaions ("imposter detection") * place VAAPI priority below CUDA/NVDEC/CUVID
2021-12-03video_core/codec: address commentsliushuyu1-8/+12
2021-12-03video_core/codecs: more robust ffmpeg hwdecoder selection logicliushuyu1-10/+27
2021-12-03service: am: ISelfController: Stub SaveCurrentScreenshotMorph3-2/+15
- Used by Disney Magical World 2: Enchanted Edition
2021-12-02yuzu: Implement basic controller navigationgerman779-8/+285
2021-12-02general: Replace high_resolution_clock with steady_clockMorph7-13/+13
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
2021-11-30service: friend: Implement GetCompletionEventMorph1-2/+21
- Used by Super Bomberman R Online
2021-11-30input_common: Fix error with thread nameNarr the Reg1-2/+1
2021-11-30input_interpreter: Make use of NpadButton instead of a u64Morph2-9/+9
Allows us to be more explicit with the representation of button states and use the provided bit manipulation operators
2021-11-30npad: Return NpadButton in GetAndResetPressStateMorph3-7/+6
We were previously truncating this to a u32 as there were no known buttons that used the full 64 bits of this type. Fix this now that we know they are used.
2021-11-30core: hid: hid_types: Add "All" to NpadButtonMorph1-0/+2
This represents a bitmask for all pressed buttons
2021-11-30qt_controller: Make use of (Enable/Disable)AllControllerConfigurationMorph1-8/+5
This also moves the use of DisableConfiguration to the destructor.
2021-11-29core: hid: hid_core: Add (Enable/DIsable)AllControllerConfigurationMorph2-0/+32
2021-11-29general: Fix handheld typoMorph2-17/+17
2021-11-29core: hid: Mark constructors as explicitMorph2-2/+2
2021-11-29core: hid: Cleanup and amend documentationMorph4-69/+76
2021-11-29Add missing pixel format mappingFeng Chen1-0/+2
2021-11-29qt_controller: Fix input when the controller applet is ignoredgerman771-0/+3
2021-11-28Texture Cache: Secure insertions against deletions.Fernando Sahmkow1-3/+13
2021-11-28core/ns: Implement GetReadOnlyApplicationControlDataInterfaceNarr the Reg2-1/+26
Used in checkpoint homebrew
2021-11-28core/pdm: Stub QueryPlayStatisticsByApplicationIdAndUserAccountIdNarr the Reg4-0/+107
Used in checkpoint homebrew
2021-11-28settings: Add debug setting to enable all controllersgerman778-0/+75
2021-11-27core/hid: Stub GetUniquePadsFromNpadNarr the Reg1-1/+13
Used in checkpoint homebrew
2021-11-27Texture Cache: Redesigning the blitting system (again).Fernando Sahmkow3-23/+64
2021-11-27config: Remove vibration configurationgerman777-104/+3
2021-11-27applet/controller: Enable configuring mode while the applet is opengerman771-7/+12
2021-11-26input_common: Fully implement UDP controllersNarr the Reg12-40/+397
2021-11-26Texture Cache: Further fix regressions.Fernando Sahmkow1-11/+15
2021-11-25service/hid: Finish converting LIFO objects and address some nitsNarr the Reg14-95/+50
2021-11-25yuzu: Fix TAS from rebasegerman773-9/+11
2021-11-25input_common: Move button names to the frontendgerman7712-52/+160
2021-11-25input_common: Fix SDL controller with inverted axisgerman772-24/+8
2021-11-25bootmanager: Use cross-platform keyboard inputgerman773-39/+58
2021-11-25kraken: Address comments from reviewgerman7717-66/+54
Fix compiler bug
2021-11-25core/hid: Improve accuary of mouse implementationgerman7714-48/+79
2021-11-25core/hid: Fully implement native mousegerman7721-1039/+323
2021-11-25input_common: Allow keyboard to be backwards compatiblegerman7710-48/+115
2021-11-25core/hid: Improve accuracy of the keyboard implementationgerman7713-313/+682
2021-11-25core/hid: Fix keyboard alignmentgerman772-12/+14
2021-11-25core/hid: Remove usage of native types, fix a couple of errors with motiongerman7711-428/+632
2021-11-25settings: Remove includes of core.hgerman7710-57/+55
2021-11-25service/hid: Remove includes of core.h and settings.hgerman7729-67/+67
2021-11-25 UI nitsLevi Behunin1-9/+6
Set top margin to 6 on Right Stick, LeftStick, Face Buttons, D-Pad. Change property on Input Device QComboBox from minimumSize to minimumContentsLength.
2021-11-25service/hid: Add support for new controllersgerman772-2/+31
2021-11-25settings: Fix controller preview not displaying the correct controllergerman773-4/+7
2021-11-25core/hid: Rename NpadType to NpadStyleIndexgerman7715-215/+228
2021-11-25config: Cleanup and documentationgerman778-99/+46
2021-11-25input_common: Fix motion from 3 axisgerman771-0/+2
2021-11-25core/hid: Prevent Emulated controller from flapping with multiple inputs devicesgerman775-36/+77
2021-11-25core/hid: Fully emulate motion from buttongerman777-37/+97
2021-11-25second commit lion reviewgerman7728-42/+73
2021-11-25settings: Fix Debug controller type optionsgerman7713-95/+77
2021-11-25kraken: Address comments from reviewgerman7731-466/+534
start lion review
2021-11-25input_common: Revert deleted TAS functionsgerman777-48/+122
2021-11-25core/hid: Explain better what a temporary value doesgerman772-24/+28
2021-11-25input_common: Fix GC adapter initializationgerman771-12/+12
Fix GC controller
2021-11-25core/hid: Update structs to 13.1.0german7712-50/+107
2021-11-25core/hid: Add TAS inputgerman776-13/+82
2021-11-25input_common: Fix UDP uuidgerman773-2/+16
2021-11-25input_common: Add multiple vibration curvesgerman772-15/+28
2021-11-25core/hid: Rework battery mappingsgerman779-46/+109
2021-11-25input_common: Add manual update options to input devicesgerman775-0/+56
2021-11-25service/hid: Fix memory allocated incorrectlygerman775-7/+7
2021-11-25settings: Fix mouse and keyboard mappingsgerman7710-105/+102
2021-11-25web_applet: Replace HIDButton with NpadButtongerman773-36/+44
2021-11-25Morph review first wavegerman7723-136/+117
2021-11-25service/hid: Match shared memory closer to HWgerman772-26/+75
2021-11-25yuzu: Fix loading input profilesgerman772-0/+9
2021-11-25kraken: Address comments from reviewgerman7715-56/+56
review fixes
2021-11-25service/hid: Use ring buffer for gesturesgerman772-79/+52
2021-11-25service/hid: Fix gesture inputgerman778-91/+159
2021-11-25configuration: Migrate controller settings to emulated controllergerman7712-127/+141
2021-11-25core/hid: Fix rumble too strong at 1%german773-13/+48
2021-11-25core/hid: Only signal when neededgerman7711-153/+240
2021-11-25hid: Fix controller connection/disconnectiongerman7710-65/+226
2021-11-25core/hid: Documment some filesgerman774-52/+265
2021-11-25kraken: Fix errors from rebase and format filesgerman7720-53/+83
2021-11-25core/hid: Add output devicesgerman7720-144/+312
2021-11-25core: Update input interpretergerman774-54/+18
2021-11-25yuzu: Update overlay appletgerman772-16/+21
2021-11-25core/frontend: Update appletsgerman772-10/+15
2021-11-25core: Remove frontend/inputgerman771-217/+0
2021-11-25service/hid: Rewrite npad to use ring lifo and the emulated controllergerman772-890/+605
2021-11-25service/hid: Update console sixaxis to the emulated consolegerman772-28/+26
2021-11-25service/hid: Update mouse and keyboard to use ring lifo and the emulated devicegerman774-158/+71
2021-11-25service/hid: Update touch and gestures to use ring lifo and the emulated consolegerman774-370/+191
2021-11-25service/hid: Update debug pad, xpad, stubbed and controller base to use ring lifo and the emulated controllergerman777-166/+80
2021-11-25service/hid: Use remove duplicated code, update namesgerman772-64/+30
2021-11-25service/hid: Create ring LIFOgerman772-1/+55
2021-11-25Qt_applets: Use new inputgerman775-49/+68
2021-11-25settings: Cleanup settingsgerman776-9/+16
2021-11-25debugger/controller: Remove TASgerman772-46/+5
2021-11-25core/emu_window: Remove touch inputgerman772-113/+15
2021-11-25yuzu: Update frontendgerman7713-1010/+822
2021-11-25core: Register HIDgerman773-4/+25
2021-11-25core/hid: Add emulated controllersgerman779-0/+2025
2021-11-25yuzu_cmd: Use new inputgerman773-45/+39
2021-11-25yuzu: Use new input on main and bootmanagergerman773-68/+59
2021-11-25input_common: Rewrite main and add the new driversgerman772-49/+330
2021-11-25input_common: Remove obsolete filesgerman775-444/+0
2021-11-25input_common: Rewrite SDLgerman776-1757/+950
2021-11-25input_common: Rewrite udp clientgerman775-441/+54
2021-11-25input_common: Rewrite tas inputgerman775-840/+2
2021-11-25input_common: Rewrite gc_adaptergerman778-827/+848
2021-11-25input_common: Rewrite touchgerman773-0/+99
2021-11-25input_common: Rewrite mousegerman777-751/+217
2021-11-25input_common: Rewrite keyboardgerman7711-614/+95
2021-11-25input_common: Move touch and analog from button. Move udp protocolgerman7710-132/+172
2021-11-25input_common: Create input poller and mappinggerman776-0/+1305
2021-11-25input_common: Create input_enginegerman772-0/+585
2021-11-25core/hid: Move motion_input, create input converter and hid_typesgerman776-0/+1164
2021-11-25core/hid: Move input_interpreter to hidgerman774-4/+4
2021-11-25common: Rewrite and move core/frontend/input.h to commongerman772-0/+243
2021-11-25Refactor menu states and shortcuts in GMainWindow. (#7419)Adam Heinermann3-237/+175
Refactor menu states and shortcuts in GMainWindow. - Removed "Start", since it was always disabled unless it was "Continue" which has now been moved to "Pause". - Allow hotkeys to be used while in fullscreen. - Removed the load amiibo hotkey.
2021-11-25video_core/codec: address commentsliushuyu1-17/+11
2021-11-25video_core/codecs: fix multiple decoding issues on Linux ...liushuyu1-2/+47
* when someone installed Intel video drivers on an AMD system, the decoder will select the Intel VA-API decoding driver and yuzu will crash due to incorrect driver selection; the fix will check if the currently about-to-use driver is loaded in the kernel * when using NVIDIA driver on Linux with a ffmpeg that does not have CUDA capability enabled, the decoder will crash; the fix simply making the decoder prefers the VDPAU driver over CUDA on Linux
2021-11-22Texture Cache: Fix issue with blitting 3D textures.Fernando Sahmkow1-2/+4
2021-11-22arm: dynarmic: Cleanup icache op handlingjam1garner1-10/+9
2021-11-22arm: dynarmic: Implement icache op handling for 'ic iallu' instructionjam1garner1-0/+3
2021-11-22arm: dynarmic: Implement icache op handling for 'ic ivau' instructionjam1garner1-0/+18
2021-11-22const fixesAdam Heinermann2-3/+3
2021-11-22Apply clang formatAdam Heinermann1-1/+0
2021-11-22Added TAS controls to the menu under ToolsAdam Heinermann5-57/+153
2021-11-22Texture Cache: Correct conversion shaders.Fernando Sahmkow2-2/+2
2021-11-22Texture Cache: Always copy on NVIDIA.Fernando Sahmkow1-0/+5
2021-11-22TextureCache: Simplify blitting of D24S8 formats and fix bugs.Fernando Sahmkow10-195/+73
2021-11-21VulkanTexturECache: Use reinterpret on D32_S8 formats.Fernando Sahmkow1-2/+7
2021-11-21HostShaders: Fix D24S8 convertion shaders.Fernando Sahmkow6-23/+47
2021-11-21configure_general: Allow framerate cap to be used in custom game configsKewlan5-27/+99
2021-11-21TextureCache: Eliminate format deduction as full depth conversion has been supported.Fernando Sahmkow2-29/+5
2021-11-21kernel: svc: Move all IsValid functions to an anonymous namespaceMorph1-3/+15
2021-11-21kernel: svc: Implement SetProcessMemoryPermissionMorph1-1/+41
- Used by Skyline modding framework
2021-11-21kernel: KPageTable: Rename SetCodeMemoryPermission to SetProcessMemoryPermissionMorph4-8/+8
2021-11-21vk_texture_cache: Mark VkBufferUsageFlags as static constexprMorph1-3/+3
2021-11-21vk_blit_image: Consolidate CreatePipelineTargetEx functionsMorph2-28/+13
2021-11-21service: pm: Implement AtmosphereGetProcessIdMorph1-0/+24
- Used by Skyline modding framework
2021-11-21service: pm: Add all relevant result codesMorph1-3/+8
2021-11-21service: pm: Rename title id to program idMorph1-6/+6
2021-11-20Fix screenshot dimensions when at 1x scaleameerj5-20/+8
This was regressed by ART. Prior to ART, the screenshots were saved at the title's framebuffer resolution. A misunderstanding of the existing logic led to screenshot dimensions becoming dependent on the host render window size. This changes the behavior to match how it was prior to ART at 1x, with screenshots now always being the title's framebuffer dimensions scaled by the resolution scaling factor.
2021-11-20TextureCache: Refactor and fix linux compiling.Fernando Sahmkow3-9/+11
2021-11-20TextureCache: Assure full conversions on depth/stencil write shaders.Fernando Sahmkow3-6/+6
2021-11-20TextureCache: Implement buffer copies on Vulkan.Fernando Sahmkow6-9/+193
2021-11-20TextureCache: Add R16G16 to D24S8 converter.Fernando Sahmkow5-0/+38
2021-11-19TextureCache: Add B10G11R11 to D24S8 converter.Fernando Sahmkow5-13/+84
2021-11-19TextureCache: Further fixes on resolve algorithm.Fernando Sahmkow2-16/+17
2021-11-19TextureCache: Implement additional D24S8 convertions.Fernando Sahmkow6-0/+86
2021-11-19TextureCache: force same image format when resolving an image.Fernando Sahmkow2-2/+9
2021-11-19main: Fix default AA nameMorph1-4/+4
By default, no AA is applied, not FXAA
2021-11-19configure_graphics_ui: AMD's -> AMDMorph1-1/+1
AMD officially markets FSR as AMD FidelityFX™️ Super Resolution
2021-11-19main: Shorten AMD FSR status bar textMorph1-1/+1
AMD'S FIDELITYFX SR -> FSR
2021-11-19TextureCache: Fix regression caused by ART and improve blit detection algorithm to be smarter.Fernando Sahmkow2-10/+27
2021-11-19Vulkan: implement D24S8 <-> RGBA8 convertions.Fernando Sahmkow6-0/+166
2021-11-18renderer_vulkan: Implement S8_UINT stencil formatMorph3-0/+18
It should be noted that on Windows, only nvidia gpus support this format natively as of this commit.
2021-11-18gl_texture_cache: Round format conversion PBO to next power of 2ameerj1-1/+5
2021-11-18Fix crash on exit due to static scoped dummy threadsAdam Heinermann1-8/+14
2021-11-17renderer_opengl: Implement S8_UINT stencil formatMorph3-6/+25
2021-11-17video_core: Add S8_UINT stencil formatMorph4-3/+21
2021-11-17hotkeys: Don't allow hotkeys to spamgerman771-0/+2
2021-11-17Prevent window flickering when holding EscValeri1-1/+1
Reported on discord by Levlight. Don't try to exit fullscreen if it's already off.
2021-11-17Fix image update/download error when width too smallFeng Chen2-10/+18
2021-11-17texture_cache: Use pixel format conversion when supported by the runtimeameerj5-0/+15
2021-11-17gl_texture_cache: Make FormatConversionPass more genericameerj1-7/+12
This allows the usage of the FormatConversionPass to be applied to more than the previously used BGR conversion scenarios.
2021-11-17gl_texture_cache: Rename BGRCopyPass to FormatConversionPassameerj2-21/+18
2021-11-17TextureCache: Fix Automatic Anisotropic.Fernando Sahmkow1-6/+5
2021-11-17TextureCache: OGL query device memory if possible.FernandoS272-2/+14
2021-11-17TextureCache: Fix OGL cleaningFernando Sahmkow5-0/+43
2021-11-16TextureCache: Add automatic anisotropic filtering and refactor code.Fernando Sahmkow5-16/+22
2021-11-16TextureCache: Make a better Anisotropic setter.Fernando Sahmkow4-24/+21
2021-11-16Texture Cache: revert Image changes.Fernando Sahmkow1-0/+4
2021-11-16ShaderCache: Better fix for Shuffling gl_FragCoordFernando Sahmkow1-2/+13
2021-11-16HostShader: fix Gaussian filter.FernandoS271-2/+2
2021-11-16Texture Cahe/Shader decompiler: Resize PointSize on rescaling, refactor and make reaper more agressive on 4Gb GPUs.FernandoS275-22/+29
2021-11-16texture_cache: Refactor Render Target scaling functionameerj2-14/+24
2021-11-16gl_resource_manager: Ensure non EXT_framebuffer objects are createdameerj2-13/+8
2021-11-16Texture Cache: Fix memory usage on ScaleDown.FernandoS271-4/+0
2021-11-16OpenGL: Fix viewport/Scissor scaling on downscaling.FernandoS271-6/+28
2021-11-16Vulkan: fix regression.FernandoS271-14/+17
2021-11-16host_shaders: Misc copyright/style changesameerj4-10/+12
2021-11-16configure_graphics.ui: Cleanup scaling options and fix duplicate name warningameerj1-5/+5
2021-11-16FSR: Fix GCC build errorsameerj3-43/+50
2021-11-16Vulkan: Reimplement FSR constant generation functions to avoid GCC warningsMarshall Mohror2-9/+145
2021-11-16vk_blit_screen: Fix AA destruction orderameerj1-9/+10
2021-11-16Presentation: Only use FP16 in scaling shaders on supported devices in VulkanMarshall Mohror14-116/+197
2021-11-16renderer_vulkan/blit_image: Use generic color state on Depth to Color blitsameerj1-1/+1
Fixes Bayonetta 2 on AMD
2021-11-16vk_texture_cache: Refactor 3D scaling helpersameerj2-113/+74
2021-11-16gl_rasterizer: Fix ScissorTest and Clear when scalingameerj1-10/+6
2021-11-16gl_texture_cache: Simplify scaling proceduresameerj2-57/+28
2021-11-16OpenGlTextureCache: Fix state invalidation on rescaling.Fernando Sahmkow3-2/+17
2021-11-16VulkanBufferCache: Avoid adding barriers between multiple copies.Fernando Sahmkow3-5/+43
2021-11-16HostShader: Fix gaussian and add attribution.Fernando Sahmkow1-23/+19
2021-11-16Yuzu UI: Add button for Anti AliasFernando Sahmkow3-0/+45
2021-11-16Vulkan: Fix FXAA in AMD.Fernando Sahmkow1-2/+40
2021-11-16Texture Cache: Fix blitting.Fernando Sahmkow1-2/+2
2021-11-16Vulkan: Implement FXAAFernandoS273-22/+387
2021-11-16OpenGL: fix FXAA with scalingMarshall Mohror2-9/+31
2021-11-16OpenGL: Implement FXAAMarshall Mohror6-35/+194
2021-11-16Frontend: Add anti-aliasing method settingMarshall Mohror5-0/+70
2021-11-16Settings: Add anti-aliasing method settingMarshall Mohror2-0/+7
2021-11-16QtGUI: Add buttton to toggle the filter.FernandoS275-1/+61
2021-11-16VideoCore: Add gaussian filtering.FernandoS278-2/+140
2021-11-16TextureCache: Improve Reaper.FernandoS272-14/+26
2021-11-16Vulkan: fix waiting on semaphore.FernandoS271-1/+3
2021-11-16Update scaleforce to use FP16Marshall Mohror1-88/+55
2021-11-16VideoCore: Add more rescaling option.FernandoS273-7/+38
2021-11-16TextureCache: fix rescaling in aliases and overlap joins.FernandoS274-23/+48
2021-11-16Presentation: Fix turning FSR on and off in settingsMarshall Mohror1-0/+11
2021-11-16Video Core: fix building for GCC.Fernando Sahmkow5-24/+42
2021-11-16Vulkan Rasterizer: Fix clears on integer textures.FernandoS273-1/+84
2021-11-16Texture cache: fix Intel with rescaler.FernandoS271-2/+2
2021-11-16TextureCache: Fix blitting filter in Vulkan and correct viewport/scissor calculation when downscaling.FernandoS272-20/+44
2021-11-16Texture Cache: fix memory managment and optimize scaled downloads, uploads.Fernando Sahmkow7-28/+57
2021-11-16Texture Cache: ease the requirements of textures being blacklisted.Fernando Sahmkow2-22/+7
2021-11-16Vulkan: Fix Blit Depth StencilFernando Sahmkow2-14/+20
2021-11-16Texture Cache: Fix downscaling and correct memory comsumption.Fernando Sahmkow8-36/+147
2021-11-16Presentation: add Nearest Neighbor filter.Fernando Sahmkow6-14/+67
2021-11-16vulkan: Implement FidelityFX Super ResolutionMarshall Mohror11-17/+643
2021-11-16Texture Cache: Rescale conversions between depth and colorFernandoS276-25/+37
2021-11-16Texture cache: Fix memory consumption and ignore rating when a depth texture is rendered.Fernando Sahmkow3-7/+19
2021-11-16vulkan: Fix rescaling push constant usageameerj8-69/+78
2021-11-16Texture Cahe: Fix downscaling on SMO.Fernando Sahmkow5-0/+11
2021-11-16texture_cache_base: Remove unused function declarationsameerj1-8/+0
2021-11-16yuzu: Fix build errorsameerj1-1/+1
2021-11-16vk_texture_cache: Use 3D to scale images when blit is unsupportedameerj4-29/+87
2021-11-16texture_cache: Fix infinitely recursive ImageCanRescale checkameerj3-10/+13
2021-11-16vk_texture_cache: Fix BlitScale of non-2D imagesameerj1-10/+9
2021-11-16video_core: Refactor resolution scale functionameerj4-46/+34
2021-11-16texture_cache: Fix image resolves when src/dst are not both scaledameerj1-5/+8
2021-11-16yuzu_cmd: Read resolution_setup and scaling_filter from configlat9nq2-0/+25
Also adds descriptions and the settings to the default config.
2021-11-16video_core,yuzu: Move UpdateRescalingInfo call to video_corelat9nq3-5/+2
This only needs to happen once per game boot, so we can just call it during CreateGPU and be done with it, avoiding the need to call it in the frontends.
2021-11-16gl_texture_cache: Disable scissor test when scaling texturesameerj1-0/+8
Fixes a bug on BOTW where some objects were no longer being rendered after blitting
2021-11-16vk_texture_cache: Fix unsupported blit format error checkingameerj2-9/+9
2021-11-16vk_texture_cache: Fix early returns on unsupported scalesameerj2-19/+11
2021-11-16video_core: Misc resolution scaling related refactoringameerj8-47/+51
2021-11-16texture_cache: Refactor scaled image size calculationameerj2-12/+13
2021-11-16Texture Cache: Fix calculations when scaling.Fernando Sahmkow1-0/+12
2021-11-16gl_texture_cache: Fix BGR pbo size for scaled texturesameerj1-11/+10
2021-11-16rescaling_pass: Fix IR errors when unscalable texture types are encounteredameerj1-0/+28
2021-11-16Texture Cache: Fix Rescaling on MultisampleFernando Sahmkow3-8/+21
2021-11-16TextureCache: Base fixes on rescaling.Fernando Sahmkow2-4/+6
2021-11-16rescaling_pass: Logic simplification and minor style cleanupameerj2-33/+17
2021-11-16rescaling_pass: Scale ImageFetch offset if it existsameerj1-59/+37
Plus some code deduplication
2021-11-16rescaling_pass: Enable PatchImageQueryDimensions on fragment stagesameerj1-5/+4
2021-11-16vk_texture_cache: Simplify scaled image managementameerj2-107/+34
2021-11-16gl_texture_cache: Fix scaling backup logicameerj2-20/+16
2021-11-16vk_rasterizer: Fix scaling on Y_NEGATEameerj1-3/+9
2021-11-16vk_texture_cache: Use nearest neighbor scaling when availableameerj4-29/+36
2021-11-16gl_texture_cache: Fix depth and integer format scaling blitsameerj2-16/+61
2021-11-16gl_texture_cache/rescaling_pass: minor cleanupameerj3-16/+10
2021-11-16vk_texture_cache: Minor cleanupameerj2-11/+8
2021-11-16rescaling_pass: Fix and simplify shuffle/fragcoord passameerj1-26/+20
2021-11-16Shader: Don't rescale FragCoord if used by ShuffleFernando Sahmkow2-2/+55
2021-11-16image_info: Mark MSAA textures as non-rescalableameerj1-2/+2
Blitting or resolving multisampled images requires the dimensions of the src and dst to be equal for valid usage, making them difficult for resolution scaling using the current implementation.
2021-11-16bootmanager: Fix screenshot resolution factor usageameerj7-20/+13
Fixes screenshots at non integer scaling
2021-11-16gl_texture_cache: Simplify scalingameerj2-31/+39
We don't need to reconstruct new textures every time we ScaleUp/ScaleDown. We can scale up once, and revert to the original texture whenever scaling down. Fixes memory leaks due to glDeleteTextures being deferred for later handling on some drivers
2021-11-16Renderers: Unify post processing filter shadersameerj7-211/+36
2021-11-16gl_texture_cache: fix scaling on uploadameerj1-0/+7
2021-11-16Renderer: Implement Bicubic and ScaleForce filters.Fernando Sahmkow15-34/+620
2021-11-16Texture Cache: fix scaling on upload and stop scaling on base resolution.Fernando Sahmkow1-14/+32
2021-11-16shader, video_core: Fix GCC build errorsameerj3-14/+3
2021-11-16emit_spirv: Fix RescalingLayout alignmentameerj3-4/+8
2021-11-16TextureCache: Fix Buffer Views Scaling.Fernando Sahmkow2-5/+9
2021-11-16RescalingPass: Agregate pixels on texelFetch while on Fragment ShaderFernando Sahmkow1-3/+97
2021-11-16Texture Cache: Correctly fix Blits Rescaling.Fernando Sahmkow1-9/+12
2021-11-16shader: Fix TextureSize check on rescaling.Fernando Sahmkow1-27/+21
2021-11-16texture_cache: Disable dst_image scaling in BlitImageameerj1-5/+7
Fixes scaling in Super Mario Party
2021-11-16emit_spirv: Fix RescalingLayout alignmentameerj2-3/+3
2021-11-16shader: Properly scale image reads and add GL SPIR-V supportReinUsesLisp25-77/+228
Thanks for everything!
2021-11-16shader: Properly blacklist and scale image loadsReinUsesLisp5-11/+31
2021-11-16texture_cache: Add getter to query if image view is rescaledReinUsesLisp5-22/+12
2021-11-16vk_rasterizer: Minor style changeReinUsesLisp1-2/+2
2021-11-16gl_texture_cache: Fix scaling blitsReinUsesLisp1-20/+12
2021-11-16glsl/glasm: Pass and use scaling parameters in shadersReinUsesLisp9-28/+51
2021-11-16gl_rasterizer: Properly scale viewports and scissorsReinUsesLisp1-23/+24
2021-11-16gl_texture_cache: Fix multi layered texture Scaleameerj1-11/+15
2021-11-16gl_compute_pipeline: Add downscale factor to shader uniformsameerj1-0/+9
2021-11-16gl_rasterizer: Fix rescale dirty state checkingameerj1-4/+9
2021-11-16gl_graphics_pipeline: Add downscale factor to shader uniformsameerj4-5/+19
2021-11-16texture_cache: Fix blacklists on computeReinUsesLisp1-1/+1
2021-11-16texture_cache: Simplify image view queries and blacklistingReinUsesLisp16-192/+192
2021-11-16Vulkan: Fix downscaling Blit.Fernando Sahmkow1-14/+18
2021-11-16Texture Cache: Implement Rating System.Fernando Sahmkow5-15/+47
2021-11-16OpenGL: set linear mag filter when blitting a downscaled image.Fernando Sahmkow1-0/+1
2021-11-16Vulkan: Fix AA when rescaling.Fernando Sahmkow1-1/+1
2021-11-16Texture Cache: Implement Blacklisting.Fernando Sahmkow5-4/+90
2021-11-16main: Add resolution scale label in the status barMorph2-2/+12
Shows the resolution scale as "Scale: {}x" in the status bar, where {} is a floating point value representing the current resolution scaling factor.
2021-11-16vulkan: Implement rescaling shader patchingReinUsesLisp8-27/+103
2021-11-16vk_texture_cache: Properly scale blit source imagesReinUsesLisp1-2/+2
2021-11-16vk_graphics_pipeline: Use Shader::NumDescriptors when possibleReinUsesLisp1-18/+6
2021-11-16opengl: Use Shader::NumDescriptors when possibleReinUsesLisp3-46/+20
2021-11-16spirv: Implement rescaling patchingReinUsesLisp8-5/+86
2021-11-16shader/rescaling_pass: Patch more instructionsReinUsesLisp1-4/+101
2021-11-16shader: Add IsTextureScaled opcodeReinUsesLisp10-0/+34
2021-11-16texture_cache: Add image gettersReinUsesLisp2-0/+16
2021-11-16shader: Add copy constructor to instructionsReinUsesLisp4-1/+20
2021-11-16shader: Add integer division opcodesReinUsesLisp9-0/+37
2021-11-16common/settings: Remove unused scaling optionsReinUsesLisp2-18/+7
2021-11-16shader: Fix rescaling passReinUsesLisp1-1/+1
2021-11-16gl_texture_cache: Simplify rescalingameerj2-19/+15
2021-11-16texture_cache: Fix typo in aliased image rescalingameerj1-1/+1
2021-11-16vk_texture_cache: Simplify and optimize scaling blitsReinUsesLisp1-106/+62
2021-11-16vk_texture_cache: Fix scaling blit validation errorsReinUsesLisp1-81/+78
2021-11-16shader: Fix resolution scaling passReinUsesLisp5-35/+32
2021-11-16shader: Add resolution down factor opcodeReinUsesLisp9-0/+25
2021-11-16gl_texture_cache: Implement ScaleDownameerj2-26/+36
2021-11-16gl_texture_cache: Rescale fixes for multi-layered texturesameerj2-16/+32
2021-11-16Texture Cache: Implement Rescaling on Aliases and Blits.Fernando Sahmkow1-5/+53
2021-11-16Fix blits with mipsReinUsesLisp1-12/+16
2021-11-16Fix blitsReinUsesLisp1-10/+10
2021-11-16renderer_gl: Resolution scaling fixesameerj3-61/+107
2021-11-16TextureCache: Fix rescaling of ImageCopiesFernando Sahmkow3-18/+67
2021-11-16TextureCache: Modify Viewports/Scissors according to Rescale.Fernando Sahmkow6-35/+93
2021-11-16Settings: eliminate rescaling_factor.Fernando Sahmkow7-37/+19
2021-11-16Texture Cache: More rescaling fixes.Fernando Sahmkow4-84/+96
2021-11-16gl_texture_cache: WIP texture rescaleameerj2-3/+69
2021-11-16Texture Cache: Implement Vulkan UpScaling & DownScalingFernando Sahmkow6-42/+327
2021-11-16ShaderDecompiler: Add initial support for rescaling.Fernando Sahmkow2-0/+73
2021-11-16Settings: Add resolution scaling to settings.Fernando Sahmkow6-5/+155
2021-11-16VideoCore: Initial Setup for the Resolution Scaler.Fernando Sahmkow11-18/+255
2021-11-16Replace keys error pop upMatías Locatti1-2/+2
Fight me.
2021-11-14Replace "Light" theme by "Default"Romain Failliot2-25/+27
This reflects the current behavior: Light = System default. If your system is set to dark theme, then Light = Dark, which is a bit confusing for the end user. In this PR, I propose to change "Light" with "Default". This way, the user has "Default" and "Default Colorful", which will apply the system theme. Now that the Flatpak respects the system theme, I think this makes much more sense. I also simplified the theme update. Before the code was branching between the default theme and the others, but I think we can have something simpler by forcing the default theme if no theme is defined in the settings, or if the selected theme doesn't exist. And if there's an error, tell the theme name in the error message.
2021-11-13codes: Rename ComposeFrameHeader to ComposeFrameameerj7-14/+14
These functions were composing the entire frame, not just the headers. Rename to more accurately describe them.
2021-11-13vp8: Implement header compositionameerj4-6/+90
Enables frame decoding with FFmpeg
2021-11-13codecs: Add VP8 codec classameerj9-20/+90
2021-11-11program_metadata: Add default ThreadInfo kernel capabilityOatmealDome1-1/+4
2021-11-08applets/swkbd: Fix text check message encodingMorph1-7/+15
The text check message can be encoded in UTF-8.
2021-11-08applets/swkbd: Skip text checking if the text has been confirmedMorph8-26/+36
Confirm means that the text has already been checked by the application to be correct, but is asking the user for confirmation. The confirmation text itself seems to be corrupted though, this needs to be investigated. Fixes the software keyboard in Famicom Detective Club: The Missing Heir
2021-11-05service/pctl: Stub EndFreeCommunicationNarr the Reg1-1/+8
- Used by Just Dance 2022
2021-11-05vulkan_device: Add missing vulkan image format R5G6B5 in GetFormatPropertiesFeng Chen1-0/+1
- Used by Dragon Quest Builders
2021-11-05core: Reorder perf_stats destruction order on Shutdownameerj1-1/+1
Avoids the gpu_core using perf_stats after it's been freed.
2021-11-04general: Get the current process program id directly from the systemMorph21-56/+42
This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
2021-11-04general: Rename GetTitleID to GetProgramIDMorph24-43/+46
2021-11-04service: aoc: Stub NotifyUnmountAddOnContentMorph2-1/+9
Used by Animal Crossing: New Horizons v2.0.0 DLC
2021-11-04service: aoc: Stub NotifyMountAddOnContent and NotifyMountAddOnContentMorph2-0/+21
Used by Animal Crossing: New Horizons v2.0.0 DLC
2021-11-04service/acc: Rename Unknown160 to InitializeApplicationInfoV2german773-3/+3
2021-11-04service: acc: Stub acc:u0 '160'Morph3-0/+9
- Used by Animal Crossing: New Horizons v2.0.0 Since the name is currently unknown, '160' is used as a placeholder.
2021-11-04core: Fix transitive include build errorsameerj5-0/+9
2021-11-04core: Remove unused includesameerj133-221/+1
2021-11-04Simply legacy attribute implementFeng Chen3-152/+125
2021-11-03svc: Correct WaitSynchronization num_handles param typeMorph2-4/+4
num_handles is a s32
2021-11-02general: Remove MakeResult helpersMorph13-69/+48
This is made obsolete by the presence of implicit constructors.
2021-11-02hle/result: Amend ResultVal documentationMorph1-12/+10
This amends the documentation slightly to reflect the updated interface.
2021-11-02hle/result: Reimplement ResultVal using Common::ExpectedMorph1-117/+63
Common::Expected effectively provides the same functions as ResultVal, so we can implement it with this. This can be replaced with std::expected with minimal effort should it be standardized in the C++ Standard Template Library.
2021-11-02common: Implement a subset of P0323 (std::expected)Morph2-0/+988
This implementation is based on and is a subset of the proposed implementation of std::expected https://github.com/TartanLlama/expected/blob/master/include/tl/expected.hpp
2021-11-02 Refactor Logging ImplLevi Behunin4-28/+41
Loop on stop_token and remove final_entry in Entry. Move Backend thread out of Impl Constructor to its own function. Add Start function for backend thread. Use stop token in PopWait and check if entry filename is nullptr before logging.
2021-11-02Shader Cahe: Fix Phi Nodes on GLASM.Fernando Sahmkow1-1/+1
2021-11-01ShaderCache: Fix Phi Nodes Type on OGL.Fernando Sahmkow3-2/+30
2021-11-01gl_rasterizer: Remove unused includesMorph1-4/+2
This removes unused includes, especially the core includes which were causing this file to be recompiled every time files included by those headers are modified.
2021-10-31ShaderCache: Order Phi Arguments from farthest away to nearest.Fernando Sahmkow5-0/+37
2021-10-31Support gl_FogFragCoord attributevonchenplus3-48/+58
2021-10-30yuzu qt: Disable the screensaver with SDL2lat9nq2-1/+23
Disables the screen saver when a game boots using SDL2 so that it works on any supported platform.
2021-10-30profile_manager: Resize any image bigger than 256pgerman771-0/+11
2021-10-29CMakeLists: Document the /GT compile optionMorph1-0/+1
2021-10-29file_sys: control_metadata: Add BrazilianPortugueseMorph2-2/+4
2021-10-29ns: language: Add BrazilianPortuguese to ApplicationLanguageMorph2-1/+26
It seems that Nintendo finally filled that last empty spot in ApplicationLanguage for a total of 16 supported languages.
2021-10-29gl_device: Force GLASM on NVIDIA drivers 495-496lat9nq1-0/+15
GLSL shaders currently do not render correctly on the recent NVIDIA drivers. This adds a check that forces assembly shaders for these drivers since they seem unaffected and adds a warning informing of the decision. Developers can disable the check by enabling graphics debugging.
2021-10-28hle/result: Declare copy/move constructor/assignment as noexceptMorph1-3/+3
While we're at it, we can also declare these copy/move constructor/assignment as noexcept.
2021-10-28hle/result: Add move assignment operator in ResultValMorph1-0/+20
ResultVal was missing a move assignment operator, add it.
2021-10-28hle/result: Remove cv-qualifiers from Arg in MakeResultMorph1-2/+2
This removes the const qualification for types when MakeResult(arg) is used in a const member function, allowing for automatic deduction and removing the need to manually specify the non-const type as the template argument.
2021-10-27Fix dangling kernel objects when exitingFeng Chen2-11/+13
2021-10-27Revert PR7009Feng Chen2-15/+5
2021-10-27Fix memory leakFeng Chen4-0/+38
2021-10-26Support gl_BackSecondaryColor attributevonchenplus3-0/+33
2021-10-26Support gl_FrontSecondaryColor attributevonchenplus3-0/+33
2021-10-26Support gl_BackColor attributevonchenplus3-0/+33
2021-10-26Geometry property removal and rewordingMoonlacer2-9/+1
2021-10-24TexturePass: Fix clamping of images as this allowed negative indices.Fernando Sahmkow1-1/+1
2021-10-24Fixed ARM_Dynamic_64 StepAndrew Strelsky1-1/+1
2021-10-24Fixup channel submit IOCTL syncpoint parametersBilly Laws2-21/+9
The current arguments worked by happenstance as games only ever submit one syncpoint and request one fence back, if a game were to do something other than this then the arguments would've been parsed entirely wrong.
2021-10-23Vulran Rasterizer: address feedback.Fernando Sahmkow1-3/+5
2021-10-23Revert "input_common: Fix data race on GC implementation"Fernando S2-120/+115
2021-10-22Fix vulkan viewport issueFeng Chen1-0/+1
2021-10-20common/alignment: Fix VS2022 compilationameerj1-1/+6
VS2022 seems to introduce an optimization when moving vectors to check for equality of the element values. AlignmentAllocator needed to overload the equality operator to fix compilation of its usage in vector moving.
2021-10-20input_common: Fix VS2022 compilation errorsameerj1-39/+35
2021-10-17emit_spirv_image: Fix depth image implicit lod sample in computeameerj1-5/+16
Ensures all drivers behave the same way in this case.
2021-10-17settings: Remove std::chrono usageameerj7-24/+20
Alleviates the dependency on chrono for all files that include settings.h
2021-10-17add_linkMoonlacer1-2/+2
remove_accident fix_whoopsie
2021-10-17Shader Compiler: avoid overflowed indices on indixed samplers.Fernando Sahmkow1-1/+2
2021-10-16SVC: Implement svcInfo:IdleTickCountFernando Sahmkow2-0/+22
Used by the Witcher 3
2021-10-16main: fix typo in warning messageRomain Failliot1-1/+1
2021-10-16main: Add missing make_unique for uiMorph1-1/+1
2021-10-16service/vi: Stub IHOSBinderDriver::TransactParcel GetBufferHistory (#7184)Feng Chen1-1/+11
2021-10-16qt_web_browser: Add missing QApplication includeMorph1-0/+1
2021-10-16NvHost/Core: Address Feedback.Fernando Sahmkow3-19/+27
2021-10-16Suspend temporallyFernandoS273-1/+31
2021-10-16NVHost_Ctrl: Force wait if the gpu falls behind too long.FernandoS272-0/+13
2021-10-15ui: fix crash when closing configure windowRomain Failliot1-2/+5
This crash happens 100% of the time (on Linux at least), you just need to open the configure window and click OK. It seems to happen when the tabs are destroyed and once all the tabs are destroyed, a final signal is sent with `index == -1`. So `debug_tab_tab` doesn't exist anymore when this happens, so the crash.
2021-10-15bootmanager: Forward declare System and SystemResultStatusMorph1-1/+5
2021-10-15yuzu: Construct system in GMainWindowMorph2-81/+83
2021-10-15core: Move ResultStatus outside of SystemMorph7-67/+69
Allows it to be a forward declaration in other header files.
2021-10-15yuzu_cmd: Remove remaining static system instancesMorph1-3/+2
2021-10-15core: Remove static system instanceMorph2-28/+5
2021-10-15Hide mouse cursor by defaultRomain Failliot1-1/+1
2021-10-15main: Slightly refactor NCA entry installation in InstallNCA (#7181)Creak1-8/+6
* main: Slightly refactor NCA entry installation in InstallNCA Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-10-15main: Use std::unique_ptr for uiMorph2-137/+142
2021-10-15configuration: Use std::make_unique instead of operator new for uiMorph13-14/+15
2021-10-15config: Read network_interfacelat9nq2-0/+9
Let's yuzu_cmd use a network interface. Also adds it to the default ini.
2021-10-15settings_ui: Better NVDEC Description For Each Video Rendering Option (#7165)Moonlacer1-3/+3
* better_description * Revert "better_description" This reverts commit 3a152a6ba6f2d6e02530b69a8194e4db302c8acd. * better_nvdec_wording * best_performance * update_word_stuff * another_update
2021-10-14string_util: Make use of std::string_view and add bounds checkingMorph2-5/+5
Makes use of std::string_view in StringFromFixedZeroTerminatedBuffer and add bounds checking
2021-10-14string_util: Prevent out of bounds access in u16string_view bufferMorph1-2/+2
2021-10-13KPageTable: Perform ranged invalidation when unmapping code memoryMorph1-0/+2
Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
2021-10-12common/fs/path_util: Slightly refactor PathManagerImpl's constructorCreak1-12/+15
This moves all GenerateYuzuPath calls outside of the platofrm-specific #ifdefs, replacing them with assignments to paths.
2021-10-12Create local variables for mouse and wheel positionsRomain Failliot1-5/+9
2021-10-12Fix a few warningsRomain Failliot3-6/+5
- configure_input_player_widget.cpp: always better to use `const auto &` whenever possible - profiler.cpp: `ev->pos()` is deprecated, replace with `ev->position()`, which returns floats, thus the addition of `.toPoint()` (same as what's happening in `pos()`) - game_list.cpp: `QString::SplitBehavior` is deprecate, use `Qt::` namespace instead
2021-10-11input_common/sdl: Fix joystick rangegerman771-3/+4
2021-10-11main: Add option to reset window size to 900pameerj3-36/+53
2021-10-11applets/web: Fallback to loader to get the manual romfs if none is foundFeng Chen1-0/+10
2021-10-11vic: Use the minimum of surface/frame dimensions when writing the final frame to the GPUameerj1-16/+15
Addresses possible buffer overflow behavior.
2021-10-10h264: Use max allowed max_num_ref_frames when using CPU decodingFeng Chen1-1/+6
2021-10-09vic: Allow surface to be higher than frameValeri1-2/+3
Touhou Genso Wanderer Lotus Labyrinth R decodes 1920x1080 videos into 1920x1088 surface. Only allow mismatch for height, since larger width would result in increasingly offset rows and somewhat defeat entire purpose of this check.
2021-10-08Update configure_tas.uiLevi Behunin1-8/+0
Remove the geometry property again(7045) after 7090 re-added.
2021-10-08vic: Avoid memory corruption when multiple streams with different dimensions are decodedameerj1-0/+9
This is a work around to avoid buffer overflow errors until multi channel/multi stream decoding is supported.
2021-10-07vic: Refactor frame writing methodsameerj2-138/+146
2021-10-07discord_impl: Remove global system instanceslat9nq3-6/+13
2021-10-07game_list: Remove global instances of Core::Systemlat9nq5-13/+19
2021-10-07configuration: Add const qualifier where ablelat9nq18-31/+28
2021-10-07yuzu qt: Remove global system instances from config, WaitTree, mainlat9nq69-636/+688
2021-10-07kernel: hle_ipc: Foward declare KAutoObjectMorph2-1/+2
2021-10-07service: Reduce header include overheadMorph31-39/+11
2021-10-07vic: Implement RGBX frame formatameerj2-3/+15
2021-10-04Vulkan: Fix failing barrier on refresh.Fernando Sahmkow1-1/+2
2021-10-04RasterizerInterface: Correct size of CPU addresses to cache.FernandoS271-1/+1
2021-10-04Vulkan: Fix the master SemaphoreFernandoS271-4/+12
2021-10-03nvflinger: Use jthread and stop_token for VSync threadameerj2-32/+8
Avoids a destruction data race that may occur on the vsync thread
2021-10-03nvhost_ctrl: Refactor usage of gpu.LockSync()ameerj3-35/+16
This seems to only be used to protect a later gpu function call. So we can move the lock into that call instead.
2021-10-03gpu: Migrate implementation to the cpp fileameerj19-632/+875
2021-10-02service: am: Make use of Exit to exit the currently running applicationMorph1-2/+2
This also moves the call to the end to ensure services are properly destructed on exit.
2021-10-02yuzu: main: Register a callback for ExitMorph4-0/+17
2021-10-02core: Add Exit and ExitCallbackMorph2-0/+25
This allows ISelfController::Exit to stop the currently running application. This is typically used by homebrew to exit back to the homebrew menu after calling consoleExit with libnx.
2021-10-02service: Replace service event creation with ServiceContext::CreateEventMorph26-271/+367
The service context helps to manage all created events and allows us to close them upon destruction.
2021-10-02network: Do not log IP addressMorph1-2/+0
Logging this may be a privacy concern for some users.
2021-10-02common/logging: Reduce scope of fmt includeameerj4-1/+5
2021-10-02common/logging: Move Log::Entry declaration to a separate headerameerj12-17/+48
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-10-01main: Don't add an extra separator when the title version is absentlat9nq1-2/+7
Some titles, such as homebrew, do not have any version string. Because yuzu hard codes the title bar string assuming a version string is preset, booting homebrew causes yuzu to add an extra separator with no content between. This uses a lambda expression to prevent that from happening.
2021-09-30prevent access violation from iob in Memory::IsValidVirtualAddressAndrew Strelsky1-1/+5
2021-09-29Fixed invalid iterator usageAndrew Strelsky1-1/+1
2021-09-29style: Remove extra space preceding the :: operatorMorph8-10/+10
2021-09-29CMakeLists: Remove BoxCat build optionMorph1-4/+0
2021-09-29settings: Remove BCAT settingsMorph5-17/+0
2021-09-29configure_network: Remove BCATMorph3-208/+0
2021-09-29service: bcat: Remove BoxCat BCAT implementationMorph4-631/+0
The current implementation of BoxCat as it stands is non-functional due to the reliance on a server providing BCAT files. This implementation will eventually be replaced with one that allows the use of local BCAT files dumped from a Nintendo Switch.
2021-09-29configure_tas: Remove help button from dialog windowMoonlacer1-0/+1
2021-09-29configure_tas: Ensure dialog buttons always stay at the bottomMoonlacer1-146/+187
Previously, the dialog buttons would be floating in-place when the dialog is stretched downwards. This change ensures that the dialog buttons always stay at the bottom of the window.
2021-09-29externals: Remove libzipMorph1-1/+1
2021-09-29file_sys: Remove vfs_libzipMorph3-103/+0
2021-09-29Fix KShareMemory object leakFeng Chen5-3/+106
2021-09-28vk_graphics_pipeline: Force patch list topology when tessellation is usedameerj1-1/+10
Fixes a crash on some drivers when tessellation is used but the IA topology is not patch list.
2021-09-27service/es: Update to 13.0.0german771-0/+6
2021-09-27service/npns: Update to 13.0.0german771-0/+1
2021-09-27service/vi: Update to 13.0.0german772-0/+2
2021-09-27service/am: Update to 13.0.0german771-0/+4
2021-09-27service/audio: Update to 13.0.0german772-1/+10
2021-09-27service/hid: Update to 13.0.0german772-0/+10
2021-09-27service/btdrv: Update to 13.0.0german771-0/+4
2021-09-27service/usb: Update to 13.0.0german771-3/+3
2021-09-25Fix KScopedAutoObject object leak when SendSyncRequestFeng Chen1-6/+8
2021-09-25service: bsd: Stub ReadMorph1-6/+5
- Used by Diablo II: Resurrected
2021-09-24service: bsd: Implement ReadMorph2-1/+15
- Used by Diablo II: Resurrected
2021-09-24general: Update style to clang-format-12ameerj13-66/+62
2021-09-24video_core: Fix jthread related hangs when stopping emulationameerj2-2/+2
jthread on some compilers is more picky when it comes to the order in which objects are destroyed.
2021-09-24vk_texture_cache: Disable cube compatibility flag on non-mesa AMD GCN4 and earlierameerj3-11/+22
Fixes rainbow textures on BOTW.
2021-09-24Vulkan Query Cache: make sure to wait for the query result.Fernando Sahmkow1-1/+2
2021-09-24QueryCache: Flush queries in order of running.Fernando Sahmkow1-4/+4
2021-09-23Use subdirectory of main data directory for QtWebEngine storagev19931-0/+3
Previously, an unrelated directory was used for this. Keep everything together for consistency.
2021-09-23Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan.Fernando Sahmkow6-3/+29
2021-09-23core/profile_select: Avoid uninitialized read in SelectProfile()Lioncash1-1/+2
The default constructor of UUID doesn't initialize its data members, so we need to directly initialize it to be invalid.
2021-09-22common/uuid: Add validity checking functions to interfaceLioncash4-7/+14
Given we have a function to invalidate, we should also have ones to query the validity. Also makes the code more straightforward to read.
2021-09-22Clean-up and nitsLevi Behunin1-121/+60
Remove redundent label, rearange checkboxs to keep same 3 per column layout, remove unneeded properties.
2021-09-21Clean-upLevi Behunin1-44/+14
Numerize names, remove unneeded properties and spacer.
2021-09-20maxwell_dma: Minor refactoringameerj2-33/+33
2021-09-20buffer_cache: Minor fixesameerj2-6/+4
Loop through the tmp_intervals by reference, rather than by copy, and fix gl clear buffer size calculation.
2021-09-19Tas configure ui nitsLevi Behunin1-4/+4
Text looked cramped on my pc (Ubuntu 21.04). Re-flowed text as well for nicer read.
2021-09-18UI: Relocate tas menu and add brief descriptiongerman7710-68/+148
2021-09-18input_common/tas: new update methodgerman775-17/+4
2021-09-18input_common/tas: Document the main classgerman778-51/+153
2021-09-18input_common/tas: Add swap controllergerman778-39/+99
2021-09-18input_common/tas: overwrite file dialoggerman773-20/+16
2021-09-18input_common/tas: Fallback to simple updateMonsterDruide110-102/+60
2021-09-18config: Move TAS options to it's own menugerman7719-184/+452
2021-09-18core: Hacky TAS syncing & load pausingMonsterDruide19-107/+140
To keep the TAS inputs synced to the game speed even through lag spikes and loading zones, deeper access is required. First, the `TAS::UpdateThread` has to be executed exactly once per frame. This is done by connecting it to the service method the game calls to pass parameters to the GPU: `Service::VI::QueueBuffer`. Second, the loading time of new subareas and/or kingdoms (SMO) can vary. To counteract that, the `CPU_BOOST_MODE` can be detected: In the `APM`-interface, the call to enabling/disabling the boost mode can be caught and forwarded to the TASing system, which can pause the script execution if neccessary and enabled in the settings.
2021-09-18main: TAS Playback state labelMonsterDruide12-0/+10
During script playback/recording, the user has to see what happens currently. For that, a new label has been added to the bottom-left corner, always displaying the current state of the TASing system.
2021-09-18settings: File selector & other settingsMonsterDruide19-2/+104
First of all, TASing requires a script to play back. The user can select the parent directory at `System -> Filesystem`, next to an option to pause TAS during loads: This requires a "hacky" setup deeper in the code and will be added in the last commit. Also, Hotkeys are being introduced: CTRL+F5 for playback start/stop, CTRL+F6 for re-reading the script and CTRL+F7 for recording a new script.
2021-09-18input_common/tas: Base playback & recording systemMonsterDruide114-9/+818
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called. The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate. Co-authored-by: Naii-the-Baf <sfabian200@gmail.com> Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
2021-09-18If not on Windows, disable raw inputValeri1-0/+4
This way, if someone copies their Windows config to other OS, they won't be stuck without web applet for no apparent reason.
2021-09-18Hide XInput bypass on non-Windows OSesValeri1-0/+4
Follow-up to #6950. This option is a no-op on other OSes and only serves to spread confusion there.
2021-09-17host_shaders: Remove opengl_copy_bgra.compameerj4-19/+0
2021-09-17gl_texture_cache: Migrate BGRCopyPass from util_shadersameerj4-42/+48
The BGR copies no longer use shaders.
2021-09-16vulkan_device: Reorder Float16Int8 declarationameerj1-1/+2
This variable was going out of scope before its usage in the vulkan device creation, causing a crash on very specific drivers.
2021-09-16Revert "Merge pull request #7006 from FernandoS27/a-motherfucking-driver"ameerj1-13/+1
This reverts commit 62e88d0e7455e37840db7e2a8e199bc6ca176966, reversing changes made to edf3da346f4ec0ca492b427f4f693d56e84abc52.
2021-09-16fix_clang_errorMoonlacer1-1/+0
2021-09-16util_shaders: Unify BGRA copy passesameerj5-82/+36
2021-09-16fix_accidental_deletionMoonlacer1-1/+2
2021-09-16remove-audio-stretching-settingMoonlacer8-30/+1
2021-09-16vk_scheduler: Use std::jthreadameerj2-17/+9
2021-09-16gpu: Use std::jthread for async gpu threadameerj5-69/+18
2021-09-16threadsafe_queue: Add std::stop_token overload to PopWaitameerj1-5/+22
Useful for jthreads which make use of the threadsafe queues.
2021-09-15audin_u: Return a buffer event in RegisterBufferEventlat9nq2-2/+12
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2021-09-15audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAutolat9nq2-26/+57
This also moves IAudioIn's definition to the header. Required for Splatoon 2 LAN play.
2021-09-15Build System: Build with JCC Erratum MitigationFernando Sahmkow1-0/+5
2021-09-15Spir-V: Rescale the frag depth to 0,1 mode when -1,1 mode is used in Vulkan.Fernando Sahmkow1-1/+7
2021-09-15ngct: Stub MatchNarr the Reg1-1/+14
Needed for Cruis'n Blast
2021-09-14renderers: Log total pipeline countMorph2-0/+4
2021-09-14vfs: Partially implement GetFileTimeStampRawMorph8-1/+83
Gets rid of homebrew warnings using this func
2021-09-14core: Destroy main_process during shutdownameerj1-3/+12
The main_process was never being cleaned up, causing a noticeable memory leak after subsequent launches. This change cleans up the memory during Core Shutdown, mitigating the leak.
2021-09-14vulkan_debug_callback: Ignore InvalidCommandBuffer-VkDescriptorSet errorsameerj1-0/+1
This validation error is spammed on some titles, asserting that VkDescriptorSet 0x0[] was destroyed. This is likely a validation layer bug when using VK_KHR_push_descriptor, which can avoid using traditional VkDescriptorSet. It should be safe to ignore for now.
2021-09-13Vulkan: Disable VK_EXT_SAMPLER_FILTER_MINMAX in GCN AMD since it's broken.Fernando Sahmkow1-6/+20
2021-09-13Vulkan: Blacklist Int8Float16 Extension on AMD on driver 21.9.1Fernando Sahmkow1-1/+13
2021-09-13Vulkan/Descriptors: Increase sets per pool on AMFD propietary driver.Fernando Sahmkow3-3/+14
2021-09-13common_funcs: Add enum flag bitwise shift operator overloadsMorph1-0/+16
This adds bitwise shift operator overloads (<<, >>, <<=, >>=) in the macro DECLARE_ENUM_FLAG_OPERATORS(type)
2021-09-13vk_swapchain: Use immediate present mode when mailbox is unavailable and FPS is unlockedameerj3-4/+38
Allows drivers that do not support VK_PRESENT_MODE_MAILBOX_KHR the ability to present at a framerate higher than the monitor's refresh rate when the FPS is unlocked.
2021-09-12vk_rasterizer: Fix dynamic StencilOp updating when two faces are enabledameerj1-6/+8
This function was incorrectly using the stencil_two_side_enable register when dynamically updating the StencilOp.
2021-09-12vk_state_tracker: Remove unused functionameerj1-4/+0
2021-09-12FS: Mark recursive CreateDirectory as inaccurate and temporaryMorph1-0/+5
2021-09-12main: Apply confirm exit setting in exit locked scenariosameerj1-11/+9
Some titles set an exit lock through HLE, which prompts an exit confirmation when stopping emulation if the system is locked. This change allows bypassing this confirmation if the setting to confirm exits has been disabled by the user.
2021-09-11shader_environment: Add missing <algorithm> includeMorph1-0/+1
2021-09-11vk_descriptor_pool: Add missing <algorithm> includeMorph1-0/+1
2021-09-11slot_vector: Add missing <algorithm> includeMorph1-0/+1
2021-09-11video_core/memory_manager: Add missing <algorithm> includeMorph1-0/+2
2021-09-11kernel: Add missing <functional> includeMorph1-0/+1
2021-09-11file_sys/kernel_executable: Add missing <string> includeMorph1-0/+1
2021-09-11codec: Add missing <string_view> includeMorph1-0/+1
2021-09-11common_funcs: Replace <algorithm> with <iterator>Morph1-1/+1
2021-09-11common: Move error handling to error.cpp/hMorph6-18/+34
This allows us to avoid implicitly including <string> every time common_funcs.h is included.
2021-09-10am: Implement GetNotificationStorageChannelEventgerman772-2/+16
2021-09-10hid: Stub SetTouchScreenConfigurationgerman773-1/+28
2021-09-10input_common: Enable steam controllers and 8 player supportgerman778-11/+35
2021-09-10api_version: Update and add AtmosphereTargetFirmwareMorph1-5/+12
2021-09-08Addressed issuesChloe1-1/+1
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-09-08Mark is_complete as atomicChloe Marcec2-4/+5
2021-09-08Addressed issuesChloe Marcec3-15/+14
2021-09-08Detail adjustmentFeng Chen1-13/+14
2021-09-08Detail adjustmentFeng Chen2-28/+35
2021-09-07Re-implement get unused locationFeng Chen1-30/+30
2021-09-07Move attribute related definitions to spirv anonymous namespaceFeng Chen4-30/+26
2021-09-07input_common: Add alternative string for joyconsgerman771-2/+16
2021-09-07nvflinger: Use external surface format for framebuffer creationameerj3-7/+8
The format member the IGBPBuffer may not always specify the correct desired format. Using the external format member ensures a valid format is provided when creating the framebuffer. Fixes homebrew using the wrong framebuffer format.
2021-09-07Fix blend equation enum errorFeng Chen1-4/+4
2021-09-06Second part of Golden's PRMoonlacer2-3/+3
2021-09-06Rename all shader cache references to pipeline cacheMatías Locatti1-4/+4
After Hades, both OpenGL and Vulkan use a pipeline cache instead of single stages of the graphics pipeline. Renamed the Remove menu entries to match.
2021-09-06address name shadowing with systemChloe Marcec1-2/+2
2021-09-06account: EnsureTokenIdCacheAsyncChloe Marcec4-19/+154
Closes #2547, #6946
2021-09-06FS: Recursively create directories for CreateDirectoryChloe Marcec1-8/+13
Originally we only created the parent directory, this caused issues for creating directories which also contained subdirectories, eg `/Folder1/Folder2` This allows the ultimate mod manager homebrew to at least boot
2021-09-06Dynamic get unused locationFeng Chen1-27/+49
2021-09-06Implement intput and output fixed fnc texturesFeng Chen4-19/+25
2021-09-05core: hle: service: buffer_queue: Improve management of KEvent.bunnei3-14/+24
2021-09-04core: hle: service: nvflinger/vi: Improve management of KEvent.bunnei4-16/+30
2021-09-04core: cpu_manager: Use jthread.bunnei2-18/+13
2021-09-03Rename parametersFeng Chen5-14/+24
2021-09-03Fix create GraphicsPipelines crashFeng Chen1-5/+5
2021-09-02renderer_vulkan: Wait on present semaphore at queue submitameerj5-26/+33
The present semaphore is being signalled by the call to acquire the swapchain image. This semaphore is meant to be waited on when rendering to the swapchain image. Currently it is waited on when presenting, but moving its usage to be waited on in the command buffer submission allows for proper usage of this semaphore. Fixes the device lost when launching titles on the Intel Linux Mesa driver.
2021-09-02Add input/output locationFeng Chen1-5/+13
2021-09-02common/logging: Add missing includegerman771-0/+1
2021-08-31emit_glsl_warp: Fix shuffle ops for 64-thread warp sizesameerj1-24/+36
2021-08-31emit_glsl_warp: Fix ballot related ops for 64-thread warp sizesameerj1-24/+38
2021-08-31emit_spirv_warp: Fix shuffle ops for 64-thread warp sizesameerj1-1/+29
2021-08-31emit_spirv_warp: Fix ballot related ops for 64-thread warp sizesameerj1-10/+11
2021-08-31Add colorfront and txtcoord supportFeng Chen5-0/+57
2021-08-30structured_control_flow: Skip reordering nested demote branches.ameerj1-0/+11
Nested demote branches add complexity with combining the condition if it has not been initialized yet. Skip them for the time being.
2021-08-30structured_control_flow: Conditionally invoke demote reorder passameerj7-10/+23
This is only needed on select drivers when a fragment shader discards/demotes.
2021-08-29Garbage Collection: Make it more agressive on high priority mode.Fernando Sahmkow3-5/+5
2021-08-29Garbage Collection: Adress Feedback.Fernando Sahmkow4-17/+23
2021-08-29vulkan_device: Enable VK_KHR_swapchain_mutable_format if availableameerj3-0/+27
Silences validation errors when creating sRGB image views of linear swapchain images
2021-08-29vk_swapchain: Prefer linear swapchain format when presenting sRGB imagesameerj3-11/+10
Fixes broken sRGB when presenting from a secondary GPU.
2021-08-28Garbage Collection: enable as default, eliminate option.Fernando Sahmkow9-26/+2
2021-08-28VideoCore: Rework Garbage Collection.Fernando Sahmkow6-101/+213
2021-08-28structured_control_flow: Add DemoteCombinationPassameerj1-1/+107
Some drivers misread data when demotes are interleaved in the program. This moves demote branches to be checked at the end of the program. Fixes "wireframe" issue in Pokemon SwSh on some drivers
2021-08-27ngct: Stub NGCT:U servicegerman776-0/+72
2021-08-27Revert "logging: Display backtrace on crash"Morph2-114/+1
2021-08-27service: nifm: Populate fields in GetCurrentNetworkProfileMorph1-29/+37
Populates the current_address, subnet_mask, and gateway fields from the selected network interface.
2021-08-27service: nifm: Cleanup GetCurrentIpConfigInfoMorph1-26/+21
2021-08-27network_interface: Cleanup codeMorph1-76/+83
2021-08-27network_interface: Replace default return value with std::nulloptMorph1-6/+6
2021-08-27emit_spirv_context_get_set: Fix Get FrontFace return valueameerj1-2/+3
The IR expects GetAttribute to return an F32 value. This case was returning a U32 instead.
2021-08-26Revert "kernel: Various improvements to scheduler"bunnei23-224/+140
2021-08-26vp9_types: Minor refactor of VP9 info structs.ameerj1-32/+29
2021-08-26vp9_types: Remove unused Vp9PictureInfo membersameerj2-24/+1
2021-08-25vulkan_device: Add a check for int8 supportameerj3-9/+19
Silences validation errors when shaders use int8 without specifying its support to the API
2021-08-24logging: Fix log filter during initializationameerj4-12/+16
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value. This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
2021-08-22CMakeLists: Ensure proper numerusform tags are generated for pluralized translationsLioncash1-1/+8
If we don't set an explicit source and target language for the base english translation, then we'll generate an incorrect number of <numerusform> tags (which Transifex doesn't like).
2021-08-21settings: Amend language_index maximum setting rangeMorph1-1/+1
The maximum is now 17 with the addition of Brazilian Portuguese
2021-08-21vk_rasterizer: Only clear depth and stencil buffers when set in attachment aspect maskameerj3-6/+24
Silences validation errors for clearing the depth/stencil buffers of framebuffer attachments that were not specified to have depth/stencil usage.
2021-08-19GPU_MemoryManger: Fix GetSubmappedRange.Fernando Sahmkow1-0/+1
2021-08-19Replace QPoint with QPointF where applicableValeri1-16/+18
Previously, floats were implicitly cast to integers
2021-08-19qt_software_keyboard: fix copy-paste errorValeri1-1/+1
2021-08-19video_core: eliminate constant ternaryValeri1-1/+1
`via_header_index` is already checked above, so it would never be true in this branch
2021-08-19applet_error: Fix 64-bit error code conversionMorph1-6/+25
2021-08-19SPIR-V: Merge two ifs in EmitGetAttributeValeri1-6/+2
2021-08-19Fix crash in logging in CreateStrayLayerValeri1-1/+1
It was trying to log value of layer_id which is specifically known not to exist, potentially leading to segfault. Log display_id instead.
2021-08-19Fix check is thread current in GetThreadContextValeri1-1/+1
Misplaced break made it only check for the first core.
2021-08-16h264: Lower max_num_ref_framesameerj1-1/+2
GPU decoding seems to be more picky when it comes to the maximum number of reference frames.
2021-08-16configure_graphics: Add GPU nvdec decoding as an optionameerj12-27/+120
Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference. Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
2021-08-16codec: Improve libav memory alloc and cleanupameerj2-14/+19
2021-08-16codec: Fallback to CPU decoding if no compatible GPU format is foundameerj2-22/+32
2021-08-16cmake: Add VDPAU and NVDEC support to FFmpeglat9nq1-0/+1
Adds {h264_,vp9_}{nvdec,vdpau} hwaccels.
2021-08-16vk_blit_screen: Fix non-accelerated texture size calculationameerj2-9/+3
Addresses the potential OOB access in UnswizzleTexture.
2021-08-16kernel: Optimize GetHostThreadIDBreadFish641-10/+13
2021-08-16network_interface: correct formattingSönke Holz1-1/+1
2021-08-16network_interface: fix mingw-w64 buildspholz1-1/+1
2021-08-16network: retrieve subnet mask and gateway infoSönke Holz5-24/+137
2021-08-15xbyak: Update include pathMerry3-3/+3
2021-08-14core: hle: kernel: Disable dispatch count tracking on single core.bunnei3-5/+12
- This would have limited value, and would be a mess to handle properly.
2021-08-13threadsafe_queue: Fix deadlockyzct123451-6/+4
This fixes a lost wakeup in SPSCQueue. If the reader is in just the right position, the writer's notification will be lost and this will be a problem if the writer then does something to wait on the reader. This was discovered to affect my upcoming stacktrace PR. I don't think any performance decrease will be noticeable because an uncontended mutex is smart enough to skip the syscall. This PR might also resolve some rare deadlocks but I don't know of any examples.
2021-08-13logging: Display backtrace on crashyzct123452-1/+114
This implements backtraces so we don't have to tell users how to use gdb anymore. This prints a backtrace after abort or segfault is detected. It also fixes the log getting cut off with the last line containing only a bracket. This change lets us know what caused a crash not just what happened the few seconds before it. I only know how to add support for Linux with GCC. Also this doesn't work outside of C/C++ such as in dynarmic or certain parts of graphics drivers. The good thing is that it'll try and just crash again but the stack frames are still there so the core dump will work just like before.
2021-08-13logging: Simplify and make thread-safeyzct123458-292/+243
This simplifies the logging system. This also fixes some lost messages on startup. The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation. With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2021-08-13configuration: fix mingw-w64 buildSönke Holz1-2/+2
2021-08-13network: don't use reinterpret_cast in GetAvailableNetworkInterfacesspholz1-7/+4
2021-08-13network: fix mingw-w64 buildSönke Holz1-4/+4
The header "combaseapi.h" of mingw-w64 defines "interface" as "struct".
2021-08-13network: don't use assert to check if no network interfaces are returnedSönke Holz1-2/+4
2021-08-13configuration: move network_interface include to source fileSönke Holz2-2/+1
2021-08-13network: use Common::BitCast instead of std::bit_castSönke Holz1-2/+3
2021-08-13network: narrow down scope of "result" in win32 code forSönke Holz1-4/+5
GetAvailableNetworkInterfaces
2021-08-13configuration: use tr instead of QStringLiteral for "None" item inSönke Holz1-1/+1
network interface combobox
2021-08-13network: use explicit bool conversions in GetAvailableNetworkInterfacesSönke Holz1-1/+1
2021-08-13network: initialize ip_addr in GetHostIPv4Address()Sönke Holz1-1/+1
2021-08-13nifm: use operator*() instead of .value() to get value of std::optionalSönke Holz1-2/+2
2021-08-13nifm: treat a missing host IP address as a non-critical errorSönke Holz1-2/+2
2021-08-12network: correct formatting in network.cpp and network_interface.cppSönke Holz2-8/+6
2021-08-12configuration: add option to select network interfacespholz15-90/+278
This commit renames the "Services" tab to "Network" and adds a combobox that allows the user to select the network interface that yuzu should use. This new setting is now used to get the local IP address in Network::GetHostIPv4Address. This prevents yuzu from selecting the wrong network interface and thus using the wrong IP address. The return type of Network::GetHostIPv4Adress has also been changed.
2021-08-12input_common: Disable sdl raw input modegerman771-0/+3
2021-08-12codec: Replace deprecated av_init_packet usageameerj1-9/+13
2021-08-12nvdec: Implement GPU accelerated decoding for all platformsameerj2-70/+92
Supplements the VAAPI intel gpu decoder by implementing the D3D11VA decoder for Windows, and CUVID/VDPAU for Nvidia and AMD on drivers linux respectively.
2021-08-12decoders: Templates allow memcpy optimizationsyzct123451-57/+116
2021-08-11settings: Fix MSVC issueslat9nq1-7/+22
According to https://stackoverflow.com/questions/469508, we run into a MSVC bug (since VS 2005) when using diamond inheritance for RangedSetting. This explicitly implements those functions in RangedSetting. GetValue is implemented as just calling the inherited version. The explicit converson operator is reimplemented. I opted for this over ignoring the warning with a pragma since this specifies the inherited behavior, and I have now less faith in MSVC to pick the right one. In addition, we mark destructors as virtual to silence what I believe is a fair MSVC compilation error.
2021-08-10vic: Specify sws_scale height stride.ameerj1-3/+2
Silences a sws_scale runtime warning about unaligned strides.
2021-08-08yuzu-cmd/CMakeLists: Correct attribution for this function.Fernando Sahmkow2-0/+2
2021-08-08vp9: Ensure the first frame is completeameerj2-3/+3
Silences a runtime error due to the first frame missing the frame data, and being set to hidden despite being a key-frame.
2021-08-08texture_cache: Address ameerj's reviewyzct123453-7/+4
2021-08-08configure_general: Swap positions of speed limit and frame limit optionsameerj1-30/+30
2021-08-08input_common: Improve SDL joystick and hide toggle optiongerman774-33/+76
2021-08-07input_common: Fix data race on GC implementationRodrigo Locatti2-115/+120
2021-08-07main: Avoid stopping emulation when taking a screenshotgerman771-5/+2
2021-08-07core: hle: kernel: k_thread: Mark KScopedDisableDispatch as nodiscard.bunnei1-1/+1
2021-08-07core: cpu_manager: Use invalid core_id on init and simplify shutdown.bunnei1-7/+3
2021-08-07core: hle: service: buffer_queue: Improve management of KEvent.bunnei3-14/+24
2021-08-07core: hle: kernel: k_auto_object: Add GetName method.bunnei1-0/+4
- Useful purely for debugging.
2021-08-07core: hle: service: nvflinger/vi: Improve management of KEvent.bunnei4-16/+30
2021-08-07core: hle: kernel: DisableDispatch on suspend threads.bunnei1-0/+3
2021-08-07core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling.bunnei1-14/+9
2021-08-07core: cpu_manager: Use KScopedDisableDispatch.bunnei1-7/+8
2021-08-07core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate.bunnei1-6/+2
2021-08-07core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess.bunnei1-5/+0
2021-08-07core: hle: kernel: k_scheduler: Improve ScheduleImpl.bunnei1-6/+7
2021-08-07core: hle: kernel: k_scheduler: Improve Unload.bunnei1-17/+29
2021-08-07core: hle: kernel: k_process: DisableDispatch on main thread.bunnei1-0/+1
2021-08-07core: hle: kernel: k_handle_table: Use KScopedDisableDispatch as necessary.bunnei2-0/+8
2021-08-07core: hle: kernel: k_thread: Add KScopedDisableDispatch.bunnei2-1/+47
2021-08-07core: hle: kernel: Ensure idle threads are closed before destroying scheduler.bunnei3-24/+22
2021-08-07core: hle: kernel: Reflect non-emulated threads as core 3.bunnei7-13/+15
2021-08-07core: cpu_manager: Use jthread.bunnei2-18/+13
2021-08-07vulkan_memory_allocator: Respect bufferImageGranularityRobin Kertels2-2/+8
2021-08-07nvdec: Better logging for unimplemented codecsameerj1-1/+1
2021-08-07memory: Address lioncash's reviewyzct123451-52/+6
2021-08-07memory: Dedup Read and Write and fix logging bugsyzct123451-129/+115
2021-08-07texture_cache: Address ameerj's reviewyzct123454-10/+5
2021-08-07network: GetAndLogLastError: ignore Errno::AGAINSönke Holz1-1/+5
If non-blocking sockets are used, they generate a lot of Errno::AGAIN errors when they didn't receive any data. These errors shouldn't be logged.
2021-08-07network: GetCurrentIpConfigInfo: return host IP addressSönke Holz1-1/+4
Service::NIFM::IGeneralService::GetCurrentIpConfigInfo currently hardcodes 192.168.1.100 as the IP address, which prevents LAN play from working correctly.
2021-08-07nvhost_nvdec_common: Remove BufferMapameerj2-76/+0
This was mainly used to keep track of mapped buffers for later unmapping. Since unmap is no longer implemented, this no longer seves a valuable purpose.
2021-08-07vp9: Cleanup unused variablesameerj3-58/+17
With reference frames refreshes fix, we no longer need to buffer two frames in advance. We can also remove other unused or otherwise unneeded variables.
2021-08-07vp9: Fix reference frame refreshesameerj2-48/+31
This resolves the artifacting when decoding VP9 streams.
2021-08-07nvhost_nvdec_common: Stub UnmapBuffer Ioctlameerj1-23/+4
Skip unmapping nvdec buffers to avoid breaking the continuity of the VP9 reference frame addresses, and the risk of invalidating data before the async GPU thread is done with it.
2021-08-06network: fix fcntl cmdsSönke Holz1-2/+2
F_SETFL/F_GETFL are the correct commands to set a socket to be non-blocking
2021-08-06common: uuid: Add hash function for UUIDMorph1-0/+11
Used when UUID is a key in an unordered_map. The hash is produced by XORing the high and low 64-bits of the UUID together.
2021-08-05memory: Clean up CopyBlock tooyzct123451-36/+15
2021-08-05Update configure_graphics_advanced.uigidoly1-2/+5
add description too fast gpu time
2021-08-05texture_cache: Don't change copyright yearyzct123454-4/+4
2021-08-05texture_cache: Address ameerj's reviewyzct1234512-1821/+1821
2021-08-05memory: Address lioncash's reviewyzct123452-7/+8
2021-08-05memory: Clean up codeyzct123452-329/+81
2021-08-05assert: Verify formattingyzct123451-2/+6
2021-08-05assert: Avoid empty macrosyzct123451-2/+2
2021-08-05texture_cache: Split templates outyzct123457-1532/+1533
2021-08-05applet_swkbd: Include the null terminator in the buffer size calculationMorph1-2/+4
Some games may interpret the read string as a null-terminated string instead of just reading the string up to buffer_size.
2021-08-05hex_util: Fix incorrect array size in AsArrayMorph1-1/+1
Although this isn't used, this is a potential bug as HexStringToArray will perform an out-of-bounds read.
2021-08-04config: Read connected setting for controllerslat9nq1-0/+3
Currently yuzu will read the mapping but does not connect a controller despite adding subsequent configurations for it. Read the `connected` setting for now as a boolean like the Qt frontend.
2021-08-04settings_ui: Add emulated joystick position dot to controller previewgerman772-21/+46
2021-08-04common: uuid: Add hex string to UUID constructorMorph2-0/+73
This allows for easily converting a hex string into a Common::UUID, which is backed by a 128 bit unsigned integer.
2021-08-04nvdec: Implement VA-API hardware video acceleration (#6713)yzct123455-72/+175
* nvdec: VA-API * Verify formatting * Forgot a semicolon for Windows * Clarify comment about AV_PIX_FMT_NV12 * Fix assert log spam from missing negation * vic: Remove forgotten debug code * Address lioncash's review * Mention VA-API is Intel/AMD * Address v1993's review * Hopefully fix CMakeLists style this time * vic: Improve cache locality * vic: Fix off-by-one error * codec: Async * codec: Forgot the GetValue() * nvdec: Address ameerj's review * codec: Fallback to CPU without VA-API support * cmake: Address lat9nq's review * cmake: Make VA-API optional * vaapi: Multiple GPU * Apply suggestions from code review Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com> * nvdec: Address ameerj's review * codec: Use anonymous instead of static * nvdec: Remove enum and fix memory leak * nvdec: Address ameerj's review * codec: Remove preparation for threading Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-08-03config: Only read/write current_user on global configlat9nq1-5/+6
2021-08-02network: fix ternary operator in Socket::SendTospholz1-1/+1
2021-08-02decoders: Optimize swizzle copy performance (#6790)yzct123451-9/+43
This makes UnswizzleTexture up to two times faster. It is the main bottleneck in NVDEC video decoding.
2021-08-01yuzu-cmd: hide cursor when in fullscreensan4-0/+9
Exposed the SDL_ShowCursor function to EmuWindow baseclass. When creating the window (GL or VK) in fullscreen it now automatically hides the cursor.
2021-08-01game_list: Make game list folder icons smaller (#6762)Malte Jürgens6-28/+70
Makes the default game list folder icons 48x48 by default instead of 64x64, and allows for selecting small (24x24) and large (72x72) icon sizes.
2021-08-01service: set: Correct copy amount in GetAvailableLanguageCodesMorph1-1/+2
2021-08-01astc_decoder: Reduce workgroup sizeameerj3-5/+5
This reduces the amount of over dispatching when there are odd dimensions (i.e. ASTC 8x5), which rarely evenly divide into 32x32.
2021-08-01astc_decoder: Compute offset swizzles in-shaderameerj4-109/+25
Alleviates the dependency on the swizzle table and a uniform which is constant for all ASTC texture sizes.
2021-08-01astc_decoder: Make use of uvec4 for payload dataameerj1-79/+43
2021-08-01astc_decoder: Simplify Select2DPartitionameerj1-38/+19
2021-08-01astc_decoder: Optimize the use EncodingDataameerj6-138/+108
This buffer was a list of EncodingData structures sorted by their bit length, with some duplication from the cpu decoder implementation. We can take advantage of its sorted property to optimize its usage in the shader. Thanks to wwylele for the optimization idea.
2021-08-01astc.h: Move data to cpp implementationameerj2-64/+63
Moves leftover values that are no longer used by the gpu decoder back to the cpp implementation.
2021-07-31settings: Use std::clamp where possiblelat9nq1-39/+9
Addresses PR review Co-authored-by: PixelyIon <pixelyion@protonmail.com>
2021-07-31hle: api_version: Update HOS version to 12.1.0Morph1-7/+7
Keeps us up to date with reporting the system version.
2021-07-31settings: Remove unnecessary std::move usageslat9nq1-12/+12
Addresses review feedback. Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-07-30settings: Fix function virtualizationlat9nq1-12/+18
Fixes a theoretical scenario where a Setting is using the BasicSetting's GetValue function. In practice this probably only happens on yuzu-cmd, where there is no need for a Setting's additional features. Need to fix regardless.
2021-07-30settings: Implement setting rangeslat9nq1-18/+152
Clamps the setting's values against the specified minimum and maximum values.
2021-07-30emu_window: Remove global system instancelat9nq7-12/+23
It was just the one in emu_window_sdl2, but since _gl and _vk inherit from it, they all needed adjustments. Leaves just the one auto system& in main().
2021-07-30applet_swkbd: Correct string buffer size calculationMorph1-2/+2
The buffer size here does not include the initial 8 bytes.
2021-07-30configure_system: Add Brazilian Portuguese to the list of languagesMorph2-1/+6
2021-07-30service: set: Correct 4.0.0 max_entries to 0x40 (64) instead of 17Morph1-8/+8
2021-07-30service: ns, set: Add PT_BR (Brazilian Portuguese)Morph3-2/+6
2021-07-30shader: Fold UnpackFloat2x16 and PackFloat2x16ReinUsesLisp1-0/+4
Simplifies the code a bit when possible. These instructions should be no-ops codegen wise.
2021-07-29vk_rasterizer: Flip viewport on Y_NEGATEReinUsesLisp1-2/+7
Matches OpenGL's behavior. I don't believe this register flips geometry, but we have to try to match behavior on both backends.
2021-07-29renderers: Add explicit invert_y bool to screenshot callbackameerj5-7/+7
OpenGL and Vulkan images render in different coordinate systems. This allows us to specify the coordinate system of the screenshot within each renderer
2021-07-29renderer_vulkan: Implement screenshotsameerj2-0/+152
2021-07-29vk_blit_screen: Add public CreateFramebuffer methodameerj2-14/+18
2021-07-29vk_blit_screen: Make Draw method more genericameerj3-55/+71
Allows specifying the framebuffer and render area dimensions, rather than being hard coded for the render window.
2021-07-28shader: Mark ConvertF16F32 and ConvertF32F16 as fp16 instructionsReinUsesLisp1-0/+2
Fixes instances where fp16 types are not declared on SPIR-V but they are used. This shouldn't happen on master, as it's been uncovered by an additional optimization pass.
2021-07-28renderer_vulkan: Add setting to log pipeline statisticsReinUsesLisp19-24/+307
Use VK_KHR_pipeline_executable_properties when enabled and available to log statistics about the pipeline cache in a game. For example, this is on Turing GPUs when generating a pipeline cache from Super Smash Bros. Ultimate: Average pipeline statistics ========================================== Code size: 6433.167 Register count: 32.939 More advanced results could be presented, at the moment it's just an average of all 3D and compute pipelines.
2021-07-27host_memory: Add workaround for FreeBSD 12Jan Beich1-0/+5
src/common/host_memory.cpp:360:14: error: use of undeclared identifier 'memfd_create' fd = memfd_create("HostMemory", 0); ^
2021-07-27host_memory: Enable Linux implementation on FreeBSDJan Beich1-2/+2
HW.Memory <Critical> common/host_memory.cpp:HostMemory:492: Fastmem unavailable, falling back to VirtualBuffer for memory allocation
2021-07-27qt_web_browser: Fix lambda capture for HIDButtonjls471-1/+1
2021-07-27qt_web_browser: Focus on the first link elementjls473-0/+22
Focusing on the first link element fixes element navigation upon loading the web applet in games such as Super Mario Odyssey
2021-07-27service: ns: Remove unused ns_language headerMorph1-42/+0
2021-07-27service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified ChineseMorph1-0/+2
2021-07-27render_target: Add missing initializer for size extentLioncash1-3/+3
Everything else has a default constructor that does the straightforward thing of initializing most members to a default value, except for the size. We explicitly initialize the size (and others, for consistency), to prevent potential uninitialized reads from occurring. Particularly given the largeish surface area that this struct is used in.
2021-07-27video_core/engine: Consistently initialize rasterizer pointersLioncash2-2/+2
Ensures all of the engines have consistent and deterministic initialization of the rasterizer pointers.
2021-07-27vulkan_wrapper: Fix SetObjectName() always indicating objects as imagesLioncash1-1/+1
We should be using the passed in object type instead.
2021-07-27buffer_cache: Remove unused small_vector in CommitAsyncFlushesHigh()Lioncash1-1/+0
Given this is non-trivial, the constructor is required to execute, so this removes a bit of redundant codegen.
2021-07-27gl_shader_cache: Remove unused variableLioncash1-1/+0
2021-07-27vk_compute_pass: Remove unused capturesLioncash1-3/+2
Resolves two compiler warnings.
2021-07-27exception: Make constructors explicitLioncash1-4/+4
Ensures that exception construction is always explicit.
2021-07-27exception: Make what() member function nodiscardLioncash1-1/+1
2021-07-27exception: Narrow down specific headerLioncash1-1/+1
We can use the <exception> header instead of pulling in all of the exception-style classes.
2021-07-27common: fs: fs_util: Add BufferToUTF8StringMorph2-0/+15
Allows for direct conversion to std::string without having to convert std::u8string to std::string
2021-07-27common: uuid: Return a lower-case hex string in FormatMorph3-15/+15
2021-07-26vk_staging_buffer_pool: Fall back to host memory when allocation failsRobin Kertels1-8/+21
2021-07-26vk_stream_buffer: Remove unused stream bufferReinUsesLisp2-244/+0
Remove unused file.
2021-07-26configure_graphics: reword GLASM optionVamsi Krishna1-1/+1
Change wording to explain that GLASM is actually short for Assembly Shaders
2021-07-26vk_compute_pass: Fix pipeline barrier for indexed quadsReinUsesLisp1-1/+1
Use an index buffer barrier instead of a vertex input read barrier.
2021-07-26vk_buffer_cache: Add transform feedback usage to null bufferReinUsesLisp1-3/+7
Fixes bad API usages on Vulkan.
2021-07-26emit_glasm: Fix LINESS_ADJACENCY typo in InputPrimitive()Lioncash1-1/+1
This should be LINES_ADJACENCY
2021-07-26emit_spirv_instructions: Add missing header guardLioncash1-0/+2
2021-07-26shader_recompiler: Remove unnecessary [[nodiscard]] instancesLioncash2-4/+4
[[nodiscard]] doesn't do anything on functions with a void return type and causes superfluous warnings.
2021-07-26control_flow: Fix duplicate switch case in OpcodeTokenLioncash1-1/+1
This previously duplicated the case of the PBK case above it.
2021-07-26object_pool: Add missing return in Chunk move assignment operatorLioncash1-0/+1
Prevents undefined behavior from occurring.
2021-07-26shader: Fold integer FMA from Nvidia's patternReinUsesLisp1-0/+175
Fold shaders doing "a * b + c" on integers from the pattern generated by Nvidia's GL compiler. On a somewhat complex compute shader it reduces the code size by 16 instructions from 2 matches on Turing GPUs. On Intel as extracted from KHR_pipeline_executable_properties: Before the optimization: ``` Instruction Count: 2057 Basic Block Count: 45 Scratch Memory Size: 14752 Spill Count: 232 Fill Count: 261 SEND Count: 610 Cycle Count: 11325 ``` After the optimization: ``` Instruction Count: 2046 Basic Block Count: 44 Scratch Memory Size: 13728 Spill Count: 219 Fill Count: 268 SEND Count: 604 Cycle Count: 11367 ```
2021-07-26shader: Use TryInstRecursive on XMAD multiply foldingReinUsesLisp1-14/+12
Simplify a bit the logic.
2021-07-26shader: Add TryInstRecursive utility to valuesReinUsesLisp1-0/+8
2021-07-25main: Fix screenshot filepath constructionameerj1-1/+1
The screenshot directory path returned does not have a trailing directory separator character. This caused screenshots to be saved in the parent directory of the configured screenshot directory. This fixes that behavior
2021-07-24renderer_base: Removed redundant settingsameerj3-12/+4
use_framelimiter was not being used internally by the renderers. set_background_color was always set to true as there is no toggle for the renderer background color, instead users directly choose the color of their choice.
2021-07-24general: Rename "Frame Limit" references to "Speed Limit"ameerj16-77/+77
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate. This allows us to differentiate it from the fps unlocker setting.
2021-07-24config, nvflinger: Add FPS cap settingameerj8-6/+49
Allows finer tuning of the FPS limit.
2021-07-23configuration: Use combobox apply template where possiblelat9nq2-35/+2
We don't need to manually apply this setting now that a template can do this for us.
2021-07-23general: Implement FullscreenMode enumerationlat9nq8-28/+38
Prevents us from using an unclear 0 or 1 to describe the fullscreen mode.
2021-07-23common: Publically link to pthreadslat9nq1-1/+1
Common requires pthreads but does not refer to it when linking to other modules. Fix this by linking to Threads where necessary.
2021-07-23shader: Support out of bound local memory reads and immediate writesReinUsesLisp1-4/+21
Support ignoring immediate out of bound writes. Writing dynamically out of bounds is not yet supported (e.g. R0+0x4). Reading out of bounds yields zero. This is supported checking for the size from the IR; if the input is immediate, the optimization passes will drop it.
2021-07-23vulkan/blit_image: Commit descriptor sets within worker threadReinUsesLisp1-9/+7
Fixes race condition caused. The descriptor pool is not thread safe, so we have to commit descriptor sets within the same thread.
2021-07-23vulkan_device: Blacklist Volta and older from VK_KHR_push_descriptorReinUsesLisp1-4/+39
Causes crashes on Link's Awakening intro. It's hard to debug if it's our fault due to bugs in validation layers.
2021-07-23qt: Remove "experimental" from asynchronous shader building UIReinUsesLisp1-1/+1
2021-07-23Revert "renderers: Disable async shader compilation"ReinUsesLisp2-5/+3
This reverts commit 4a152767286717fa69bfc94846a124a366f70065.
2021-07-23opengl: Fix asynchronous shadersReinUsesLisp2-4/+33
Wait for shader to build before configuring it, and wait for the shader to build before sharing it with other contexts.
2021-07-23shader_environment: Receive cache version from outsideReinUsesLisp4-16/+23
This allows us invalidating OpenGL and Vulkan separately in the future.
2021-07-23cmake: Remove shader cache versionReinUsesLisp3-12/+1
2021-07-23shader: Fix disabled attribute default valuesameerj2-2/+2
2021-07-23gl_device: Simplify GLASM setting logicameerj1-15/+8
2021-07-23glsl: Simplify FCMP emissionameerj1-6/+4
2021-07-23glsl: Update TessellationControl gl_inameerj1-0/+28
Adheres to GL_ARB_separate_shader_objects requirements
2021-07-23renderer_opengl: Use ARB_separate_shader_objectsReinUsesLisp9-116/+154
Ensures that states set for a particular stage are not attached to other stages which may not need them.
2021-07-23shader: Implement ISETP.Xameerj4-44/+57
2021-07-23shader: Avoid usage of C++20 ranges to build in clangReinUsesLisp11-39/+47
2021-07-23glsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZEameerj3-2/+12
2021-07-23gl_shader_cache: Properly implement asynchronous shadersReinUsesLisp1-1/+1
2021-07-23shader_recompiler, video_core: Resolve clang errorslat9nq14-44/+40
Silences the following warnings-turned-errors: -Wsign-conversion -Wunused-private-field -Wbraced-scalar-init -Wunused-variable And some other errors
2021-07-23main: Update Shader Cache menu optionsameerj4-16/+64
This change adds two new context menu items to remove either the OpenGL or the Vulkan shader caches individually, and the provides the option to remove all caches for the selected title. This also changes the behavior of the open shader cache option. Now it creates the shader cache directory for the title if it does not yet exist.
2021-07-23renderers: Fix clang formattingameerj4-9/+13
2021-07-23shader: Manually convert from array<u32> to bitset instead of using bit_castReinUsesLisp1-2/+3
2021-07-23renderers: Disable async shader compilationameerj2-3/+5
The current implementation is prone to causing graphical issues. Disable until a better solution is implemented.
2021-07-23maxwell_to_vk: Add R16_SNORMReinUsesLisp2-1/+2
2021-07-23configure_graphics: Mark SPIR-V as Experimental, Mesa onlylat9nq1-1/+1
2021-07-23glsl: Fix tracking of info.uses_shadow_lodameerj1-4/+4
2021-07-23shader: Ignore global memory ops on devices lacking int64 supportameerj8-30/+79
2021-07-23vulkan_device: Add missing include algorithmlat9nq1-0/+1
2021-07-23vulkan_device: Blacklist ampere devices from float16 mathameerj2-12/+23
2021-07-23dual_vertex_pass: Clang formatameerj1-14/+14
2021-07-23gl_shader_cache: Fixes for async shadersameerj2-2/+25
2021-07-23vulkan_device: Enable VK_EXT_extended_dynamic_state on RADV 21.2 onwardReinUsesLisp1-4/+7
2021-07-23emit_spirv: Workaround VK_KHR_shader_float_controls on fp16 NvidiaReinUsesLisp4-5/+12
Fix regression on Fire Emblem: Three Houses when using native fp16.
2021-07-23configure_graphics: Re-order vulkan device populatinglat9nq1-4/+4
2021-07-23shader: GCC fmt 8.0.0 fixeslat9nq7-16/+19
2021-07-23shader: Account for 33-bit IADD3 scenarioameerj1-2/+10
2021-07-23shader: Only apply shift on register mode for IADD3ReinUsesLisp1-10/+14
2021-07-23vk_rasterizer: Workaround bug in VK_EXT_vertex_input_dynamic_stateReinUsesLisp4-19/+20
Workaround potential bug on Nvidia's driver where only updating high attributes leaves low attributes out dated.
2021-07-23shader: Fix disabled and unwritten attributes and varyingsReinUsesLisp3-18/+31
2021-07-23glsl: Fix shared and local memory declarationsameerj1-3/+3
account for the fact that program.*memory_size is in units of bytes.
2021-07-23opengl: Implement LOP.CCameerj2-6/+38
Used by MH:Rise
2021-07-23vk_graphics_pipeline: Implement smooth linesReinUsesLisp5-5/+65
2021-07-23vk_graphics_pipeline: Implement line widthReinUsesLisp8-8/+36
2021-07-23spirv: Fix code emission when descriptor aliasing is unsupportedReinUsesLisp1-1/+2
Fixes OpenGL.
2021-07-23video_core: Enable GL SPIR-V shaderslat9nq7-38/+105
2021-07-23general: Add setting shader_backendlat9nq14-87/+182
GLASM is getting good enough that we can move it out of advanced graphics settings. This removes the setting `use_assembly_shaders`, opting for a enum class `shader_backend`. This comes with the benefits that it is extensible for additional shader backends besides GLSL and GLASM, and this will work better with a QComboBox. Qt removes the related assembly shader setting from the Advanced Graphics section and places it as a new QComboBox in the API Settings group. This will replace the Vulkan device selector when OpenGL is selected. Additionally, mark all of the custom anisotropic filtering settings as "WILL BREAK THINGS", as that is the case with a select few games.
2021-07-23glsl: Declare local memory in mainameerj1-3/+3
2021-07-23glsl: Add passthrough geometry shader supportameerj3-7/+27
2021-07-23shader: Use std::bit_cast instead of Common::BitCast for passthroughReinUsesLisp1-2/+3
2021-07-23glasm: Add passthrough geometry shader supportReinUsesLisp5-8/+33
2021-07-23shader: Rework varyings and implement passthrough geometry shadersReinUsesLisp29-331/+345
Put all varyings into a single std::bitset with helpers to access it. Implement passthrough geometry shaders using host's.
2021-07-23vk_graphics_pipeline: Implement conservative renderingReinUsesLisp6-10/+44
2021-07-23shader: Only verify shader when graphics debugging is enabledReinUsesLisp1-2/+7
2021-07-23shader: Unify shader stage typesReinUsesLisp15-55/+37
2021-07-23lower_int64_to_int32: Add missing includelat9nq1-0/+1
2021-07-23shader: Emulate 64-bit integers when not supportedReinUsesLisp6-2/+16
Useful for mobile and Intel Xe devices.
2021-07-23shader: Add int64 to int32 lowering passReinUsesLisp3-0/+218
2021-07-23shader: Teach global memory base tracker to follow vectorsReinUsesLisp1-15/+14
2021-07-23shader: Add constant propagation to integer vectorsReinUsesLisp1-0/+9
2021-07-23glsl: Better IAdd Overflow CC fixameerj2-11/+13
This ensures the original operand values are not overwritten when being used in the overflow detection.
2021-07-23shader: Remove IAbs64ReinUsesLisp9-26/+3
2021-07-23glsl: Fix IADD CCameerj2-5/+7
2021-07-23shader_recompiler: Fix IADD3 input partitioningameerj1-14/+13
2021-07-23shader: Move loop safety tests to code emissionReinUsesLisp16-108/+54
2021-07-23gl_graphics_pipeline: Fix assembly shaders check for transform feedbacksReinUsesLisp1-1/+1
2021-07-23glsl: Remove frag color initializationameerj1-9/+0
2021-07-23glasm: Implement SetAttribute ViewportMaskameerj2-1/+10
2021-07-23gl_graphics_pipeline: Inline hash and operator== key functionsReinUsesLisp2-12/+8
2021-07-23gl_shader_cache: Check previous pipeline before checking hash mapReinUsesLisp5-29/+41
Port optimization from Vulkan.
2021-07-23gl_graphics_pipeline: Port optimizations from Vulkan pipelinesReinUsesLisp2-57/+141
2021-07-23emit_glsl_special: Skip initialization of frag_color0ameerj1-1/+1
Fixes rendering in Devil May Cry without regressing Ori and the Blind Forest.
2021-07-23shader: Calibrate loop safety thresholdReinUsesLisp1-1/+1
2021-07-23buffer_cache: Fix debugging leftoverReinUsesLisp1-1/+1
2021-07-23glsl: Add missing ; in EmitSetSampleMaskMorph1-1/+1
Fixes shader compilation in Okami HD
2021-07-23buffer_cache: Fix size reductions not having in mind bind sizesReinUsesLisp1-7/+23
A buffer binding can change between shaders without changing the shaders. This lead to outdated bindings on OpenGL.
2021-07-23glsl: Fix output varying initialization when transform feedback is usedameerj1-3/+37
2021-07-23shaders: Allow shader notify when async shaders is disabledameerj2-11/+9
2021-07-23texture_pass: Fix is_read image qualificationameerj1-1/+1
Atomic operations are considered to have both read and write access. This was not being accounted for.
2021-07-23shader: Align constant buffer sizes to 16 bytesReinUsesLisp1-1/+2
WAR for AMD reading zeroes on uniform buffers of size 2.
2021-07-23spirv: Properly handle devices without int8 and int16ReinUsesLisp2-39/+67
2021-07-23spirv: Handle small storage buffer loads on devices with no supportReinUsesLisp2-6/+6
2021-07-23vk_graphics_pipeline: Use VK_KHR_push_descriptor when availableReinUsesLisp8-36/+88
~51% faster on Nvidia compared to previous method.
2021-07-23glsl: Fix cbuf component indexing bug falbackameerj1-7/+6
2021-07-23shader: Simplify MergeDualVertexProgramsReinUsesLisp1-6/+4
2021-07-23shader: Properly manage attributes not written from previous stagesReinUsesLisp12-41/+62
2021-07-23glsl: Only declare fragment outputs on fragment shadersReinUsesLisp1-4/+6
2021-07-23shader: Split profile and runtime info headersReinUsesLisp13-77/+93
2021-07-23shader: Add support for native 16-bit floatsReinUsesLisp9-14/+50
2021-07-23shader: Rename maxwell/program.h to translate_program.hReinUsesLisp5-11/+6
2021-07-23vulkan_device: Blacklist VK_EXT_vertex_input_dynamic_state on IntelReinUsesLisp1-0/+4
2021-07-23glsl: Obey need_declared_frag_colors to declare and initialize all frag_colorameerj2-1/+10
Fixes Ori and the blind forest title screen
2021-07-23glsl: Address rest of feedbackameerj11-38/+86
2021-07-23glsl: Move gl_Position/generic attribute initialization to EmitProlgueameerj2-14/+12
2021-07-23glsl: Conditionally use fine/coarse derivatives based on device supportameerj4-4/+29
2021-07-23glsl: Cleanup/Address feedbackameerj10-28/+24
2021-07-23gl_shader_cache: Implement async shadersameerj7-107/+154
2021-07-23glsl: Add Shader_GLSL loggingameerj3-28/+32
2021-07-23glsl: Add LoopSafety instructionsameerj2-0/+10
2021-07-23glsl: Conditionally add EXT_texture_shadow_lodameerj3-4/+15
2021-07-23glsl: Add stubs for sparse queries and variable aoffi when not supportedameerj7-13/+47
2021-07-23glsl: Implement legacy varyingsameerj6-8/+81
2021-07-23gl_shader_cache: Remove const from pipeline source argumentsameerj4-6/+6
2021-07-23gl_shader_cache: Move OGL shader compilation to the respective Pipeline constructorameerj5-76/+79
2021-07-23glsl: Minor cleanupameerj2-19/+15
2021-07-23glsl: Fix Cbuf getters for F32 typeameerj1-12/+15
2021-07-23glsl: Add immediate index oob checking for Cbuf gettersameerj1-0/+16
2021-07-23glsl: Refactor GetCbuf functions to reduce code duplicationameerj1-104/+66
2021-07-23glsl: Address more feedback. Implement indexed texture readsameerj6-114/+112
2021-07-23glsl: Remove Signed Integer variablesameerj8-43/+13
2021-07-23glsl: Address Rodrigo's feedbackameerj13-75/+87
2021-07-23glsl: Reorganize backend code, remove unneeded [[maybe_unused]]ameerj12-315/+251
2021-07-23glsl: Implement SampleId and SetSampleMaskameerj3-30/+35
plus some minor refactoring of implementations
2021-07-23glsl: Add gl_PerVertex in for GSameerj1-1/+2
2021-07-23glsl: Use existing tracking for enabling EXT_shader_image_load_formattedameerj1-15/+1
2021-07-23glsl: Enable early fragment testsameerj2-4/+7
2021-07-23gl_rasterizer: Add texture fetch barrier for fragmentsameerj1-1/+1
Fixes flicker seen in XC2
2021-07-23glsl: Implement more attribute getters and settersameerj2-12/+60
2021-07-23glsl: Implement fswzaddameerj5-5/+45
and wip nv thread shuffle impl
2021-07-23glsl: Implement indexed attribute loadsameerj5-29/+64
2021-07-23glsl: Conditionally add GL_ARB_sparse_texture2ameerj1-2/+3
2021-07-23glsl: Rebase fixesameerj2-3/+5
2021-07-23glsl: Conditionally use GL_EXT_shader_image_load_formattedameerj1-2/+18
Fix for SULD.D
2021-07-23glsl: Remove output generic indexing for geometry stageameerj1-5/+3
2021-07-23glsl: Allow dynamic tracking of variable allocationameerj3-21/+35
2021-07-23glsl: Implement barriersameerj3-13/+21
2021-07-23glsl: Implement image atomics and set layerameerj5-153/+202
along with some more cleanup/oversight fixes
2021-07-23glsl: Fix image gather logicameerj1-0/+4
2021-07-23glsl: Add cbuf access workaround for devices with component indexing bugameerj2-51/+112
2021-07-23glsl: Use textureGrad fallback when EXT_texture_shadow_lod is unsupportedameerj4-8/+42
2021-07-23emit_glsl_image: Use immediate offsets when possibleameerj1-12/+33
2021-07-23glsl: Fix <32-bit SSBO writesameerj4-50/+43
and more cleanup
2021-07-23glsl: Cleanup and address feedbackameerj10-86/+69
2021-07-23glsl: Refactor Global memory functionsameerj2-71/+73
2021-07-23glsl: Increase NUM_VARS that can be allocatedameerj1-1/+1
needed for HW:AoC.
2021-07-23glsl: Implement Load/WriteGlobalameerj9-98/+185
along with some other misc changes and fixes
2021-07-23glsl: Implement Imagesameerj2-9/+74
2021-07-23glsl: skip gl_ViewportIndex write if device does not support itameerj5-8/+18
2021-07-23glsl: Implement transform feedbackameerj4-18/+76
2021-07-23glsl: Yet another gl_ViewportIndex fix attemptameerj1-3/+19
2021-07-23glsl: Add gl_ViewportIndex out attributeameerj1-1/+3
2021-07-23emit_glsl_context_get_set: Remove unused functionlat9nq1-4/+0
2021-07-23glsl: Fix precise variable declarationameerj3-24/+25
and add some more separation in the shader for better debugability when dumped
2021-07-23glsl: Implement tessellation shadersameerj5-27/+146
2021-07-23glsl: Implement ImageGradient and other texture function variantsameerj2-32/+73
2021-07-23glsl: Fix atomic SSBO offsetsameerj4-67/+74
and implement misc getters
2021-07-23glsl: Implement geometry shadersameerj4-9/+62
2021-07-23glsl: Use NotImplemented macro with function name outputameerj10-104/+103
2021-07-23glsl: Implement gl_ViewportIndexameerj3-5/+14
SSBU now working
2021-07-23glsl: SHFL fix and prefer shift operations over divide in glsl shaderameerj5-63/+64
2021-07-23glsl: Implement precise fp variable allocationameerj4-8/+67
2021-07-23HACK glsl: Write defaults to unused generic attributesameerj2-2/+11
2021-07-23glsl: Fix ssbo indexing and name shadowing between shader stagesameerj3-77/+101
2021-07-23glsl: implement set clip distanceameerj2-0/+15
and missed a diff in emit_glsl relating to var alloc ref counting
2021-07-23glsl: Rework var alloc to not assign unused resultsameerj9-49/+91
2021-07-23glsl: Rework variable allocator to allow for variable reuseameerj14-353/+482
2021-07-23glsl: Fix ATOM and implement ATOMSameerj5-114/+136
2021-07-23glsl: Use gl_SubGroupInvocationARBameerj2-8/+7
2021-07-23glsl: Implement VOTE for subgroup size potentially largerameerj5-20/+43
2021-07-23glsl: Implement VOTEameerj4-50/+64
2021-07-23glsl: Implement ST{LS}ameerj6-69/+106
2021-07-23glsl: Implement more instructions used by SMOameerj1-3/+3
2021-07-23glsl: Implement more instructions used by SMOameerj5-10/+16
2021-07-23glsl: Fix GetAttribute return valuesameerj2-7/+9
fixes font rendering issues as these were used to index into the ssbos
2021-07-23glsl: minor cleanupameerj4-20/+19
2021-07-23glsl: Fix and implement rest of cbuf accessameerj1-7/+43
2021-07-23glsl: Implement TXQ and other misc changesameerj5-6/+36
2021-07-23glsl: TLD4 implementationameerj1-2/+89
2021-07-23glsl: Implement TLD instructionameerj1-1/+55
2021-07-23glsl: Implement TEXSameerj1-1/+29
2021-07-23glsl: Cleanup texture functionsameerj1-13/+11
2021-07-23shader_recompiler: GCC fixeslat9nq14-3/+13
2021-07-23glsl: Implement TEX depth functionsameerj2-4/+46
2021-07-23glsl: Implement TEX ImageSample functionsameerj3-11/+71
2021-07-23glsl: Rework Shuffle emit instructions to align with SPIR-Vameerj1-19/+40
2021-07-23glsl: Better Storage access and wip warpsameerj8-62/+133
2021-07-23glsl: Fix integer conversions, implement clamp CCameerj2-27/+36
2021-07-23glsl: Implement IADD CCameerj2-2/+17
2021-07-23glsl: SSBO access fixes and wip SampleExplicitLod implementation.ameerj2-4/+19
2021-07-23glsl: WIP var forward declarationameerj6-49/+60
to fix Loop control flow.
2021-07-23glsl: Fix bindings, add some CC opsameerj8-57/+91
2021-07-23glsl: remove unused headersameerj14-34/+10
2021-07-23glsl: Implement derivatives and YDirectionameerj8-81/+87
plus some other misc additions/changed
2021-07-23glsl: Fix non-immediate buffer accessameerj12-72/+133
and many other misc implementations
2021-07-23glsl: textures wipameerj9-75/+139
2021-07-23glsl: Implement some attribute getters and settersameerj10-192/+337
2021-07-23glsl: Track S32 atomicsameerj3-6/+16
2021-07-23glsl: Update phi node managementameerj4-21/+53
2021-07-23glsl: Fix floating point compare opsameerj1-28/+28
Logic for ordered/unordered ops was wrong.
2021-07-23glsl: Query GL Device for FP16 extension supportameerj5-2/+23
2021-07-23glsl: Simply FP storage atomicsameerj2-48/+28
2021-07-23glsl: F16x2 storage atomicsameerj7-58/+64
2021-07-23glsl: Revert ssbo aliasing. Storage Atomics implameerj5-75/+134
2021-07-23glsl: implement phi nodesameerj4-20/+54
2021-07-23glsl: Wip storage atomic opsameerj10-327/+414
2021-07-23glsl: Implement FCMPameerj3-242/+185
2021-07-23glsl: Add a more robust fp formatterameerj4-9/+14
2021-07-23glsl: More FP fixesameerj2-9/+16
2021-07-23glsl: FP function fixesameerj7-17/+25
2021-07-23glsl: More FP instructions/fixesameerj5-28/+41
2021-07-23glsl: Add many FP32/64 instructionsameerj12-765/+1011
2021-07-23glsl: Fixup build issuesReinUsesLisp1-1/+1
2021-07-23glsl: Implement more Integer opsameerj3-119/+72
2021-07-23glsl: Implement BF*ameerj3-9/+10
2021-07-23glsl: Implement a few Integer instructionsameerj10-260/+398
2021-07-23glsl: Use std::string_view for Emit function args.ameerj6-760/+838
2021-07-23glsl: Pass IR::Inst& to Emit functionsameerj6-171/+169
2021-07-23glsl: INeg and IAdd negate testsameerj3-94/+106
2021-07-23glsl: Reusable typed variables. IADD32ameerj6-203/+311
2021-07-23glsl: Fix program linking and cbufameerj2-3/+5
2021-07-23glsl: Fix "reg" allocingameerj10-898/+938
based on glasm with some tweaks
2021-07-23glsl: Initial backendameerj28-2/+3297
2021-07-23spirv: Reduce log severity of mismatching denorm rulesReinUsesLisp1-2/+2
2021-07-23shader: Fix loop safety to SSA passReinUsesLisp2-2/+4
2021-07-23vk_rasterizer: Exit render passes on fragment barriersReinUsesLisp1-0/+1
2021-07-23vk_graphics_pipeline: Fix path with no VK_EXT_extended_dynamic_stateRodrigo Locatti1-1/+1
2021-07-23buffer_cache: Invalidate fast buffers on computeReinUsesLisp1-0/+1
2021-07-23shader: Add loggingReinUsesLisp15-28/+38
2021-07-23shader: Add shader loop safety check settingslat9nq16-35/+183
Also add a setting for enable Nsight Aftermath.
2021-07-23shader: Comment why the array component is not read in TMMLReinUsesLisp1-0/+2
2021-07-23vulkan_device: Enable VK_EXT_vertex_input_dynamic_stateReinUsesLisp1-0/+28
2021-07-23vk_pipeline_cache: Skip cached pipelines with different dynamic stateReinUsesLisp1-0/+6
2021-07-23main: Fix Open Transferable Shader Cache context itemameerj1-25/+5
Opens the new shader cache directory location for the specified title, if it exists.
2021-07-23tmml: Remove index component from coords vecameerj1-4/+3
The lod query functions exposed by the rendering API's do not make use of the texturearray layer indexing.
2021-07-23vulkan: Add VK_EXT_vertex_input_dynamic_state supportReinUsesLisp11-116/+291
Reduces the number of total pipelines generated on Vulkan. Tested on Super Smash Bros. Ultimate.
2021-07-23shader: Reorder shader cache directoriesReinUsesLisp2-18/+12
2021-07-23vk_rasterizer: Implement first indexReinUsesLisp1-2/+5
2021-07-23vulkan: Use VK_EXT_provoking_vertex when availableReinUsesLisp6-4/+52
2021-07-23spirv/convert: Catch more signed operations oversightsameerj1-5/+5
The sign bit on integers of size < 32 was not properly preserved in casts
2021-07-23spirv/convert: Catch more broken signed operations on Nvidia OpenGLReinUsesLisp1-0/+6
BitCast U32 to S32 before converting to float on drivers with broken signed operations.
2021-07-23 gl_buffer_cache: Use unorm internal formats for snorm texture buffer viewsameerj1-1/+24
Fixes black textures in UE4 games
2021-07-23shader_environment: Fix local memory size calculationsReinUsesLisp1-3/+3
2021-07-23buffer_cache: Fix copy based uniform bindings trackingReinUsesLisp2-9/+22
2021-07-23shader_environment: Add shader_local_memory_crs_size to local memory sizeameerj2-3/+3
Fixes DOOM 2016 missing local memory
2021-07-23gl_texture_cache: Create image storage viewsReinUsesLisp4-38/+126
Fixes SULD.D tests.
2021-07-23gl_shader_util: Move shader utility code to a separate fileReinUsesLisp7-245/+106
2021-07-23gl_shader_cache: Store workers in shader cache objectReinUsesLisp2-58/+78
2021-07-23vk_pipeline_cache,shader_notify: Add shader notificationsReinUsesLisp10-96/+127
2021-07-23vk_pipeline_cache: Add asynchronous shadersReinUsesLisp3-3/+33
2021-07-23vk_rasterizer: Flush work on clear and dispatchesReinUsesLisp1-0/+3
2021-07-23DMA: Restrict optimised path for BlockToLinear further.FernandoS271-1/+2
2021-07-23vk_swapchain: Handle outdated swapchainsReinUsesLisp3-17/+34
Fixes pixelated presentation on Intel devices.
2021-07-23shader: Fix VertexA Shaders.FernandoS274-19/+51
2021-07-23shader: Add 2D and 3D variants to SUATOM and SUREDReinUsesLisp1-0/+4
Used by Claybook.
2021-07-23vk_buffer_cache: Handle null texture buffersReinUsesLisp1-0/+4
Fixes a crash on Age of Calamity cutscenes.
2021-07-23nsight_aftermath_tracker: Fix SPIR-V module writesReinUsesLisp1-1/+1
2021-07-23vk_pipeline_cache: Set support_derivative_control to trueReinUsesLisp1-0/+1
2021-07-23shader: Avoid CPU side undefined behavior on I2FReinUsesLisp1-0/+2
2021-07-23glasm: Use ARB_derivative_control conditionallyReinUsesLisp6-7/+37
2021-07-23buffer_cache: Reduce uniform buffer size from shader usageReinUsesLisp11-38/+78
Increases performance significantly on certain titles.
2021-07-23transform_feedback: Read buffer stride from index instead of layoutReinUsesLisp1-1/+2
2021-07-23fixed_pipeline_state: Use regular for loop instead of ranges for perfReinUsesLisp1-2/+3
MSVC generates better code for it.
2021-07-23vk_swapchain: Avoid recreating the swapchain on each frameReinUsesLisp2-15/+9
Recreate only when requested (or sRGB is changed) instead of tracking the frontend's size. That size is still used as a hint.
2021-07-23emit_glasm_context_get_set: Remove unused variablelat9nq1-1/+0
2021-07-23shader,glasm: Implement legacy texcoord loadsReinUsesLisp3-54/+29
2021-07-23glasm: Implement legacy varyingsReinUsesLisp1-17/+56
2021-07-23shader: Track legacy varyingsReinUsesLisp2-17/+105
2021-07-23shader: Add support for "negative" and unaligned offsetsReinUsesLisp3-8/+13
"Negative" offsets don't exist. They are shown as such due to a bug in nvdisasm. Unaligned offsets have been proved to read the aligned offset. For example, when reading an U32, if the offset is 6, the offset read will be 4.
2021-07-23shader: Implement ISCADD32IReinUsesLisp1-17/+31
2021-07-23spirv: Fix output generics with componentsReinUsesLisp1-1/+1
2021-07-23vulkan: Conditionally use shaderInt16ReinUsesLisp3-2/+9
Add support for Polaris AMD devices.
2021-07-23vulkan: Enable depth bounds and use it conditionallyReinUsesLisp4-2/+17
Intel devices pre-Xe don't support this.
2021-07-23vk_buffer_cache: Add transform feedback usage to buffersReinUsesLisp1-15/+22
2021-07-23opengl: Declare fragment outputs even if they are not usedReinUsesLisp6-10/+18
Fixes Ori and the Blind Forest's menu on GLASM. For some reason (probably high level optimizations) it is not sanitized on SPIR-V for OpenGL. Vulkan is unaffected by this change.
2021-07-23buffer_cache: Mark uniform buffers as dirty if any enable bit changesReinUsesLisp5-7/+17
2021-07-23shader: Always initialize up reference in structure control flowReinUsesLisp1-31/+36
Fixes ubsan issue.
2021-07-23vulkan_device: Enable float64 and int64 conditionallyReinUsesLisp2-2/+6
Add Intel Xe support.
2021-07-23shader: Fix ImageWrite indexingReinUsesLisp1-1/+1
2021-07-23spirv: Fix image and image buffer descriptor index usageReinUsesLisp1-5/+7
2021-07-23glasm: Fix immediate texture coordinateReinUsesLisp1-0/+1
2021-07-23shader: Clang-format secondary texturesReinUsesLisp1-2/+2
2021-07-23shader: Fix secondary texturesReinUsesLisp1-2/+2
2021-07-23shader: Adhere to disk shader cache settingameerj2-9/+12
2021-07-23shader: Fix TMML queriesReinUsesLisp1-5/+9
2021-07-23shader: Fix FSwizzleAdd folding when going through phi nodesReinUsesLisp1-2/+2
2021-07-23shader/exception: Fix compilation errors on gccReinUsesLisp1-6/+6
2021-07-23glasm: Reduce reg allocation leaks from an exception to a logReinUsesLisp1-1/+1
2021-07-23texture_cache: Reduce invalid image/sampler error severityReinUsesLisp1-7/+7
2021-07-23shader: Handle host exceptionsReinUsesLisp8-45/+98
2021-07-23glasm: Use integer lod for TXQReinUsesLisp2-2/+2
2021-07-23glasm: Prepare XFB from state instead of global registersReinUsesLisp1-4/+2
2021-07-23glasm: Fix global memory fallbacksReinUsesLisp1-9/+10
2021-07-23Revert "glasm: Skip phi moves on undefined instructions"ReinUsesLisp2-16/+1
Causes regressions on Bowser's Fury.
2021-07-23glasm: Remove unintentional '\n' on Undef32ReinUsesLisp1-1/+1
2021-07-23glasm: Use storage buffers instead of global memory when possibleReinUsesLisp17-437/+503
2021-07-23glasm: Implement Y directionReinUsesLisp4-3/+9
2021-07-23glasm: Skip phi moves on undefined instructionsReinUsesLisp2-1/+16
2021-07-23glasm: Implement undef instructionsReinUsesLisp2-15/+15
2021-07-23glasm: Fix global memory callbacksReinUsesLisp1-5/+6
2021-07-23gl_shader_cache: Add disk shader cacheReinUsesLisp3-11/+116
2021-07-23video_core,shader: Clang-format fixesReinUsesLisp4-7/+12
2021-07-23gl_shader_cache: Rename Program abstractions into PipelineReinUsesLisp10-104/+104
2021-07-23glasm: Release phi node registers after they are no longer neededReinUsesLisp2-38/+54
2021-07-23glasm: Remove unintentionally committed fmt::printsReinUsesLisp1-2/+0
2021-07-23glasm: Fix INeg32 on negative immediatesReinUsesLisp1-1/+5
2021-07-23glasm: Remove unnecessary value typesReinUsesLisp3-47/+6
2021-07-23glasm: Throw when there are register leaksReinUsesLisp2-0/+7
2021-07-23glasm: Catch more register leaksReinUsesLisp8-41/+114
Add support for null registers. These are used when an instruction has no usages. This comes handy when an instruction is only used for its CC value, with the caveat of having to invalidate all pseudo-instructions before defining the instruction itself in the register allocator. This commits changes this. Workaround a bug on Nvidia's condition codes conditional execution using branches.
2021-07-23glasm: Fix usage counting on phi nodesReinUsesLisp3-8/+22
2021-07-23gl_shader_cache: Do not flip tessellation on OpenGLReinUsesLisp1-2/+1
2021-07-23gl_graphics_program: Fix texture buffer bindingsReinUsesLisp1-24/+35
2021-07-23glasm: Implement global memory fallbacksReinUsesLisp2-50/+89
2021-07-23glasm: Implement int64 add and subtractReinUsesLisp2-8/+6
2021-07-23emit_glasm_context_get_set: Remove unused variablelat9nq1-1/+0
2021-07-23glasm: Implement indirect attribute loadsReinUsesLisp4-6/+65
2021-07-23glasm: Implement image atomicsReinUsesLisp3-166/+153
2021-07-23glasm: Reorder unreachable image atomic instsReinUsesLisp1-66/+66
Reorder them to the bottom of the file for readability.
2021-07-23glasm: Implement gl_Layer storesReinUsesLisp1-0/+7
2021-07-23glasm: Implement SampleIdReinUsesLisp2-3/+3
2021-07-23glasm: Implement IsHelperInvocationReinUsesLisp2-3/+3
2021-07-23glasm: Fix EmitVertex's optimizationReinUsesLisp1-1/+1
2021-07-23gl_shader_cache: Conditionally use viewport maskReinUsesLisp1-1/+1
2021-07-23gl_shader_cache,glasm: Conditionally use typeless image reads extensionReinUsesLisp3-39/+43
2021-07-23gl_shader_cache: Improve GLASM error print logicReinUsesLisp1-7/+10
2021-07-23glasm: Implement forced early ZReinUsesLisp2-4/+8
2021-07-23glasm: Set transform feedback stateReinUsesLisp5-113/+132
2021-07-23video_core: Abstract transform feedback translation utilityReinUsesLisp6-111/+145
2021-07-23glasm: Simplify patch readsReinUsesLisp1-5/+2
2021-07-23glasm: Fix output patch readsReinUsesLisp2-13/+22
With this, Luigi's Mansion's sand renders properly.
2021-07-23gl_shader_cache: Pass shader runtime informationReinUsesLisp1-2/+74
2021-07-23shader: Split profile and runtime information in separate structsReinUsesLisp14-308/+300
2021-07-23emit_glasm_context_get_and_set.cpp: Add missing semicolonsameerj1-2/+2
2021-07-23glasm: Fix patch attribute declarationsReinUsesLisp1-1/+1
2021-07-23glasm: Implement FSWZADDameerj3-4/+28
2021-07-23glasm: Implement PrimitiveId attribute readReinUsesLisp1-0/+3
2021-07-23glasm: Implement clip distance storesReinUsesLisp2-0/+15
2021-07-23glasm: Fix tessellation input attributesReinUsesLisp1-2/+5
2021-07-23glasm: Add missing semicolon on tesscoord readingReinUsesLisp1-1/+1
2021-07-23glasm: Fix tessellation headersReinUsesLisp1-2/+2
2021-07-23glasm: Add tessellation shader declarationsReinUsesLisp1-0/+35
2021-07-23glasm: Implement TessellationEvaluationPointReinUsesLisp1-0/+4
2021-07-23gl_shader_manager: Zero initialize current assembly programsReinUsesLisp1-1/+1
2021-07-23gl_shader_manager: Remove unintentionally committed #pragmaReinUsesLisp1-2/+0
2021-07-23glasm: Implement patch memoryReinUsesLisp3-6/+51
2021-07-23glasm: Fix InvocationId declarationReinUsesLisp1-1/+1
2021-07-23glasm: Implement InvocationIdReinUsesLisp2-2/+5
2021-07-23glasm: Optimize EmitVertex into EMITReinUsesLisp1-1/+5
2021-07-23glasm: Implement geometry shader attribute readsReinUsesLisp2-4/+18
2021-07-23glasm: Properly declare attributes on geometry programsReinUsesLisp3-6/+14
2021-07-23glasm: Declare geometry program headersReinUsesLisp1-0/+35
2021-07-23renderer_opengl: State track compute assembly programsReinUsesLisp3-4/+21
2021-07-23renderer_opengl: State track assembly programsReinUsesLisp3-23/+56
2021-07-23glasm: Fix potential aliasing bug on cube array samplesReinUsesLisp2-35/+44
2021-07-23glasm: Implement ImageWriteReinUsesLisp1-4/+7
2021-07-23glasm: Implement ImageReadReinUsesLisp4-4/+56
2021-07-23glasm: Implement EmitVertex and EndPrimitiveReinUsesLisp2-4/+8
2021-07-23glasm: Implement ImageGradientReinUsesLisp2-7/+65
2021-07-23glasm: Implement 64-bit shiftsReinUsesLisp2-12/+14
2021-07-23glasm: Implement barriersReinUsesLisp1-3/+3
2021-07-23glasm: Fix compute stage nameReinUsesLisp1-1/+1
2021-07-23glasm: Fix phi instruction typesReinUsesLisp1-1/+1
2021-07-23glasm: Implement PREC on relevant instructionsReinUsesLisp1-6/+12
2021-07-23glasm: Implement stores to gl_ViewportIndexReinUsesLisp4-7/+29
2021-07-23glasm: Implement gl_PointSize storesReinUsesLisp1-0/+3
2021-07-23glasm: Implement gl_PointCoordReinUsesLisp1-0/+4
2021-07-23glasm: Implement ImageQueryLodReinUsesLisp1-3/+5
2021-07-23glasm: Implement ImageFetchReinUsesLisp4-13/+38
2021-07-23glasm: Implement IADD.CCameerj1-1/+26
2021-07-23glasm: Implement BFE.CCReinUsesLisp1-0/+8
2021-07-23glasm: Implement SelectU1ReinUsesLisp2-4/+5
2021-07-23HACK: Bind stages before and after bindingsReinUsesLisp1-0/+11
Works around a bug where program parameters are only applied to the current stage, and this one wasn't bound at the moment. Affects all SSBO usages on GLASM.
2021-07-23glasm: Implement gl_WorkGroupIDReinUsesLisp2-3/+3
2021-07-23glasm: Implement TXQ and improve texture info readsReinUsesLisp2-50/+51
2021-07-23glasm: Implement gl_FrongFacing attributeReinUsesLisp1-0/+3
2021-07-23glasm: Support textures used in more than one stageReinUsesLisp4-5/+25
2021-07-23glasm: Implement textureGather instructionsReinUsesLisp2-15/+97
2021-07-23glasm: Implement gl_FragDepth and gl_SampleMask storesReinUsesLisp2-5/+5
2021-07-23glasm: Do not alias ConditionRef for nowReinUsesLisp2-3/+2
Immediate condition refs where not handled correctly. Just move the value for now.
2021-07-23shader: Read branch conditions from an instructionReinUsesLisp12-16/+36
Fixes the identity removal pass.
2021-07-23glasm: Implement InstanceId and VertexIdReinUsesLisp1-0/+6
2021-07-23glasm: Add missing return value on move assignmentReinUsesLisp1-0/+1
2021-07-23glasm: Fix aliased bitcasts ref countingReinUsesLisp3-13/+42
2021-07-23glasm: Remove unintentional comma on vector insertReinUsesLisp1-1/+1
2021-07-23glasm: Implement TEX and TEXS instructionsReinUsesLisp10-69/+275
Remove lod clamp from texture instructions with lod, as this is not needed (nor supported).
2021-07-23glasm: Add support for non-2D texture samplesReinUsesLisp1-4/+26
2021-07-23glasm: Reorder unreachable image instructions to the bottomReinUsesLisp1-97/+97
2021-07-23glasm: Add support for texture offsetsReinUsesLisp1-11/+15
2021-07-23glasm: Improve texture sampling instructionsReinUsesLisp2-50/+70
2021-07-23emit_glasm: Enable ARB_draw_buffers when neededReinUsesLisp2-1/+5
2021-07-23emit_glasm: Add support for reading position attributesReinUsesLisp1-3/+13
2021-07-23shader_recompiler: GCC fixeslat9nq7-58/+55
Fixes members of unnamed union not being accessible, and one function without a declaration.
2021-07-23glasm: Implement rest of shared memameerj2-35/+29
2021-07-23opengl: Initial (broken) support to GLASM shadersReinUsesLisp3-14/+53
2021-07-23shader: Use a non-trivial dummy to construct ASL node unionReinUsesLisp1-1/+6
2021-07-23emit_spirv: Jump to loop body with local variableReinUsesLisp1-1/+1
Silence unused variable warning
2021-07-23glasm: Implement derivative instructions on GLASMReinUsesLisp2-12/+12
2021-07-23glasm: Initial (broken) implementation of TEX on GLASMReinUsesLisp3-299/+386
2021-07-23glasm: Implement some graphics instructions on GLASMReinUsesLisp2-6/+5
2021-07-23glasm: Add Void type to GLASM valuesReinUsesLisp3-0/+15
2021-07-23glasm: Add graphics specific shader declarations to GLASMReinUsesLisp2-6/+63
2021-07-23glasm: Implement local memory for glasmameerj4-9/+12
2021-07-23emit_spirv: Add missing block in caseReinUsesLisp1-1/+2
2021-07-23glasm: Initial implementation of phi nodes on GLASMReinUsesLisp12-25/+117
2021-07-23glasm: Write result to scalar on integer comparison instructionsReinUsesLisp1-10/+10
2021-07-23glasm: Declare NV_shader_thread_group when neededReinUsesLisp1-3/+4
2021-07-23vk_update_descriptor: Properly initialize payload on the update descriptor queueReinUsesLisp1-1/+3
2021-07-23glasm: Rework control flow introducing a syntax listReinUsesLisp33-505/+437
This commit regresses VertexA shaders, their transformation pass has to be adapted to the new control flow.
2021-07-23glasm: Implement Storage atomicsameerj5-109/+156
StorageAtomicExchangeU64 is failing test seemingly due to failure storing 64-bit result into the register
2021-07-23glasm: Ensure reg alloc order across compilers on GLASMReinUsesLisp1-11/+14
Use a struct constructor to serialize register allocation arguments to ensure registers are allocated in the same order regardless of the compiler used. The A and B functions can be called in any order when passed as arguments to "foo": foo(A(), B()) But the order is guaranteed for curly-braced constructor calls in classes: Foo{A(), B()} Use this to get consistent behavior.
2021-07-23glasm: Enable unintentionally disabled register aliasing on GLASMReinUsesLisp1-16/+11
2021-07-23glasm: Review all GLASM insts to be aware of register aliasingReinUsesLisp4-20/+51
2021-07-23glasm: Implement shuffle and vote instructions on GLASMReinUsesLisp10-100/+166
2021-07-23glasm: Add MUFU instructions to GLASMReinUsesLisp2-21/+22
2021-07-23glasm: Implement IAbs64 and INeg64 on GLASMReinUsesLisp2-6/+6
2021-07-23shader: Add floating-point rounding to I2FReinUsesLisp3-35/+42
2021-07-23glasm: Properly clamp Fp64 on GLASMReinUsesLisp1-6/+6
2021-07-23glasm: Fix register allocation when moving immediate on GLASMReinUsesLisp3-42/+89
2021-07-23glasm: Implement SelectU64 on GLASMReinUsesLisp2-4/+20
2021-07-23glasm: Fix clamps so the min value has priority on NAN on GLASMReinUsesLisp1-12/+15
2021-07-23glasm: Fix moving U64 immediates to registers in GLASMReinUsesLisp2-3/+4
2021-07-23glasm: Implement storage atomic opsameerj4-305/+358
2021-07-23glasm: Add conversion instructions to GLASMReinUsesLisp9-282/+351
2021-07-23glasm: Add fp min/max insts and fix store for fp64 on GLASMReinUsesLisp2-10/+8
2021-07-23glasm: Add logical instructions on GLASMReinUsesLisp2-12/+12
2021-07-23glasm: Remove duplicated Fp64 pack instructions on GLASMReinUsesLisp1-8/+0
2021-07-23glasm: Remove unnecesary new white space on Clamp GLASMReinUsesLisp1-4/+4
2021-07-23glasm: Add floating-point comparisons on GLASMReinUsesLisp3-120/+116
2021-07-23emit_glasm: Implement more integer alu opsameerj2-47/+41
2021-07-23glasm: Reimplement bitwise ops and BFI/BFEameerj4-88/+108
2021-07-23glasm: Initial GLASM fp64 supportReinUsesLisp9-55/+152
2021-07-23glasm: Implement GLASM fp16 packing and move bitwise insnsReinUsesLisp4-66/+77
2021-07-23glasm: Remove unused functions left from rebaseReinUsesLisp1-12/+0
2021-07-23glasm: Specify namespace when using FormatToReinUsesLisp1-6/+6
2021-07-23glasm: Implement more GLASM composite instructionsReinUsesLisp2-54/+63
2021-07-23vk_pipeline_cache: Enable int8 and int16 types on VulkanReinUsesLisp1-0/+2
2021-07-23glasm: Make GLASM aware of typesReinUsesLisp12-1244/+1380
2021-07-23glasm: Use CMP.S for Select32ameerj3-12/+8
also fixes ADD and SUB to use U modifier
2021-07-23glasm: Implement more logical opsameerj2-5/+5
2021-07-23glasm: Implement BFI, BFEameerj4-138/+164
Along with implementations of common instructions along the way
2021-07-23glasm: Use BitField instead of C bitfieldsReinUsesLisp2-8/+12
2021-07-23glasm: Remove unused argument in identity instructions on GLASMReinUsesLisp1-7/+7
2021-07-23gl_rasterizer: Flush L2 caches before glFlush on GLASMReinUsesLisp1-0/+8
2021-07-23glasm: Initial GLASM compute implementation for testingReinUsesLisp3-14/+47
2021-07-23glasm: Implement basic GLASM instructionsReinUsesLisp10-840/+1173
2021-07-23glasm: Changes to GLASM register allocator and emit contextReinUsesLisp4-26/+64
2021-07-23vk_scheduler: Use locks instead of SPSC a queueReinUsesLisp2-32/+42
This tries to fix a data race where we'd wait forever for the GPU.
2021-07-23vk_query_cache: Wait before reading queriesReinUsesLisp1-9/+2
2021-07-23vk_master_semaphore: Use fetch_add to increase master semaphore tickReinUsesLisp2-6/+4
2021-07-23glasm: Add GLASM backend infrastructureReinUsesLisp28-4/+3115
2021-07-23shader: ISET.X implementationameerj1-8/+58
2021-07-23gl_shader_cache: Remove code unintentionally committedReinUsesLisp1-3/+0
2021-07-23shader: Fixup SPIR-V emit header namespacesReinUsesLisp1-2/+2
2021-07-23Move SPIR-V emission functions to their own headerReinUsesLisp26-579/+637
2021-07-23shader: Optimize NVN FallthroughFernandoS274-9/+83
2021-07-23shader: Stub SR_AFFINITYFernandoS271-0/+3
2021-07-23shader: Implement Int32 SUATOM/SUREDameerj17-6/+733
2021-07-23shader: Initial OpenGL implementationReinUsesLisp38-705/+1427
2021-07-23spirv: Be aware of NAN unaware driversReinUsesLisp1-18/+40
2021-07-23spirv: Add SSBO read fallbacks when no aliasing is availableReinUsesLisp1-37/+99
2021-07-23spirv: Add OpKill fallback to demoteReinUsesLisp1-2/+6
2021-07-23spirv: Do not enable ShaderLayerReinUsesLisp1-3/+0
This is enabled by an extension instead of the capability.
2021-07-23spirv: Enable DemoteToHelperInvocationEXT only when supportedReinUsesLisp1-1/+1
2021-07-23spirv: Use OriginLowerLeft when requestedReinUsesLisp1-1/+5
2021-07-23spirv: Only add image operands mask when neededReinUsesLisp1-5/+9
2021-07-23spirv: Workaround image unsigned offset bugReinUsesLisp2-9/+26
Workaround bug on Nvidia's OpenGL SPIR-V compiler when using unsigned texture offsets.
2021-07-23spirv: Add int8 and int16 capabilities only when supportedReinUsesLisp1-2/+2
2021-07-23spirv: Add integer clamping workaroundsReinUsesLisp1-4/+34
Workaround more bugs on Nvidia's OpenGL SPIR-V compiler.
2021-07-23spirv: Implement int8 and int16 conversion fallbacksReinUsesLisp1-19/+80
2021-07-23spirv: Support OpenGL uniform buffers and change bindingsReinUsesLisp6-58/+168
2021-07-23spirv: Desambiguate descriptor namesReinUsesLisp1-9/+37
Worksaround a bug on Nvidia's OpenGL SPIR-V compiler where names are used for name matching.
2021-07-23shader: Add OpenGL shader profile optionsReinUsesLisp1-0/+11
2021-07-23shader: Remove shader utilReinUsesLisp4-176/+0
2021-07-23shader: Address feedbackFernandoS275-44/+42
2021-07-23shader: Implement VertexA stageFernandoS2712-3/+180
2021-07-23shader: Implement delegation of Exit to dispatcher on CFGFernandoS272-3/+47
2021-07-23vk_graphics_pipeline: Fix texture buffer descriptorsReinUsesLisp1-7/+8
2021-07-23shader: Fix IADD3.CCameerj1-12/+5
2021-07-23vk_scheduler: Allow command submission on worker threadReinUsesLisp8-182/+200
This changes how Scheduler::Flush works. It queues the current command buffer to be sent to the GPU but does not do it immediately. The Vulkan worker thread takes care of that. Users will have to use Scheduler::Flush + Scheduler::WaitWorker to get the previous behavior. Scheduler::Finish is unchanged. To avoid waiting on work never queued, Scheduler::Wait sends the current command buffer if that's what the caller wants to wait.
2021-07-23vk_compute_pass: Fix -Wshadow warningReinUsesLisp1-3/+3
2021-07-23shader: Move pipeline cache logic to separate filesReinUsesLisp12-824/+1095
Move code to separate files to be able to reuse it from OpenGL. This greatly simplifies the pipeline cache logic on Vulkan. Transform feedback state is not yet abstracted and it's still intrusively stored inside vk_pipeline_cache. It will be moved when needed on OpenGL.
2021-07-23vulkan: Defer descriptor set work to the Vulkan threadReinUsesLisp8-79/+69
Move descriptor lookup and update code to a separate thread. Delaying this removes work from the main GPU thread and allows creating descriptor layouts on another thread. This reduces a bit the workload of the main thread when new pipelines are encountered.
2021-07-23vulkan: Rework descriptor allocation algorithmReinUsesLisp15-197/+314
Create multiple descriptor pools on demand. There are some degrees of freedom what is considered a compatible pool to avoid wasting large pools on small descriptors.
2021-07-23vk_graphics_pipeline: Generate specialized pipeline config functions and improve codeReinUsesLisp2-31/+230
2021-07-23shader: Accelerate pipeline transitions and use dirty flags for shadersReinUsesLisp9-64/+114
2021-07-23shader: Fix BFE s32 undefined checkameerj1-1/+1
Our unit tests were hitting this exception.
2021-07-23vk_compute_pipeline: Fix index comparison oversight on compute texture buffersReinUsesLisp1-1/+1
2021-07-23shader: Fix error checking in bitfieldExtract and implement bitfieldInsert foldingReinUsesLisp1-5/+14
2021-07-23vulkan_device: Require shaderClipDistance and shaderCullDistance featuresReinUsesLisp1-2/+4
2021-07-23vk_graphics_pipeline: Guard against non-tessellation pipelines using patchesReinUsesLisp1-2/+8
2021-07-23shader: Fix storage type when reading patches on tess controlReinUsesLisp1-1/+2
2021-07-23shader: Fix VMNMX selector BReinUsesLisp1-1/+2
2021-07-23shader: Fix bugs and build issues on GCCRodrigo Locatti3-4/+4
2021-07-23shader: Fix render targets with null attachmentsReinUsesLisp2-26/+34
2021-07-23shader: Increase the maximum number of storage buffersReinUsesLisp1-1/+1
Compute shaders spill uniform buffers on storage buffers, increasing the expected number.
2021-07-23shader: Remove identity removal pass for better build timesReinUsesLisp1-1/+0
2021-07-23shader: Add more strict validation the passReinUsesLisp1-0/+42
2021-07-23shader: Fix forward referencing identity instructions when inserting phiReinUsesLisp1-11/+13
2021-07-23shader: Remove invalidated blocks in dead code elimination passReinUsesLisp1-3/+6
2021-07-23shader: Add missing UndoUse case for GetSparseFromOpReinUsesLisp1-0/+4
2021-07-23shader: Require dual source blendingReinUsesLisp1-1/+2
2021-07-23shader: Simplify code in opcodes.h to fix IntellisenseReinUsesLisp1-8/+6
Avoid using std::array to fix Intellisense not properly compiling this code and disabling itself on all files that include it. While we are at it, change the code to use u8 instead of size_t for the number of instructions in an opcode.
2021-07-23shader: Implement indexed texturesReinUsesLisp10-157/+284
2021-07-23shader: Refactor atomic_operations_global_memoryameerj1-44/+36
2021-07-23shader: add missing include guard in half_floating_point_helper.hameerj1-0/+2
2021-07-23shader: Fix gcc warningsReinUsesLisp2-2/+2
2021-07-23shader: Inline common Value gettersReinUsesLisp2-109/+102
2021-07-23shader: Intrusively store in a block if it's sealed or notReinUsesLisp2-3/+11
2021-07-23cmake: Link to common in shader_recompilerReinUsesLisp1-1/+1
2021-07-23shader: Improve goto removal algorithm complexityReinUsesLisp1-49/+28
Find sibling node containing a nephew searching from the nephew itself instead of the uncle.
2021-07-23shader: Use memset to reset instruction argumentsReinUsesLisp2-4/+7
2021-07-23shader: Inline common Value functions into the headerReinUsesLisp2-19/+23
2021-07-23shader: Move microinstruction header to the value headerReinUsesLisp20-181/+162
2021-07-23shader: Move siblings check to a separate function and comment them outReinUsesLisp1-16/+21
2021-07-23shader: Intrusively store register values in block for SSA passReinUsesLisp2-21/+53
2021-07-23shader: Inline common Opcode and Inst functionsReinUsesLisp4-112/+83
2021-07-23shader: Inline common IR::Block methodsReinUsesLisp2-17/+12
2021-07-23shader: Use a small_vector for phi blocksReinUsesLisp1-1/+2
2021-07-23shader: Calculate number of arguments in an opcode at compile timeReinUsesLisp1-3/+12
2021-07-23shader: Implement D3D samplersReinUsesLisp6-49/+127
2021-07-23shader: Add constant propagation for arithmetic right shiftsReinUsesLisp1-0/+3
2021-07-23shader: Simplify code for local memoryReinUsesLisp1-6/+11
2021-07-23shader: Add NVN storage buffer fallbacksReinUsesLisp9-62/+214
When we can't track the SSBO origin of a global memory instruction, leave it as a global memory operation and assume these pointers are in the NVN storage buffer slots, then apply a linear search in the shader's runtime.
2021-07-23spirv: Fix ViewportMaskReinUsesLisp1-1/+2
2021-07-23spirv: Replace Constant/ConstantComposite with Const helperameerj12-112/+101
2021-07-23shader: Address feedbackFernandoS272-7/+10
2021-07-23shader: Implement F2F (Imm)FernandoS271-2/+28
2021-07-23shader: Implement IADD3.CC/.XFernandoS271-7/+22
2021-07-23shader: Address feedbackFernandoS274-7/+4
2021-07-23shader: Add coarse derivativesFernandoS277-8/+28
2021-07-23shader: Implement fine derivates constant propagationFernandoS279-0/+101
2021-07-23shader: Implement SR_Y_DIRECTIONFernandoS2710-0/+22
2021-07-23shader: Fix Phi node typesReinUsesLisp2-4/+4
2021-07-23shader: Fix memory barriersReinUsesLisp8-62/+30
2021-07-23spirv: Fix implicit lod typeReinUsesLisp2-1/+5
2021-07-23spirv: Use explicit lods outside of fragment shadersReinUsesLisp1-5/+16
2021-07-23spirv: Use ConstOffset instead of Offset when possibleReinUsesLisp3-21/+67
2021-07-23shader: Implement BFE and BFI CCameerj3-14/+17
Fix two bugs in BFI.
2021-07-23shader: Implement SampleMaskReinUsesLisp11-2/+22
2021-07-23shader: Implement PIXLD.MY_INDEXReinUsesLisp14-5/+71
2021-07-23spirv: Bitcast non-F32 output attributes to their type before storeReinUsesLisp1-13/+28
2021-07-23spirv: Implement ViewportMask with NV_viewport_array2ReinUsesLisp10-0/+32
2021-07-23spirv: Bitcast non-F32 attributes to F32ReinUsesLisp1-7/+9
2021-07-23shader: Implement PrimitiveIdReinUsesLisp5-0/+10
2021-07-23shader: Implement tessellation shaders, polygon mode and invocation idReinUsesLisp28-91/+605
2021-07-23shader: Mark atomic instructions as writesReinUsesLisp1-0/+27
2021-07-23vk_pipeline_cache: Silence GCC warningslat9nq1-0/+2
Silences `-Werror=missing-field-initializers` due to missing initializers.
2021-07-23spirv: Implement image buffersReinUsesLisp9-49/+142
2021-07-23spirv: Implement Layer storesReinUsesLisp6-9/+30
2021-07-23spirv: Fix alpha testFernandoS271-0/+5
2021-07-23spirv: Fix non-atomic 64-bit storeameerj1-1/+1
2021-07-23spirv: Implement alpha testameerj3-1/+95
2021-07-23shader: Implement transform feedbacks and define file formatReinUsesLisp11-23/+272
2021-07-23shader: Implement early Z testsReinUsesLisp3-0/+5
2021-07-23shader: Document and relax cache control on surface instructionsReinUsesLisp1-10/+11
2021-07-23spirv: Rework storage buffers and shader memoryReinUsesLisp9-500/+581
2021-07-23shader: Fix fixed pipeline point size on geometry shadersReinUsesLisp1-10/+18
2021-07-23shader: Add constant propagation for *&^| binary operationsReinUsesLisp1-0/+12
2021-07-23shader: Implement geometry shadersReinUsesLisp14-91/+277
2021-07-23shader: Implement OUTReinUsesLisp10-17/+73
2021-07-23internal_stage_buffer_entry_read: Remove pragma optimize offlat9nq1-2/+0
2021-07-23shader: Stub SR_INVOCATION_INFOReinUsesLisp1-2/+5
2021-07-23shader: Stub ISBERDReinUsesLisp3-4/+56
2021-07-23shader: Fix CC in I2IReinUsesLisp1-0/+2
2021-07-23spirv: Define StorageImageWriteWithoutFormat capability when usedReinUsesLisp3-0/+9
2021-07-23pipeline_helper: Simplify descriptor objects initializationReinUsesLisp1-33/+25
2021-07-23shader: Simplify FLO and throw on CCReinUsesLisp1-12/+13
2021-07-23shader: Mark blocks with no end branch as unreachableReinUsesLisp1-2/+7
2021-07-23shader: Implement LOP CCReinUsesLisp3-12/+29
2021-07-23shader: Implement SR_THREAD_KILLReinUsesLisp10-0/+22
2021-07-23shader: Apply sign bit in FCMP (imm)ReinUsesLisp1-1/+1
2021-07-23shader: Implement ATOM/S and REDameerj21-19/+1745
2021-07-23nsight_aftermath_tracker: Report used shaders to Nsight AftermathReinUsesLisp6-16/+20
2021-07-23spirv: Move phi node patching to a separate functionReinUsesLisp1-13/+16
2021-07-23spirv: Guard against typeless image reads on unsupported devicesReinUsesLisp6-1/+17
2021-07-23shader: Move LaneId to the warp emission file and fix AMDReinUsesLisp5-7/+11
2021-07-23vk_rasterizer: Request outside render pass execution context for computeReinUsesLisp1-0/+1
2021-07-23pipeline_helper: Add missing [[maybe_unused]]ReinUsesLisp1-1/+1
2021-07-23spirv: Fix forward declarations on phi nodesReinUsesLisp1-47/+25
2021-07-23shader: Mark ImageWrite with side effectsReinUsesLisp1-0/+3
2021-07-23shader: Implement CC for ISET, FSET, PSET, CSET, and DSETFernandoS2718-13/+136
Throw when other instructions are missing CC.
2021-07-23shader: Remove outdated comment in F2IReinUsesLisp1-4/+0
2021-07-23shader: Implement SULD and SUSTReinUsesLisp31-202/+732
2021-07-23shader: Fix Windows build issuesReinUsesLisp1-1/+1
2021-07-23shader: Address feedback + clang formatlat9nq12-24/+22
2021-07-23shader_recompiler,video_core: Cleanup some GCC and Clang errorslat9nq66-313/+308
Mostly fixing unused *, implicit conversion, braced scalar init, fpermissive, and some others. Some Clang errors likely remain in video_core, and std::ranges is still a pertinent issue in shader_recompiler shader_recompiler: cmake: Force bracket depth to 1024 on Clang Increases the maximum fold expression depth thread_worker: Include condition_variable Don't use list initializers in control flow Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
2021-07-23shader: Fix FCMP immediate variantReinUsesLisp1-1/+9
2021-07-23shader: Fix dangling labelsReinUsesLisp1-0/+5
2021-07-23shader: Interact texture buffers with buffer cacheReinUsesLisp17-148/+333
2021-07-23shader: Fix F2IReinUsesLisp1-1/+1
2021-07-23shader: Fix TextureGradReinUsesLisp1-1/+1
2021-07-23shader: Implement texture buffersReinUsesLisp10-35/+154
2021-07-23shader: Address feedbackFernandoS275-53/+54
2021-07-23shader: Implement indexed Position and ClipDistancesFernandoS273-11/+100
2021-07-23shader: Implement indexed attributesFernandoS2712-35/+279
2021-07-23shader: Implement AL2PFernandoS273-4/+36
2021-07-23shader: Fix BRX trackingFernandoS272-3/+4
2021-07-23vk_pipeline_cache: Fix num of pipeline workers on weird platformsReinUsesLisp1-1/+1
2021-07-23shader: Move recursive SSA rewrite to the heapReinUsesLisp1-29/+89
2021-07-23shader: Fix ShadowCube declaration type, set number of pipeline threads based on hardwareFernandoS272-2/+4
2021-07-23shader: Fix splits on blocks using indirect branchesReinUsesLisp3-17/+38
2021-07-23shader: Eliminate orphan blocks more efficientlyReinUsesLisp1-7/+8
2021-07-23shader: Add subgroup masksReinUsesLisp10-45/+169
2021-07-23shader: Implement BAR and fix memory barriersReinUsesLisp7-5/+79
2021-07-23shader: Abstract breadth searches and use the abstractionReinUsesLisp4-104/+106
2021-07-23shader: Reimplement GetCbufU64 as GetCbufU32x2ReinUsesLisp9-22/+21
It may generate better code on some compilers and it's easier to handle.
2021-07-23vk_compute_pass: Fix compute passesReinUsesLisp3-23/+19
2021-07-23shader: Remove atomic flags and use mutex + cond variable for pipelinesReinUsesLisp4-11/+32
2021-07-23shader: Remove unused header in VOTEReinUsesLisp1-2/+0
2021-07-23vk_pipeline_cache: Remove unnecesary scope in pipeline cache lockingReinUsesLisp1-15/+12
2021-07-23shader: Rework global memory tracking to use breadth-first searchReinUsesLisp1-69/+80
2021-07-23shader: Fix fp16 merge when using native fp16ReinUsesLisp1-3/+3
2021-07-23shader: Fix FADD32IReinUsesLisp1-6/+4
2021-07-23shader: Fix undetected bug from reviewFernandoS271-0/+3
2021-07-23shader: Address feedbackFernandoS273-13/+16
2021-07-23shader: "Implement" NOPFernandoS271-1/+1
2021-07-23vk_pipeline_cache: Small fixes to the pipeline cacheFernandoS271-10/+14
2021-07-23shader: Address FeedbackFernandoS2716-211/+60
2021-07-23shader: Implement SR_LaneIdFernandoS277-0/+15
2021-07-23shader: Fix shared memory on cool driversFernandoS271-0/+1
2021-07-23shader: Implement MEMBARFernandoS279-11/+121
2021-07-23shader: Improve VOTE.VTG stubFernandoS277-4/+147
2021-07-23shader: Mark SSBOs as written when they areFernandoS274-4/+32
2021-07-23shader: Implement ViewportIndexFernandoS278-2/+33
2021-07-23shader: Stub TLD4's PTP when it isn't constantFernandoS271-1/+2
2021-07-23shader: Stub VOTE.VTGFernandoS274-4/+15
2021-07-23shader: Fold composite extractFernandoS271-0/+62
2021-07-23shader: Fold comparisons and Pack/Unpack16FernandoS271-1/+41
2021-07-23shader: Fix branches to visited virtual blocksReinUsesLisp2-0/+12
2021-07-23vulkan: Serialize pipelines on a separate threadReinUsesLisp2-67/+64
2021-07-23vulkan: Create pipeline layouts in separate threadsReinUsesLisp7-63/+65
2021-07-23vulkan: Build pipelines in parallel at runtimeReinUsesLisp9-165/+197
Wait from the worker thread for a pipeline to build before binding it to the command buffer. This allows queueing pipelines to multiple threads.
2021-07-23shader: Fix dependency on identity removal passReinUsesLisp2-3/+8
2021-07-23shader: Fix constant propagation to use reverse post orderReinUsesLisp1-1/+2
2021-07-23shader: Implement LDG .U.128 as .128ReinUsesLisp1-3/+2
2021-07-23shader: Unroll "using enum" for opcode declarationsReinUsesLisp1-1/+27
2021-07-23vk_pipeline_cache: Name SPIR-V modulesReinUsesLisp1-1/+11
2021-07-23spirv: Remove unnecesary variable for clip distancesReinUsesLisp2-6/+2
2021-07-23shader: Implement ClipDistanceFernandoS275-0/+36
2021-07-23shader: Fix TXDFernandoS272-2/+2
2021-07-23shader: Address feedbackFernandoS275-53/+49
2021-07-23shader: Always pass a lod for TexelFetchReinUsesLisp3-25/+17
2021-07-23shader: Implement TXDFernandoS274-10/+183
2021-07-23shader: Implement ImageGradientFernandoS278-2/+84
2021-07-23shader: Implement TMML partiallyFernandoS276-13/+137
2021-07-23shader,spirv: Implement ImageQueryLod.FernandoS279-1/+38
2021-07-23shader: Implement TLDSFernandoS273-4/+253
2021-07-23shader: Implement TLDFernandoS278-16/+174
2021-07-23spirv: Add fixed pipeline point sizeReinUsesLisp4-1/+11
2021-07-23shader: Add PointCoord attributeFernandoS275-0/+16
2021-07-23shader: Add PointSize attributeameerj5-0/+13
2021-07-23shader: Store type of phi nodes in flagsReinUsesLisp3-2/+11
This is needed because pseudo-instructions where invalidated.
2021-07-23shader: Fix indirect branches to scheduler instructionsReinUsesLisp3-7/+17
2021-07-23spirv: Fix default output attribute initializationReinUsesLisp1-3/+3
2021-07-23shader: Add missing new linesReinUsesLisp1-0/+2
2021-07-23shader: Implement FSWZADDameerj14-4/+87
2021-07-23shader: Implement BRXFernandoS2721-48/+437
2021-07-23shader: Fix alignment checks on RZReinUsesLisp1-1/+1
2021-07-23shader: Implement I2I CCameerj3-24/+45
2021-07-23shader: Implement I2I SATameerj6-10/+52
2021-07-23vk_pipeline_cache: Fix size hashing of shadersReinUsesLisp1-8/+7
2021-07-23shader: Fix ISCADD logic for PO/CCameerj1-7/+8
2021-07-23shader: Implement LDS, STS, LDL, and STS and use SPIR-V 1.4 when availableReinUsesLisp20-36/+730
2021-07-23shader: Implement ISCADD CCameerj1-1/+4
2021-07-23shader: Implement VMAD, VMNMX, VSETPameerj9-23/+319
2021-07-23shader: Add missing I2I exception when CC is usedReinUsesLisp1-0/+4
2021-07-23shader: Better interpolation and disabled attributes supportReinUsesLisp9-25/+101
2021-07-23spirv: Remove dependencies on Environment when generating SPIR-VReinUsesLisp5-16/+15
2021-07-23vk_pipeline_cache: Fix pipeline and shader cachesReinUsesLisp2-6/+21
2021-07-23shader: Implement front faceReinUsesLisp5-0/+12
2021-07-23shader: Fix structured control flow on KIL instructionsReinUsesLisp2-3/+7
This could potentially leave unvisited blocks, leading to illegal phi nodes.
2021-07-23shader: Fix TXQFernandoS271-1/+1
2021-07-23shader: Fix rasterizer integration order issuesReinUsesLisp3-7/+6
2021-07-23shader: Implement TXQ and fix FragDepthReinUsesLisp15-21/+264
2021-07-23shader: Refactor PTP and other minor changesReinUsesLisp14-123/+67
2021-07-23shader: Add IR opcode for ImageFetchFernandoS277-5/+55
2021-07-23shader: Implement TLD4.PTPFernandoS2715-28/+111
2021-07-23shader: Fix Array Indices in TEX/TLD4FernandoS272-6/+6
2021-07-23shader: Implement FragDepthFernandoS272-1/+7
2021-07-23shader: Implement TLD4S.FernandoS273-4/+134
2021-07-23shader: Implement TLD4 and TLD4_BFernandoS2713-11/+315
2021-07-23shader: Implement SHFLameerj16-69/+284
2021-07-23shader: Track first bindless argument instead of the instruction itselfReinUsesLisp1-1/+1
2021-07-23shader: Properly insert Prologue instructionReinUsesLisp1-1/+2
2021-07-23shader: Minor style nitsReinUsesLisp1-2/+4
2021-07-23shader: Fix F2IFernandoS2710-9/+147
2021-07-23shader: Implement NDC [-1, 1], attribute types and default varying initializationReinUsesLisp15-43/+186
2021-07-23shader: Fix use-after-free bug in object_poolReinUsesLisp1-3/+3
2021-07-23shader: Implement VOTEameerj18-6/+182
2021-07-23vk_pipeline_cache: Fix ReleaseContents orderReinUsesLisp1-2/+2
2021-07-23shader: Fix TEX maskReinUsesLisp1-1/+3
2021-07-23vk_pipeline_cache: Add pipeline cacheReinUsesLisp2-0/+7
2021-07-23vk_pipeline_cache: Add pipeline cacheReinUsesLisp8-106/+347
2021-07-23shader: Fold interpolation multiplicationsReinUsesLisp1-0/+34
2021-07-23shader: Better but still partial interpolation supportReinUsesLisp1-5/+7
2021-07-23shader: Implement DMNMX, DSET, DSETPameerj16-59/+210
2021-07-23shader: Implement FADD32IFernandoS271-2/+15
2021-07-23shader: Implement F2FFernandoS276-20/+192
2021-07-23shader: Add missing fp64 usage flagsReinUsesLisp1-0/+34
2021-07-23shader: Implement DMUL and DFMAameerj8-30/+111
Also add a missing const on DADD
2021-07-23shader: Add FP64 register load/store helpersameerj3-21/+24
2021-07-23shader: Add support for fp16 comparisons and misc fixesReinUsesLisp11-14/+56
2021-07-23shader: Fix floating point comparison for FP16FernandoS275-32/+56
2021-07-23shader: Implement HSETP2FernandoS273-12/+117
2021-07-23shader: Implement HSET2FernandoS275-14/+119
2021-07-23shader: Implement HMUL2FernandoS273-16/+144
2021-07-23shader: Implement HFMA2FernandoS275-20/+192
2021-07-23spirv: Implement VertexId and InstanceId, refactor codeReinUsesLisp10-144/+244
2021-07-23shader: Refactor half floating instructionsFernandoS274-58/+84
2021-07-23shader: Implement I2FReinUsesLisp17-70/+429
2021-07-23shader: Implement ISCADD (imm)ReinUsesLisp1-2/+2
2021-07-23shader: Implement LOP32IReinUsesLisp2-18/+45
2021-07-23shader: Add partial rasterizer integrationReinUsesLisp54-566/+1927
2021-07-23shader: Implement DADDameerj8-14/+132
2021-07-23shader: Implement CSET and CSETPameerj6-15/+114
2021-07-23shader: Reorder phi nodes when redefined as undefined opcodesReinUsesLisp1-1/+9
2021-07-23shader: Fix instruction transitions in and out of PhiReinUsesLisp1-9/+11
2021-07-23shader: Implement FSET and FSETPameerj9-94/+204
Also fix oversight with adding SignedZeroInfNanPreserve execution mode.
2021-07-23shader: Implement TEXSReinUsesLisp8-7/+287
2021-07-23shader: Implement CAL inlining function callsReinUsesLisp24-330/+286
2021-07-23spirv: Add SignedZeroInfNanPreserve logicameerj3-0/+12
2021-07-23shader: Implement FMNMXameerj8-25/+101
And add a const in FCMP
2021-07-23shader: Fix rebase issueReinUsesLisp1-1/+0
2021-07-23shader: Implement FCMPameerj9-50/+203
still need to configure some settings for NV denorm flush and intel NaN
2021-07-23shader: Partial implementation of LDCReinUsesLisp16-50/+405
2021-07-23shader: Initial support for textures and TEXReinUsesLisp33-342/+1489
2021-07-23shader: Implement R2Pameerj8-15/+88
2021-07-23shader: Implement SHFameerj8-31/+119
2021-07-23shader: Implement LEAameerj9-29/+136
2021-07-23shader: Deduplicate HADD2 codeReinUsesLisp1-19/+16
2021-07-23shader: Implement I2Iameerj3-12/+100
2021-07-23shader: Implement HADD2ReinUsesLisp12-42/+400
2021-07-23shader: Implement LOP and LOP3ameerj8-31/+227
2021-07-23shader: Implement IADD3ameerj3-12/+104
2021-07-23shader: Implement PSETPameerj4-5/+40
2021-07-23Implement PSET, refactor common comparison funcsameerj9-101/+88
2021-07-23shader: Implement FLOameerj8-18/+75
2021-07-23shader: Implement ISET, add common_funcsameerj8-50/+150
2021-07-23shader: Make IMNMX, SHR, SEL stylistically more consistentameerj3-5/+5
2021-07-23shader: Implement ICMPameerj3-16/+84
2021-07-23shader: Implement IMNMXameerj8-12/+105
2021-07-23shader: Implement BFIameerj3-16/+57
2021-07-23shader: Implement BFEameerj3-12/+67
2021-07-23shader: Implement POPCameerj8-12/+59
2021-07-23shader: Implement SHRameerj8-18/+80
2021-07-23shader: Implement SELameerj4-16/+53
2021-07-23spirv: Move phi arguments emit to a separate functionReinUsesLisp1-27/+27
2021-07-23shader: Avoid infinite recursion when tracking global memoryReinUsesLisp1-5/+26
2021-07-23shader: Fix conditional execution of exit instructionsReinUsesLisp2-5/+6
2021-07-23spirv: Add support for self-referencing phi nodesReinUsesLisp1-3/+10
2021-07-23shader: Fix control flowReinUsesLisp8-20/+39
2021-07-23shader: Implement more of XMAD and FFMA32I and fix XMAD.CBCCReinUsesLisp5-28/+76
2021-07-23shader: FMUL, select, RRO, and MUFU fixesReinUsesLisp18-119/+507
2021-07-23shader: Fix MOV(reg), add SHL variants and emit neg and abs instructionsReinUsesLisp4-11/+11
2021-07-23spirv: Fixes and Intel specific workaroundsReinUsesLisp11-32/+44
2021-07-23shader: Rename, implement FADD.SAT and P2R (imm)ReinUsesLisp18-127/+213
2021-07-23shader: Add denorm flush supportReinUsesLisp20-93/+260
2021-07-23spirv: Add lower fp16 to fp32 passReinUsesLisp32-285/+479
2021-07-23shader: Primitive Vulkan integrationReinUsesLisp43-3036/+1003
2021-07-23shader: Remove old shader managementReinUsesLisp80-19568/+54
2021-07-23shader: Add XMAD multiplication folding optimizationReinUsesLisp1-5/+77
2021-07-23shader: Simplify ISCADDReinUsesLisp1-6/+1
2021-07-23shader: Add utility to resolve identities on a valueReinUsesLisp2-0/+8
2021-07-23spirv: Implement EmitIdentityReinUsesLisp2-3/+3
2021-07-23spirv: Initial bindings supportReinUsesLisp22-292/+671
2021-07-23shader: Improve object poolReinUsesLisp3-50/+66
2021-07-23shader: Fix trackingReinUsesLisp1-50/+72
2021-07-23shader: Add support for forward declarationsReinUsesLisp10-68/+79
2021-07-23shader: Support SSA loops on IRReinUsesLisp12-46/+150
2021-07-23shader: Misc fixesReinUsesLisp10-89/+104
2021-07-23shader: Initial implementation of an ASTReinUsesLisp32-589/+1345
2021-07-23spirv: Initial SPIR-V supportReinUsesLisp20-3299/+1400
2021-07-23shader: Better constant foldingReinUsesLisp2-13/+48
2021-07-23shader: Properly store phi on InstReinUsesLisp6-75/+132
2021-07-23shader: Add pools and rename filesReinUsesLisp30-108/+255
2021-07-23shader: Make typed IRReinUsesLisp19-269/+495
2021-07-23shader: Remove illegal character in SSA passReinUsesLisp1-1/+1
2021-07-23shader: Constant propagation and global memory to storage bufferReinUsesLisp17-63/+652
2021-07-23shader: Initial instruction supportReinUsesLisp28-334/+1450
2021-07-23shader: SSA and dominanceReinUsesLisp24-77/+570
2021-07-23shader: Initial recompiler workReinUsesLisp57-0/+7061
2021-07-23thread_worker: Fix compile time errorameerj1-1/+1
state is unused in the branch where with_state is false
2021-07-22yuzu_cmd: Make use of fullscreen_mode settinglat9nq3-15/+34
Reverts 48259de0c1a6a1aca77eec31cb8aca5ca2b680dd to the previous hierarchy and fixes the resolution issue with this fullscreen mode. yuzu-cmd will now read the fullscreen_mode setting and use it appropriately.
2021-07-21yuzu-cmd: Fullscreen Improvements (#6656)san4-9/+13
* emu_window_sdl2_vk: Use the generated SDL config On Linux, due to the way we include SDL2 as a submodule, it makes it difficult for us to specify which SDL_config.h we intended to include. Before, CMake would default to the dummy one included with SDL and ignore the generated one. This tells CMake to use the generated one. In addition, we define USING_GENERATED_CONFIG_H to throw an error in case the dummy config is used by accident. Fixes Vulkan not working on Linux yuzu-cmd. * emu_window_sdl2_vk: Specify the window manager if it should be supported The original language "not implemented" is wrong if the implementation exists but is not compiled. This causes a bit of a debugging headache when it goes wrong. Log it if the window manager is known before exiting. * sdl_impl, emu_window: Remove clang ignore Fixed upstream by libsdl-org/SDL@25fc40b0bd44c484051064bc6b945ea9943f88dd * Enable fullscreen support for Vulkan on yuzu-cmd Hooked up the existing SDL2 logic for fullscreen support in the Vulkan window of yuzu-cmd. * Change fullscreen logic to attempt desktop resolution first on yuzu-cmd Changed the order in which we attempt to switch to fullscreen. First try desktop resolution first, if it fails fall back to streched fullscreen using windowed resolution. Co-authored-by: lat9nq <22451773+lat9nq@users.noreply.github.com> Co-authored-by: san <san+gitkraken@smederijmerlijn.nl>
2021-07-21hle: service: kernel_helpers: Remove unnecessary pragma once.bunnei1-2/+0
2021-07-21hle: kernel: svc: Remove part of ExitProcess.bunnei1-5/+0
- ExitProcess is not actually implemented either way, and this needs more work before we implement.
2021-07-21hle: service: nvdrv: Remove unused kernel reference.bunnei1-1/+0
2021-07-21hle: service: hid: npad: Remove unused kernel reference.bunnei1-1/+0
2021-07-21hle: kernel: Track and release server sessions, and protect methods with locks.bunnei4-13/+82
2021-07-21hle: kernel: KProcess: Change process termination assert to a warning.bunnei1-1/+1
- Since we do not implement multiprocess right now, this should not be a crashing assert.
2021-07-21hle: kernel: Ensure current running process is closed.bunnei1-5/+6
2021-07-21hle: kernel: Ensure global handle table is finalized before closing.bunnei1-0/+1
2021-07-21kernel: svc: ConnectToNamedPort: Close extra reference to port.bunnei1-0/+1
2021-07-21hle: service: sm: Refactor to better manage ports.bunnei4-45/+47
2021-07-21hle: kernel: k_process: Close the handle table on shutdown.bunnei1-0/+3
2021-07-21hle: kernel: k_process: Close main thread reference after it is inserted into handle table.bunnei1-0/+3
2021-07-21hle: kernel: Ensure global handle table is initialized.bunnei1-0/+1
2021-07-21hle: service: Add a helper module for managing kernel objects.bunnei10-20/+146
2021-07-21hle: kernel: Provide methods for tracking dangling kernel objects.bunnei4-2/+43
2021-07-20gl_buffer_cache: Use glClearNamedBufferSubData:GL_RED instead of GL_RGBAReinUsesLisp1-1/+1
Avoids reading out of bounds from the stack.
2021-07-20buffer_cache: Simplify clear logicReinUsesLisp1-6/+2
Use existing helper functions and avoid looping when only one buffer has to be active.
2021-07-20vk_texture_cache: Use VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL when possibleReinUsesLisp1-21/+35
Silences performance warnings generated from validation layers on each frame.
2021-07-20gl_texture_cache: Workaround slow PBO downloads on radeonsiReinUsesLisp1-1/+1
There's an optimization bug on non-git mesa versions where not specifying GL_CLIENT_STORAGE_BIT causes very slow reads on the CPU side. Add this bit for all vendors.
2021-07-20uuid: Directly compare UUID instead of checking per elementChloe Marcec1-3/+2
We can now update this for C++20
2021-07-20vk_buffer_cache: Fix quad index array with 0 vertices (#6627)Fernando S1-0/+7
2021-07-20input/sdl_impl: fix rumble support on DualSense. (#6683)Nicolas Jallamion1-2/+2
- value return can be different 0, is not error is normal, error is only -1.
2021-07-20applet_controller: Add preliminary support for version 8Morph2-3/+33
Version 8 adds support for key remapping introduced in FW 11.0, we will not be implementing this for now.
2021-07-20bootmanager: Create a dummy render widgetMorph1-0/+6
This ensures that Qt positions the render window at the correct position on initializing the respective render backends.
2021-07-20file_sys: Support load game collection (#6582)Feng Chen17-108/+171
Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
2021-07-19Update src/video_core/renderer_vulkan/vk_texture_cache.cppyzct123451-1/+1
Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
2021-07-19Update src/video_core/renderer_vulkan/vk_texture_cache.cppyzct123451-1/+1
Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
2021-07-18Ignore wrong blit formatyzct123451-1/+4
2021-07-18vk_texture_cache: Finalize renderpass when downloading imagesReinUsesLisp1-0/+1
2021-07-18vk_compute_pass: Fix pipeline barriers on non-initialized ASTC imagesReinUsesLisp1-2/+3
2021-07-18vk_compute_pass: Fix ASTC buffer setup synchronizationReinUsesLisp1-14/+14
2021-07-18texture_cache/util: Fix size calculations of multisampled imagesReinUsesLisp1-53/+33
On the texture cache we handle multisampled images by keeping their real size in samples (e.g. 1920x1080 with 4 samples is 3840x2160). This works nicely with size matches and other comparisons, but the calculation for guest sizes was not having this in mind, and the size was being multiplied (again) by the number of samples per dimension. For example a 3840x2160 texture cache image had its width and height multiplied by 2, resulting in a much larger texture. Fix this issue. - Fixes performance regression on cooking related titles when an unrelated bug was fixed.
2021-07-18texture_cache: Always prepare image views on render targetsReinUsesLisp1-0/+6
Images used as render targets were not being "prepared", causing desynchronizations on the texture cache. Needs #6669 to avoid performance regressions on certain cooking titles. - Fixes black shadows on Age of Calamity.
2021-07-17configure/ui: Add sliders for trigger buttonsgerman772-0/+78
2021-07-17input_common: Fix mouse panning behaivourgerman773-5/+8
2021-07-16sdl_impl, emu_window: Remove clang ignorelat9nq4-33/+0
Fixed upstream by libsdl-org/SDL@25fc40b0bd44c484051064bc6b945ea9943f88dd
2021-07-16emu_window_sdl2_vk: Specify the window manager if it should be supportedlat9nq1-0/+15
The original language "not implemented" is wrong if the implementation exists but is not compiled. This causes a bit of a debugging headache when it goes wrong. Log it if the window manager is known before exiting.
2021-07-16emu_window_sdl2_vk: Use the generated SDL configlat9nq2-0/+11
On Linux, due to the way we include SDL2 as a submodule, it makes it difficult for us to specify which SDL_config.h we intended to include. Before, CMake would default to the dummy one included with SDL and ignore the generated one. This tells CMake to use the generated one. In addition, we define USING_GENERATED_CONFIG_H to throw an error in case the dummy config is used by accident. Fixes Vulkan not working on Linux yuzu-cmd.
2021-07-16configure_audio: Fix volume clamping to 0Morph1-6/+6
2021-07-16yuzu_cmd: Add missing or update current settingslat9nq2-4/+112
Many settings in common/settings.h are missing from yuzu-cmd, either they were added to default_ini.h but not read in, or vice versa, or the setting was altogether omitted from yuzu-cmd. Some defaults were reported wrong, so those were fixed where noticed.
2021-07-16input_common: Make button threshold customizablegerman772-3/+13
2021-07-16default_ini: Remove deprecated settingslat9nq1-61/+1
These settings are not being read in config.cpp AND they do not exist in common/settings.h. Remove their references.
2021-07-15input_common: Support SDL toggle buttonsgerman772-5/+53
2021-07-15vic: Fix dimension compuation of YUV framesameerj1-11/+10
Fixes out of bound memory crashes in Mario Golf
2021-07-15applets/web: Resolve Nintendo CDN URLsMorph1-0/+13
This fixes the hint videos in New Super Mario Bros. U Deluxe
2021-07-15nvhost_nvdec_common: Read Submit ioctl data from object addrameerj1-8/+2
Fixes Mario Golf intro video decoding.
2021-07-15nvhost_nvdec_common: Fix {Slice/Write}Vectors returnameerj1-37/+38
Plus some minor cleanup for consistency.
2021-07-15Buffer cache: Fixes, Clang and Feedback.Fernando Sahmkow3-11/+10
2021-07-14GPUMemoryManager: Force inmediate invalidation when writting block.Fernando Sahmkow1-1/+1
2021-07-14Buffer Cache: Fixes to DMA Copy.Fernando Sahmkow1-6/+7
2021-07-14DMAEngine: Revert flushing from Pitch to BlpockLinear.Fernando Sahmkow1-2/+7
2021-07-14BufferCache: fix clearing on forced download.Fernando Sahmkow1-10/+20
2021-07-14service: Append service name prefix to common filenamesMorph41-56/+56
2021-07-14applets: Append applet_ prefix to backend appletsMorph19-33/+33
2021-07-14applets: Append qt_ prefix to Qt frontend appletsMorph15-25/+26
2021-07-13vk_rasterizer: Only clear valid color attachmentsameerj1-2/+4
2021-07-13DMAEngine: Accelerate BufferClearFernando Sahmkow11-6/+115
2021-07-12accelerateDMA: Fixes and feedback.Fernando Sahmkow3-88/+62
2021-07-12content_archive: Remove unnecessary include to <ranges>ReinUsesLisp1-1/+0
Fixes build issues on clang.
2021-07-12web_service: Silence -Wmaybe-uninitialized on httplib.hReinUsesLisp1-0/+10
2021-07-12boxcat: Silence -Wmaybe-uninitialized in httplib.hReinUsesLisp1-0/+3
2021-07-11npad: Disable vibration check if disabledgerman771-0/+5
2021-07-11input_common: Fix build with sdl disabledgerman771-2/+2
2021-07-11accelerateDMA: Accelerate Buffer Copies.Fernando Sahmkow9-13/+176
2021-07-10Buffer Cache: Address Feedback.Fernando Sahmkow3-5/+10
2021-07-10settings: Disable FPS unlimit setting between title launchesameerj6-29/+10
Some titles crash if the FPS limit is disabled when launching. This change ensures that titles launch with the limit in-place to avoid issues. In order to simplify the change, the UI toggle was removed as it will always be overridden at launch to be disabled. The setting can still be toggled during gameplay with the hotkey, and indicated by the fps label in the status bar.
2021-07-09Buffer Cache: Fix GCC copmpile errorFernando Sahmkow1-1/+0
2021-07-09Fence Manager: remove reference fencing.Fernando Sahmkow3-31/+6
2021-07-09BufferCache: Additional download fixes.Fernando Sahmkow2-23/+107
2021-07-09Buffer Cache: Revert unnecessary range reduction.Fernando Sahmkow1-29/+13
2021-07-09Fence Manager: Force ordering on WFI.Fernando Sahmkow4-38/+71
2021-07-09Buffer Cache: Eliminate the AC Hack as the base game is fixed in Hades.Fernando Sahmkow1-14/+4
2021-07-09Fence Manager: Add fences on Reference Count.Fernando Sahmkow8-6/+57
2021-07-09Videocore: Address Feedback & CLANG Format.Fernando Sahmkow2-78/+75
2021-07-09Buffer Cache: Fix High Downloads and don't predownload on Extreme.Fernando Sahmkow4-92/+123
2021-07-09yuzu qt: config: Only save renderer_debug as a global settinglat9nq1-2/+8
This is a bug fix. Enabling graphics debug mode, then saving a custom configuration causes graphics debugging to be saved and read from the custom configuration. Isolate it the same way we isolate the CPU settings.
2021-07-09Update src/yuzu/main.cppFernando S1-2/+2
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2021-07-09vk_buffer_cache: Use emulated null buffers for transform feedbackReinUsesLisp2-11/+19
Vulkan does not support null buffers on transform feedback bindings. Emulate these using the same null buffer we were using for index buffers.
2021-07-09configure_input: Use u8 for mouse sensitivityameerj3-11/+8
2021-07-09config: Remove float {Read,Write}Setting variantsameerj2-29/+2
2021-07-09configure_graphics: Use u8 for bg_color valuesameerj5-19/+20
2021-07-09configure_audio: Use u8 for volume valueameerj4-10/+9
2021-07-09Settings: Eliminate ASYNC & MULTICORE Toggles and add GPU Accuracy Toggle.Fernando Sahmkow2-39/+45
2021-07-09common/thread_worker: Stop workers on stop_token when waitingReinUsesLisp1-18/+20
2021-07-09common/thread_worker: Add support for stateful threadsReinUsesLisp3-78/+86
2021-07-09common/thread_worker: Simplify logicFernandoS271-8/+1
2021-07-09common/thread_worker: Fix data raceFernandoS272-1/+18
2021-07-09common/thread_worker: Use unique functionReinUsesLisp2-28/+24
2021-07-09common: Add unique functionReinUsesLisp4-0/+172
2021-07-09common/thread_worker: Add wait for requests methodReinUsesLisp2-0/+11
2021-07-08settings, arm_dynarmic, yuzu qt: Move CPU debugging optionlat9nq18-132/+244
Decouples the CPU debugging mode from the enumeration to its own boolean. After this, it moves the CPU Debugging tab over to a sub tab underneath the Debug tab in the configuration UI.
2021-07-08arm_dynarmic_64: Re-add fastmem_address_space_bits to Auto settinglat9nq1-0/+1
2021-07-08qt/main: Make title string more i18n-friendlyLioncash1-2/+4
Currently, whether or not the title is 32-bit or 64-bit was being appended as a suffix to the title, which is fine for left-to-right languages, but may not always fly so smoothly with some right-to-left languages. We also weren't marking that portion of the string as translatable, which prevents translators from translating part of the title string.
2021-07-08settings, yuzu qt: Add migration code for CPU accuracylat9nq2-1/+10
Old CPU Accuracy setting won't translate well into since we're adding one at the beginning of the list. On first boot with the new setting, just use the default setting.
2021-07-08arm_dynarmic{32,64}: Fixes from test buildlat9nq2-18/+5
Now sets optimizations regardless of the Settings. Drops unsafe fastmem optimization.
2021-07-08core,common,yuzu qt: Add CPU accuracy option 'Auto'lat9nq4-16/+50
The current CPU accuracy settings in yuzu are fairly polarized and require more than common knowledge to know what the optimal settings for yuzu would be. This adds a curated option called 'Auto' that applies a few at the moment known-good unsafe optimizations to Dynarmic.
2021-07-08general: Code formatting improvementslat9nq4-22/+25
Slight improvements to readability. Dropped suggestions for string_view (settings.h:101), pass by value (settings.h:82), reverting double to a float (config.cpp:316), and other smaller ones, some out of scope. Addresses review feedback. Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-07-08Out of bound blit (#6531)Feng Chen2-58/+35
* Fix out of bound blit error * Fix code read * Fix ci error Co-authored-by: Feng Chen <chen.feng@gloritysolutions.com>
2021-07-08Replace NaN mix volume samples with silence.Kelebek11-0/+9
Fixes Xenoblade Chronicles 2 blowing out the audio.
2021-07-08audio_core: Preserve front channel volume after 6 to 2 downmixKelebek15-75/+81
Many games report 6 channel output while only providing data for 2. We only output 2-channel audio regardless, and in the downmixing, front left/right only provide 36% of their volume. This is done assuming all of the other channels also contain valid data, but in many games they don't. This PR alters the downmixing to preserve front left/right, so volume is not lost. This improves volume in Link's Awakening, New Super Mario Bros U, Disgaea 6, Super Kirby Clash.
2021-07-07util_shaders: Fix BindImageTexturelat9nq1-2/+2
According to https://gitlab.freedesktop.org/mesa/mesa/-/issues/3820#note_753371 we need to set these to true for use with 3D textures. Fixes BOTW teleporting on RadeonSI and iris.
2021-07-06Report 2 channels active. Fixes Tales of Vesperia's mono channel audio.Kelebek11-1/+1
2021-07-06Support more PCM formats. Fixes Ys IX audio.Kelebek12-18/+51
2021-07-06CMakeLists: Treat -Wsign-compare as an error on GCC/ClangMorph4-8/+1
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-06common: logging: backend: Close the file after exceeding the write limitMorph1-8/+11
There's no point in keeping the file open after the write limit is exceeded. This allows the file to be committed to the disk shortly after it is closed and avoids redundantly checking whether or not the write limit is exceeded.
2021-07-06common: fs: file: Revert Flush to its previous behavior and add CommitMorph2-3/+34
It became apparent that logging can continuously spam errors that trigger file flushing. Since committing the files to disk is an expensive operation, this causes unnecessarily high disk usage. As such, we will revert Flush() to the previous behavior and add a Commit() member function in the event that this behavior is needed.
2021-07-06common: fs: file: Flush the file in GetSizeMorph1-0/+3
This ensures that GetSize always retrieves the correct file size after a write operation.
2021-07-05input_common: Add missing modifier callback to analog from buttongerman771-0/+1
2021-07-05profiler: Fix deprecated functionsgerman771-4/+5
2021-07-04Texture Cache: Fix collision with multiple overlaps of the same sparse texture.Fernando Sahmkow1-1/+6
2021-07-04Texture Cache: Fix GCC & Clang.Fernando Sahmkow2-11/+11
2021-07-04Texture Cache: Address feedback.Fernando Sahmkow5-18/+37
2021-07-04Texture Cache: Improve accuracy of sparse texture detection.Fernando Sahmkow6-131/+342
2021-07-04Texture Cache: Initial Implementation of Sparse Textures.Fernando Sahmkow12-23/+310
2021-07-04service: mii: Retrieve the correct default miis.Morph1-2/+3
We were including the first 2 default miis which are not meant to be shown in games. With this change, we properly retrieve the 6 default miis shown in games, with 3 of each gender.
2021-07-03TextureCacheOGL: Implement Image Copies for 1D and 1D Array.Fernando Sahmkow1-0/+26
2021-07-03TextureCache: Fix 1D to 2D overlapps.Fernando Sahmkow1-3/+0
2021-07-03CMakeLists: Enforce C4189Morph1-0/+1
This supplements C4101 by detecting initialized but unreferenced local variables
2021-07-02config: Read UISettings as basic settingslat9nq1-30/+19
I must have been asleep or something. These need to be read with the new ReadBasicSetting function.
2021-07-01settings: Set resolution_factor default to 1lat9nq1-1/+1
Fixes Disgaea 6 Demo issues.
2021-07-01Slightly refactor NVDEC and codecs for readability and safetyKelebek110-356/+522
2021-07-01Fix XC2/VOEZ crashing, add audio looping and a few misc fixesKelebek17-132/+188
2021-07-01yuzu_cmd: config: Pass a reference inlat9nq2-5/+11
Also adds documentation for the ReadSetting function. Address review comments. Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-06-29core, input_common: Miscellaneous fixeslat9nq3-5/+8
bcat: Fix settings access telemetry_session: Fix settings accesses So this is what I get for testing with the web service disabled. touch_from_button: Fix settings access for clang
2021-06-29yuzu qt: Make most UISettings a BasicSettinglat9nq12-91/+107
For simple primitive settings, moves their defaults and labels to definition time. Also fixes typo and clang-format yuzu qt: config: Fix rng_seed
2021-06-28general: Make most settings a BasicSettinglat9nq32-660/+807
Creates a new BasicSettings class in common/settings, and forces setting a default and label for each setting that uses it in common/settings. Moves defaults and labels from both frontends into common settings. Creates a helper function in each frontend to facillitate reading the settings now with the new default and label properties. Settings::Setting is also now a subclass of Settings::BasicSetting. Also adds documentation for both Setting and BasicSetting.
2021-06-28CMakeLists: Disable all warnings for external headersMorph1-0/+5
This lets us avoid needing to wrap external headers with #pragma warning directives for warnings we treat as errors and avoids generating warnings for external code. Thanks to MerryMage for pointing this out.
2021-06-28video_core: Remove #pragma warning directives for external headersMorph2-15/+0
2021-06-28input_common: Remove #pragma warning directives for external headersMorph2-14/+0
2021-06-28CMakeLists: Enforce C4018, C4267, C4305, C4389Morph1-3/+7
2021-06-28core: Enforce C4242Morph1-6/+3
2021-06-28input_common: Enforce C4242Morph1-12/+4
2021-06-28video_core: Enforce C4242Morph1-3/+2
2021-06-28patch_manager: Do not apply LayeredFS mods when dumpingMorph3-4/+8
We should not apply any mods when dumping a game's RomFS.
2021-06-28filesystem: Open a read-only directory for SDMC modsMorph3-19/+25
This prevents mod files from being locked due to the read-only share flag in Windows.
2021-06-28core: Simplify SDMC mod loadinglat9nq3-21/+10
If someone else wants to support other mod formats in the SDMC directory, that can be added later. For now, just allow RomFS modding here and force people to do other types of mods the old way. Addresses review comments. Co-authored-by: LC <mathew1800@gmail.com>
2021-06-28core: Support LayeredFS mod from SDMC directorylat9nq5-2/+47
Enables loading a mod directly from `[yuzu data directory]/sdmc/atmosphere/contents/[title_id]`. For use with some homebrew mod managers.
2021-06-28yuzu qt: Add option to dump to SDMC directorylat9nq4-7/+23
Enables dumping the RomFS to SDMC directory, specifically '[yuzu data directory]/sdmc/atmosphere/contents/[title_id]/romfs'.
2021-06-28video_core: Silence signed/unsigned mismatch warningsMorph4-5/+6
2021-06-28main: Display the instruction set of the running title in the window nameameerj1-0/+3
Displays whether the currently running title uses 64-bit instructions or only 32-bit instructions.
2021-06-27Decouple audio processing and run at variable rateKelebek13-79/+115
Currently, processing of audio samples is called from AudioRenderer's Update method, using a fixed 4 buffers to process the given samples. Games call Update at variable rates, depending on framerate and/or sample count, which causes inconsistency in audio processing. From what I've seen, 60 FPS games update every ~0.004s, but 30 FPS/160 sample games update somewhere between 0.02 and 0.04, 5-10x slower. Not enough samples get fed to the backend, leading to a lot of audio skipping. This PR seeks to address this by de-coupling the audio consumption and the audio update. Update remains the same without calling for buffer queuing, and the consume now schedules itself to run based on the sample rate and count.
2021-06-26hle: service: hwopus: OpenHardwareOpusDecoderEx: Remove unused buffer size.bunnei1-1/+30
2021-06-26configuration: Defer to common/settings for per-game settings defaultslat9nq2-127/+100
Avoids double-setting defaults, and avoids potential accidents when inconsistently setting the default on new settings.
2021-06-26common: Force defaults for Settings::Setting'slat9nq1-44/+57
Requires a default value when creating each per-game setting.
2021-06-26buffer_cache: Only flush downloaded sizeReinUsesLisp1-2/+3
Fixes a regression unintentionally introduced by the garbage collector. This makes regular memory downloads only flush the requested sizes. This negatively affected Koei Tecmo games.
2021-06-26video_core: Enforce C4244ReinUsesLisp1-0/+1
Enforce implicit integer casts to a smaller type as errors.
2021-06-26codec,vic: Disable warnings in ffmpeg headersReinUsesLisp2-4/+29
2021-06-26vk_buffer_cache: Silence implicit cast warningsReinUsesLisp1-2/+3
2021-06-26buffer_cache/texture_cache: Make GC functions privateReinUsesLisp2-5/+5
2021-06-26buffer_cache: Silence implicit cast warningReinUsesLisp1-1/+1
2021-06-25vulkan_device: Make device memory match the rest of the fileReinUsesLisp2-19/+18
Match the style in the file.
2021-06-25hle: hle_helpers: Skip data payload offset checks on TIPC requests.bunnei1-2/+6
- TIPC does not use this.
2021-06-25hle: service: hwopus: Implement GetWorkBufferSizeEx and OpenHardwareOpusDecoderEx.bunnei2-5/+15
- This is used by the latest update of Doom Eternal.
2021-06-25hle: service: aoc: Stub GetAddOnContentListChangedEventWithProcessId.bunnei2-1/+10
- This is used by the latest update of Doom Eternal.
2021-06-25audio_core: common: Bump audio revision to 9.bunnei1-1/+1
- This is used in fw 12.x.x games.
2021-06-24common: Replace common_sizes into user-literalsWunkolo19-126/+152
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals.
2021-06-24general: Add missing #pragma once directivesMorph4-0/+8
2021-06-24Add missing includes (#6521)Chloe4-0/+7
* Add missing includes * Add array
2021-06-23General: Resolve fmt specifiers to adhere to 8.0.0 API where applicableLioncash9-15/+23
Also removes some deprecated API usages.
2021-06-23maxwell3d: Add missing return in default SizeInBytes() caseLioncash1-0/+1
We were returning '1' in ComponentCount()'s default case but were neglecting to do the same with SizeInBytes().
2021-06-23Simple resizing of the Per-Game configuration window and removal of useless Help question mark button in the title barOZtistic2-1/+8
2021-06-22Reaper: Set minimum cleaning limit on OGL.Fernando Sahmkow1-1/+4
2021-06-22common: fs: Add a description of a regular file in IsFileMorph1-4/+6
This provides a more concrete example of what a regular file is and isn't.
2021-06-22vfs_real: Fix Mode to FileAccessMode conversionMorph1-6/+1
These enforce requiring the file to exist prior to opening.
2021-06-22common: fs: Amend IsFile check in FileOpen / (Write/Append)StringToFileMorph4-9/+12
This check was preventing files with the Write or Append file access modes from being created, as per the documented behavior in FileAccessMode. This amends the check to test for the existence of a filesystem object prior to checking whether it is a regular file. Thanks to liushuyu for pointing out that removing the check altogether would not guard against attempting to open non-regular files such as directories, symlinks, FIFO (pipes), sockets, block devices, or character devices. The documentation has also been updated for these functions to clarify that a file refers to a regular file.
2021-06-22common: fs: file: Remove [[nodiscard]] attribute from FlushMorph2-3/+3
Similarly, Flush() is typically called to attempt to flush a file into the disk. In the one case where this is used, we do not care whether the flush has succeeded or not, making [[nodiscard]] unnecessary.
2021-06-22common: fs: Remove [[nodiscard]] attribute on Remove* functionsMorph6-26/+26
There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal. As such, removing the [[nodiscard]] attribute is best for these functions.
2021-06-22core: Make is_powered_on atomicRodrigo Locatti1-2/+3
Fixes potential data races when shutting down.
2021-06-22common/detached_tasks: Wait for tasks before shutting downRodrigo Locatti1-0/+2
If this is not waited on, the synchronization primitives are destroyed whe main exits and the detached task ends up signalling garbage and not properly finishing.
2021-06-22npad: Fix data race when updating devicesRodrigo Locatti2-0/+8
Add a lock to avoid data races. This reduces the number of -fsanitize=thread errors significantly.
2021-06-22input_common/mouse_input: Fix data raceRodrigo Locatti2-12/+10
Fix data race using std::jthread and std::stop_token.
2021-06-22Implement audout GetAudioOutPlayedSampleCountKelebek13-3/+20
Used in Ninja Gaiden games.
2021-06-22bootmanager: Use std::stop_source for stopping emulationReinUsesLisp8-18/+18
Use its std::stop_token to abort shader cache loading. Using std::stop_token instead of std::atomic_bool allows the usage of other utilities like std::stop_callback.
2021-06-22vk_master_semaphore: Use jthread for debug threadReinUsesLisp2-19/+8
2021-06-21gl_device: Expand on Mesa driver nameslat9nq1-3/+28
Makes this list a bit more capable at identifying Mesa drivers. Tries to deal with two of the overloaded vendor strings in a more generic fashion.
2021-06-21video_core: Add GPU vendor name to window title barameerj9-10/+75
2021-06-20Update dynarmic and add new unsafe CPU option.Fernando Sahmkow7-0/+31
2021-06-20Reaper: Guarantee correct deletion.Fernando Sahmkow5-2/+23
2021-06-20Reaper: Upgrade label from unsafe to experimental as no regressions are known now.Fernando Sahmkow1-1/+1
2021-06-19util_shaders: Specify ASTC decoder memory barrier bitsameerj1-1/+6
2021-06-19astc_decoder.comp: Remove unnecessary LUT SSBOsameerj5-113/+34
We can move them to instead be compile time constants within the shader.
2021-06-19astc: Various robustness enhancements for the gpu decoderameerj5-47/+16
These changes should help in reducing crashes/drivers panics that may occur due to synchronization issues between the shader completion and later access of the decoded texture.
2021-06-19host_memory: Correct MEM_RESERVE_PLACEHOLDERlat9nq1-1/+1
Microsoft defines `MEM_RESERVE_PLACEHOLDER` as `0x00040000`, but our manually imported version of it drops the last zero.
2021-06-18externals: httplib: replace custom httplib header with upstream as submodule.Vortex1-1/+2
This also includes a minor change to web_service.cpp - to fix compatibility with upstream changes.
2021-06-18service: time: Use GetFileRelative to get files within subdirectoriesMorph1-1/+1
The timezone info file can be within subdirectories (such as Asia/Tokyo), use GetFileRelative instead of GetFile to get files within subdirectories.
2021-06-18kernel: Fix missing peak set in KResourceLimit::SetLimitValueMorph1-0/+1
2021-06-18vulkan_debug_callback: Skip logging known false-positive validation errorsameerj1-0/+8
Avoids overwhelming the log with validation errors that are not applicable
2021-06-17Reaper: Correct size calculation on Vulkan.Fernando Sahmkow1-5/+3
2021-06-17config: Add frame limiter toggle hotkeyameerj3-3/+8
2021-06-17nvflinger: Add toggle to disable buffer swap interval limitsameerj8-0/+38
Enabling this setting will allow some titles to present more frames to the screen as they become available in the nvflinger buffer queue.
2021-06-17Reaper: Change memory restrictions on TC depending on host memory on VK.Fernando Sahmkow10-41/+90
2021-06-16Reaper: Address Feedback.Fernando Sahmkow6-20/+43
2021-06-16Reaper: Setup settings and final tuning.Fernando Sahmkow10-32/+64
2021-06-16Reaper: Tune it up to be an smart GC.Fernando Sahmkow5-13/+130
2021-06-16Initial Reaper SetupReinUsesLisp6-56/+226
WIP
2021-06-16vulkan_memory_allocator: Release allocations with no commitsReinUsesLisp2-5/+22
2021-06-16spl: Mark the other functions as unimplementedMorph1-5/+30
2021-06-16spl: Implement spl::GetConfigMorph2-1/+90
2021-06-16hle: api_version: Add HLE API version constantsMorph3-33/+54
2021-06-16spl: Add the general SPL interfaceMorph4-45/+64
2021-06-16spl: Add SPL typesMorph2-0/+231
2021-06-16spl: Add SPL result codesMorph2-0/+30
2021-06-16common: fs: file: Remove redundant call to WriteStringToFileMorph2-6/+1
The Append open mode will create a new file if said file does not exist at a given path, making this call redundant.
2021-06-16fsp_srv: Fix filesystem access loggingMorph10-38/+63
This introduces a new setting Enable FS Access Log which saves the filesystem access log to sdmc:/FsAccessLog.txt If this setting is not enabled, this will indicate to FS to not call OutputAccessLogToSdCard. Fixes softlocks during loading in Xenoblade Chronicles 2 when certain DLC is enabled.
2021-06-16astc_decoder: Fix LDR CEM1 endpoint calculationameerj2-2/+2
Per the spec, L1 is clamped to the value 0xff if it is greater than 0xff. An oversight caused us to take the maximum of L1 and 0xff, rather than the minimum. Huge thanks to wwylele for finding this. Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
2021-06-16yuzu_cmd/config: Add Accelerate ASTC and missing NVDEC emulation settingsameerj2-2/+12
2021-06-16configure_graphics: Add Accelerate ASTC decoding settingameerj9-2/+32
2021-06-16textures: Reintroduce CPU ASTC decoderameerj4-2/+1592
Users may want to fall back to the CPU ASTC texture decoder due to hangs and crashes that may be caused by keeping the GPU under compute heavy loads for extended periods of time. This is especially the case in games such as Astral Chain which make extensive use of ASTC textures.
2021-06-15lm: Demote guest logs to LOG_DEBUGameerj1-27/+20
Guest logs are not very useful, as they are intended for use by the game developers during development. As such, they provide little meaning to be logged by yuzu and tend to overwhelm the log output at times.
2021-06-15texture_cache/util: Avoid relaxed image views on different bytes per pixelReinUsesLisp1-1/+9
Avoids API usage errors on UE4 titles leading to crashes.
2021-06-13general: Remove extraneous includesMorph3-3/+0
2021-06-13common: logging: Restructure backend codeMorph8-278/+288
2021-06-13common: logging: backend: Wrap IOFile in a unique_ptrMorph2-6/+27
Allows us to forward declare Common::FS::IOFile.
2021-06-13common: fs: file: Flush the file to the disk when Flush() is calledMorph1-1/+5
std::fflush does not guarantee that file buffers are flushed to the disk. Use _commit on Windows and fsync on all other OSes to ensure that the file is flushed to the disk.
2021-06-13cmake: Fix find_program usage for 3.15lat9nq1-1/+4
yuzu requires CMake 3.15 yet find_program was using REQUIRED, which is only available on 3.18 and later. Instead, we check for "<VAR>-NOTFOUND". In addition, check for additional requirements before building libusb or FFmpeg with autotools. Otherwise, CMake configuration will pass yet compilation will fail.
2021-06-13configure_cpu_debug: Clarify settings behaviorMorph1-1/+1
This makes it clear that the disabled settings only take effect when CPU Accuracy is set to Debug Mode.
2021-06-12common: fs: Use the normal directory iterator in *Recursively functionsMorph1-2/+16
MSVC's implementation of recursive_directory_iterator throws an exception on an error despite a std::error_code being passed into its constructor. This is most likely a bug in MSVC's implementation since directory_iterator does not throw an exception on an error. We can replace the usage of recursive_directory_iterator for now until MSVC fixes their implementation of it.
2021-06-11hid: Stub IsFirmwareUpdateAvailableForSixAxisSensorgerman772-1/+23
2021-06-11yuzu: main: Ensure enough space is available for RomFS dumpingMorph1-0/+12
This warns the user if there isn't enough free space to dump the entire RomFS to disk. It requires at least the size of the extracted RomFS + 1 GiB as a buffer of free space.
2021-06-11common/host_memory: Implement a fallback if fastmem fails.Markus Wick2-14/+49
This falls back to the old approach of using a virtual buffer. Windows is untested, but this build should fix support for Windows < 10 v1803. However without fastmem support at all.
2021-06-11common/host_shader: Load Windows 10 functions dynamicallyReinUsesLisp1-29/+88
Workaround old headers and libraries shipped on MinGW.
2021-06-11GPUTHread: Remove async reads from Normal Accuracy.Fernando Sahmkow1-18/+6
2021-06-11rasterizer: Update pages in batchesReinUsesLisp1-15/+41
2021-06-11host_memory: Support staged VirtualProtect callsReinUsesLisp1-3/+12
2021-06-11General: Add settings for fastmem and disabling adress space check.FernandoS2712-6/+83
2021-06-11common/host_memory: Optimize for huge tables.Markus Wick2-11/+24
In theory, if we have 2 MB continously mapped, this should save one layer of TLB. Let's make it at least more likely by aligning the memory.
2021-06-11core: Make use of fastmemMarkus Wick6-8/+30
2021-06-11tests: Add tests for host memoryReinUsesLisp2-0/+184
2021-06-11common/host_memory: Add Linux implementationMarkus Wick1-10/+120
2021-06-11common/host_memory: Add interface and Windows implementationReinUsesLisp3-0/+384
2021-06-11kernel: Unconditionally set thread state when appropriateMorph2-23/+12
2021-06-11kernel: KLightConditionVariable: Update implementation to 12.xMorph2-14/+31
Updates the implementation of KLightConditionVariable to FW 12.x
2021-06-10Fix GCC undefined behavior sanitizer.Markus Wick3-1/+9
* Wrong alignment in u64 LOG_DEBUG -> memcpy. * Huge shift exponent in stride calculation for linear buffer, unused result -> skipped. * Large shift in buffer cache if word = 0, skip checking for set bits. Non of those were critical, so this should not change any behavior. At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
2021-06-10hle: service: sm: Remove redundant session reservation, etc.bunnei2-18/+13
- We were double-reserving, causing us to run out of sessions in Pokemon Sword & Shield.
2021-06-10hle: service: Increase arbitrary max sessions limit.bunnei1-4/+1
- Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
2021-06-10hle: kernel: KClientPort: Add an assert for session count.bunnei1-0/+3
- Prevents us from over decrementing num_sessions.
2021-06-10hle: service: sm: Fix GetService setup of session & port.bunnei2-5/+5
2021-06-10hle: service: Use correct size for ServerSessionCountMax.bunnei1-4/+6
2021-06-10hle: kernel: KServerSession: Fix client disconnected.bunnei3-9/+8
- Prevents a cloned session's handler from being overwritten by another disconnected session. - Fixes session handler nullptr asserts with Pokemon Sword & Shield.
2021-06-10kernel: svc: Add missing error check to CancelSynchronization.bunnei1-2/+2
- Avoids a potential crash if the handle is invalid, and also makes this code accurate to real kernel behavior.
2021-06-09hle: service: Increase arbitrary max sessions limit.bunnei1-1/+1
- Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
2021-06-09src/common/CMakeLists.txt: fix variable escapingliushuyu1-8/+9
2021-06-09common/fs/path_util: Remove [[nodiscard]] from function with void returnLioncash1-1/+1
We can't make use of the return value here, since we don't a return value to work with.
2021-06-09configure_ui: Add translation context for file-scope stringsLioncash1-13/+27
Allows for these strings to show up in the translation files.
2021-06-08hle: kernel: KServerSession: Work-around scenario where session is closed too early.bunnei1-7/+24
2021-06-08hle: kernel: hle_ipc: Ensure SessionRequestHandler is valid.bunnei3-5/+26
2021-06-08hle: kernel: Remove service thread manager and use weak_ptr.bunnei3-18/+8
- We no longer need to queue up service threads to be destroyed. - Fixes a race condition where a thread could be destroyed too early, which caused a crash in Pokemon Sword/Shield.
2021-06-08yuzu qt: Start games from context menulat9nq4-3/+23
This connects the BootGame function to the context menu. In addition, there is an option to boot without using the custom configuration.
2021-06-07Various suggestions by v1993 and lioncashClément Gallet2-11/+9
2021-06-07hle: kernel: KServerSession: Use ASSERT_MSG where appropriate.bunnei1-1/+1
2021-06-07hle: kernel: k_server_session: Return service thread by strong pointer.bunnei2-4/+4
2021-06-07hle: kernel: k_server_session: Ensure service thread is valid before dereference.bunnei1-1/+3
2021-06-07hle: kernel: hle_ipc: Use default destructor for SessionRequestManager.bunnei1-1/+1
2021-06-07hle: kernel: KAutoObjectWithListContainer: Use boost::instrusive::rbtree.bunnei11-22/+26
- Fixes some crashes introduced by our common intrusive red/black tree impl.
2021-06-06Add sdl2 audio description in the yuzu-cmd config fileClément Gallet1-1/+2
2021-06-06Add SDL2 audio backendClément Gallet4-0/+211
2021-06-06limitable_input_dialog: Implement character limiterKewlan3-5/+48
When using GetText() you can now choose what set of characters the user can't enter.
2021-06-05Avoid -Wshadow warningClément Gallet1-1/+1
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-06-05result: Add [[nodiscard]] specifiers where applicableLioncash1-20/+20
The result code classes are used quite extensively throughout both the kernel and service HLE code. We can mark these member functions as [[nodiscard]] to prevent a few logic bugs from slipping through.
2021-06-05hle: kernel: Refactor to allocate a ServiceThread per service handler.bunnei13-67/+75
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject. - This results in race conditions with N sessions queuing requests to the same service interface. - Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
2021-06-04yuzu-cmd: Fix OpenGL renderingClément Gallet2-12/+6
2021-06-04decoders: Break instead of continuelat9nq1-2/+2
continue causes a memory leak in A Hat in Time.
2021-06-04decoders: Avoid out-of-bounds accesslat9nq1-0/+8
This is not a real fix, so assert here and continue before crashing.
2021-06-04[game_list] Correct light theme loading (#6408)Maide1-5/+1
Correct light theme loading The setLayout call in game list instantiation will call resizing signals with default values in light theme, which was then being erroneously saved. setLayout doesn't seem to call resizing for any other theme, so I'm not sure why that happens.
2021-06-04yuzu-cmd: Add touch_from_button in config fileClément Gallet2-1/+50
2021-06-03cmake: General improvements to libusb linkinglat9nq1-2/+1
Delegates libusb external communication to externals/CMakeLists.txt Ensures an interface library `usb` for every pathway input_common just links to the `usb` library now externals/libusb/CMakeLists.txt sets variables to override SDL2's libusb finding Other minor cleanup
2021-06-03fsp-srv: Replace one last instance of RESULT_SUCCESSMorph1-1/+1
2021-06-03fspsrv: Implement DisableAutoSaveDataCreation (#6355)Chloe6-2/+25
- Used by Mii Edit
2021-06-03yuzu qt: Revert some usages of string_viewlat9nq7-18/+27
Causes a heap-use-after free reported by AddressSanitizer. This makes use of std::filesystem::path, but due to that we have to use their string() function which may not work for all characters.
2021-06-02game_list: Minor for loop optimizationsKewlan1-9/+6
There's no need to check the first and last rows since they'll always be the Favorites and AddDir rows. Also change the name of the clear_all variable for consistency.
2021-06-02Stop the columns resizing on NAND installKelebek12-34/+17
2021-06-02general: Replace RESULT_UNKNOWN with ResultUnknownMorph13-45/+45
Transition to PascalCase for result names.
2021-06-02general: Replace RESULT_SUCCESS with ResultSuccessMorph113-933/+930
Transition to PascalCase for result names.
2021-06-02common: fs: fs_util: Move PathToUTF8String to fs_utilMorph4-15/+14
2021-06-02common: fs: fs_util: Add more string conversion functionsMorph2-0/+33
2021-06-01yuzu qt: Use lambda and std::function for reset callbacklat9nq4-19/+17
Also makes use of std::move, and performs a clang-format cleanup. This addresses review comments. Co-authored-by: LC <mathew1800@gmail.com>
2021-06-01yuzu: Add settings reset button to general configurationlat9nq8-23/+111
Builds on german77's work to reset all settings back to their defaults. This include UISettings and Settings values structs, but does not affect save profiles, input profiles, and game directories. This works from a button input in configure_general. When activated, it calls a callback to close the whole configure dialog, then GMainWindow deletes the old configuration, both on disk and in memory, and reinitalizes a new one. It also resets a portion of the UI and calls the telemetry window prompt.
2021-06-01configuration: Initial work to reset all settingsfearlessTobi6-0/+33
This commit does not compile. Initial work to add and connect a Reset to Defaults button to the configure_general tab. Co-authored-by: german77 <juangerman-13@hotmail.com>
2021-06-01buffer_cache: Simplify uniform disabling logicameerj8-6/+29
2021-05-31common_funcs: Move R_ macros to result.hLioncash2-25/+25
These macros all interact with the result code type, so they should ideally be within this file as well, so all the common_funcs machinery doesn't need to be pulled in just to use them.
2021-05-30settings: Disable controller preview if controller is not activegerman773-2/+25
2021-05-30input_common: Analog button, use time based position instead of frequent updatesgerman773-73/+138
2021-05-29k_class_token: Use variable templates where applicableLioncash1-43/+36
Same behavior, less code.
2021-05-29video_core: gpu: WaitFence: Do not block threads during shutdown.bunnei2-1/+13
- Fixes a hang on shutdown when NVFlinger thread is waiting on a syncpoint that will never occur. - Commonly observed when stopping emulation in Super Mario Odyssey.
2021-05-29core/memory: Check our memory fallbacks for out-of-bound behavior.Markus Wick3-4/+46
This makes it by far harder to crash yuzu. Also implement the 48bit masking of AARCH64 while touching this code.
2021-05-29core/arm_interface: Improve the performance of memory fallbacks.Markus Wick2-29/+31
We just create one memory subsystem. This is a constant all the time. So there is no need to call the non-inlined parent.Memory() helper on every callback.
2021-05-29kernel: Add missing override specifiersLioncash15-53/+48
Over the course of the kernel refactoring a tiny bit of missing overrides slipped through review, so we can add these. While we're at it, we can remove redundant virtual keywords where applicable as well.
2021-05-29Fix two GCC 11 warnings: Unneeded copies.Markus Wick2-3/+3
std::move created an unneeded copy. iterating without reference also created copies.
2021-05-29externals: Update dynarmic.Markus Wick6-11/+11
The new version supports fastmem on a64.
2021-05-29k_thread: Move dereference after null check in Initialize()Lioncash1-5/+5
Prevents a -Wnonnull warning on GCC.
2021-05-29hle: kernel: KSlabHeap: Allow host or guest allocations.bunnei2-11/+191
- Use host allocations for kernel memory, as this is not properly emulated yet. - Use guest allocations for TLS, as this needs to be backed by DeviceMemory.
2021-05-28touchscreen: Make use of common point structLioncash2-10/+10
2021-05-28common: Extract point into a common structLioncash3-29/+65
This is generic enough that it can be moved into the Common class for reuse.
2021-05-28common/fs/file: Explicitly delete copy constructorsLioncash1-1/+4
Relocates them to the same place the move equivalents are at for consistent viewing.
2021-05-28common/fs/file: Devirtualize destructorLioncash1-1/+1
IOFile is a final class, so there's no need for a virtual destructor.
2021-05-28common/fs/file: Default initialize IOFile membersLioncash1-2/+2
Prevents a potential uninitialized read vector in the move constructor.
2021-05-28applets/swkbd: Make use of std::move where applicableMorph2-22/+19
Avoids redundant string copies
2021-05-28applets/swkbd: Only read the text check message on Failure/ConfirmMorph1-2/+7
Applications may leave this region of memory uninitialized when the text check result is not either Failure or Confirm. Attempting to read uninitialized memory may cause an exception within the UTF16 to UTF8 string converter. Fix this by only reading the text check message on Failure or Confirm.
2021-05-27video_core: rasterizer_cache: Use u16 for cached page count.bunnei2-9/+9
- Greatly reduces the risk of overflow, at the cost of doubling the size of this array.
2021-05-27core/arm_interface: Call SVC after end of dynarmic block.Markus Wick6-18/+42
So we can modify all of dynarmic states within SVC without ExceptionalExit. Especially as the ExceptionalExit hack is dropped on upstream dynarmic.
2021-05-27vulkan_memory_allocator: Allow textures to be allocated in host memoryReinUsesLisp2-31/+43
Allow Vulkan's allocator to use host memory when there's no more device local memory. This delays OOM, but it will eventually still happen.
2021-05-26cmake: Download Qt binaries on Linux if neededlat9nq1-2/+11
If the local version of Qt is older than the minimum version required by yuzu, download a pre-built binary package from yuzu-emu/ext-linux-bin and build yuzu with it, instead. This also requires linking yuzu to the correct libraries after building it, and copying over the required binaries when building yuzu. This sets the Qt requirement to 5.12, which is intentionally behind the versions used by our toolchains since they are not all updated yet to 5.15.
2021-05-26core/arm: Drop ChangeProcessorID.Markus Wick5-12/+0
This code was used to switch the CPU ID on thread switches. However since "hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.", the CPU ID is not a constant. This has been dead code since this rewrite, and dropped in dynarmic as well. So there is no need to keep it.
2021-05-26ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkServicegerman771-0/+141
2021-05-26yuzu qt: Restore const qualifierslat9nq2-23/+12
This addresses review comments. Co-authored-by: LC <mathew1800@gmail.com>
2021-05-26yuzu qt: Handle per-game configs for title id 0lat9nq8-22/+46
Currently with programs that have a 0 title id, yuzu loads the custom configuration 0000000000000000.ini for per-game configs. This is not ideal since many homebrews share this id. Instead for these programs, we load a config that is simply the file name and `.ini` appended to it.
2021-05-26common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph74-2173/+3789
* common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2021-05-25yuzu qt: Add an Apply button to configuration dialogslat9nq6-18/+57
Most of the code already exists to do this, but the Apply button itself was never added. This adds a button and boolean that tells yuzu to save the configuration after applying settings, even if close/Cancel is pressed on the dialog. Changes after applying will not be saved when Cancel is pressed, though.
2021-05-25kernel: process_capability: Add MapRegion capabilityMorph2-0/+12
- Used by nx-hbloader
2021-05-24zstd_compression: Make use of std::spanLioncash2-3/+4
Allows for the incoming data stream to be non-allocating.
2021-05-24lz4_compression: Make use of std::spanLioncash2-4/+4
Allows making the incoming data stream non-allocating.
2021-05-24hid: ApplyNpadSystemCommonPolicyChloe Marcec1-1/+10
We already do this specifically for homebrew, so we can keep it stubbed out for the time being
2021-05-24settings: Forbid docked mode on handheldgerman773-4/+24
2021-05-23input_common: Add dual joycon supportgerman772-60/+258
2021-05-23settings: Suppress duplicate label name warninggerman771-3/+3
2021-05-22applets/swkbd: Make use of QueuedConnection in returnPressed signalMorph1-15/+3
Some users have reported rare crashes when pressing the Enter key on the keyboard to confirm input in the normal software keyboard, particularly in Super Smash Bros. Ultimate while entering the name of a ruleset or controller layout. It is suspected that the QLineEdit::returnPressed signal is causing a race condition as confirming input through other means does not produce the crash. Since Qt::QueuedConnection posts an event to the event queue of the callee's thread instead of executing it directly on the caller's thread, this eliminates any potential race conditions from occurring in this scenario.
2021-05-21hle: kernel: service_thread: Take reference to KServerSession on service request.bunnei1-9/+5
2021-05-21hle: kernel: k_port: Use AcceptSession to ensure SessionList state is correct.bunnei1-1/+1
- Fixes a use-after-free, work-around until we fixup session/port management.
2021-05-21hle: kernel: Use host memory allocations for KSlabMemory.bunnei4-174/+20
- There are some issues with the current workaround, we will just use host memory until we have a complete kernel memory implementation.
2021-05-21Revert "WORKAROUND: Do not use slab heap while we track down issues with resource management."bunnei1-2/+2
This reverts commit f2c26443f85a3c3fd43137509368ba5c7ab80ee7.
2021-05-21hle: kernel: hle_ipc: Simplify incoming/outgoing move/copy/domain objects.bunnei3-62/+17
2021-05-21common: tree: Avoid a crash on nullptr dereference.bunnei1-0/+11
2021-05-21hle: kernel: Implement CloneCurrentObject and improve session management.bunnei13-99/+184
2021-05-21Revert "WORKAROUND: temp. disable session resource limits while we work out issues"bunnei4-11/+11
This reverts commit fc086f93b2165b5c210cb7dcd6c18ebe17f1fd7b.
2021-05-20configure_cpu: Simplify UpdateGrouplat9nq1-7/+4
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-19configuration_shared: Drop unused function and template anotherlat9nq2-52/+7
Drops an unused variant of ApplyPerGameSetting, and turns the QComboBox variants of SetPerGameSetting into a template. Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-19applets/swkbd: Send the correct text string on TextCheck::ConfirmMorph1-8/+8
Previously the text string for the inline software keyboard was being sent instead of the normal software keyboard, leading to empty text being sent all the time.
2021-05-18KTransferMemory: Return size instead of size * PageSize in GetSize()Morph1-1/+1
size is already the size in bytes. We do not need to multiply it by the page size
2021-05-18hid/gesture: Factor out last gesture retrieval into its own functionLioncash2-14/+23
Deduplicates a commonly repeated expression.
2021-05-18hid/gesture: Ensure all ID arrays are initializedLioncash1-4/+4
Makes for deterministic initial state.
2021-05-18hid/gesture: Make Point a templateLioncash2-38/+46
We can now use this in a generic context to reuse it with the finger position.
2021-05-18hid/gesture: Replace x,y members of GestureState with a PointLioncash2-6/+4
Simplifies assignments.
2021-05-18hid/gesture: Add default comparators to PointLioncash2-10/+7
Simplifies some comparisons.
2021-05-18hid/gesture: Rename Points to PointLioncash1-5/+5
This only represents a single point
2021-05-17general: Demote custom_rtc to regular settinglat9nq6-58/+30
2021-05-17CMakeLists: Enforce C4715 on MSVCMorph1-0/+1
This is similar to -Werror=return-type
2021-05-17configure_debug: FIx duplicate labelsMorph1-5/+5
Duplicate labels were unintentionally introduced due to copy-paste. This silences the compilation warning produced by the presence of these duplicates.
2021-05-17yuzu/main: Fix version info in logging and about dialogMorph3-14/+17
2021-05-16buffer_cache: Ensure null buffers cannot take the fast uniform bind pathameerj1-1/+4
Fixes a crash in New Pokemon Snap
2021-05-16main: Prevent installing base titles into NANDMorph4-3/+28
Many users have been installing their base titles into NAND instead of adding them into the games list. This prevents users from installing any base titles and warns the user about the action.
2021-05-16hle_ipc: unsigned -> u32Morph1-7/+7
This is more concise and consistent with the rest of the codebase.
2021-05-16hle_ipc: Add a getter for PIDMorph2-2/+7
2021-05-16core: Make variable shadowing a compile-time errorLioncash99-279/+304
Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
2021-05-16configuration: Add CPU tab to game propertieslat9nq13-88/+181
Allows setting CPU accuracy to Accurate or Unsafe per-game, as well as the accuracy options for Unsafe. Debug is not allowed here as a per-game CPU accuracy.
2021-05-16nifm, ssl: Fix incorrect response sizesMorph2-2/+2
2021-05-16configuration: Simplify applying per-game settingslat9nq6-112/+69
Originally, every time we add a per-game setting, we'd have to guard for it when setting it on the global config, and use a specific function to do it for the per-game config. This moves the global check into the ApplyPerGameSetting function so that we can use it for changing both the global and per-game states. Less work for the programmer.
2021-05-16configuration_shared: Add some commentslat9nq1-6/+14
Monke brain can't remember what all of these does a year later.
2021-05-16general: Make CPU accuracy and related a Settings::Settinglat9nq7-41/+47
Required to make CPU accuracy and unsafe settings available to use as a per-game setting.
2021-05-16perf_stats: Rework FPS counter to be more accurateameerj10-14/+26
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case. This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics. The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values. The status bar update frequency was also changed from 2 seconds to 500ms.
2021-05-15main: Add title's version to window name on EA/mainlineameerj1-11/+6
Fixes the missing title version number on EA/mainline builds which override the title bar string.
2021-05-15input_common: Implement SDL motiongerman775-3/+167
2021-05-15input_common: Fix crash when controller disconnectsgerman771-1/+3
2021-05-15input_common: Rewrite sdl analog mappinggerman771-25/+25
2021-05-13input_common: Sanitize motion datagerman771-0/+23
2021-05-13ssl: Stub Import(Client/Server)PkiMorph1-2/+40
- Used in JUMP FORCE Deluxe Edition
2021-05-12common: tree: Avoid a nullptr dereference.bunnei1-1/+1
2021-05-11hle: kernel: hle_ipc: Fix outgoing IPC response size calculation.bunnei3-1/+15
2021-05-11WORKAROUND: temp. disable session resource limits while we work out issuesbunnei4-11/+11
2021-05-11WORKAROUND: Do not use slab heap while we track down issues with resource management.bunnei1-2/+2
2021-05-11audrenbunnei2-25/+16
2021-05-11core: hle: ipc_helpers: Fix cast on raw_data_size calculation.bunnei1-1/+1
2021-05-11hle: service: sm: Add TIPC support.bunnei2-41/+66
- Fixes our error checking of names as well.
2021-05-11hle: kernel: hle_ipc: Improve IPC code and add initial support for TIPC.bunnei2-81/+57
- Fixes our move handles implementation to actually move objects. - Simplifies the traditional IPC path.
2021-05-11hle: service: sm: GetService: Reserve session resource when we create a KSession.bunnei1-0/+7
2021-05-11hle: service: Add support for dispatching TIPC requests.bunnei2-1/+52
2021-05-11hle: service: Implement IPC::CommandType::Close.bunnei3-11/+15
- This was not actually closing sessions before.
2021-05-11hle: service: sm: Use RegisterNamedService to register the service.bunnei1-1/+1
2021-05-11hle: service: sm: Improve Initialize implementation.bunnei2-0/+3
2021-05-11hle: kernel: svc: Update ConnectToNamedPort to use new CreateNamedServicePort interface.bunnei1-4/+3
2021-05-11hle: kernel: Implement named service ports using service interface factory.bunnei4-22/+30
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
2021-05-11hle: kernel: KSession: Improve implementation of CloneCurrentObject.bunnei1-2/+10
2021-05-11hle: service: sm: Increase point buffer size.bunnei1-1/+1
2021-05-11hle: ipc_helpers: Reserve session resource when we create a KSession.bunnei1-0/+5
2021-05-11hle: kernel: KClientPort: Cleanup comment format.bunnei1-1/+1
2021-05-11hle: ipc: Add declarations for TIPC.bunnei1-1/+16
2021-05-11hle: kernel: Further cleanup and add TIPC helpers.bunnei2-4/+12
2021-05-11hle: ipc_helpers: Update IPC response generation for TIPC.bunnei2-19/+39
2021-05-10configure_ui: Call RequestGameListUpdate when toggling "Show Add-Ons Column"Kewlan1-0/+1
2021-05-10parent_of_member: Make sign conversion explicit in OffsetOfImpl()Lioncash1-1/+2
Previously these conversions were implicit and causing quite a few warnings on clang.
2021-05-09kernel: Delete unused filesgerman772-151/+0
2021-05-08kernel: Eliminate variable shadowingLioncash40-140/+138
Now that the large kernel refactor is merged, we can eliminate the remaining variable shadowing cases.
2021-05-08texture_cache: Handle out of bound texture blitsameerj8-61/+99
Some games interleave a texture blit using regions which are out-of-bounds. This addresses the interleaving to avoid oob reads from the src texture.
2021-05-07ldr: Simplify memory copy within LoadNro()Lioncash1-5/+3
We can use the dedicated memory function for performing copies instead of reading into a temporary buffer and then immediately writing it back out to memory. Eliminates a bit of heap memory churn.
2021-05-06nvflinger: Create layers when they are queried but not foundameerj2-5/+35
Fixes Shantae softlock on boot.
2021-05-06hle: kernel: KPageTable: CanContain should not be constexpr.bunnei2-2/+2
2021-05-06hle: kernel: Move slab resource counts to Kernel.bunnei4-33/+52
2021-05-06fixup! hle: kernel: Migrate KSharedMemory to KAutoObject.bunnei1-2/+2
2021-05-06fixup! hle: kernel: Migrate more of KThread to KAutoObject.bunnei1-1/+1
2021-05-06fixup! common: bit_util: Add BIT macro.bunnei1-2/+0
2021-05-06fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created.bunnei1-2/+0
2021-05-06fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created.bunnei1-2/+0
2021-05-06kernel: svc: Remove unused RetrieveResourceLimitValue function.bunnei1-32/+0
2021-05-06hle: kernel: Fix un/sign mismatch errors with NUM_CPU_CORES.bunnei1-3/+3
2021-05-06fixup! hle: kernel: Add initial impl. of slab setup.bunnei1-6/+2
2021-05-06fixup! hle: kernel: Migrate to KHandleTable.bunnei1-0/+3
2021-05-06fixup! hle: kernel: Migrate more of KThread to KAutoObject.bunnei1-7/+0
2021-05-06common: parent_of_member: Fix build for OffsetOf().bunnei1-4/+4
2021-05-06fixup! common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC.bunnei1-5/+0
2021-05-06fixup! hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.bunnei2-2/+2
2021-05-06fixup! hle: kernel: Migrate to KHandleTable.bunnei1-1/+1
2021-05-06fixup! hle: kernel: Add initial impl. of KLinkedList.bunnei1-12/+12
2021-05-06fixup! hle: kernel: Migrate to KHandleTable.bunnei1-1/+1
2021-05-06fixup! hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.bunnei1-1/+1
2021-05-06fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei3-22/+28
2021-05-06fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei1-1/+1
2021-05-06fixup! hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.bunnei1-1/+1
2021-05-06fixup! hle: kernel: Migrate to KHandleTable.bunnei1-60/+58
2021-05-06fixup! hle: kernel: Add initial impl. of KAutoObjectWithListContainer.bunnei1-11/+9
2021-05-06fixup! hle: kernel: Add initial impl. of KAutoObjectWithListContainer.bunnei1-9/+2
2021-05-06fixup! hle: kernel: Add initial impl. of KAutoObject.bunnei1-46/+46
2021-05-06fixup! hle: kernel: Add initial impl. of KAutoObject.bunnei1-1/+1
2021-05-06fixup! hle: kernel: Add initial impl. of slab setup.bunnei1-8/+8
2021-05-06common: Rename NON_COPYABLE/NON_MOVABLE with YUZU_ prefix.bunnei5-11/+11
2021-05-06fixup! hle: kernel: Rename Process to KProcess.bunnei1-1/+1
2021-05-06fixup! hle: kernel: Migrate to KHandleTable.bunnei1-1/+1
2021-05-06fixup! hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory.bunnei1-3/+3
2021-05-06hle: kernel: svc: ConnectToNamedPort: Use KHandleTable::Reserve.bunnei1-3/+8
2021-05-06hle: kernel: Migrate to KHandleTable.bunnei22-381/+503
2021-05-06hle: kernel: KClassToken: Ensure class tokens are correct.bunnei1-1/+127
2021-05-06hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory.bunnei10-95/+210
2021-05-06hle: kernel: Rename Process to KProcess.bunnei83-247/+249
2021-05-06hle: kernel: Remove deprecated Object class.bunnei39-423/+34
2021-05-06hle: kernel: Do not shutdown twice on emulator close.bunnei1-3/+1
2021-05-06hle: kernel: Cleanup shutdown of persistent kernel objects.bunnei1-14/+12
2021-05-06hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.bunnei22-166/+444
2021-05-06hle: kernel: Migrate KServerPort to KAutoObject.bunnei8-52/+67
2021-05-06hle: kernel: Migrate KClientPort to KAutoObject.bunnei18-63/+92
2021-05-06hle: kernel: HandleTable: Remove deprecated APIs.bunnei7-111/+28
2021-05-06hle: kernel: Migrate KResourceLimit to KAutoObject.bunnei13-122/+197
2021-05-06hle: kernel: svc: Migrate WaitSynchronization.bunnei2-47/+78
2021-05-06hle: kernel: svc: Use new handle table API for Process.bunnei2-16/+17
2021-05-06hle: kernel: Migrate KTransferMemory to KAutoObject.bunnei12-68/+209
2021-05-06hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei31-356/+412
2021-05-06hle: kernel: svc: Migrate GetThreadContext, GetThreadCoreMask.bunnei1-2/+59
2021-05-06hle: kernel: svc: Migrate GetProcessId, CancelSynchronization, SetThreadActivity.bunnei1-13/+67
2021-05-06hle: kernel: KThread: Remove incorrect resource release.bunnei1-2/+1
2021-05-06hle: kernel: svc_results: Update naming..bunnei8-42/+43
2021-05-06hle: kernel: KThread: Add missing resource hint release.bunnei1-1/+1
2021-05-06hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.bunnei35-200/+215
2021-05-06hle: ipc_helpers: Add methods for copy/move references.bunnei1-2/+24
2021-05-06hle: kernel: Move slab heaps to their own container.bunnei2-10/+16
2021-05-06hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps.bunnei11-59/+53
2021-05-06hle: kernel: Move slab heap management to KernelCore.bunnei7-64/+106
2021-05-06hle: kernel: Ensure all kernel objects with KAutoObject are properly created.bunnei20-0/+55
2021-05-06hle: kernel: Use unique_ptr for suspend and dummy threads.bunnei1-8/+8
2021-05-06hle: kernel: Migrate KEvent to KAutoObject.bunnei37-266/+269
2021-05-06hle: kernel: Migrate KSharedMemory to KAutoObject.bunnei16-114/+128
2021-05-06hle: kernel: Migrate KProcess to KAutoObject.bunnei14-58/+80
2021-05-06hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.bunnei28-59/+65
2021-05-06hle: kernel: Migrate more of KThread to KAutoObject.bunnei18-294/+451
2021-05-06hle: kernel: svc: Migrate GetThreadPriority, StartThread, and ExitThread.bunnei1-21/+12
2021-05-06hle: kernel: svc: Migrate CreateThread.bunnei1-14/+21
2021-05-06hle: kernel: Migrate idle threads.bunnei2-13/+9
2021-05-06hle: kernel: Migrate KThread to KAutoObject.bunnei2-109/+91
2021-05-06hle: kernel: Add initial impl. of slab setup.bunnei3-0/+227
2021-05-06hle: kernel: Refactor out various KThread std::shared_ptr usage.bunnei10-58/+30
2021-05-06core: Defer CoreTiming initialization.bunnei1-1/+1
2021-05-06core: memory: Add a work-around to allocate and access kernel memory regions by vaddr.bunnei3-1/+46
2021-05-06common: common_funcs: Add Size helper function.bunnei1-0/+15
2021-05-06hle: kernel: Add initial impl. of KLinkedList.bunnei2-0/+234
2021-05-06common: bit_util: Add BIT macro.bunnei1-0/+2
2021-05-06hle: kernel: Add initial impl. of KSlabAllocated.bunnei2-0/+153
2021-05-06hle: kernel: Add initial impl. of KAutoObjectWithListContainer.bunnei3-0/+109
2021-05-06hle: kernel: Add initial impl. of KAutoObject.bunnei3-0/+306
2021-05-06common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC.bunnei1-0/+4
2021-05-06common: common_funcs: Add helper macros for non-copyable and non-moveable.bunnei1-0/+8
- Useful for scenarios where we do not want to inherit from NonCopyable.
2021-05-06Update src/core/hle/service/nvdrv/interface.cppbunnei1-1/+1
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-05hid: Improve hardware accuracy of gesturesgerman772-76/+340
2021-05-05service: Remove unused class variablesLioncash3-7/+4
Prevents some warnings from occurring.
2021-05-04service: Resolve cases of member field shadowingLioncash60-117/+119
Now all that remains is for kernel code to be 'shadow-free' and then -Wshadow can be turned into an error.
2021-05-03core: Resolve misc cases of variable shadowingLioncash10-25/+27
Resolves shadowing warnings that aren't in a particularly large subsection of core. Brings us closer to turning -Wshadow into an error. All that remains now is for cases in the kernel (left untouched for now since a big change by bunnei is pending), and a few left over in the service code (will be tackled next).
2021-05-03nvdrv: /dev/nvhost-prof-gpu for productionChloe Marcec1-3/+14
While we're at it, we can fix the is_initialized error code. This fixes the crashes on Shante
2021-05-03hid: Fix touch not initializing properly if disabledgerman772-2/+10
2021-05-03input_common: Release mouse buttons on out of focusgerman773-1/+18
2021-05-02file_sys: Resolve cases of variable shadowingLioncash21-114/+132
Brings us closer to enabling -Wshadow as an error in the core code.
2021-05-01service: filesystem: Return proper error codes for CreateFileMorph2-2/+8
This improves the accuracy of CreateFile by returning the correct error codes on certain conditions (parent directory does not exist, path already exists). This fixes saving and the loading of existing saves in New Pokemon Snap
2021-05-01Disable touch if setting is not enabledgerman772-2/+2
2021-04-30game_list: Fix dir move up/down expand stateKewlan1-2/+4
2021-04-30game_list: Update filter results when removing directoriesKewlan2-5/+6
2021-04-29yuzu: config: Silence narrowing conversion warning on MSVCMorph1-2/+1
2021-04-28applets/web: Fix a use-after-free when passing in the URL stringMorph6-25/+28
The URL string was being deleted before being used, leading to a use-after-free occurring when it is used afterwards. Fix this by taking the string by const ref to extend its lifetime, ensuring it doesn't get deleted before use.
2021-04-28yuzu: main: Silence type conversion warning on MSVCMorph1-1/+1
2021-04-27loader: Resolve instances of variable shadowingLioncash19-169/+257
Eliminates variable shadowing cases across all the loaders to bring us closer to enabling variable shadowing as an error in core.
2021-04-27address commentsgerman772-5/+5
2021-04-27input_common: Reset GC sticks center by measuring multiple packetsgerman772-2/+7
2021-04-26gl_device: Intel: Disable texture view formats workaround on mesaA-w-x1-1/+1
2021-04-26service: Eliminate cases of member shadowingLioncash15-76/+81
Resolves a few localized instances of member variable shadowing. Brings us a little closer to turning shadowing warnings into errors.
2021-04-25config: Add new keyboard bindingsMorph1-9/+10
Changes the keyboard bindings to be based on RPCS3's tried and true keyboard bindings.
2021-04-25vk_texture_cache: Swap R and B channels of color flipped formatameerj1-1/+24
Swaps the Red and Blue channels of the A1B5G5R5_UNORM texture format, which was being incorrectly rendered.
2021-04-25nvhost_vic: Fix device closureameerj4-15/+11
Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation. Also cleans up some of the surrounding code.
2021-04-24applets/swkbd: Fix software keyboard button hint scalingIts-Rei1-12/+6
Fixes the scaling of the button hints using background images. Now they scale like the rest of the elements.
2021-04-24glue: Add ectx:aw placeholdergerman774-0/+49
2021-04-24hid: Implement SevenSixAxis and ConsoleSixAxisSensorgerman7710-17/+220
2021-04-24ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabledMorph2-1/+10
- Used by Pixel Game Maker Series Werewolf Princess Kaguya
2021-04-23program_metadata: Set a default resource size when a NPDM is not presentMorph3-4/+8
Sets a default size of 0x1FE00000 bytes (510 MiB) for the system_resource_size when a NPDM is not present.
2021-04-23emu_window: Return pair from ClipToTouchScreen() instead of tupleLioncash2-5/+8
This is only a 2-tuple, so it can be converted over to the std::pair class.
2021-04-23emu_window: unsigned -> u32Lioncash4-23/+23
This is more concise and consistent with the rest of the codebase.
2021-04-23aes_util: Make use of std::spanLioncash2-9/+5
Allows us to simplify the interface quite a bit as it will handle contiguous sequences for us.
2021-04-23acc/lbl: Remove unused variablesLioncash2-6/+0
2021-04-23lm: Make use of insert_or_assign() in Log()Lioncash1-1/+1
Avoids unnecessary default construction of an entry in cases where no entry exists before overwriting the created entry.
2021-04-23lm: Prevent redundant map lookups in Log()Lioncash1-4/+5
We can perform the lookup and then do the contains check by checking the end iterator. The benefit of this is that if we *do* find an entry, then we aren't hashing into the map again to find it. We can also get rid of an unused std::vector temporary while we're at it.
2021-04-23lm: Resolve -Wextra-semi warningLioncash1-1/+1
Resolves a trivial warning with clang.
2021-04-23program_metadata: Explicitly specify copy/move functionsLioncash1-0/+6
The generation of the copy assignment operators are deprecated on being generated when a user-provided destructor is present. We can explicitly specify that we desire this behavior to keep the class forward compatible with future standards.
2021-04-23yuzu_cmd: Remove unused resource.hameerj2-17/+0
2021-04-22service: hid: Get transfer memory for InitializeSevenSixAxisSensorMorph1-1/+38
2021-04-20log/backend: Use in-class initializer for FileBackendLioncash2-6/+8
We can also avoid redundant constructions of the same string repeatedly.
2021-04-20log/backend: Make use of erase_ifLioncash1-4/+4
Same behavior, but less verbose.
2021-04-19texture_cache/util: Fix src being used instead of dst within DeduceBlitImagesLioncash1-1/+1
This line can only ever be reached if src is null, so dereferencing it here is a logic bug that slipped through. Instead, we dereference dst instead which is guaranteed to be valid.
2021-04-19general: Write buffers before pushing raw argumentsMorph3-5/+12
For consistency with the rest of the service implementations
2021-04-19arp: Use type alias for issue functionLioncash1-4/+4
Reduces some verbosity and centralizes the function details in one spot.
2021-04-19arp: Prevent uninitialized read of launch member variableLioncash1-1/+1
If anything happened to call arp functions in the wrong order and called IRegistrar's Issue function before SetApplicationLaunchProperty, we'd read from an uninitialized ApplicationLaunchProperty instance. Instead, we can always initialize it so if this does happen, then the outcome of doing such a thing is at least consistently reproducible.
2021-04-19npad: Remove duplicated class member variableLioncash2-2/+1
ControllerBase already has a System reference that can be accessed from this class, so we can get rid of this to make the class layout a little more straightforward.
2021-04-19time: Write buffer before pushing RESULT_SUCCESS in GetClockSnapshotMorph1-1/+2
2021-04-19time: Fix GetClockSnapshotFromSystemClockContextMorph1-2/+3
This removes an incorrect alignment usage and corrects the positions of the popped parameters. - Fixes Super Kirby Clash crashing on boot
2021-04-18general: Ignore implicit-fallthrough for SDL.hlat9nq5-0/+47
SDL 2.0.14 introduces an incompatibility with Clang, causing it to trigger -Wimplicit-fallthrough even though it is marked. Ignore it for now, with a comment mentioning why this is needed.
2021-04-18cmake: Use SDL 2.0.14 and fix CMake scope issuelat9nq1-1/+1
Forces using SDL 2.0.14. Upgrades the SDL external to that version. Adds a message when switching to the external. Fixes an error where input_common only links to SDL when SDL2_FOUND is set, but externals/CMakeLists cannot set that variable to the required scope. Switch to using ENABLE_SDL2, which we can use since we now include the SDL source.
2021-04-17applets: Send focus state change message on applet state changeMorph10-22/+56
Fixes the softlock after the controller applet exits in Mario Kart 8 Deluxe.
2021-04-17applets: Make the applet mode a protected property of AppletMorph14-22/+20
2021-04-16Address issuesChloe Marcec1-3/+2
2021-04-15applets/swkbd: Implement the Qt Software Keyboard frontendMorph6-14/+5518
The Qt Software Keyboard frontend attempts to mimic the software keyboard rendered by the Nintendo Switch. This frontend implements multiple keyboard types, such as the normal software keyboard, the numeric pad software keyboard and the inline software keyboard. Keyboard and controller input is also supported in this frontend. Keyboard input is handled as native keyboard input, and so the on-screen keyboard cannot be navigated with the keyboard arrow keys as the arrow keys are used to move the text cursor. Controller input is translated into mouse hover movements on the onscreen keyboard or their respective button actions (B for backspace, A for entering the selected button, L/R for moving the text cursor, etc). The text check dialogs can also be confirmed with controller input through the use of the OverlayDialog Massive thanks to Rei for creating all the UI for the various keyboards and OverlayDialog. This would not have been possible without his excellent work. Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15error: Make the error code as the title text of the OverlayDialogMorph4-15/+17
Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15overlay_dialog: Add an overlay text dialog that accepts controller inputMorph5-1/+768
An OverlayDialog is an interactive dialog that accepts controller input (while a game is running) This dialog attempts to replicate the look and feel of the Nintendo Switch's overlay dialogs and provide some extra features such as embedding HTML/Rich Text content in a QTextBrowser. The OverlayDialog provides 2 modes: one to embed regular text into a QLabel and another to embed HTML/Rich Text content into a QTextBrowser. Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15main: Move meta type registration into its own functionMorph2-9/+65
Moves the existing meta type registration into its own function and adds registration of common integral, floating point and string types. This function is also now called in the constructor of the GMainWindow instead of on starting a game.
2021-04-15input_interpreter: Fix button hold being interpreted incorrectly on initMorph2-1/+17
We reset all the button states to 0 except the first index (which has all the buttons as pressed) to prevent a button hold being interpreted as a button that was pressed once on the first poll.
2021-04-15applets/swkbd: Implement the Default Software Keyboard frontendMorph2-2/+236
2021-04-15applets/swkbd: Implement the Normal and Inline Software Keyboard AppletMorph4-13/+1488
2021-04-15ILibraryAppletCreator: Implement CreateHandleStorageMorph2-6/+64
Used by Monster Hunter Generations Ultimate
2021-04-15hle_ipc: Add helper functions to get copy/move handlesMorph2-2/+16
2021-04-15ILibraryAppletAccessor: Demote from ERROR to DEBUG for null storage logsMorph1-2/+2
Avoids unnecessary console spam when the inline software keyboard is used.
2021-04-15applets: Pass in the LibraryAppletMode each applet's constructorMorph13-33/+58
2021-04-15applets: Remove the previous software keyboard applet implementationMorph8-492/+14
2021-04-15game_list: Mark games as favorite to make them appear at the top.Kewlan5-5/+144
Icons are from Icons8.
2021-04-15log/backend: Correct order of const in copy constructorLioncash1-2/+5
Follows our predominant coding style. Also explicitly specifies the move constructor/assignment operator as well.
2021-04-15common/log: Move Log namespace into the Common namespaceLioncash11-43/+53
Forgot to move this over when I moved the rest of the source files with lacking namespaces over.
2021-04-15common: Move settings to common from core.bunnei116-146/+144
- Removes a dependency on core and input_common from common.
2021-04-15core: settings: Add setting for debug assertions and disable by default.bunnei7-2/+28
- This is a developer-only setting and no longer needs to be enabled by default. - Also adds "use_auto_stub" setting to SDL frontend while we are here. - Supersedes #1340.
2021-04-14k_resource_limit: Minor cleanup of member variables/headersameerj4-21/+13
2021-04-13applets/controller: Hook up the "Motion" button functionalityMorph2-0/+19
I forgot to hook this up during the development of the controller applet, this PR amends that.
2021-04-13nvidia_flags: Add missing header guardLioncash1-0/+2
Prevents potential inclusion compilation errors.
2021-04-12kernel/process: Replace process resource limit instance with the kernel's resource limitameerj2-38/+27
This commit addresses the inaccurate behavior of kernel processes creating their own resource limit, rather than utilizing the kernel's system-wide resource limit instance.
2021-04-12k_thread: Remove [[nodiscard]] attribute from ClearWaitCancelled()Lioncash1-1/+1
This function has a void return value, so this attribute doesn't apply to it.
2021-04-12engine_interface: Add missing virtual destructorLioncash4-4/+5
Eliminates a potential bug vector related to inheritance. Plus, we should generally be specifying the destructor as virtual within purely virtual interfaces to begin with.
2021-04-12vk_master_semaphore: Deduplicate atomic access within IsFree()Lioncash1-1/+1
We can just reuse the already existing KnownGpuTick() to deduplicate the access.
2021-04-12vk_master_semaphore: Add missing const qualifier for IsFree()Lioncash1-1/+1
This member function doesn't modify class state.
2021-04-12vk_texture_cache: Make use of Common::BitCast where applicableLioncash1-5/+6
Also clarify the TODO comment a little more on the lacking implementations for std::bit_cast.
2021-04-12texure_cache/util: Resolve implicit sign conversions with std::reduceLioncash2-11/+15
Amends implicit sign conversions occurring with usages of std::reduce and also relocates it to its own utility function to reduce verbosity a little bit.
2021-04-12query_cache: Make use of std::erase_ifLioncash1-5/+4
Same behavior, but much more straightforward to read.
2021-04-11vk_buffer_cache: Fix offset for NULL vertex buffersJoshua Ashton1-1/+1
The Vulkan spec states: If an element of pBuffers is VK_NULL_HANDLE, then the corresponding element of pOffsets must be zero. https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBindVertexBuffers2EXT.html#VUID-vkCmdBindVertexBuffers2EXT-pBuffers-04112
2021-04-11vulkan_device: Enable EXT_robustness2 featuresJoshua Ashton1-0/+9
When this was being made mandatory, these enablement of these features was removed, but this is still needed. Fixes: 757fd1e91716 ("vulkan_device: Require VK_EXT_robustness2")
2021-04-11renderer_vulkan: Check return value of AcquireNextImageJoshua Ashton3-5/+10
We can get into a really bad state by ignoring this leading to device loss and using incorrect resources.
2021-04-09ns: Update to 12.xMorph1-3/+38
2021-04-09aoc_u: Update to 12.xMorph1-0/+2
2021-04-09nim: Update to 12.xMorph1-44/+55
2021-04-09npns: Update to 12.xMorph1-0/+3
2021-04-09bgtc: Update to 12.x and implement OpenTaskServiceMorph4-1/+36
2021-04-09vi: Update to 12.xMorph1-0/+8
2021-04-09erpt: Update to 12.xMorph1-1/+6
2021-04-09btm: Update to 12.xMorph1-0/+1
2021-04-09btdrv: Update to 12.xMorph1-0/+19
2021-04-09wlan: Update to 12.xgerman771-0/+7
2021-04-09usb: Use proper namesgerman771-21/+21
2021-04-09ITimeZoneService: Update to 12.xgerman771-0/+1
2021-04-09spl: Update to 12.xgerman771-0/+3
2021-04-09sfdnsres: Use proper namesgerman771-2/+2
2021-04-09nsd: Update to 12.xgerman771-0/+1
2021-04-09ethc: Update to 12.xgerman771-0/+1
2021-04-09sm: Use proper names, update to 12.xgerman771-4/+5
2021-04-09set_sys: Update to 12.xgerman771-0/+6
2021-04-09pctl_module: Update to 12.xgerman771-0/+3
2021-04-09pcie: Use proper namesgerman771-1/+1
2021-04-09olsc: Update to 12.xgerman771-0/+1
2021-04-09pl_u: Update to 12.xgerman771-0/+4
2021-04-09ldr: Use proper namesgerman771-16/+16
2021-04-09arp: Use proper names, update to 12.xgerman772-3/+10
2021-04-09caps_u: Update to 12.xgerman771-0/+1
2021-04-09caps_a: Update to 12.xgerman771-0/+1
2021-04-09bpc: Use proper namesgerman771-2/+2
2021-04-09bcat_module: Update to 12.xgerman771-0/+2
2021-04-09codecctl: Use proper namesgerman771-13/+13
2021-04-09audren_u: Use proper namesgerman772-4/+4
2021-04-09audren_a: Use proper namesgerman771-6/+6
2021-04-09audrec_u: Use proper names, update to 12.xgerman771-3/+4
2021-04-09audrec_a: Use proper namesgerman771-2/+2
2021-04-09audout_u: Use proper namesgerman771-3/+3
2021-04-09audout_a: Use proper namesgerman771-6/+6
2021-04-09audin_u: Use proper namesgerman771-7/+7
2021-04-09audin_a: Use proper namesgerman771-4/+4
2021-04-08externals: Search for shared opus installation.Markus Wick1-1/+1
We had used conan for opus before, but there was a bug in the AVX detection. However we still had the Findopus.cmake file within the repository, but not used. This patch reenables the Findopus helper and prefer the system wide installation of opus.
2021-04-08service: time: Setup the network clock with the local clock contextMorph6-21/+38
Setting the network time allows some time based events using the network clock to not reset.
2021-04-08service: hid: Stub SetAnalogStickUseCenterClampMorph4-1/+29
- Used by eBASEBALLパワフルプロ野球2020
2021-04-08service: time: Fix CalculateStandardUserSystemClockDifferenceByUserMorph1-3/+8
CalculateStandardUserSystemClockDifferenceByUser passes in the ClockSnapshots through 2 input buffers and not as raw arguments. Fix this by reading the 2 input buffers instead of popping raw arguments.
2021-04-07video_core: Use a CV for blocking commands.Markus Wick2-23/+31
There is no need for a busy loop here. Let's just use a condition variable to save some power.
2021-04-07video_core/gpu_thread: Keep the write lock for allocating the fence.Markus Wick2-1/+4
Else the fence might get submited out-of-order into the queue, which makes testing them pointless. Overhead should be tiny as the mutex is just moved from the queue to the writing code.
2021-04-07video_core/gpu_thread: Implement a ShutDown method.Markus Wick5-15/+28
This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone. This should fix a race condition while removing the other subsystems while the GPU is still active.
2021-04-07common/threadsafe_queue: Provide Wait() method.Markus Wick2-3/+10
It shall block until there is something to consume in the queue. And use it for the GPU emulation instead of the spin loop. This is only in booting the emulator, however in BOTW this is the case for about 1 second.
2021-04-07hwopus: Update to 12.xMorph1-0/+4
2021-04-07IFile: Update to 12.xMorph1-3/+7
2021-04-07fsp-srv: Update to 12.xMorph2-3/+8
2021-04-07dauth_o: Update to 11.xMorph1-6/+11
2021-04-07acc_u1: Update to 12.xMorph1-13/+15
2021-04-07acc_su: Update to 12.xMorph1-17/+19
2021-04-07hid: Update service function tablesgerman772-0/+85
2021-04-07ISelfController: Update to 11.xMorph1-0/+1
2021-04-07IApplicationFunctions: Update to 11.xMorph1-0/+6
2021-04-07IDebugFunctions: Update to 12.xMorph1-0/+2
2021-04-07ICommonStateGetter: Update to 12.xMorph1-0/+9
2021-04-07IGlobalStateController: Update to 12.xMorph1-0/+1
2021-04-07IHomeMenuFunctions: Update to 12.xMorph1-0/+3
2021-04-07Amend bizarre clang-format suggestionsLioncash3-5/+5
2021-04-07k_scoped_scheduler_lock_and_sleep: Mark class as [[nodiscard]]Lioncash1-1/+1
Prevents logic bugs from slipping through.
2021-04-07k_scoped_lock: delete copy and move assignment operatorsLioncash1-2/+5
If we delete the copy and move constructor, we should also be deleting the copy and move assignment operators (and even if this were intended, it would be pretty odd to not document why it's done this way).
2021-04-07k_scoped_lock: Mark class as [[nodiscard]]Lioncash1-1/+1
Prevents logic bugs of the kind described in the previous commit from slipping through.
2021-04-07k_scheduler: Mark KScopedSchedulerLock as [[nodiscard]]Lioncash1-1/+1
Prevents logic bugs like: KScopedSchedulerLock{kernel}; instead of: KScopedSchedulerLock lk{kernel}; from slipping through.
2021-04-07kernel: Increase event and session countsameerj1-2/+2
12.x increased the number of available sessions and event resource counts
2021-04-07svc: Expand SVC tablesLioncash1-0/+132
12.x expanded the range of SVC entries from 0x7F to 0xBF (with all new entries being unused), so we can expand it to also match.
2021-04-07process_capability: Handle extended SVC rangeLioncash2-6/+1
12.x extended the range of SVC IDs, so we need to expand the range of bits that need to be tested. The upside of this is that we can eliminate a range check, given the whole range is used.
2021-04-06config: Default to exclusive fullscreen mode on platforms other than WindowsMorph1-0/+12
Several issues have been reported with the borderless windowed fullscreen mode on *nix platforms. Default to exclusive fullscreen mode on these platforms for now.
2021-04-06configure_graphics: Add Borderless Windowed fullscreen modeMorph5-9/+108
The borderless windowed fullscreen mode solves several issues with the presentation of the overlay dialogs and on-screen keyboard in exclusive fullscreen mode, and also has other benefits such as smoother gameplay, lower latency and a significant reduction in screen tearing. Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-05nvhost_nvdec_common: Avoid memcpy with null pointerslat9nq1-6/+11
Avoid sending null pointer to memcpy as reported by Undefined Behavious Sanitizer. Co-authored-by: LC <mathew1800@gmail.com>
2021-04-05nvhost_ctrl_gpu: Avoid sending null pointer to memcpylat9nq1-1/+7
Undefined Behaviour Sanitizer reports a null pointer is being sent to memcpy, thought it's "guaranteed to never be null". Guard it with an if statement, and log when the action has been averted.
2021-04-05vp9: Avoid memcpy with null pointerslat9nq1-7/+9
Avoid sending null pointer to memcpy as reported by Undefined Behaviour Sanitizer. Replaces the std::memcpy calls in SpliceVectors with std::copy calls. Opting to replace all the memcpy's with copy's. Co-authored-by: LC <mathew1800@gmail.com>
2021-04-04common: Move assert failure handling into a cpp file.Markus Wick3-6/+20
Advantage: Altering the handler does not need a full recompilation. Disadvantage: noreturn is droped, so the caller is a bit slower. We quite often run yuzu with a YOLO assertion handler. In fact, only very few games run at all with asserts. This patch allows developers to patch the handler without recompiling everything. The overhead of the missing "noreturn" attribute shoul be negletable.
2021-04-04configure_graphics: Prevent stack-use-after-scopelat9nq1-1/+1
Address Sanitizer reports stack-use-after-scope on line 231 `vulkan_devices.push_back(QString::fromStdString(name));`. Instead of using a pointer, copy the string into a std::string and use that, instead.
2021-04-02arm_dynarmic: Increase size of code cacheMerryMage2-0/+8
2021-04-02HID: Fix SL and SR buttons for right joycongerman771-2/+6
2021-03-31Use a single connection for UDP server, make connection test longer and check all pads instead of only the first onegerman774-102/+101
2021-03-31InputCommon: Name properly xbox 360 and one controllers, Fix mappings for Nintendo Pro controllersgerman772-6/+24
2021-03-30ISelfController: Stub SetAlbumImageTakenNotificationEnabledMorph2-1/+17
This service call sets an internal flag whether a notification is shown when an image is captured. Currently we do not support capturing images via the capture button, so this can be stubbed for now.
2021-03-30configuration: Add auto stub toggle that resets on bootameerj5-4/+32
Auto-stub is an experimental debugging feature that may cause unforseen bugs. This adds a toggle to only allow auto-stubbing unimplemented functions when explicitly enabled when yuzu is launched.
2021-03-30service: Auto stub fallbackameerj1-0/+4
For simple services we can implement an automatic stub fallback to help with compatibility until a proper implementation is done. Co-Authored-By: Chloe <25727384+ognik5377@users.noreply.github.com>
2021-03-30nvdrv: Cleanup CDMA Processor on device closureChloe Marcec3-11/+15
Brings us a step closer to unifying all channels to share a common interface.
2021-03-30Addressed issuesChloe Marcec2-21/+22
2021-03-30vulkan_common: enable OpenGL interop on other UnicesJan Beich2-5/+5
2021-03-27yuzu/main: Add user command line argumentgerman771-0/+28
2021-03-27hle: kernel: Initialize preemption task after schedulers.bunnei1-1/+1
- Fixes a startup crash that occurs if CoreTiming tries to preempt before kernel initialization completes.
2021-03-27service: friend: Change logging class from ACC to FriendMorph1-11/+12
2021-03-27Friend: Stub GetPlayHistoryRegistrationKeygerman771-1/+13
2021-03-26HID: Initialize correctly the gesture finger_id and filter invalid resultsNarr the Reg2-3/+13
2021-03-26pctl: Rework how pctl works to be more accurateChloe Marcec6-31/+253
Introduces the usage of compatibilities to allow it the module to be closer to how it works on hardware.
2021-03-25astc_decoder: Refactor for style and more efficient memory useameerj9-2256/+502
2021-03-25nvdrv: Pass device fd and handle device create methods for device opening and closingChloe Marcec20-78/+161
We pass the fd to the ioctl as well as alert the device when it's opened or closed to allow for fd unique actions to take place
2021-03-24gl_device: unblock async shaders on other Unix systemsJan Beich1-1/+1
Mesa is the primary OpenGL provider on all FreeDesktop systems. For example, iris is used on Intel GPU + FreeBSD by default.
2021-03-24arm_dynarmic: Always have a 'valid' jit instanceMerryMage4-53/+26
2021-03-24hle: kernel: Breakup InitializeMemoryLayout.bunnei1-3/+7
2021-03-24hle: kernel: k_memory_region_type: Minor code cleanup.bunnei1-13/+12
2021-03-24hle: kernel: k_memory_region: Minor code cleanup.bunnei1-7/+5
2021-03-24hle: kernel: k_memory_layout: Use pair instead of tuple.bunnei1-2/+4
2021-03-24hle: kernel: k_system_control: Remove unnecessary inline.bunnei1-4/+4
2021-03-24common: common_sizes: Move sizes to the Common namespace.bunnei5-45/+50
2021-03-22nvdrv: Change InitializeEx to AllocAsExChloe Marcec2-27/+49
Wee also report the correct "big page size" now in GetVARegions & fix up the struct for IoctlAllocAsEx
2021-03-21hle: kernel: Merge KMemoryRegionAttr and KMemoryRegionType.bunnei2-11/+9
- Fixes clang errors with mixed enum arithmetic.
2021-03-21hle: kernel: Remove unused variable.bunnei1-1/+0
2021-03-21hle: kernel: k_memory_region_type: Remove extra ".bunnei1-1/+1
2021-03-21core: arm_dynarmic: Ensure JIT state is saved/restored on page table changes.bunnei2-0/+10
- We re-create the JIT here without preserving any state.
2021-03-21hle: kernel: k_memory_layout: Move KMemoryRegionAllocator out of global.bunnei3-35/+47
2021-03-21hle: kernel: k_memory_layout: Derive memory regions based on board layout.bunnei6-56/+1033
2021-03-21common: common_sizes: Move Invalid to Size_* prefix and add missing values.bunnei2-15/+21
2021-03-21hle: kernel: k_memory_region: Refactor to simplify code.bunnei2-83/+89
2021-03-21hle: kernel: board: k_system_control: Extend to include memory region sizes.bunnei3-1/+135
2021-03-21hle: kernel: board: Add secure_monitor module.bunnei2-0/+27
2021-03-21common: Move common sizes to their own header for code reuse.bunnei3-13/+25
2021-03-21hle: kernel: k_address_space_info: Cleanup.bunnei1-9/+9
2021-03-21hle: kernel: Add k_trace module.bunnei2-0/+13
2021-03-21hle: kernel: KSystemControl: Update to reflect board-specific behavior.bunnei4-10/+41
2021-03-21hle: kernel: KMemoryManager: Add CalculateManagementOverheadSize.bunnei2-0/+26
2021-03-21hle: kernel: KMemoryManager: Add aliases.bunnei1-0/+4
2021-03-21hle: kernel: Add architecture and board specific memory regions.bunnei2-0/+72
2021-03-21hle: kernel: KMemoryRegion: Derive region values.bunnei1-0/+327
2021-03-21hle: kernel: Migrate some code from Common::SpinLock to KSpinLock.bunnei5-25/+25
2021-03-21hle: kernel: Add initial KMemoryRegionType module.bunnei3-18/+41
2021-03-21hle: kernel: Move KMemoryRegion to its own module and update.bunnei4-31/+322
2021-03-21gl_device: Block async shaders on AMD and Intellat9nq1-1/+13
Currently, the Windows versions of the Intel OpenGL driver and the AMD proprietary OpenGL driver do not properly support (or in fact degrade) when asynchronous shader compilation is enabled. This blocks specifically those drivers from using this feature. This affects AMDGPU-PRO on Linux, and AMD's and Intel's OpenGL drivers on Windows.
2021-03-20Fix cancelation of choose directory dialogivan-boikov1-1/+4
2021-03-17IApplicationDisplayService: Stub GetIndirectLayerImageMapMorph1-1/+27
Used by games invoking the inline software keyboard such as GNOSIA
2021-03-16bsd: Avoid writing empty buffersMorph1-2/+6
Silences log spam on empty buffer writes
2021-03-14system_version: Update to 11.0.1Morph1-5/+5
2021-03-14system_archive: Update NgWord archive versionMorph1-2/+2
2021-03-13astc_decoder: Reimplement LayersRodrigo Locatti5-142/+161
Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
2021-03-13astc_decoder: Fix out of bounds memory accessameerj1-2/+10
resolves a crash with some anamolous textures found in Astral Chain.
2021-03-13renderer_vulkan: Accelerate ASTC decodingameerj11-57/+426
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2021-03-13host_shaders: Modify shader cmake integration to allow for larger shadersameerj4-8/+27
using a raw string to encapsulate the entire shader code limits us to shaders of size less than 2KB. This change overcomes this limitation.
2021-03-13renderer_opengl: Accelerate ASTC texture decoding with a compute shaderameerj6-2/+1598
ASTC texture decoding is currently handled by a CPU decoder for GPU's without native ASTC decoding support (most desktop GPUs). This is the cause for noticeable performance degradation in titles which use the format extensively. This commit adds support to accelerate ASTC decoding using a compute shader on OpenGL for GPUs without native support.
2021-03-13video_core: rasterizer_accelerated: Fix un/signed mismatch.bunnei1-1/+2
2021-03-11Fix casing on DeallocateAesKeySlotzkitx1-3/+3
2021-03-11Update SPL to fit N's service refactor (4.0.0+) which split into new services.zkitx3-9/+178
2021-03-10fiber: Double default stack sizeMerryMage1-1/+1
Stack overflow occurs with some guest applications
2021-03-10time: Fix CalculateSpanBetween implementationMorph1-3/+9
CalculateSpanBetween passes in the ClockSnapshots through 2 input buffers and not as raw arguments. Fix this by reading the 2 input buffers instead of popping raw arguments. Partially fixes Super Smash Bros. Ultimate's Spirit Board
2021-03-10time: Assign the current time point to the ClockSnapshotMorph1-0/+2
Fixes the timer in Super Smash Bros Ultimate's Spirit Board.
2021-03-07common: Fiber: use a reference for YieldTo.bunnei5-34/+27
- Fixes another small leak.
2021-03-07qt: Set DISPLAY env var when not presentAni1-0/+9
Fixes web browser opening (Help > Open Mods Page, Help > Open Quickstart Guide)
2021-03-06Enable mouse toggle buttonsgerman775-11/+65
2021-03-06Add toggle button option for normal buttonsgerman1-0/+5
2021-03-06common: fiber: Use weak_ptr when yielding.bunnei2-8/+13
- Avoids a memory leak, as taking a strong reference of the fiber here causes a circular reference. - Supersedes #6006 with a more narrow fix.
2021-03-06Enable button toggle for keyboard in the modifier buttongerman3-6/+44
2021-03-06hle: kernel: KThread: Rework dummy threads & fix memory leak.bunnei6-36/+65
- Dummy threads are created on thread local storage for all host threads. - Fixes a leak by removing creation of fibers, which are not applicable here.
2021-03-06Revert "core: Switch to unique_ptr for usage of Common::Fiber."bunnei10-58/+59
2021-03-05aes_util: Remove malformed mbedtls_cipher_finish function callMorph1-2/+0
2021-03-05CMakeLists: Add /utf-8 compile option for MSVCMorph1-0/+2
Ensures that the source and execution character sets are in UTF-8
2021-03-04texture_cache: Blacklist BGRA8 copies and views on OpenGLameerj9-28/+80
In order to force the BGRA8 conversion on Nvidia using OpenGL, we need to forbid texture copies and views with other formats. This commit also adds a boolean relating to this, as this needs to be done only for the OpenGL api, Vulkan must remain unchanged.
2021-03-04renderer_opengl: Swizzle BGR textures on copyameerj5-2/+132
OpenGL does not natively support BGR internal formats, which causes many BGR textures to render incorrectly, with Red and Blue channels swapped. This commit aims to address this by swizzling the blue and red channels on texture copies when a BGR format is encountered.
2021-03-03video_core: rasterizer_accelerated: Fix delta check ordering.bunnei1-3/+3
2021-03-03video_core: rasterizer_accelerated: Improve error handling & fix implicit conversion.bunnei1-4/+8
2021-03-03video_core: rasterizer_accelerated: Use a flat array instead of interval_map for cached pages.bunnei2-44/+32
- Uses a fixed 64MB for the cache instead of an ever growing map. - Slightly faster by using atomics instead of a single mutex for access. - Thanks for Rodrigo for the idea.
2021-03-02buffer_cache: Heuristically decide to skip cache on uniform buffersReinUsesLisp2-11/+37
Some games benefit from skipping caches (Pokémon Sword), and others don't (Animal Crossing: New Horizons). Add an heuristic to decide this at runtime. The cache hit ratio has to be ~98% or better to not skip the cache. There are 16 frames of buffer.
2021-03-02core: Shutdown: Move kernel cleanup to later in shutdown.bunnei1-12/+1
- Fixes a shutdown crash due to a race condition with GPU still accessing memory.
2021-03-02Fix default bcat_backend initKelebek12-3/+3
2021-03-01inputCommon: Use an unique client id for each socket instancegerman4-19/+23
2021-03-01gpu_thread: Remove Async NVDEC placeholdersameerj3-26/+8
This commit removes early placeholders for an implementation of async nvdec. With recent changes to the source code, the placeholders are no longer accurate, and can cause a nullptr dereference due to the nature of the cdma_pusher lifetime.
2021-02-28[network] Error handling reformcomex6-111/+147
`network.cpp` has several error paths which either: - report "Unhandled host socket error=n" and return `SUCCESS`, or - switch on a few possible errors, log them, and translate them to Errno; the same switch statement is copied and pasted in multiple places in the code Convert these paths to use a helper function `GetAndLogLastError`, which is roughly the equivalent of one of the switch statements, but: - handling more cases (both ones that were already in `Errno`, and a few more I added), and - using OS functions to convert the error to a string when logging, so it'll describe the error even if it's not one of the ones in the switch statement. - To handle this, refactor the logic in `GetLastErrorMsg` to expose a new function `NativeErrorToString` which takes the error number explicitly as an argument. And improve the Windows version a bit. Also, add a test which exercises two random error paths.
2021-02-28Implements touch, pan, pinch and rotation gesturesgerman2-11/+240
2021-02-28inputCommon: Mouse fixesgerman779-25/+89
2021-02-27core: hle: ldn: Error out on call to Initialization.bunnei1-1/+1
- Since we do not emulate LDN, returning an error here makes more sense.
2021-02-27core: Switch to unique_ptr for usage of Common::Fiber.bunnei10-59/+58
- With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context. - Fixes a memory leak due to circular reference of the shared pointer.
2021-02-24Implement glDepthRangeIndexeddNVKelebek13-1/+12
2021-02-23vk_command_pool: Reduce the command pool size from 4096 to 4ReinUsesLisp1-1/+1
This allows drivers to reuse memory more easily and preallocate less. The optimal number has been measured booting Pokémon Sword.
2021-02-23video_core: add missing header after 468bd9c1b0f9Jan Beich1-0/+1
src/video_core/shader_notify.cpp: In member function 'void VideoCore::ShaderNotify::MarkShaderComplete()': src/video_core/shader_notify.cpp:33:10: error: 'unique_lock' is not a member of 'std' 33 | std::unique_lock lock{mutex}; | ^~~~~~~~~~~ src/video_core/shader_notify.cpp:6:1: note: 'std::unique_lock' is defined in header '<mutex>'; did you forget to '#include <mutex>'? 5 | #include "video_core/shader_notify.h" +++ |+#include <mutex> 6 | src/video_core/shader_notify.cpp: In member function 'void VideoCore::ShaderNotify::MarkSharderBuilding()': src/video_core/shader_notify.cpp:38:10: error: 'unique_lock' is not a member of 'std' 38 | std::unique_lock lock{mutex}; | ^~~~~~~~~~~ src/video_core/shader_notify.cpp:38:10: note: 'std::unique_lock' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
2021-02-23common: add missing header after f3805376f726Jan Beich1-0/+1
In file included from src/video_core/dma_pusher.cpp:5: src/./common/cityhash.h:69:47: error: 'size_t' has not been declared 69 | [[nodiscard]] u64 CityHash64(const char* buf, size_t len); | ^~~~~~ src/./common/cityhash.h:73:55: error: 'size_t' has not been declared 73 | [[nodiscard]] u64 CityHash64WithSeed(const char* buf, size_t len, u64 seed); | ^~~~~~ src/./common/cityhash.h:77:56: error: 'size_t' has not been declared 77 | [[nodiscard]] u64 CityHash64WithSeeds(const char* buf, size_t len, u64 seed0, u64 seed1); | ^~~~~~ src/./common/cityhash.h:80:47: error: 'size_t' has not been declared 80 | [[nodiscard]] u128 CityHash128(const char* s, size_t len); | ^~~~~~ src/./common/cityhash.h:84:55: error: 'size_t' has not been declared 84 | [[nodiscard]] u128 CityHash128WithSeed(const char* s, size_t len, u128 seed); | ^~~~~~
2021-02-21hid: Implement GameCube Controller VibrationsMorph2-3/+130
Implements both SendVibrationGcErmCommand and GetActualVibrationGcErmCommand, and modifies GetVibrationDeviceInfo to account for additional controllers.
2021-02-21acc: Stub GetNintendoAccountUserResourceCacheForApplicationMorph1-1/+17
This command returns a Nintendo Account ID and writes 2 output buffers. The first output buffer is a NasUserBaseForApplication and the second output buffer is currently empty. Used by: - Pokken Tournament DX - Super Smash Bros. Ultimate - Super Nintendo Entertainment System - Nintendo Switch Online - Mario Kart 8 Deluxe
2021-02-21kernel: Fix resource release exception on exitameerj4-2/+16
After rewriting the resource limit, objects releasing reserved resources require a live kernel instance. This commit fixes exceptions that occur due to the kernel being destroyed before some objects released their resources, allowing for a graceful exit.
2021-02-20gl_disk_shader_cache: Log total shader entries count on game loadMorph1-0/+4
2021-02-20common: wall_clock: Fix integer overflow with StandardWallClock.bunnei2-7/+28
- Previous optimized impl. resulted in an integer overflow, so revert. - This is our slow/fallback path that should never be really be used, so the optimization in unimportant.
2021-02-19hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.bunnei24-147/+131
2021-02-19hle: kernel: Migrate MemoryManager to KMemoryManager.bunnei8-47/+48
2021-02-19hle: kernel: Migrate PageLinkedList to KPageLinkedList.bunnei8-38/+41
2021-02-19hle: kernel: Migrate to KMemoryBlock, KMemoryBlockManager, and others.bunnei18-476/+479
2021-02-19hle: kernel: Migrate SlabHeap to KSlabHeap.bunnei4-22/+21
2021-02-19hle: kernel: Migrate MemoryLayout to KMemoryLayout.bunnei5-31/+30
2021-02-19hle: kernel: Migrate AddressSpaceInfo to KAddressSpaceInfo.bunnei4-59/+54
2021-02-19hle: kernel: memory_manager: Rename AllocateContinuous to AllocateContinuous.bunnei2-4/+28
2021-02-19hle: kernel: KSystemControl does not belong in Memory namespace.bunnei7-31/+38
2021-02-19hle: kernel: memory: PageHeap: Migrate to KPageBitmap class.bunnei4-197/+23
2021-02-19hle: kernel: Add KPageBitmap class.bunnei2-0/+280
2021-02-19hle: kernel: system_control: Add function GenerateRandomU64.bunnei2-3/+5
2021-02-19common: Add implementation of TinyMT (Mersenne Twister RNG).bunnei2-0/+251
2021-02-19hle: kernel: Add KSpinLock implementation.bunnei3-0/+89
2021-02-19core: memory: Add templated GetPointer methods.bunnei1-0/+10
2021-02-19common: alignment: Add DivideUp utility method.bunnei1-0/+5
2021-02-19hle: kernel: Rename SharedMemory to KSharedMemory.bunnei13-54/+54
2021-02-18Revert "Port citra-emu/citra#5123: "SDL: Disable hidapi drivers due to compatibility problems with certain controllers""Morph1-7/+0
2021-02-18common/cityhash: Use common typesReinUsesLisp3-116/+100
Allow sharing return types with the rest of the code base. For example, we use 'u128 = std::array<u64, 2>', meanwhile Google's code uses 'uint128 = std::pair<u64, u64>'. While we are at it, use size_t instead of std::size_t.
2021-02-18tests: Add tests for CityHashReinUsesLisp2-0/+23
2021-02-16vk_rasterizer: Fix loading shader addresses twiceReinUsesLisp1-1/+0
This was recently introduced on a wrongly rebased commit.
2021-02-15core: core_timing_util: Optimize core timing math.bunnei3-98/+48
- Avoids a lot of unnecessary 128-bit math for imperceptible accuracy.
2021-02-15common: wall_clock: Optimize GetClockCycles/GetCPUCycles to use a single MUL instruction.bunnei1-8/+9
2021-02-15common: Merge uint128 to a single header file with inlines.bunnei4-135/+84
2021-02-15core/CMakeLists: Add web_types.hMorph1-0/+1
2021-02-15Review 1Kelebek12-3/+3
2021-02-15Implement texture offset support for TexelFetch and TextureGather and add offsets for TldsKelebek13-9/+34
Formatting
2021-02-14debugger: controller: Add access keylat9nq1-1/+1
Adds the access key to the Controller P1 selection at View -> Debugger -> Controller P1. Avoids using the windowTitle as that would add a literal & to the beginning of the window title.
2021-02-14yuzu: Various frontend improvements to avoid crashes and improve experience on Linux.bunnei10-10/+52
2021-02-14hle: service: ldn: IUserLocalCommunicationService: Improve the stub.bunnei1-5/+29
2021-02-14Improve mouse panninggerman1-5/+21
2021-02-14hle: service: ldn: IUserLocalCommunicationService: Indicate that LDN is disabled.bunnei3-3/+19
- Fixes crash on Pokemon Sword/Shield when pressing 'Y'.
2021-02-14hle: service: am: IStorageAccessor: Fix out of bounds error handling.bunnei1-6/+7
2021-02-13vk_resource_pool: Load GPU tick once and compare with itReinUsesLisp2-8/+8
Other minor style improvements. Rename free_iterator to hint_iterator, to describe better what it does.
2021-02-13vk_update_descriptor: Inline and improve code for binding buffersReinUsesLisp4-24/+24
Allow compilers with our settings inline hot code.
2021-02-13fixed_pipeline_cache: Use dirty flags to lazily update keyReinUsesLisp7-56/+103
Use dirty flags to avoid building pipeline key from scratch on each draw call. This saves a bit of unnecesary work on each draw call.
2021-02-13gl_texture_cache: Lazily create non-sRGB texture views for sRGB formatsameerj3-7/+41
This creates non-sRGB texture views for sRGB texture formats to allow for interfacing with these views in compute shaders using imageLoad and imageStore. Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2021-02-13 rebase, fix name shadowing, more constameerj4-11/+10
2021-02-13Address PR feedbackameerj4-12/+7
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2021-02-13 streamline cdma_pusher/command_classesameerj1-13/+5
2021-02-13 streamline cdma_pusher/command_classesameerj5-85/+34
2021-02-13nvdec cleanupameerj8-43/+38
2021-02-13vk_master_semaphore: Mark gpu_tick atomic operations with relaxed orderReinUsesLisp1-4/+4
2021-02-13vk_staging_buffer_pool: Inline tick testsReinUsesLisp2-1/+7
Load the current tick to a local variable, moving it out of an atomic and allowing us to compare the value without going through a pointer each time. This should make the loop more optimizable.
2021-02-13gl_stream_buffer/vk_staging_buffer_pool: Fix size checkReinUsesLisp2-2/+2
Fix a tragic off-by-one condition that causes Vulkan's stream buffer to think it's always full, using fallback memory. The OpenGL was also affected by this bug to a lesser extent.
2021-02-13vulkan_device: Require VK_EXT_robustness2ReinUsesLisp2-37/+14
We are already using robustness2 features without requiring it explicitly, causing potential crashes on drivers without the extension. Requiring this at boot allows better diagnostics for it and formalizes our usage on the extension.
2021-02-13config: Make high GPU accuracy the defaultReinUsesLisp2-3/+3
This is a better default for most games, yielding better performance and less graphical issues.
2021-02-13video_core: Fix clang build issuesReinUsesLisp2-8/+5
2021-02-13vk_staging_buffer_pool: Fix softlock when stream buffer overflowsReinUsesLisp2-19/+20
There was still a code path that could wait on a timeline semaphore tick that would never be signalled. While we are at it, make use of more STL algorithms.
2021-02-13vk_buffer_cache: Add support for null index buffersReinUsesLisp2-4/+40
Games can bind a null index buffer (size=0) where all indices are evaluated as zero. VK_EXT_robustness2 doesn't support this and all drivers segfault when a null index buffer is passed to vkCmdBindIndexBuffer. Workaround this by creating a 4 byte buffer and filling it with zeroes. If it's read out of bounds, robustness takes care of returning zeroes as indices.
2021-02-13buffer_cache: Add extra bytes to guest SSBOsReinUsesLisp1-1/+7
Bind extra bytes beyond the guest API's bound range. This is due to some games like Astral Chain operating out of bounds. Binding the whole map range would be technically correct, but games have large maps that make this approach unaffordable for now.
2021-02-13Merge branch 'bytes-to-map-end' into new-bufcache-wipReinUsesLisp1-0/+2
2021-02-13vk_staging_buffer_pool: Get a staging buffer instead of waitingReinUsesLisp2-9/+18
Avoids waiting idle while the GPU finishes to do work, and fixes an issue where we'd wait forever if a single command buffer (logic tick) all the data.
2021-02-13yuzu/config: Disable assembly shaders by defaultReinUsesLisp1-2/+2
Due to BindBufferRangeNV limitations and poor quality code emission from our side, assembly shaders are currently slower than GLSL. Their build time and feature advantages are still relevant, but they are outweighted by their runtime performance.
2021-02-13renderer_opengl: Remove interopReinUsesLisp8-122/+10
Remove unused interop code from the OpenGL backend.
2021-02-13gl_buffer_cache: Drop interop based parameter buffer workaroundsReinUsesLisp3-65/+45
Sacrify runtime performance to avoid generating kernel exceptions on Windows due to our abusive aliasing of interop buffer objects.
2021-02-13buffer_cache: Heuristically detect stream buffersReinUsesLisp2-6/+33
Detect when a memory region has been joined several times and increase the size of the created buffer on those instances. The buffer is assumed to be a "stream buffer", increasing its size should stop us from constantly recreating it and fragmenting memory.
2021-02-13buffer_cache: Split CreateBuffer in separate functionsReinUsesLisp1-29/+52
Allow adding functionality to each function without making CreateBuffer more complex.
2021-02-13buffer_cache: Skip cache on small uploads on VulkanReinUsesLisp3-9/+18
Ports from OpenGL the optimization to skip small 3D uniform buffer uploads. This will take advantage of the previously introduced stream buffer. Fixes instances where the staging buffer offset was being ignored.
2021-02-13vk_staging_buffer_pool: Add stream buffer for small uploadsReinUsesLisp15-127/+298
This uses a ring buffer similar to OpenGL's stream buffer for small uploads. This stops us from allocating several small buffers, reducing memory fragmentation and cache locality. It uses dedicated allocations when possible.
2021-02-13vulkan_device: Enable robustBufferAccessReinUsesLisp1-1/+2
Fix regression on Pascal on Animal Crossing: New Horizons, fixing a validation error.
2021-02-13video_core: Reimplement the buffer cacheReinUsesLisp67-2607/+2514
Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits.
2021-02-13vulkan_common: Expose interop and headless devicesReinUsesLisp4-21/+100
2021-02-13vulkan_common: Make interop extensions mandatoryReinUsesLisp1-0/+6
2021-02-13vulkan_device: Enable robust buffersReinUsesLisp1-2/+4
2021-02-13vulkan_device: Use designated initializers for featuresReinUsesLisp1-60/+59
2021-02-13vulkan_wrapper: Add memory barrier pipeline barrier helperReinUsesLisp1-0/+6
2021-02-13vulkan_device: Fix formatting of constantsReinUsesLisp1-10/+6
2021-02-13vulkan_wrapper: Add interop functionsReinUsesLisp2-1/+41
2021-02-13vulkan_instance: Initialize Vulkan instance in a separate threadReinUsesLisp1-1/+5
Workaround an issue on Nvidia where creating a Vulkan instance from an active OpenGL thread disables threaded optimization on the driver. This optimization is important to have good performance on Nvidia OpenGL.
2021-02-13vulkan_wrapper: Pull Windows symbolsReinUsesLisp2-0/+14
2021-02-13gpu: Report renderer errors with exceptionsReinUsesLisp27-232/+176
Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
2021-02-13tests/buffer_base: Add cached CPU writes testsReinUsesLisp1-0/+76
Ensure the behavior of the previous commit in tests.
2021-02-13buffer_base: Add support for cached CPU writesReinUsesLisp1-61/+145
Some games usually write memory pages currently used by the GPU, causing rendering issues (e.g. flashing geometry and shadows on Link's Awakening). To workaround this issue, Guest CPU writes are delayed until the command buffer finishes processing, but the pages are updated immediately. The overall behavior is: - CPU writes are cached until they are flushed, they update the page state, but don't change the modification state. Cached writes stop pages from being flushed, in case games have meaningful data in it. - Command processing writes (e.g. push constants) update the page state and are marked to the command processor as dirty. They don't remove the state of cached writes.
2021-02-13maxwell_to_gl: Remove unused codeameerj2-36/+3
Removes unused declarations in maxwell_to_gl.h
2021-02-13revert to std::sin and std::cosChloe Marcec3-6/+6
2021-02-13address issuesChloe Marcec3-22/+25
2021-02-13audren: Implement I3dl2ReverbChloe Marcec8-18/+569
Most notable fix is the voices in Fire Emblem Three Houses
2021-02-13kernel: More accurately reserve and release resourcesameerj6-14/+42
2021-02-13kernel: KScopedReservation implementationameerj6-26/+152
This implements KScopedReservation, allowing resource limit reservations to be more HW accurate, and release upon failure without requiring too many conditionals.
2021-02-13kernel: Unify result codes (#5890)Chloe21-256/+223
* kernel: Unify result codes Drop the usage of ERR_NAME convention in kernel for ResultName. Removed seperation between svc_results.h & errors.h as we mainly include both most of the time anyways. * oops * rename errors to svc_results
2021-02-12yuzu: Create screenshot path before capturelat9nq1-0/+5
Allows screenshots in cases where the screenshots path doesn't already exist.
2021-02-11software_keyboard: Implement Finalize request commandMorph1-0/+4
2021-02-10configure_input_player_widget: Silence unused variable warningslat9nq1-7/+0
Prevents clang 11 from throwing an error since these variables are unused.
2021-02-10common: Add -fsized-deallocation as a Clang flaglat9nq1-0/+2
Prevents an operator delete error when compiling with Clang 11.
2021-02-10core: Add -fsized-dealloction as a Clang flaglat9nq1-0/+2
Prevents a operator delete error when compiling with Clang 11.
2021-02-09bsd: Remove usage of optional emplace() with no argumentsLioncash1-2/+4
Clang 12 currently falls over in the face of this.
2021-02-09am/controller: Remove [[fallthrough]] from unreachable pathLioncash1-1/+2
Prevents warnings on clang 12. This path is reachable on other variations of the build that disable the unreachable macro.
2021-02-09nfp: Correct uninitialized size being used within GetTagInfo()Lioncash1-1/+1
We were previously the name of the object being initialized within its own initializer, which results in uninitialized data being read.
2021-02-09udp: Silence unused member variable warningsLioncash1-2/+2
Simply mark them as unused for now.
2021-02-09udp/client: Define ClientData constructor/destructor in cpp fileLioncash2-0/+7
Prevents compilation errors on clang 12 due to incomplete types within a unique_ptr member.
2021-02-09gl_rasterizer: Remove unused variablesLioncash1-3/+0
Resolves warnings on clang 12
2021-02-09texture_cache/util: Remove unused functionsLioncash1-34/+0
Silences a few warnings on clang 12.
2021-02-09configure_input_player_widget: Reduce duplication of array accessors where applicableLioncash1-108/+125
Reduces the amount of code to read in expressions a little bit by separating constituents out a little.
2021-02-09configure_input_player_widget: Avoid nontrivial copies where applicableLioncash2-5/+6
Previously a function was copying an array of 20 std::string instances by value.
2021-02-09Use GC imagegerman1-0/+3
2021-02-09Settings: Add depth to Joysticks on Pro Controller preview (#5894)Jatoxo2-6/+30
* Add some depth to ProJoysticks * address comments * clang * address nits * fix wrong inner_offset when offset.x was 0
2021-02-08string_util: Remove MSVC workaround for converting between UTF8/UTF16Morph1-14/+0
This has been fixed as of Visual Studio 2019 Version 16.2
2021-02-08hid: Implement GC controllergerman7-6/+206
2021-02-08olsc: Stub GetSaveDataBackupSettinggerman1-1/+12
2021-02-08Add mouse panninggerman11-38/+149
2021-02-08video_core: Delete mortonChloe Marcec3-2/+0
moron.h & morton.cpp are not used anywhere and are just empty files
2021-02-07renderer_opengl: Update OpenGL backend version requirement to 4.6Morph3-42/+17
2021-02-07lm: Fix ReadLeb128Chloe Marcec1-7/+9
Fixes assertion on Bloodstained Ritual of the Night. We would over read sometimes, this is fixed by checking if the top bit is set in the first iteration. We also lock the loop off to be only the max size of the type we can fit. Finally we changed an incorrect print of "DEBUG" to "TRACE" to reflect the proper log severity
2021-02-07Add GC controller animationgerman2-52/+429
2021-02-06ring_buffer: Remove granularity template argumentMerryMage2-16/+15
Non-obvious bug in RingBuffer::Push(std::vector<T>&) when granularity != 1 Just remove it altogether because we do not have a use for granularity != 1
2021-02-06pl_u: Fix read out of boundsAlessandro Astone1-2/+7
2021-02-06Refresh debug controller settingsgerman4-10/+18
2021-02-06Refresh controller only when necessarygerman2-15/+37
2021-02-06Add SL SR vectors, change dual joycon view, add missing raw data from keyboard/mousegerman4-178/+247
2021-02-06Add controller window and single joycon top viewgerman7-29/+391
2021-02-06Replace text with vectorsgerman2-77/+306
2021-02-06Make settings controller image change with controller inputgerman9-75/+2076
2021-02-06k_address_arbiter: Unfold R_UNLESS macrosLioncash1-5/+8
Allows for more descriptive error messages and also doesn't hide control-path exit returns from the reader.
2021-02-06k_address_arbiter: Remove unnecessary usages of std::addressofLioncash1-10/+10
This is a useful function in a generic context or with types that overload unary operator&. However, primitives and pointers will never do this, so we can opt for a more straightforward syntax.
2021-02-06k_address_arbiter: Remove dead codeLioncash1-40/+13
This code is never used, so we can remove it. It's in version control, so it can always be brought back when needed.
2021-02-06svc: Provide more detailed error logs for svc functionsLioncash1-59/+188
Allows SVC calls to have much more informative information during error cases. This also doesn't hide control flow returns from the reader.
2021-02-05hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement.bunnei3-11/+11
2021-02-05hle: kernel: KAddressArbiter: Remove noisy error log.bunnei1-1/+1
2021-02-05hle: kernel: svc: Cleanup KEvent/KReadableEvent/KWritableEvent SVCs.bunnei5-69/+89
2021-02-05common: scope_exit: Add a cancellable ScopeExit macro.bunnei1-0/+6
2021-02-05hle: kernel: Reimplement KReadableEvent and KWritableEvent.bunnei38-298/+341
2021-02-05hle: kernel: Implement KEvent.bunnei3-0/+91
2021-02-05hle: kernel: KAddressArbiter: Use R_UNLESS_NOLOG where applicable.bunnei1-1/+1
2021-02-05common: common_funcs: Add R_UNLESS_NOLOG for scenarios that should not log.bunnei1-0/+8
2021-02-05hle: kernel: Rename WritableEvent to KWritableEvent.bunnei44-101/+101
2021-02-05hle: kernel: Rename ReadableEvent to KReadableEvent.bunnei42-81/+82
2021-02-05Address reviewer commentslat9nq1-1/+1
2021-02-05CMake: Port citra-emu/citra FindFFmpeg.cmakelat9nq1-2/+2
Also renames related CMake variables to match both the Find*FFmpeg* and variables defined within the file. Fixes odd errors produced by the old FindFFmpeg. Citra's FindFFmpeg is slightly modified here: adds Citra's copyright at the beginning, renames FFmpeg_INCLUDES to FFmpeg_INCLUDE_DIR, disables a few components in _FFmpeg_ALL_COMPONENTS, and adds the missing avutil component to the comment above.
2021-02-05CMake: Implement YUZU_USE_BUNDLED_FFMPEGlat9nq2-7/+6
For Linux, instructs CMake to use the FFmpeg submodule in externals. This is HEAVILY based on our usage of the late Unicorn. Minimal change to MSVC as it uses the yuzu-emu/ext-windows-bin. MinGW now targets the same ext-windows-bin libraries as MSVC for FFmpeg. Adds FFMPEG_LIBRARIES to WIN32 and simplifies video_core/CMakeLists.txt a bit.
2021-02-04k_affinity_mask: Avoid implicit truncation to boolLioncash1-1/+1
This can cause compiler warnings. Instead, we can explicitly add a boolean expression around it to naturally turn the result into a bool.
2021-02-04k_priority_queue: Unfold several declval usagesLioncash1-5/+5
Given these are only used as function existence checks, we can simplify some usages of declval, given they aren't particularly useful here. Reduces a few template instantiations, which at most reduces compile times a tiny bit.
2021-02-04k_priority_queue: Simplify affinity mask type aliasLioncash1-2/+2
We can make use of the _t variants of the templates to cut down on a little bit of verbosity.
2021-02-04k_priority_queue: Resolved reserved identifierLioncash1-2/+2
An identifier containing a starting underscore followed by a capital letter is reserved by the standard. It's trivial to avoid this by moving the underscore to the end of the identifier. While the likelihood of clashing here being minimal, we can turn a "should not break" scenario into a definitive "will not break" one, so why not?.
2021-02-04key_manager: Create the keys directory if it does not existMorph1-0/+5
2021-02-04Add footer types and address commentsgerman7-58/+106
2021-02-04Fix npad struct to match switchbrewgerman4-106/+135
2021-02-04Adds missing controller types and propertiesgerman9-30/+191
2021-02-04Always update handheld configgerman1-4/+2
2021-02-03Simplify limitableresource namesChloe Marcec6-36/+29
2021-02-02Prevent over scheduling audio events and terminate properly the motion update eventgerman2-1/+9
2021-02-02IApplicationFunctions: Implement GetHealthWarningDisappearedSystemEventMorph2-1/+14
2021-02-02settings: Log the cache, config, and mod load directoriesMorph1-0/+3
2021-02-02video_core: host_shaders: Don't pass --quiet to glslangValidator if unavailablelat9nq1-1/+19
Prevents CMake from calling `glslangValidator` with `--quiet` when it is not available, i.e. on older downstream versions from Ubuntu.
2021-02-02Compile errorChloe Marcec1-1/+1
2021-02-02Address issuesChloe Marcec3-19/+15
2021-02-01arm_dynarmic_32: Print out CPSR.T on exceptionMerryMage2-2/+7
2021-02-01audren: Disable reverb for the time beingChloe Marcec1-1/+4
As this is causing issues in a few games, it's best to have it disabled until it's completely implemented
2021-02-01Only update motion for npad and prevent over scheduling eventsgerman1-2/+11
2021-01-31nifm: Stub GetCurrentIpConfigInfoMorph1-1/+29
- Used by Lets Sing 12
2021-01-31prepo: Stub GetTransmissionStatusMorph1-1/+11
2021-01-31prepo: Stub RequestImmediateTransmissionMorph1-1/+8
- Used by Animal Crossing: New Horizons
2021-01-31nifm: Stub GetCurrentNetworkProfileMorph1-1/+41
- Used by Minecraft Bedrock Edition - Used by Bloons TD 5
2021-01-31nifm: Add several structsMorph1-0/+87
2021-01-31am/IApplicationFunctions: Stub IsGamePlayRecordingSupportedMorph2-1/+12
Used by RetroArch
2021-01-31bsd: Fix EventFd stubMorph1-3/+3
2021-01-31nifm: Fix GetAppletInfo stubMorph1-1/+5
2021-01-31bsd: Fix GetSockOpt stubMorph1-1/+5
2021-01-31bsd: Stub EventFdameerj2-1/+12
Used by Family Feud
2021-01-31am: Stub TryPopFromFriendInvitationStorageChannelameerj2-1/+10
Used by Family Feud
2021-01-30fix compile errorChloe Marcec1-1/+1
2021-01-30cleanup commentingChloe Marcec1-2/+2
2021-01-30Drop m_ from lockChloe Marcec2-9/+9
2021-01-30Move to GetGlobalTimeNs, fix GetTotalPhysicalMemoryAvailableChloe Marcec3-9/+7
2021-01-30kernel: Rewrite resource limit to be more accurateChloe Marcec13-231/+357
Matches closer to hardware
2021-01-30Stub GetSystemSessionIdgerman1-1/+10
2021-01-30analog_from_button: Fix update_thread.join exceptionameerj1-5/+9
This commit aims to address an exception that occurs when trying to join the Analog object's update_thread. By using an atomic bool for the status of the update thread, we ensure its value is consistent across the threads accessing it.
2021-01-29hle: kernel: KLightLock: Fix several bugs.bunnei1-3/+3
2021-01-29common: common_funcs: Change R_UNLESS to LOG_ERROR.bunnei1-1/+1
2021-01-29arm: dynarmic: Reintroduce JIT checks on SaveContext/LoadContext.bunnei2-0/+12
2021-01-29hle: kernel: KThread: Release thread resource on thread exit.bunnei1-0/+1
2021-01-29yuzu: debugger: Ignore HLE threads.bunnei3-9/+21
2021-01-29hle: kernel: process: Add state lock.bunnei3-6/+15
2021-01-29hle: kernel: threading: Fix bug with host thread naming.bunnei1-3/+2
2021-01-29hle: kernel: k_scheduler_lock: Cleanup.bunnei1-3/+3
2021-01-29core: arm: Remove unnecessary JIT checks.bunnei2-24/+0
2021-01-29common: common_funcs: Log error on R_UNLESS.bunnei1-0/+3
2021-01-29hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling.bunnei8-43/+45
2021-01-29hle: kernel: k_scheduler: Use atomics for current_thread, etc.bunnei2-26/+28
2021-01-29hle: kernel: k_scheduler: Fix for single core mode.bunnei1-1/+2
2021-01-29kernel: Fix build errors.bunnei2-4/+9
2021-01-29core: cpu_manager: Remove unused variable.bunnei1-1/+0
2021-01-29hle: kernel: KScheduler: Introduce thread context_guard.bunnei2-3/+16
2021-01-29hle: kernel: Recode implementation of KThread to be more accurate.bunnei14-785/+1562
2021-01-29kernel: svc_types: Add ThreadActivity.bunnei1-0/+5
2021-01-29kernel: KSchedulerPriorityQueue: Lowest priority should be LowestThreadPriority.bunnei1-1/+1
2021-01-29kernel: k_light_lock: Simplify EmuThreadHandle implementation.bunnei5-51/+33
2021-01-29hle: kernel: TimeManager: Simplify to not rely on previous EmuThreadHandle implementation.bunnei6-69/+25
2021-01-29common: common_funcs: Add useful kernel macro R_SUCCEED_IF.bunnei1-0/+3
2021-01-29core: hle: kernel: object: Implement Finalize() virtual method.bunnei15-6/+29
2021-01-29core: hle: kernel: svc_results: Populate with several missing error codes.bunnei1-0/+3
2021-01-29core: hle: kernel: Implement KLightLock.bunnei3-0/+173
2021-01-29core: hle: kernel: Implement KThreadQueue.bunnei2-0/+82
2021-01-29common: common_funcs: Add a few more useful macros for kernel code.bunnei1-0/+11
2021-01-29hle: kernel: KThread: Clean up thread priorities.bunnei10-83/+44
2021-01-29hle: kernel: KThread: Reorganize thread priority defaults.bunnei9-31/+31
2021-01-29hle: kernel: KThread: Fix ThreadType definition.bunnei5-11/+12
2021-01-29hle: kernel: Move single core "phantom mode" out of KThread.bunnei4-16/+31
- This is a workaround that does not belong in a kernel primitive.
2021-01-29hle: kernel: KThread: Remove thread types that do not exist.bunnei6-53/+30
2021-01-29arm: arm_dynarmic: Skip calls when JIT is invalid.bunnei2-0/+24
- This can happen if called from an idle or suspension thread.
2021-01-29core: hle: kernel: Rename Thread to KThread.bunnei45-272/+271
2021-01-29Fix user changing to 0 if validgerman1-2/+8
2021-01-28Avoid overwritting usernamegerman1-1/+1
2021-01-28hid: Add static_assert for Parameter sizeMorph1-15/+19
2021-01-28prepo: Fix BufferDescriptorX invalid buffer errors and add "New" variants of SaveReportMorph1-24/+42
The second input buffer could be optional when prepo/srepo is called, test for the availability of the second buffer prior to reading from it.
2021-01-28hle_ipc: Add Can(Read, Write)BufferMorph2-0/+28
Allows us to test whether a buffer can be read from or written to memory
2021-01-28Stub GetSockOptgerman2-1/+17
2021-01-28vk_scheduler: Fix unaligned placement new expressionsReinUsesLisp1-6/+6
We were accidentaly creating an object in an unaligned memory address. Fix this by manually aligning the offset.
2021-01-27vulkan_device: Blacklist Intel from float16 math (#5798)Rodrigo Locatti1-0/+5
Astral Chain crashes Intel's SPIR-V compiler when using fp16. Disable this while the vendor works on a fix.
2021-01-27npad: Remove unused device handle parameterMorph3-11/+9
2021-01-25Omit system referenceChloe Marcec1-2/+1
2021-01-25psm: IPsmSessionChloe Marcec1-2/+114
Used by homebrew menu
2021-01-25Revert "Start of Integer flags implementation"ReinUsesLisp3-59/+3
This reverts #4713. The implementation in that PR is not accurate. It does not reflect the behavior seen in hardware.
2021-01-25vk_graphics_pipeline: Fix narrowing conversion on MSVCReinUsesLisp1-2/+2
2021-01-24vk_texture_cache: Support image store on sRGB images with VkImageViewUsageCreateInfoReinUsesLisp3-38/+72
Vulkan 1.0 didn't support creating sRGB image views on an ABGR8 VkImage with storage usage bits. VK_KHR_maintenance2 addressed this allowing to reduce the usage bits on a VkImageView. To allow image store on non-sRGB image views when the VkImage is created with sRGB, always create VkImages without sRGB and add the sRGB format on the view.
2021-01-25vulkan_device: Lift VK_EXT_extended_dynamic_state blacklist on RDNAReinUsesLisp1-23/+0
It seems to be safe to use this on new drivers.
2021-01-24cmake: Enforce -Warray-bounds and -Wmissing-field-initializers globallyReinUsesLisp2-2/+2
2021-01-24Stub Set/Get/Reset SixaxisSensorFusionParametersgerman4-3/+104
2021-01-24Print Process ID and Thread ID as hexChloe Marcec1-2/+2
2021-01-24hle: Implement remaining services for Stereo VisionChloe Marcec3-7/+60
Used by Zelda Breath of the Wild, Super Mario Odyssey and Nintendo Labo
2021-01-24audout: FlushAudioOutBuffersChloe Marcec3-1/+20
Fixes Devil May Cry
2021-01-24host_shaders/cmake: Pass --quiet to glslang to keep it quietReinUsesLisp1-1/+1
Silences noisy builds on toolchains.
2021-01-24video_core/cmake: Enforce -Warray-bounds and -Wmissing-field-initializersReinUsesLisp1-0/+2
2021-01-24video_core: Silence -Wmissing-field-initializers warningsReinUsesLisp5-25/+56
2021-01-24maxwell_3d: Silence array bounds warningsReinUsesLisp2-35/+35
2021-01-24maxwell_to_vk: Silence -Wextra warnings about using different enum typesReinUsesLisp2-2/+2
2021-01-24Fix connect and disconnect controller eventsgerman2-15/+37
2021-01-23vfs_real: When moving files or directories, don't assume file opening will succeedcomex1-4/+10
Found this via a warning, but it's a substantive fix. Since this is only for a cache, it should be safe to silently drop the entry if opening fails. I think.
2021-01-23shader_ir: Fix comment typoLevi Behunin1-1/+1
2021-01-23sdl_impl: Set the maximum vibration duration to 1 secondMorph1-2/+6
2021-01-23Simplify conditionChloe Marcec1-2/+1
2021-01-23nvdrv: Unregister already registered eventsChloe Marcec1-1/+8
2021-01-23Clamp string reads to buffer sizeChloe Marcec1-3/+5
2021-01-23video_core/cmake: Properly generate fatal errors on AftermathReinUsesLisp1-2/+2
Fix "message(ERROR ..." to "message(FATAL_ERROR ..." to properly stop cmake when Nsight Aftermath can't be configured.
2021-01-23nsight_aftermath_tracker: Fix build issues when enabledReinUsesLisp2-16/+5
Fixes a bunch of build errors when Nsight Aftermath is properly enabled.
2021-01-23vk_pipeline_cache: Properly bypass VertexA shadersReinUsesLisp1-9/+3
The VertexA stage is not yet implemented, but Vulkan is adding its descriptors, causing a discrepancy in the pushed descriptors and the template. This generally ends up in a driver side crash. Bypass the VertexA stage for now.
2021-01-22video_core/memory_manager: Add BytesToMapEndReinUsesLisp2-2/+27
Track map address sizes in a flat ordered map and add a method to query the number of bytes until the end of a map in a given address.
2021-01-22common: Add missing include to bit_util.hbunnei1-0/+1
2021-01-21gl_shader_decompiler: Fix constant buffer size calculationReinUsesLisp1-1/+2
The divide logic was wrong and can cause an uniform buffer size overflow.
2021-01-21video_core/memory_manager: Remove unused CopyBlockUnsafeReinUsesLisp2-8/+0
This function was not being used.
2021-01-21video_core/memory_manager: Flush destination buffer on CopyBlockReinUsesLisp1-0/+4
When we copy into a buffer, it might contain data modified from the GPU on the same pages. Because of this, we have to flush the contents before writing new data. An alternative approach would be to write the data in place, but games can also write data in other ways, invalidating our contents. Fixes geometry in Zombie Panic in Wonderland DX.
2021-01-21video_core/memory_manager: Add GPU address based flush methodReinUsesLisp2-0/+17
Allow flushing rasterizer contents based on a GPU address.
2021-01-21bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64Lioncash1-35/+13
We can use the standardized CLZ facilities to perform this. This also allows us to make utilizing functions constexpr and eliminate the inclusion of an intrinsics header.
2021-01-21hle: service: am: Stub ILibraryAppletAccessor::PresetLibraryAppletGpuTimeSliceZero.bunnei1-1/+8
- Used by Monster Hunter Rise demo.
2021-01-21renderer_opengl: Avoid precompiled cache and force NV GL cache directoryReinUsesLisp8-5/+59
Setting __GL_SHADER_DISK_CACHE_PATH we can force the cache directory to be in yuzu's user directory to stop commonly distributed malware from deleting our driver shader cache. And by setting __GL_SHADER_DISK_CACHE_SKIP_CLEANUP we can have an unbounded shader cache size. This has only been implemented on Windows, mostly because previous tests didn't seem to work on Linux. Disable the precompiled cache on Nvidia's driver. There's no need to hide information the driver already has in its own cache.
2021-01-20lbl: Implement most of lblChloe Marcec1-22/+261
Pretty basic service, only thing left to do is handle setting applying once set:sys is implemented
2021-01-20mii: Fix BuildRandomStoreData & Cleanup raw_dataChloe Marcec4-2274/+1657
Cleaned up mii raw data to reflect the underlying values instead of just a chunk of bytes. Fixed BuildRandomStoreData not actually generating random miis properly. "values" should be a u32, not a u8.
2021-01-20Mark DestinationToString as staticChloe Marcec1-1/+1
2021-01-20Mark LogPacketHeaderEntry hash as noexceptChloe Marcec1-1/+1
2021-01-20lm: Recode LM serviceChloe Marcec8-345/+286
Rework the service to spit out to logs instead of a seperate file as well as fix any crashes caused by lm.
2021-01-19acc: Stub StoreSaveDataThumbnailChloe Marcec5-6/+66
Fixes ACA NEOGEO METAL SLUG hanging on boot.
2021-01-18npad: Add check for HANDHELD_INDEX in UpdateControllerAt()Morph1-1/+1
2021-01-18Always update configuration for handheldgerman1-0/+10
2021-01-18game_list: Fix folder reorderingFearlessTobi2-28/+32
The bug(s) happened because we swapped the contents on values.game_dirs, but the pointer each item had to their respective game_dir wasn't updated. This made it so that the item had the wrong game_dir associated with it after a "move up" or "move down" operation. It can be observed by choosing "open directory location" after such operation. Changed from raw pointer to an index because it's equivalent but a bit clearer, but the change is not essential. Co-Authored-By: Vitor K <29167336+vitor-k@users.noreply.github.com>
2021-01-17configure_service: Only compile FormatEventStatusString when YUZU_ENABLE_BOXCAT is enabledlat9nq1-0/+2
The function is unused if YUZU_ENABLE_BOXCAT is disabled, causing a -Wunused-funciton error when compiled. Wrapping it with `#ifdef YUZU_ENABLE_BOXCAT` to prevent compiling the function when the variable is disabled. Opting to not use [[maybe unused]] in case the function is totally unused in the future.
2021-01-17Fix player 1 default connected valuegerman1-1/+2
2021-01-17texture_cache/util: Resolve -Wsign-compare warningLioncash1-1/+1
Resolves a -Wsign-compare warning on Clang.
2021-01-17video_core: Resolve -Wdocumentation warningsLioncash2-4/+3
Silences some -Wdocumentation warnings on Clang.
2021-01-17vulkan_debug_callback: Add missing header guardLioncash1-0/+2
Prevents inclusion issues from occurring.
2021-01-16input_interpreter: Mark two member functions as constLioncash1-4/+4
These aren't stateful functions, so we can make use of const. While we're at, we can resolve some -Wdocumentation warnings.
2021-01-16input_interpreter: Add method to check for a button press stateMorph2-0/+25
This allows to check for continuous input for the duration of a button press/hold
2021-01-16vk_shader_decompiler: Show comments as OpUndef with a typeReinUsesLisp1-1/+4
Silence the new validation layer error about SPIR-V not allowing OpUndef on a OpTypeVoid, even when the SPIR-V spec doesn't say anything against it. They will be inserted as an undefined int to avoid SPIRV-Cross and validation errors, but only when a debugging tool is attached.
2021-01-15core/cmake: Enforce Wclass-memaccessReinUsesLisp1-0/+1
Treat -Wclass-memaccess as an error.
2021-01-15core: Silence Wclass-memaccess warningsReinUsesLisp17-205/+215
This requires making several types trivial and properly initialize them whenever they are called.
2021-01-15common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITReinUsesLisp11-149/+149
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
2021-01-15vulkan_memory_allocator: Remove unnecesary 'device' memory from commitsReinUsesLisp2-15/+15
2021-01-15vk_texture_cache: Use Download memory types for texture flushesReinUsesLisp2-5/+10
Use the Download memory type where it matters.
2021-01-15vulkan_memory_allocator: Add allocation support for download typesReinUsesLisp2-55/+91
Implements the allocator logic to handle download memory types. This will try to use HOST_CACHED_BIT when available.
2021-01-15vulkan_memory_allocator: Add "download" memory usage hintReinUsesLisp9-45/+86
Allow users of the allocator to hint memory usage for downloads. This removes the non-descriptive boolean passed for "host visible" or not host visible memory commits, and uses an enum to hint device local, upload and download usages.
2021-01-15vulkan_common: Move allocator to the common directoryReinUsesLisp11-11/+11
Allow using the abstraction from the OpenGL backend.
2021-01-15renderer_vulkan: Rename Vulkan memory manager to memory allocatorReinUsesLisp15-54/+52
"Memory manager" collides with the guest GPU memory manager, and a memory allocator sounds closer to what the abstraction aims to be.
2021-01-15vk_memory_manager: Improve memory manager and its APIReinUsesLisp13-343/+318
Fix a bug where the memory allocator could leave gaps between commits. To fix this the allocation algorithm was reworked, although it's still short in number of lines of code. Rework the allocation API to self-contained movable objects instead of naively using an unique_ptr to do the job for us. Remove the VK prefix.
2021-01-15Always initialize keyboard inputgerman5-25/+20
2021-01-15Add mutitouch support for touch screensgerman10-85/+137
2021-01-15Allow to return up to 16 touch inputs per enginegerman10-154/+202
2021-01-15Allow all touch inputs at the same time and remove config options that are not longer necesarygerman8-99/+36
2021-01-15Add multitouch supportgerman2-23/+93
2021-01-15common/bit_util: Replace CLZ/CTZ operations with standardized onesLioncash10-113/+17
Makes for less code that we need to maintain.
2021-01-15common/alignment: Upgrade to use constraints instead of static assertsReinUsesLisp1-13/+9
2021-01-15common/alignment: Rename AlignBits to AlignUpLog2ReinUsesLisp4-16/+15
AlignUpLog2 describes what the function does better than AlignBits.
2021-01-15common/timer: RemoveLioncash3-202/+0
This is a leftover from citra and dolphin that isn't used at all, particularly given the <chrono> header exists.
2021-01-15common/color: RemoveReinUsesLisp2-272/+0
This is a leftover from Citra we no longer use.
2021-01-15core/cmake: Remove Werror flags already defined code-base wideReinUsesLisp1-2/+0
2021-01-15video_core/cmake: Remove Werror flags already defined code-base wideReinUsesLisp1-2/+0
These flags are already defined in src/cmake.
2021-01-15cmake: Remove yuzu_testerReinUsesLisp12-1057/+0
We never ended up using yuzu_tester. Removing it saves code duplication with yuzu_cmd, and distribution size on prebuilt packages. For unit testing, we can use catch2 from guest code and dump the results to a file. Then execute yuzu from a script on ci if we want this to be automated.
2021-01-15cmake: Enforce -Wunused-function code-base wideReinUsesLisp2-1/+1
2021-01-15video_core: Enforce -Wunused-functionReinUsesLisp1-0/+1
Stops us from merging code with unused functions in the future. If something is invoked behind conditionally evaluated code in a way that the language can't see it (e.g. preprocessor macros), the potentially unused function should use [[maybe_unused]].
2021-01-15vk_buffer_cache: Remove unused functionReinUsesLisp1-4/+0
2021-01-15vulkan_common: Silence missing initializer warningsReinUsesLisp2-145/+146
Silence warnings explicitly initializing all members on construction.
2021-01-15vulkan_device: Enable shaderStorageImageMultisample conditionallyReinUsesLisp2-18/+20
Fix Vulkan initialization on ANV.
2021-01-15astc: Increase integer encoded vector sizeReinUsesLisp1-1/+1
Invalid ASTC textures seem to write more bytes here, increase the size to something that can't make us push out of bounds.
2021-01-15astc: Return zero on out of bound bitsReinUsesLisp1-17/+22
Avoid out of bound reads on invalid ASTC textures. Games can bind invalid textures that make us read or write out of bounds.
2021-01-14yuzu: Remove unused variables in Qt codeLioncash2-21/+2
Removes two unused variables in out Qt code. In this case the removal of these two results in less allocations, given std::map allocates on the heap.
2021-01-14configure_motion_touch: Prevent use after move in ApplyConfiguration()Lioncash1-2/+1
touch_engine was being compared against after being moved into the setter for the engine, so this comparison wouldn't behave properly.
2021-01-14configure_motion_touch: Migrate off QRegExp to QRegularExpressionLioncash1-6/+9
QRegularExpression was introduced in Qt 5 as a better replacement for QRegExp. In Qt 6.0 QRegExp is removed entirely. To remain forward compatible with Qt 6.0, we can transition over to using QRegularExpression.
2021-01-13Fix IP validator error where the last octet produced an error if the value was higher than 199german1-2/+3
2021-01-13yuzu: Migrate off of setMargin() to setContentsMargins()Lioncash2-3/+3
setMargin() has been deprecated since Qt 5, and replaced with setContentsMargins(). We can move over to setContentsMargins() to stay forward-compatible with Qt 6.0.
2021-01-13vulkan_device: Remove requirement on shaderStorageImageMultisampleReinUsesLisp1-1/+0
yuzu doesn't currently emulate MS image stores. Requiring this makes no sense for now. Fixes ANV not booting any games on Vulkan.
2021-01-13tests: Add unit tests for the GPU range tracking buffer containerReinUsesLisp2-0/+474
Due to how error prone the container design is, this commit adds unit tests for it. Some tests taken from here are based on bugs from using this buffer container in games, so if we ever break it in the future in a way that might harm games, the tests should fail.
2021-01-13buffer_cache/buffer_base: Add a range tracking buffer containerReinUsesLisp2-0/+496
It keeps track of the modified CPU and GPU ranges on a CPU page granularity, notifying the given rasterizer about state changes in the tracking behavior of the buffer. Use a small vector optimization to store buffers smaller than 256 KiB locally instead of using free store memory allocations.
2021-01-13cmake: Enforce -Werror=switch and -Werror=unused-variableMorph1-0/+2
2021-01-12common/tree: Convert defines over to templatesLioncash2-592/+666
Reworks the tree header to operate off of templates as opposed to a series of defines. This allows all tree facilities to obey namespacing rules, and also allows this code to be used within modules once compiler support is in place. This also gets rid to use a macro to define functions and structs for necessary data types. With templates, these will be generated when they're actually used, eliminating the need for the separate declaration.
2021-01-12common/tree: Remove unused splay tree definesLioncash1-249/+2
Makes for less code to take care of.
2021-01-12common/parent_of_member: Replace TYPED_STORAGE define with template aliasLioncash2-8/+10
Provides the same construct, but makes it obey namespacing.
2021-01-11hle: kernel: thread: Preserve thread wait reason for debugging only.bunnei8-4/+74
- This is decoupled from core functionality and used for debugging only.
2021-01-11yuzu: debugger: wait_tree: Handle unknown ThreadState.bunnei1-0/+3
2021-01-11hle: kernel: k_scheduler_lock: Fix shadowing errors.bunnei1-1/+1
2021-01-11core: arm: arm_interface: Fix shadowing errors.bunnei1-3/+4
2021-01-11core: hle: Add missing calls to MicroProfileOnThreadExit.bunnei2-0/+5
2021-01-11core: hle: Integrate new KConditionVariable and KAddressArbiter implementations.bunnei15-1182/+508
2021-01-11core: hle: kernel: Update KAddressArbiter.bunnei3-0/+437
2021-01-11core: hle: kernel: Update KConditionVariable.bunnei4-0/+413
2021-01-11core: hle: kernel: Begin moving common SVC defintions to its own header.bunnei2-0/+14
2021-01-11hle: kernel: Remove unnecessary AddressArbiter definition.bunnei1-1/+0
2021-01-11common: common_funcs: Add R_UNLESS macro.bunnei1-0/+8
2021-01-11hle: kernel: k_scheduler: Cleanup OnThreadPriorityChanged.bunnei2-6/+3
2021-01-11hle: kernel: Rename thread "status" to "state".bunnei1-2/+2
2021-01-11hle: kernel: thread: Replace ThreadStatus/ThreadSchedStatus with a single ThreadState.bunnei12-172/+111
- This is how the real kernel works, and is more accurate and simpler.
2021-01-11core: hle: kernel: Add some useful functions for checking kernel addresses.bunnei1-0/+19
2021-01-11core: hle: kernel: svc_types: Add type definitions for KAddressArbiter.bunnei1-0/+12
2021-01-11common: Introduce useful tree structures.bunnei4-0/+1641
2021-01-11core: hle: kernel: Update KSynchronizationObject.bunnei33-621/+397
2021-01-11core: hle: kernel: Begin moving common SVC results to its own header.bunnei2-0/+21
2021-01-11hle: service: nfp: Remove incorrect signaling behavior in GetDeviceState.bunnei1-6/+0
2021-01-10config: Enable docked mode by defaultMorph5-6/+6
2021-01-10cmake: Enforce C4101Morph1-0/+1
This matches GCC's -Wunused-variable
2021-01-10yuzu_cmd: Silence unreferenced local variable warningMorph1-2/+0
2021-01-09general: Resolve C4062 warnings on MSVCMorph2-0/+4
2021-01-09common/div_ceil: Return numerator typeReinUsesLisp1-5/+5
Fixes instances where DivCeil(u32, u64) would surprisingly return u64, instead of the more natural u32.
2021-01-09cmake: Enforce C4062, C4265, C4388, and C5038ReinUsesLisp1-0/+4
This should match some warnings we treat as errors on gcc and clang, caching bugs early and reducing the number of instances where we have to edit commits to make CI happy when developing from Windows.
2021-01-09file_sys/registered_cache: Silence virtual functions without override warningsReinUsesLisp1-4/+4
2021-01-09core: Silence unhandled enum in switch warningsReinUsesLisp2-10/+5
2021-01-09tests/ring_buffer: Silence signed/unsigned mismatch warningsReinUsesLisp1-15/+15
2021-01-08Stub IsCpuOverclockEnabledgerman2-1/+10
2021-01-08vk_fence_manager: Use timeline semaphores instead of spin waitsReinUsesLisp3-54/+18
With timeline semaphores we can avoid creating objects. Instead of creating an event, grab the current tick from the scheduler and flush the current command buffer. When the fence has to be queried/waited, we can do so against the master semaphore instead of spinning on an event. If Vulkan supported NVN like events or fences, we could signal from the command buffer and wait for that without splitting things in two separate command buffers.
2021-01-07remove inaccurate referenceAmeer J1-1/+1
Co-authored-by: LC <mathew1800@gmail.com>
2021-01-07fix for nvdec disabled, cleanup host1xameerj3-72/+23
2021-01-07nvdec syncpt incorporationameerj11-37/+59
laying the groundwork for async gpu, although this does not fully implement async nvdec operations
2021-01-07vulkan_library: Common::DynamicLibrary::Open is [[nodiscard]]MerryMage1-1/+1
Ignore the return value on __APPLE__ systems as well
2021-01-07texture_cache: Replace PAGE_SHIFT with PAGE_BITSMerryMage1-6/+6
PAGE_SHIFT is a #define in system headers that leaks into user code on some systems
2021-01-05core: Enforce C4715 (not all control paths return a value)ReinUsesLisp1-0/+2
2021-01-05core: Silence warnings when compiling without assertsReinUsesLisp5-8/+11
2021-01-04vk_rasterizer: Skip binding empty descriptor sets on computeReinUsesLisp1-2/+4
Fixes unit tests where compute shaders had no descriptors in the set, making Vulkan drivers crash when binding an empty set.
2021-01-04buffer_queue: Protect queue_sequence list access with a mutexameerj2-13/+21
fixes a data race as this is an unprotected variable manipulated by multiple threads
2021-01-04yuzu/configure_filesystem: Remove "Select Cache Directory" optionFearlessTobi5-57/+1
This tab of the settings is already extremely bloated and the setting itself is quite useless. With a gamelist of almost 30 games, the cache directory is smaller than 1MB for me and therefore I don't see why it needs to be configurable.
2021-01-04vulkan_device: Allow creating a device without surfaceReinUsesLisp1-3/+3
2021-01-04renderer_vulkan/nsight_aftermath_tracker: Move to vulkan_commonReinUsesLisp5-30/+21
2021-01-04renderer_vulkan: Move device abstraction to vulkan_commonReinUsesLisp29-29/+31
2021-01-04gl_texture_cache: Avoid format views on Intel and AMDReinUsesLisp11-21/+48
Intel and AMD proprietary drivers are incapable of rendering to texture views of different formats than the original texture. Avoid creating these at a cache level. This will consume more memory, emulating them with copies.
2021-01-04gl_texture_cache: Create base images with sRGBReinUsesLisp2-99/+100
This breaks accelerated decoders trying to imageStore into images with sRGB. The decoders are currently disabled so this won't cause issues at runtime.
2021-01-04Address review commentsFearlessTobi1-5/+5
2021-01-04Delete the old log file before rotating (#5675)xperia641-0/+3
2021-01-03renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp52-169/+166
The "VK" prefix predates the "Vulkan" namespace. It was carried around the codebase for consistency. "VKDevice" currently is a bad alias with "VkDevice" (only an upcase character of difference) that can cause confusion. Rename all instances of it.
2021-01-03main: Resolve error string not displayingLioncash3-2/+8
During the transition to make the error dialog translatable, I accidentally got rid of the conversion to ResultStatus, which prevented operator<< from being invoked during formatting. This adds a function to directly retrieve the result status string instead so that it displays again.
2021-01-03Fix the old log file to work with the log parser.bunnei1-1/+1
2021-01-03Rotate previous log file to '.old' if it existsxperia641-4/+9
2021-01-03hle: service: nvflinger: buffer_queue: Do not reset id/layer_id on Connect.bunnei1-2/+0
- This behavior is a mistake, fixes Katana Zero.
2021-01-02dynarmic: Add Unsafe_InaccurateNaN optimizationMerryMage6-0/+26
2021-01-02general: Fix various spelling errorsMorph20-43/+43
2021-01-02X86/NativeClock: Reimplement RTDSC access to be lock free.Fernando Sahmkow5-103/+107
2021-01-02X86/NativeClock: Improve performance of clock calculations on hot path.Fernando Sahmkow2-5/+71
2021-01-01typo fixTimotej Leginus1-1/+1
typo fix
2021-01-01configure_input: Modify controller connection delayMorph4-12/+47
Increases the controller connection delay to 60ms and refactors it to attempt to disconnect all controllers prior to connecting all controllers in HID.
2021-01-01memory: Remove MemoryHookMerryMage9-382/+0
2020-12-31yuzu/main: fix mouse not showing on move and port citra-emu/citra#5476gal204-19/+24
2020-12-31main: Make the loader error dialog fully translatableLioncash1-8/+12
Makes the dialog fully localizable and also adds disambiguation comments to help translators understand what the formatting specifiers indicate.
2020-12-31main: Tidy up enum comparisonLioncash1-2/+1
enum classes are comparable with one another, so these casts aren't necessary.
2020-12-31vulkan_instance: Allow different Vulkan versions and enforce 1.1ReinUsesLisp7-41/+39
For listing the available physical devices we can use Vulkan 1.0. Now that MoltenVK supports 1.1 we can require it for running games. Add missing documentation.
2020-12-31vk_device: Use an array to report lacking device limitsReinUsesLisp1-13/+17
This makes easier to add and tune the required device limits.
2020-12-31vk_device: Stop initialization when device is not suitableReinUsesLisp2-61/+39
VKDevice::IsSuitable was not being called. To address this issue, check suitability before initialization and throw an exception if it fails. By doing this, we can deduplicate some code on queue searches. Previosuly we would first search if a present and graphics queue existed, then on initialization we would search again to find the index.
2020-12-31renderer_vulkan: Remove two step initialization on VKDeviceReinUsesLisp6-31/+10
The Vulkan device abstraction either initializes successfully on the constructor or throws a Vulkan exception.
2020-12-31renderer_vulkan: Throw when enumerating devices failsReinUsesLisp5-33/+21
Report device enumeration errors with exceptions to be consistent with other initialization related function calls. Reduces the amount of code to maintain.
2020-12-31renderer_vulkan: Initialize surface in separate fileReinUsesLisp6-73/+109
Move surface initialization code to a separate file. It's unlikely to use this code outside of Vulkan, but keeping platform-specific code (Win32, Xlib, Wayland) in its own translation unit keeps things cleaner.
2020-12-31renderer_vulkan: Catch and report exceptionsReinUsesLisp1-2/+5
Move more Vulkan code to report errors with exceptions and report them through a log before notifying it with an error boolean for backwards compatibility. In the future we can replace the rasterizer two-step initialization to always use exceptions.
2020-12-31renderer_vulkan: Create debug callback on separate file and throwReinUsesLisp8-79/+88
Initialize debug callbacks (messenger) from a separate file. This allows sharing code with different backends. Change our Vulkan error handling to use exceptions instead of error codes, simplifying the initialization process.
2020-12-31renderer_vulkan: Move instance initialization to a separate fileReinUsesLisp4-111/+176
Simplify Vulkan's backend initialization code by moving it to a separate file, allowing us to initialize a Vulkan instance from different backends.
2020-12-31vulkan_common: Rename renderer_vulkan/wrapper.h to vulkan_common/vulkan_wrapper.hReinUsesLisp51-51/+51
Allows sharing Vulkan wrapper code between different rendering backends.
2020-12-31vulkan_common: Move dynamic library load to a separate fileReinUsesLisp4-31/+59
Allows us to initialize a Vulkan dynamic library from different backends without duplicating code.
2020-12-31Port citra-emu/citra#5509german1-2/+45
2020-12-31Make the coding conventions more consistant16-Bit-Dog1-1/+1
lut_index had 0 added when nothing was supposed to be added despite this, index was not added to 0 when nothing was supposed to be added...
2020-12-30half_set: Resolve -Wmaybe-uninitialized warningsLioncash1-7/+7
2020-12-30maxwell_to_vk: Initialize usage variable in SurfaceFormat()Lioncash1-1/+1
Silences a -Wmaybe-uninitialized warning
2020-12-30video_core: Rewrite the texture cacheReinUsesLisp152-8101/+10359
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
2020-12-30cmake: Enforce -WuninitializedReinUsesLisp1-0/+1
2020-12-30service/pcie: Fix invalid initialization argumentReinUsesLisp1-1/+1
2020-12-30video_core: Add a delayed destruction ring abstractionReinUsesLisp2-0/+33
2020-12-30host_shaders: Add Vulkan assembler compute shadersReinUsesLisp4-0/+96
2020-12-30host_shaders: Add helper to blit depth stencil fragment shaderReinUsesLisp2-0/+17
2020-12-30host_shaders: Add texture color blit fragment shaderReinUsesLisp2-0/+15
2020-12-30host_shaders: Add shaders to present to the swapchainReinUsesLisp3-0/+36
2020-12-30host_shaders: Add shaders to convert between depth and color imagesReinUsesLisp3-0/+28
2020-12-30host_shaders: Add compute shader to copy BC4 as RG32UI to RGBA8ReinUsesLisp2-0/+71
2020-12-30host_shaders: Add shader to render a full screen triangleReinUsesLisp2-0/+30
2020-12-30host_shaders: Add pitch linear upload compute shaderReinUsesLisp2-0/+87
2020-12-30host_shaders: Add block linear upload compute shadersReinUsesLisp3-0/+249
2020-12-30host_shaders: Add copyright headers to OpenGL present shadersReinUsesLisp2-0/+8
2020-12-30video_core/host_shaders: Add support for prebuilt SPIR-V shadersReinUsesLisp1-16/+37
Add support for building SPIR-V shaders from GLSL and generating headers to include the text of those same GLSL shaders to consume from OpenGL.
2020-12-30core/memory: Read and write page table atomicallyReinUsesLisp7-147/+132
Squash attributes into the pointer's integer, making them an uintptr_t pair containing 2 bits at the bottom and then the pointer. These bits are currently unused thanks to alignment requirements. Configure Dynarmic to mask out these bits on pointer reads. While we are at it, remove some unused attributes carried over from Citra. Read/Write and other hot functions use a two step unpacking process that is less readable to stop MSVC from emitting an extra AND instruction in the hot path: mov rdi,rcx shr rdx,0Ch mov r8,qword ptr [rax+8] mov rax,qword ptr [r8+rdx*8] mov rdx,rax -and al,3 and rdx,0FFFFFFFFFFFFFFFCh je Core::Memory::Memory::Impl::Read<unsigned char> mov rax,qword ptr [vaddr] movzx eax,byte ptr [rdx+rax]
2020-12-30hle: kernel: service_thread: Make thread naming more consistent.bunnei1-1/+1
2020-12-30hle: kernel: Manage service threads on another thread.bunnei1-9/+20
- This is to allow service threads to defer destruction of themselves.
2020-12-30common: ThreadWorker: Add class to help do asynchronous work.bunnei3-0/+90
2020-12-30hle: kernel: Manage host thread IDs using TLS.bunnei1-46/+31
- Avoids the need to have a large map of host to guest thread IDs.
2020-12-29k_priority_queue: Fix concepts usecomex2-3/+9
- For `std::same_as`, add missing include of `<concepts>`. - For `std::convertible_to`, create a replacement in `common/concepts.h` and use that instead. This would also be found in `<concepts>`, but unlike `std::same_as`, `std::convertible_to` is not yet implemented in libc++, LLVM's STL implementation - not even in master. (In fact, `std::same_as` is the *only* concept currently implemented. For some reason.)
2020-12-29Add missing include of "core/hle/kernel/kernel.h"comex1-0/+1
This is needed as the header invokes methods on KernelCore.
2020-12-29svc: demote SleepThread log to LOG_TRACEameerj1-1/+1
This log is called often, and introduces a lot of noise when debug logging is enabled, making it difficult to see other debug logs.
2020-12-29hle: kernel: Move ServiceThread ownership to KernelCore.bunnei4-5/+48
- Fixes a circular dependency which prevented threads from being released on shutdown.
2020-12-29hle: kernel: service_thread: Add thread name and take weak_ptr of ServerSession.bunnei3-11/+22
2020-12-29hle: service: Acquire and release a lock on requests.bunnei7-40/+41
- This makes it such that we can safely access service members from CoreTiming thread.
2020-12-29audio_core: stream: Ensure buffer is valid before release.bunnei1-2/+10
2020-12-29core: Do not reset device_memory on shutdown.bunnei1-1/+0
- This will be reset on initialization.
2020-12-29core: hle: kernel: Clear process list on boot.bunnei1-2/+2
2020-12-29gpu: gpu_thread: Ensure MicroProfile is shutdown on exit.bunnei1-0/+3
2020-12-29hle: service: vi: Refactor to grab buffer only once.bunnei1-15/+4
2020-12-29service: nvflinger: Improve synchronization for BufferQueue.bunnei5-19/+72
- Use proper mechanisms for blocking on DequeueBuffer. - Ensure service thread terminates on emulation Shutdown.
2020-12-29hle: service: Ensure system is powered on before writing IPC result.bunnei1-1/+5
2020-12-29core: kernel: Clear process list earlier.bunnei1-2/+2
2020-12-29video_core: gpu_thread: Do not wait when system is powered down.bunnei1-1/+2
2020-12-29core: settings: Untangle multicore from asynchronous GPU.bunnei5-21/+4
- Now that GPU is always threaded, we can support multicore with synchronous GPU.
2020-12-29video_core: gpu: Implement synchronous mode using threaded GPU.bunnei4-12/+34
2020-12-29video_core: gpu: Refactor out synchronous/asynchronous GPU implementations.bunnei10-289/+130
- We must always use a GPU thread now, even with synchronous GPU.
2020-12-29hle: kernel: hle_ipc: Remove SleepClientThread.bunnei2-54/+0
- This was kind of hacky, and no longer is necessary with service threads.
2020-12-29hle: service: bsd: Update to work with service threads, removing SleepClientThread.bunnei4-250/+45
2020-12-29hle: service: nvdrv: Revert #4981 to remove usage of SleepClientThread.bunnei23-211/+83
- Note, this always processes the ioctl right away, which fixes BotW 1.0.0 issues.
2020-12-29hle: kernel: service_thread: Add parameter for thread pool size.bunnei3-7/+7
2020-12-29hle: service: nvflinger: Refactor locking and interfaces.bunnei3-45/+31
2020-12-29hle: service: vi: Remove usage of SleepClientThread.bunnei1-34/+43
2020-12-29core: hle: server_session: Use separate threads for each service connection.bunnei6-23/+140
2020-12-27udp client: process packets only for the correct padgal201-0/+5
2020-12-27Allow to invert analog axis with right clickgerman4-65/+99
2020-12-26renderer_vulkan/fixed_pipeline_state: Move enabled bindings to static stateReinUsesLisp3-26/+12
Without using VK_EXT_robustness2, we can't consider the 'enabled' (not null) vertex buffers as dynamic state, as this leads to invalid Vulkan state. Move this to static state that is always hashed and compared in the pipeline key. The bits for enabled vertex buffers are moved into the attribute state bitfield. This is not 'correct' as it's not an attribute state, but that struct has bits to spare, and it's used in an array of 32 elements (the exact same number of vertex buffer bindings).
2020-12-25yuzu/main: Add basic command line argumentsMorph1-3/+39
The following command line arguments are supported: yuzu.exe "path_to_game" - Launches a game at "path_to_game" yuzu.exe -f - Launches the next game in fullscreen yuzu.exe -g "path_to_game" - Launches a game at "path_to_game" yuzu.exe -f -g "path_to_game" - Launches a game at "path_to_game" in fullscreen
2020-12-25core: memory: Ensure thread safe access when pages are rasterizer cached (#5206)bunnei1-12/+40
* core: memory: Ensure thread safe access when pages are rasterizer cached.
2020-12-25cmake: Always enable VulkanReinUsesLisp8-133/+75
Removes the unnecesary burden of maintaining separate #ifdef paths and allows us sharing generic Vulkan code across APIs.
2020-12-25video_core: Enforce C4715 (not all control paths return a value)ReinUsesLisp1-0/+1
Most of the time people write code that always returns a value, terminates execution, throws an exception, or uses an unconventional jump primitive. This is not always true when we build without asserts on mainline builds. To avoid introducing undefined behavior on our most used builds, enforce this warning signalling an error and stopping the build from shipping.
2020-12-25vk_shader_decompiler: Silence warning when compiling without assertsReinUsesLisp1-0/+1
2020-12-23yuzu/main: Improve menubar access keyslat9nq4-38/+38
Adds a unique access key to each action within each menu. A few actions already had their own access key, so those were untouched.
2020-12-23Add option to reset window size to 1080pgerman3-6/+30
2020-12-22yuzu/main: Save settings when starting guestlat9nq2-16/+25
Saves UISettings and Settings when booting a guest. Moves updating UISettings::values from GMainWindow::closeEvent into its own function, then reuses it in GMainWindow::BootGame.
2020-12-19yuzu: Remove gdbstub configurationFearlessTobi9-110/+7
The gdbstub itself was removed with https://github.com/yuzu-emu/yuzu/pull/5028. This PR just removes the remaining gdb configuration code from the emulator and the UI.
2020-12-18applets/web: Implement the online web browser appletMorph8-64/+167
2020-12-18applets/web: Fix keyboard to emulated controller inputMorph3-4/+30
2020-12-18main: Add the ability to disable the web appletMorph2-0/+27
This should only be used for Super Mario 3D All-Stars. This is a temporary solution until it can be implemented properly.
2020-12-18main, applets/web: Re-add progress dialog for RomFS extractionMorph8-68/+125
2020-12-18applets/web: Implement the Qt web browser applet frontendMorph4-5/+600
2020-12-18web_browser_scripts: Add injection scripts for the web browserMorph1-0/+193
2020-12-18pl_u, applets/web: Decrypt shared fonts to TTF filesMorph3-18/+117
2020-12-18ns_vm: Stub NeedsUpdateVulnerabilityMorph1-1/+10
This is used to force system updates on launching the web browser. We do not care about system updates so this can be set to false.
2020-12-18frontend/input_interpreter: Add InputInterpreter APIMorph3-0/+167
The InputInterpreter class interfaces with HID to retrieve button press states. Input is intended to be polled every 50ms so that a button is considered to be held down after 400ms has elapsed since the initial button press and subsequent repeated presses occur every 50ms. Co-authored-by: Chloe <25727384+ogniK5377@users.noreply.github.com>
2020-12-18controllers/npad: Make press_state atomicMorph2-2/+3
2020-12-18util: Add URL Request Interceptor for QWebEngineMorph3-0/+64
2020-12-18bootmanager: Add a check whether loading is completeMorph2-0/+6
2020-12-18applets/web: Implement the default web browser applet frontendMorph3-1/+24
2020-12-18applets/web: Implement the offline browser applet backendMorph2-13/+143
2020-12-18applets/web: Initial implementation of the web browser appletMorph3-2/+428
2020-12-18applets: Remove the previous web browser applet implementationMorph12-1039/+40
2020-12-18system_archive: Add + and - buttons to the Nintendo Extended OSS fontMorph2-315/+343
2020-12-18buffer_queue: better use of std::arrayameerj1-59/+46
2020-12-17Overwrite slots instead of queuing them, add disconnect signalameerj3-27/+33
Fix for Katana Zero and Yoshi's Crafted World
2020-12-17system_archive: Update Nintendo Extended OSS fontMorph2-182/+347
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-12-13cmake: Fix generating CMake configs and linking with Boostlat9nq1-1/+1
Fixes regression by 761206cf81b271f7f4dd6a167a120325b760dbf3, causing yuzu to not build on Linux with any version of Boost except a cached 1.73 Conan version from before about a day ago. Moves the Boost requirement out of the `REQUIRED_LIBS` psuedo-2D-array for Conan to instead be manually configured, using Conan as a fallback solution if the system does not meet our requirements. Requires any update from the linux-fresh container in order to build. **DO NOT MERGE** until someone with the MSVC toolchain can verify this works there, too.
2020-12-12common: Update CMakeList to fix build issue with Boost.bunnei1-2/+1
2020-12-12controllers/npad: Validate device handles before useMorph2-0/+45
Some games such as NEKOPARA Vol. 3 send invalid device handles when calling InitializeVibrationDevice. Introduce a check to validate the device handle before use.
2020-12-12Revert "Merge pull request #5173 from lioncash/common-fs"Morph2-112/+396
This reverts commit ce5fcb6bb2c358b0251a2ce87945bda52789a76d, reversing changes made to 6f41763061082d5fa2ab039c554427152243cb46.
2020-12-12Revert "Merge pull request #5174 from ReinUsesLisp/fs-fix"Morph2-36/+4
This reverts commit 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a, reversing changes made to e94dd7e2c4fc3f7ca2c15c01bdc301be2b8a4c1b.
2020-12-12Revert "Merge pull request #5176 from Morph1984/fix-createfile"Morph1-6/+2
This reverts commit 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76, reversing changes made to 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a.
2020-12-12Revert "Merge pull request #5179 from ReinUsesLisp/fs-path"Morph1-1/+1
This reverts commit 4e94d0d53af2cdb7b03ef9de23cc29f3565df97a, reversing changes made to 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76.
2020-12-12Revert "Merge pull request #5181 from Morph1984/5174-review"Morph1-3/+9
This reverts commit cdb36aef9ec9d30bdef1953f9ed46776ae2f12af, reversing changes made to 5e9b77129f2cf8c039a8d98033cae4ac0f93f515.
2020-12-10vfs: Use existing type aliases consistentlyLioncash28-136/+142
Makes use of the VirtualDir and VirtualFile aliases across the board instead of having a few isolated places that don't use it.
2020-12-10common/file_util: Simplify the behavior of CreateFullPathMorph1-9/+3
2020-12-09common/file_util: Let std::filesystem cast from UTF16 to std::stringReinUsesLisp1-1/+1
Fix invalid encoding paths when iterating over a directory on Windows.
2020-12-09vfs_real: Fix CreateFile for files without a file extensionMorph1-2/+6
2020-12-09common/file_util: Fix and deprecate CreateFullPath, add CreateDirsReinUsesLisp2-4/+31
Fix CreateFullPath to have its intended previous behavior (whatever that was), and deprecate it in favor of the new CreateDirs function. Unlike CreateDir, CreateDirs is marked as [[nodiscard]] to avoid new code ignoring its result value.
2020-12-09common/file_util: Succeed on CreateDir when the directory existsReinUsesLisp1-0/+5
2020-12-09file_util: Migrate remaining file handling functions over to std::filesystemLioncash2-340/+100
Converts creation and deletion functions over to std::filesystem, simplifying our file-handling code. Notably with this, CopyDir will now function on Windows.
2020-12-09file_util: Migrate Exists() and IsDirectory() over to std::filesystemLioncash2-57/+13
Greatly simplifies our file-handling code for these functions.
2020-12-08svc: Remove unnecessary castsLioncash1-35/+25
Simplifies and removes some casts. In all cases, these were generally widening from a 32-bit unsigned type to a 64-bit unsigned type, so no information would be lost from the conversion.
2020-12-08IPurchaseEventManager: Implement GetPurchasedEventReadableHandleMorph1-1/+14
- Used by Pokémon Café Mix - Used by DOOM: Eternal
2020-12-08IPurchaseEventManager: Stub Set(Default)DeliveryTargetMorph1-2/+27
- Used by Pokémon Café Mix - Used by DOOM: Eternal
2020-12-08aoc_u: Stub Create(Permanent)EcPurchasedEventManagerMorph2-2/+38
- Used by Pokémon Café Mix - Used by DOOM: Eternal
2020-12-08memory: Resolve -Wdocumentation warning for Write()Lioncash1-2/+0
Write() doesn't return anything, so the @returns tag shouldn't be present.
2020-12-08fsp_srv: Implement OpenDataStorageWithProgramIndexMorph6-1/+83
- Used by RollerCoaster Tycoon 3: Complete Edition
2020-12-08file_sys: Consolidate common Title ID operationsMorph5-13/+67
2020-12-08core: Remove unnecessary enum casts in log callsLioncash25-96/+90
Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
2020-12-08controller: Use std::move within ConvertToFrontendParameters()Lioncash1-3/+3
Avoids unnecessary copies.
2020-12-08controller: Avoid unnecessary copies in ConfigurationComplete()Lioncash1-9/+8
Avoids unnecessary 1072 byte copies when querying info about controllers.
2020-12-08Disable analog joystick from buttons by defaultgerman5-10/+52
2020-12-07video_core: Make use of ordered container contains() where applicableLioncash8-16/+13
With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
2020-12-07ast: Improve string concat readability in operator()Lioncash1-5/+4
Provides an in-place format string to make it more pleasant to read.
2020-12-07gl_shader_decompiler: Elide unnecessary copies within DeclareConstantBuffers()Lioncash1-1/+1
Resolves a -Wrange-loop-analysis warning.
2020-12-07buffer_block: Mark interface as nodiscard where applicableLioncash1-7/+7
Prevents logic errors from occurring from unused values.
2020-12-07buffer_block: Remove unnecessary includesLioncash1-5/+0
Reduces the amount of dependencies the header pulls in.
2020-12-07shader_ir: std::move node within DeclareAmend()Lioncash1-2/+2
Same behavior, but elides an unnecessary atomic reference count increment and decrement.
2020-12-07video_core: Remove unnecessary enum class casting in logging messagesLioncash33-148/+125
fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more. Reduces the line noise a bit.
2020-12-07maxwell_3d: Move member variables to end of classLioncash1-31/+32
Follows our established coding style.
2020-12-07maxwell_3d: Resolve -Wdocumentation warningLioncash1-1/+1
Removes a documentation comment for a non-existent member.
2020-12-07maxwell_3d: Remove unused dirty_pointer arrayLioncash1-2/+0
This is unused and removing it shrinks the structure by 3584 bytes.
2020-12-07configure_motion_touch: Fix unescaped backslash in regexcomex1-2/+2
Since this is inside a string literal, backslashes that are part of regex syntax have to be escaped. But that's ugly, so convert to a raw string instead.
2020-12-07network, sockets: Replace `POLL_IN`, `POLL_OUT`, etc. constants with an `enum class PollEvents`comex6-71/+82
Actually, two enum classes, since for some reason there are two separate yet identical `PollFD` types used in the codebase. I get that one is ABI-compatible with the Switch while the other is an abstract type used for the host, but why not use `WSAPOLLFD` directly for the latter? Anyway, why make this change? Because on Apple platforms, `POLL_IN`, `POLL_OUT`, etc. (with an underscore) are defined as macros in <sys/signal.h>. (This is inherited from FreeBSD.) So defining a variable with the same name causes a compile error. I could just rename the variables, but while I was at it I thought I might as well switch to an enum for stronger typing. Also, change the type used for values copied directly to/from the `events` and `revents` fields of the host *native* `pollfd`/`WSASPOLLFD`, from `u32` to `short`, as `short` is the correct canonical type on both Unix and Windows.
2020-12-07Fix "explicitly defaulted but implicitly deleted" warningcomex1-1/+1
`PhysicalCore`'s move assignment operator was declared as `= default`, but was implicitly deleted because `PhysicalCore` has fields of reference type. Switch to explicitly deleting it to avoid a Clang warning. The move *constructor* is still defaulted, and is required to exist due to the use of `std::vector<PhysicalCore>`.
2020-12-07hle: Type check ResponseBuilder::Push arguments, and fix use in vi.cppcomex2-34/+37
- Add a type check so that calling Push with an invalid type produces a compile error rather than a linker error. - vi.cpp was calling Push with a variable of type `std::size_t`. There's no explicit overload for `size_t`, but there is one for `u64`, which on most platforms is the same type as `size_t`. On macOS, however, it isn't: both types are 64 bits, but `size_t` is `unsigned long` and `u64` is `unsigned long long`. Regardless, it makes more sense to explicitly use `u64` here instead of `size_t`.
2020-12-07CMakeLists,network: Create YUZU_UNIX macro to replace __unix__comex2-5/+5
__unix__ is not predefined on Apple platforms even though they are Unix.
2020-12-07renderer_vulkan: Add missing `override` specifiercomex1-1/+1
2020-12-07map_interval: Change field order to address uninitialized field warningcomex1-1/+2
Clang complains about `new_chunk`'s constructor using the then-uninitialized `first_chunk` (even though it's just to get a pointer into it).
2020-12-07core: Mark unused fields as [[maybe_unused]]comex2-3/+3
2020-12-07boxcat: Avoid unnecessary object copycomex1-1/+1
2020-12-07nvdrv: Remove useless re-declaration of pure virtual methods that were already declared in the superclasscomex1-33/+0
2020-12-07video_core: Adjust `NUM` macro to avoid Clang warningcomex3-3/+3
The previous definition was: #define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / sizeof(u32)) In cases where `field_name` happens to refer to an array, Clang thinks `sizeof(an array value) / sizeof(a type)` is an instance of the idiom where `sizeof` is used to compute an array length. So it thinks the type in the denominator ought to be the array element type, and warns if it isn't, assuming this is a mistake. In reality, `NUM` is not used to get array lengths at all, so there is no mistake. Silence the warning by applying Clang's suggested workaround of parenthesizing the denominator.
2020-12-06hle: kernel: Process: Various style fixes based on code review feedback.bunnei1-2/+2
2020-12-06core: cpu_manager: Fix a typo in PreemptSingleCore, which broke many games.bunnei1-21/+26
- We were reload'ing the old current scheduler, which may have changed.
2020-12-06hle: kernel: Thread: Various style fixes based on code review feedback.bunnei1-22/+25
2020-12-06hle: kernel: KScopedSchedulerLockAndSleep: Various style fixes based on code review feedback.bunnei1-6/+6
2020-12-06hle: kernel: KScopedLock: Various style fixes based on code review feedback.bunnei1-6/+8
2020-12-06hle: kernel: KAbstractSchedulerLock: Various style fixes based on code review feedback.bunnei1-9/+7
2020-12-06hle: kernel: KScheduler: Various style fixes based on code review feedback.bunnei2-50/+41
2020-12-06hle: kernel: KPriorityQueue: Various style fixes based on code review feedback.bunnei1-29/+36
2020-12-06hle: kernel: KAffinityMask: Various style fixes based on code review feedback.bunnei1-17/+13
2020-12-06hle: kernel: GlobalSchedulerContext: Various style fixes based on code review feedback.bunnei2-5/+10
2020-12-06common: BitSet: Various style fixes based on code review feedback.bunnei1-23/+22
2020-12-06hle: kernel: Use C++ style comments in KScheduler, etc.bunnei4-152/+136
2020-12-06kernel: KScopedSchedulerLockAndSleep: Remove unused ctor.bunnei1-13/+7
2020-12-06kernel: time_manager: Add missing lock guards.bunnei1-3/+10
2020-12-06hle: kernel: Migrate to KScopedSchedulerLock.bunnei15-48/+92
2020-12-06hle: kernel: Separate KScopedSchedulerLockAndSleep from k_scheduler.bunnei11-69/+72
2020-12-06hle: kernel: Separate KScheduler from GlobalSchedulerContext class.bunnei9-520/+140
2020-12-06hle: kernel: Rewrite scheduler implementation based on Mesopshere.bunnei26-1223/+1215
2020-12-06hle: kernel: physical_core: Clear exclusive state after each run.bunnei3-0/+7
- This is closer to pre-multicore behavior, and works a bit better.
2020-12-06hle: kernel: Port KAbstractSchedulerLock from Mesosphere.bunnei2-0/+77
2020-12-06hle: kernel: svc: Remove reschedule on svcBreak.bunnei1-5/+0
- This breaks things, and is unnecessary, since emulation will be done at this point.
2020-12-06hle: kernel: process: Add schedule count tracking, to be used for yield impl.bunnei1-0/+13
2020-12-06hle: kernel: svc: Remove unnecessary hack in svcSleep.bunnei1-7/+0
2020-12-06common: Port KPriorityQueue from Mesosphere.bunnei2-0/+444
2020-12-06common: Port BitSet from Mesosphere.bunnei2-0/+101
2020-12-06hle: kernel: Port KAffinityMask from Mesosphere.bunnei7-16/+80
2020-12-05maxwell_dma: Rename RenderEnable::Mode::FALSE and TRUE to avoid name conflictcomex1-5/+7
On Apple platforms, FALSE and TRUE are defined as macros by <mach/boolean.h>, which is included by various system headers. Note that there appear to be no actual users of the names to fix up.
2020-12-05yuzu_cmd: Remove 'users_size'comex1-1/+0
Specifically: const auto size = sdl2_config->GetInteger("System", "users_size", 0); The variable is never used, producing a warning. I wondered if this ought to be assigning something to in `Settings`, but nothing else in the codebase ever mentions a setting called "users_size", so I guess it's safe to remove...
2020-12-05Update cubeb and request a persistent stream sessionVitor Kiguchi1-0/+1
2020-12-05video_core: Resolve more variable shadowing scenarios pt.3Lioncash49-292/+305
Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
2020-12-05game_list_p: Resolve deprecated usage of QVariant operator<Lioncash1-1/+2
This is designated as obsolete in Qt's docs (see: https://doc.qt.io/qt-5/qvariant-obsolete.html#operator-lt)
2020-12-05applets: Resolve variable shadowingMorph10-19/+19
2020-12-05video_core: Resolve more variable shadowing scenarios pt.2Lioncash39-296/+305
Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
2020-12-05xbyak_abi: Shorten std::size_t to size_tLioncash1-8/+8
Makes for less reading.
2020-12-05xbyak_abi: Avoid implicit sign conversionsLioncash1-2/+2
2020-12-05system_version: Update to 11.0.0Chloe Marcec1-6/+6
2020-12-05Fix telemetry-related exit crash from use-after-freeFearlessTobi1-3/+3
Co-Authored-By: xperia64 <xperia64@users.noreply.github.com>
2020-12-04codec: Remove deprecated usage of AVCodecContext::refcounted_framesLioncash1-1/+0
This was only necessary for use with the avcodec_decode_video2/avcoded_decode_audio4 APIs which are also deprecated. Given we use avcodec_send_packet/avcodec_receive_frame, this isn't necessary, this is even indicated directly within the FFmpeg API changes document here on 2017-09-26: https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges#L410 This prevents our code from breaking whenever we update to a newer version of FFmpeg in the future if they ever decide to fully remove this API member.
2020-12-04video_core: Resolve more variable shadowing scenariosLioncash42-206/+219
Resolves variable shadowing scenarios up to the end of the OpenGL code to make it nicer to review. The rest will be resolved in a following commit.
2020-12-04nim: Stub IsLargeResourceAvailableMorph1-1/+13
- Used by Immortals Fenyx Rising
2020-12-03node: Mark member functions as [[nodiscard]] where applicableLioncash1-29/+29
Prevents logic bugs from accidentally ignoring the return value.
2020-12-03node: Eliminate variable shadowingLioncash1-47/+49
2020-12-03vp9/vic: Resolve pessimizing movesLioncash2-11/+11
Removes the usage of moves that don't result in behavior different from a copy, or otherwise would prevent copy elision from occurring.
2020-12-03mouse_poller: Remove unused includesLioncash1-3/+1
2020-12-03mouse_input: Invert conditional in UpdateYuzuSettings()Lioncash1-4/+6
Allows the struct to be constructed in place.
2020-12-03mouse_input: Remove two casts and amend some formattingLioncash1-11/+14
Removes the use of two static casts and improves the readability of some vectors slightly.
2020-12-03mouse_input: Resolve a -Wdocumentation warningLioncash1-1/+1
2020-12-03mouse_input: Remove unused includesLioncash2-7/+3
2020-12-03audio_core: Make shadowing and unused parameters errorsLioncash29-154/+163
Moves the audio code closer to enabling warnings as errors in general.
2020-12-01Fix implicit conversion in mouse inputgerman1-6/+8
2020-11-30Disable web applet and warning when compiling for Linux on CIlat9nq1-0/+2
yuzu's web applet does not or barely reacts to user input while open in Linux. It can be closed via 'Exit Web Applet' on the menubar, however if yuzu is in fullscreen, this is effectively a softlock as the menubar cannot be accessed. This disables building yuzu with the web applet on the Linux CI target. In addition, this disables the QMessageBox warning about not having compiled yuzu with the web applet.
2020-11-29kernel: scheduler: Minor cleanup to remove duplicated code.bunnei2-46/+14
2020-11-29kernel: time_manager: Protect access with a mutex.bunnei2-1/+5
2020-11-29common: fiber: Use VirtualBuffer for stack memory.bunnei1-2/+5
- This will be aligned by default, and helps memory usage.
2020-11-29hle: kernel: thread: Remove unused "Running" state.bunnei3-21/+9
2020-11-29core: arm: Implement InvalidateCacheRange for CPU cache invalidation.bunnei12-16/+56
2020-11-29hle: kernel: time_manager: Avoid a crash on process exit.bunnei1-1/+4
2020-11-29hle: kernel: AddressArbiter: Remove unused code.bunnei2-9/+0
2020-11-29hle: kernel: SynchronizationObject: Use atomic_bool for is_signaled.bunnei1-1/+2
2020-11-29common: fiber: Use boost::context instead of native fibers on Windows.bunnei3-116/+9
2020-11-29hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.bunnei15-72/+124
2020-11-29Add missing types to NpadCommunicationModegerman1-0/+2
2020-11-28audio_core: Remove temp_mix_bufferChloe Marcec2-3/+1
It's unused and doesn't need to be initialized
2020-11-27CMakeLists: disable -Winvalid-offsetofcomex1-0/+1
This Clang warning complains when offsetof is used on a non-standard-layout type (i.e. any class using various C++ features), even though it works fine (and is not undefined behavior as of C++17).
2020-11-27tests: Fix warning about comparison between signed and unsignedcomex1-2/+2
2020-11-27core: Eliminate remaining usages of the global system instanceLioncash21-1593/+58
Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends.
2020-11-27savedata_factory: Eliminate usage of the global system instanceLioncash4-14/+22
Now there's only two meaningful instances left in core.
2020-11-27Stub set and get NpadCommunicationModegerman4-2/+50
2020-11-27service: Eliminate usages of the global system instanceLioncash222-907/+1221
Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
2020-11-26codec: Fix `pragma GCC diagnostic pop` missing corresponding pushcomex1-0/+1
2020-11-26vk_shader_decompiler: Implement force early fragment testsReinUsesLisp6-11/+19
Force early fragment tests when the 3D method is enabled. The established pipeline cache takes care of recompiling if needed. This is implemented only on Vulkan to avoid invalidating the shader cache on OpenGL.
2020-11-26core: Reduce string copies in GetGameFileFromPath()Lioncash1-12/+22
Eliminates some minor string churn where applicable. Also eliminates an unnecessary vector copy.
2020-11-26Limit queue size to 10 framesameerj1-0/+4
Workaround for ZLA, which seems to decode and queue twice as many frames as it displays.
2020-11-26Implement full mouse supportgerman14-277/+793
2020-11-26Add multiple udp server supportgerman10-267/+420
2020-11-26Address PR feedbackameerj4-32/+33
remove some redundant moves, make deleter match naming guidelines. Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-11-26common: Add Common::DivCeil and Common::DivCeilLog2ReinUsesLisp2-0/+27
Add an equivalent to 'Common::AlignUp(n, d) / d' and a log2 alternative.
2020-11-26input_common: ignore some Clang warnings after 5c4774e8ce1dJan Beich1-2/+2
error: unknown warning option '-Werror=unused-but-set-parameter'; did you mean '-Werror=unused-parameter'? [-Werror,-Wunknown-warning-option] error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
2020-11-25Queue decoded frames, cleanup decodersameerj10-338/+227
2020-11-25cleanup unneeded comments and newlinesameerj1-6/+0
2020-11-25hid: Check if applet_resource exists in InitializeVibrationDeviceMorph1-2/+4
2020-11-25Refactor MaxwellToSpirvComparison. Use Common::BitCastameerj3-31/+34
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2020-11-25Address PR feedback from Reinameerj5-40/+31
2020-11-25vulkan_renderer: Alpha Test Culling Implementationameerj5-2/+76
Used by various textures in many titles, e.g. SSBU menu.
2020-11-25core: cpu_manager: Fix shutdown crash when closing before emulation starts.bunnei1-7/+17
2020-11-25frontend: yuzu (qt): Register a callback for ExecuteProgram.bunnei4-7/+38
2020-11-25service: am: Implement ExecuteProgram and required stubs.bunnei2-3/+34
- This is used by Super Mario 3D All-Stars.
2020-11-25core: loader: Implement support for loading indexed programs.bunnei12-26/+74
2020-11-24hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)bunnei17-100/+104
* hle: services: Fix a crash with improper NVFlinger lifetime management. - This crash would happen when attempting to shutdown yuzu early on in boot.
2020-11-24nvdrv, video_core: Don't index out of bounds when given invalid syncpoint IDcomex2-13/+20
- Use .at() instead of raw indexing when dealing with untrusted indices. - For the special case of WaitFence with syncpoint id UINT32_MAX, instead of crashing, log an error and ignore. This is what I get when running Super Mario Maker 2.
2020-11-24input_common: Fix typo in gc_poller.cpp with [[maybe_unused]].bunnei1-2/+2
2020-11-24nvservices: Reintroducee IoctlCtrlChloe Marcec24-91/+214
Fixes regression caused by #4907 which caused games like Breath of the Wild 1.0.0 not to boot.
2020-11-24input_common: Add more missing [[maybe_unused]] from #4927.bunnei3-4/+6
2020-11-24Fix warnings in core/frontend/input.h with [[maybe_unused]]bunnei1-1/+3
Fixes build break due to #4927
2020-11-23Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off main threadcomex10-73/+68
EmuWindow::PollEvents was called from the GPU thread (or the CPU thread in sync-GPU mode) when swapping buffers. It had three implementations: - In GRenderWindow, it didn't actually poll events, just set a flag and emit a signal to indicate that a frame was displayed. - In EmuWindow_SDL2_Hide, it did nothing. - In EmuWindow_SDL2, it did call SDL_PollEvents, but this is wrong because SDL_PollEvents is supposed to be called on the thread that set up video - in this case, the main thread, which was sleeping in a busyloop (regardless of whether sync-GPU was enabled). On macOS this causes a crash. To fix this: - Rename EmuWindow::PollEvents to OnFrameDisplayed, and give it a default implementation that does nothing. - In EmuWindow_SDL2, do not override OnFrameDisplayed, but instead have the main thread call SDL_WaitEvent in a loop.
2020-11-23svc: Remove unnecessary [[maybe_unused]] tagLioncash1-1/+1
The parameter is used in this function, so this suppression isn't necessary.
2020-11-22input_common: Treat warnings as errorsLioncash8-10/+23
Migrates over warnings as errors for input common to match how the common library treats warnings as errors.
2020-11-21applets/controller: Use a pair of emulated controller index to controller typeMorph2-44/+96
2020-11-21configure_input_player: Use the npad style set to show the available controllersMorph2-55/+96
This will reduce the likelihood of an invalid controller type to be set within a game
2020-11-21gl_rasterizer: Remove warning of untested alpha testReinUsesLisp1-4/+0
Alpha test has been proven to only affect the first render target.
2020-11-20olsc: Move member initialization to after member functions.bunnei1-2/+2
2020-11-20async_shaders: emplace threads into the worker thread vectorLioncash1-2/+2
Same behavior, but constructs the threads in place instead of moving them.
2020-11-20async_shaders: Simplify implementation of GetCompletedWork()Lioncash1-2/+1
This is equivalent to moving all the contents and then clearing the vector. This avoids a redundant allocation.
2020-11-20async_shaders: Simplify moving data into the pending queueLioncash1-13/+8
2020-11-20async_shaders: std::move data within QueueVulkanShader()Lioncash1-2/+2
Same behavior, but avoids redundant copies. While we're at it, we can simplify the pushing of the parameters into the pending queue.
2020-11-20gl_rasterizer: Make floating-point literal a floatLioncash1-1/+1
Gets rid of an unnecessary expansion from float to double.
2020-11-20shader_bytecode: Make use of [[nodiscard]] where applicableLioncash1-73/+79
Ensures that all queried values are made use of.
2020-11-20shader_bytecode: Eliminate variable shadowingLioncash1-15/+17
2020-11-20common/bit_cast: Add function matching std::bit_cast without constexprReinUsesLisp2-0/+23
Add a std::bit_cast-like function archiving the same runtime results as the standard function, without compile time support. This allows us to use bit_cast while we wait for compiler support, it can be trivially replaced in the future.
2020-11-19hle: service: Stub OLSC Initialize and SetSaveDataBackupSettingEnabled functions.bunnei6-0/+91
- Used by Animal Cross: New Horizons v1.6.0 update, minimal stub gets this update working.
2020-11-19Modify rumble amplificationgerman772-4/+3
2020-11-19virtual_buffer: Do nothing on resize() calls with same sizesLioncash1-1/+6
Prevents us from churning memory by freeing and reallocating a memory block that would have already been adequate as is.
2020-11-18patch_manager: Remove usages of the global system instanceLioncash26-157/+259
With this, only 19 usages of the global system instance remain within the core library. We're almost there.
2020-11-18core: Remove unused private Init function for the System classLioncash2-16/+4
This isn't used, so it can be removed.
2020-11-18core: Make use of [[nodiscard]] with the System classLioncash4-85/+82
Given this is a central class, we should flag cases where the return value of some functions not being used is likely a bug.
2020-11-18configure_input_player: Use static qualifier for IsProfileNameValid()Lioncash1-1/+1
This is a static member function, so we don't need use an existing instance to call this function.
2020-11-18virtual_buffer: Add compile-time type-safety guarantees with VirtualBufferLioncash1-0/+6
VirtualBuffer makes use of VirtualAlloc (on Windows) and mmap() (on other platforms). Neither of these ensure that non-trivial objects are properly constructed in the allocated memory. To prevent potential undefined behavior occurring due to that, we can add a static assert to loudly complain about cases where that is done.
2020-11-18page_table: Allow page tables to be movedLioncash4-9/+30
Makes page tables and virtual buffers able to be moved, but not copied, making the interface more flexible. Previously, with the destructor specified, but no move assignment or constructor specified, they wouldn't be implicitly generated.
2020-11-18page_table: Add missing doxygen parameters to Resize()Lioncash1-0/+2
Resolves two -Wdocumentation warnings.
2020-11-18page_table: Remove unnecessary header inclusionsLioncash1-4/+0
Prevents indirect inclusions for these headers.
2020-11-17rasterizer_interface: Make use of [[nodiscard]] where applicableLioncash1-8/+9
2020-11-17render_base: Make use of [[nodiscard]] where applicableLioncash1-11/+11
2020-11-17gpu: Make use of [[nodiscard]] where applicableLioncash1-31/+35
2020-11-17Addressed changesChloe Marcec4-10/+13
2020-11-17audren: Make use of nodiscard, rework downmixing, release all buffersChloe Marcec13-102/+194
Preliminary work for upmixing & general cleanup. Fixes basic issues in games such as Shovel Knight and slightly improves the LEGO games. Upmixing stitll needs to be implemented. Audio levels in a few games will be fixed as we now use the downmix coefficients when possible instead of supplying our own
2020-11-16sdl_impl: Pump SDL Events at 1000 HzMorph1-1/+1
2020-11-16configure_input: Accommodate for the mouse input device engineMorph2-2/+18
2020-11-16hid: Reimplement Begin/EndPermitVibrationSessionMorph3-5/+17
Upon further investigation, these commands allow temporary vibrations even when the "Controller Vibration" system setting is disabled. As a result, vibrations are allowed when either the system setting or this flag is set to true. Therefore, we can only block vibrations when both flags are set to false.
2020-11-16controllers/npad: Load input devices on initMorph1-0/+2
2020-11-16configure_input: Update the input profiles for other player tabsMorph4-11/+38
2020-11-16general: Fix compiler warnings on linux and miscellaneous changesMorph12-22/+31
2020-11-16sdl_impl: Revert to the "old" method of mapping sticksMorph3-33/+29
Not all controllers have a SDL_GameController binding. This caused controllers not present in the SDL GameController database to have buttons mapped instead of axes. Furthermore, it was not possible to invert the axes when it could be useful such as emulating a horizontal single joycon or other potential cases. This allows us to invert the axes by reversing the order of mapping (vertical, then horizontal).
2020-11-16applets/controller: Change the input button to create input profilesMorph10-100/+117
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-11-16controllers/npad: Remove the old vibration filterMorph4-65/+64
Previously we used a vibration filter that filters out amplitudes close to each other. It turns out there are cases where this results into vibrations that are too inaccurate. Remove this and move the 100Hz vibration filter (Only allowing a maximum of 100 vibrations per second) from sdl_impl to npad when enable_accurate_vibrations is set to false.
2020-11-16input: Disconnect a controller prior to connecting a new oneMorph2-50/+73
Some games do not respond to a change in controller type if 1) The controller is not disconnected prior to being reconnected and/or 2) The controller is reconnected instantly after being disconnected. Since it is not possible to change controllers instantly on hardware and requiring a disconnect prior to connecting a new one, we should emulate this as well with a small delay, fixing the aforementioned issue.
2020-11-16hid: Implement InitializeVibrationDevice and IsVibrationDeviceMountedMorph3-12/+66
2020-11-16input_common: Add VibrationDevice and VibrationDeviceFactoryMorph19-101/+327
A vibration device is an input device that returns an unsigned byte as status. It represents whether the vibration device supports vibration or not. If the status returns 1, it supports vibration. Otherwise, it does not support vibration.
2020-11-16configure_input: Add per-player vibrationMorph16-28/+730
Allows for enabling and modifying vibration and vibration strength per player. Also adds a toggle for enabling/disabling accurate vibrations. Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-11-16settings: Remove global vibration strength modifierMorph9-19/+1
This will be replaced in favor of per-player vibration strength modifiers.
2020-11-16hid: Mark Begin/EndPermitVibrationSession as stubsMorph3-18/+4
The implementation of these commands seem incomplete and causes rumble in Super Mario Party to stop working since only EndPermitVibrationSession is called. Thus, these are better off being marked as a stub until this can be investigated more thoroughly.
2020-11-16controllers/npad: Send an empty vibration on destruction/deactivationMorph3-22/+38
This stops all controllers from continuously vibrating when emulation is stopped.
2020-11-16hid: Stub IsVibrationDeviceMountedMorph2-1/+23
- Used in Super Mario Odyssey
2020-11-16controllers/npad: Add heuristics to reduce rumble state changesMorph3-35/+72
Sending too many state changes in a short period of time can cause massive performance issues. As a result, we have to use several heuristics to reduce the number of state changes to minimize/eliminate this performance impact while maintaining the quality of these vibrations as much as possible.
2020-11-16configure_input: Hook up the vibration percentage spinboxMorph11-3/+26
This allows setting the vibration strength percentage anywhere from 1% to 100%. Also hooks up the remaining motion button and checkbox in the Controller Applet.
2020-11-16controllers/npad: Stop games from vibrating incorrect controllersMorph1-0/+10
Fixes vibration in 1-2 Switch and potentially other games where they would vibrate both players' joycons at the same time.
2020-11-16hid: Fix controller rumble based on new researchMorph3-43/+69
This fixes the issue where rumble is only sent to the first controller. Now, individual controllers can receive their own rumble commands.
2020-11-16hid: Pop a struct of parameters instead of popping individual parametersMorph1-103/+237
Some parameters need to be doubleword aligned due to the presence of the applet_resource_user_id. Previously, this value was invalid in many commands where it was not doubleword aligned when popped.
2020-11-16hid: Reorder all HID commandsMorph5-217/+232
Reorders all HID commands in command id order.
2020-11-16hid: Implement GetVibrationDeviceInfoMorph2-3/+39
The first u32 describes the vibration device type which is a Linear Resonant Actuator used in Nintendo Switch controller hardware. The second u32 describes the vibration device position, in this case distinguishing between left and right vibration actuators. Pro Controllers have 2 LRAs each that can vibrate independently of each other, which means they have 2 distinct vibration device handles to distinguish between the two actuators. Similarly for joycons, the left joycon can be distinguished from the right joycon through the vibration device handle since each joycon has 1 LRA.
2020-11-16hid: Stub InitializeVibrationDeviceMorph1-3/+11
2020-11-16controllers/npad: Rename NPadType to NpadStyleSetMorph3-9/+9
This more accurately represents the underlying type and avoids confusion with NpadType
2020-11-16controllers/npad: Add DeviceHandle structMorph1-27/+50
A DeviceHandle describes a vibration device or six-axis sensor based on the npad type, npad id, and device index/position
2020-11-16configure_input_player: Change "Defaults" button behaviorMorph2-35/+30
RestoreDefaults() now restores the selected devices' mappings using UpdateMappingWithDefaults(). This allows us to move the keyboard mapping from RestoreDefaults() to UpdateMappingWithDefaults().
2020-11-16settings: Preparation for per-game input settingsMorph19-115/+167
2020-11-16udp/client: Reduce testing period to 5 secondsMorph1-1/+1
2020-11-16config: Migrate config files into config/customMorph4-21/+61
Co-authored-by: lat9nq <lat9nq@virginia.edu>
2020-11-16controllers/npad: Connect a controller on init if none are connectedMorph2-1/+15
2020-11-16applets/controller: Auto accept a valid single player configurationMorph3-14/+24
2020-11-16bootmanager: Allow mouse clicks only if touch is disabledMorph1-3/+13
Previously mouse clicks will not register when touch is disabled. This rectifies that and allows mouse clicks to be mapped to other buttons if the touchscreen is disabled.
2020-11-16input_profiles: Implement input profilesMorph13-130/+509
2020-11-16configure_input_player: Implement input exclusivity and persistenceMorph4-138/+205
With this, the "Input Devices" combobox should accurately reflect the input device being used and disallows inputs from other input devices unless the input device is set to "Any".
2020-11-16ui/themes: Cleanup UIMorph13-397/+263
2020-11-15motion_input: Mark constructor as explicitLioncash1-1/+1
2020-11-15motion_input: Mark member functions as [[nodiscard]] where applicableLioncash1-10/+11
2020-11-11maxwell_3d: Use insert instead of loop push_backReinUsesLisp1-3/+1
This reduces the overhead of bounds checking on each element. It won't reduce the cost of allocation because usually this vector's capacity is usually large enough to hold whatever we push to it.
2020-11-11maxwell_3d: Move code to separate functionsReinUsesLisp2-151/+124
Deduplicate some code and put it in separate functions so it's easier to understand and profile.
2020-11-10fix minor clang errorgerman1-1/+1
2020-11-10Addressed issuesChloe Marcec10-17/+86
2020-11-10core: Make nvservices more standardizedChloe Marcec26-903/+1156
2020-11-10bootmanager: Address review commentslat9nq1-12/+16
Changes QMessageBox usages to warnings, as the problems they bring to light are being safely handled by the application and do not warrant something of the "critical" level. Changes LOG_CRITICAL to LOG_ERROR for the same reason. Preferring ERROR to WARNING as yuzu is denying loading of any guest applications after checking for these conditions. Moved logging the GL_RENDERER string into GetUnsupportedGLExtensions() to make more clear that unsupported extensions were already being logged. Makes placement of the logs easier to understand later, as well.
2020-11-10bootmanager: Log and show GL_RENDERER string when GPU is insufficientlat9nq1-3/+19
Changes the first message to not include the OpenGL version, as the error is caused by OpenGL failing to load. Adds a new check for OpenGL version 4.3. This will display a message with a similar error as well as the GL_RENDERER string. Adds a CRITICAL log message when triggered. This prevents a crash with yuzu trying to use older OpenGL versions. Modifies the unsupported extension message to output the GL_RENDERER string in the message, as well as logging the string.
2020-11-08ipc_helpers: Remove usage of the global system instanceLioncash16-7/+23
Resolves numerous deprecation warnings throughout the codebase due to inclusion of this header. Now building core should be significantly less noisy (and also relying on less global state). This also uncovered quite a few modules that were relying on indirect includes, which have also been fixed.
2020-11-08cpu_interrupt_handler: Mark move contructor/assignment as deletedLioncash1-2/+2
The interrupt handler contains a std::atomic_bool, which isn't copyable or movable, so the special move member functions will always be deleted, despite being defaulted. This can resolve warnings on clang and GCC.
2020-11-08Allow to dial any angle with digital joystickgerman1-19/+103
2020-11-08applets: Rename LibraryAppletVersion to ControllerAppletVersionMorph2-15/+15
2020-11-08applets/controller: Pop normal data for StrapGuide and FirmwareUpdateMorph2-6/+19
2020-11-08applets/controller: Introduce additional checks for mode and callerMorph2-5/+39
Some games like Cave Story+ set invalid values in the ControllerPrivateArg's mode and caller fields. Use other fields to determine the appropriate mode and caller should either or both fields be invalid.
2020-11-08applets/controller: Add ControllerUpdateFirmwareArg structMorph1-0/+7
2020-11-07settings: log value of CPU_Accuracylat9nq1-0/+1
2020-11-07video_core: dma_pusher: Remove integrity check on command lists.bunnei3-29/+1
- This seems to cause softlocks in Breath of the Wild.
2020-11-07hle: service: caps_u: Stub GetAlbumFileList3AaeAruid.bunnei2-9/+17
- This works similiar to GetAlbumContentsFileListForApplication. - Since we do not implement the album, this should be safe to stub for now. - Used by Super Smash Bros. Ultimate (newer updates) in World of Light.
2020-11-07common/fiber: Move all member variables into impl classLioncash2-89/+86
Hides all of the implementation details for users of the class. This has the benefit of reducing includes and also making the fiber classes movable again.
2020-11-06settings: Simplify initializer of resolution factorLioncash1-1/+1
This can use a braced initializer to accomplish the same thing with less code.
2020-11-05General: Fix clang buildLioncash4-7/+14
Allows building on clang to work again
2020-11-04core/settings: Move configuring_global behind an APILioncash9-39/+50
Rather than have directly modified global state here, we can make it an implementation detail and have an interface that changes are queried through.
2020-11-04core: Remove usage of unicornLioncash11-418/+15
Unicorn long-since lost most of its use, due to dynarmic gaining support for handling most instructions. At this point any further issues encountered should be used to make dynarmic better. This also allows us to remove our dependency on Python.
2020-11-02common: Enable warnings as errorsLioncash9-31/+49
Cleans up common so that we can enable warnings as errors.
2020-11-02nvdec: Make use of [[nodiscard]] where applicableLioncash7-16/+16
Prevents bugs from occurring where the results of a function are accidentally discarded
2020-11-01fixup! hle service: nvdrv: nvhost_gpu: Update to use SyncpointManager and other improvements.bunnei2-3/+11
2020-11-01core: Initialize GPU before services.bunnei1-4/+6
2020-11-01 hle service: nvdrv: nvhost_gpu: Update to use SyncpointManager and other improvements.bunnei3-46/+106
- Refactor so that SubmitGPFIFO and KickoffPB use shared functionality. - Implement add_wait and add_increment flags.
2020-11-01video_core: dma_pusher: Add support for integrity checks.bunnei2-0/+27
- Log corrupted command lists, rather than crash.
2020-11-01video_core: dma_pusher: Add support for prefetched command lists.bunnei2-25/+52
2020-11-01service: hle: nvflinger: Fix potential shutdown crash when GPU is destroyed.bunnei1-0/+4
2020-11-01video_core: gpu: Implement WaitFence and IncrementSyncPoint.bunnei3-28/+70
2020-11-01hle service: nvdrv: nvhost_ctrl: Update to use SyncpointManager.bunnei3-9/+31
2020-11-01hle service: nvdrv: Update to instantiate SyncpointManager.bunnei2-5/+18
2020-11-01hle: service: nvdrv: Implement SyncpointManager, to manage syncpoints.bunnei4-1/+127
2020-11-01Rename to align with switchbrew and remove gpu function (#4714)Levi Behunin2-16/+10
* Rename to align with switchbrew * Rename to align with switchbrew and remove gpu function that checks if clearing should be done.
2020-10-31hle: service: ldr: Implement UnloadNrr.bunnei1-1/+15
- Used by Final Fantasy X/X-2 HD Remaster.
2020-10-30CMakeLists: Resolve MSVC build failuresLioncash1-1/+0
Prevents the compiler tripping up about Windows headers.
2020-10-30video_core: unbreak -Werror in NVDEC with ClangJan Beich1-1/+1
src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp:41:15: error: unused variable 'OutOfMemory' [-Werror,-Wunused-const-variable] constexpr u32 OutOfMemory{static_cast<u32>(-12)}; ^
2020-10-30General: Catch more expressions with no effect on MSVCLioncash1-0/+4
MSVC lets us fine-tune catching expressions with no side-effects a little more.
2020-10-30General: Make ignoring a discarded return value an errorLioncash3-6/+17
Allows our CI to catch more potential bugs. This also removes the [[nodiscard]] attribute of IOFile's Open member function. There are cases where a file may want to be opened, but have the status of it checked at a later time.
2020-10-30common/stream: Be explicit with copy and move operatorsLioncash1-3/+9
2020-10-30vp9: Be explicit with copy and move operatorsLioncash1-0/+18
It's deprecated in the language to autogenerate these if the destructor for a type is specified, so we can explicitly specify how we want these to be generated.
2020-10-30vp9: Mark functions with [[nodiscard]] where applicableLioncash2-13/+13
Prevents values from mistakenly being discarded in cases where it's a bug to do so.
2020-10-30vp9: Provide a default initializer for "hidden" memberLioncash1-1/+1
The API of VP9 exposes a WasFrameHidden() function which accesses this member. Given the constructor previously didn't initialize this member, it's a potential vector for an uninitialized read. Instead, we can initialize this to a deterministic value to prevent that from occurring.
2020-10-30vp9: Make some member functions internally linkedLioncash2-58/+54
These helper functions don't directly modify any member state and can be hidden from view.
2020-10-30General: Resolve a few missing initializer warningsLioncash5-4/+24
Resolves a few -Wmissing-initializer warnings.
2020-10-29async_shaders: Increase Async worker thread count for 8+ thread cpusameerj1-8/+9
Adds 1 async worker thread for every 2 available threads above 8
2020-10-29kernel/process: Add missing <ctime> includeMorph1-0/+1
Fixes compilation on MSVC
2020-10-29web_service: follow-up fix to #4842 ...liushuyu1-5/+0
* The web_service http request is now fixed on Windows (R) platform. * The issue is due to a complicated race-condition in `httplib`, a detailed explanation is available at https://github.com/yhirose/cpp-httplib/pull/701 * A pending Pull Request on `httplib` has been applied to remedy the said race-condition. * The socket availability check is removed due to a behavioral chice of `httplib` that a socket will not be created before any actual request is sent.
2020-10-29Add hotplug, rumble and fix 3rd party adapters for the GC adaptergerman3-303/+433
2020-10-29web_service: web_backend: Handle socket errors with GenericRequest.bunnei1-0/+11
- Fixes a shutdown crash when we try to submit telemetry if there is a service issue.
2020-10-29video_core: cdma_pusher: Add missing LOG_DEBUG field in ExecuteCommand.bunnei1-1/+1
2020-10-28shader: Partially implement texture cube array shadowReinUsesLisp3-25/+37
This implements texture cube arrays with shadow comparisons but doesn't fix the asserts related to it. Fixes out of bounds reads on swizzle constructors and makes them use bounds checked ::at instead of the unsafe operator[].
2020-10-28shader/arithmetic: Implement FCMP immediate + register variantReinUsesLisp2-1/+4
Trivially add the encoding for this.
2020-10-28video_core: Enforce -Wredundant-move and -Wpessimizing-moveReinUsesLisp4-4/+5
Silence three warnings and make them errors to avoid introducing more in the future.
2020-10-28video_core: Enforce -Werror=type-limitsReinUsesLisp2-1/+2
Silences one warning and avoids introducing more in the future.
2020-10-28common/fiber: Take shared_ptr<Fiber> by copy in YieldToReinUsesLisp2-3/+3
YieldTo does not intend to modify the passed shared_ptrs. Pass it by copy to keep a reference count while this function executes.
2020-10-28tests: Fix data race in fibers testReinUsesLisp1-31/+40
Previous to this commit, the tests were using operator[] from unordered_map to query elements but this silently inserts empty elements when they don't exist. If all threads were executed without concurrency, this wouldn't be an issue, but the same unordered_map could be written from two threads at the same time. This is a data race and makes some previously inserted elements invisible for a short period of time, causing them to insert and return an empty element. This default constructed element (a zero) was used to index an array of fibers that asserted when one of them was nullptr, shutting the test session off. To address this issue, lock on thread id reads and writes. This could be a shared mutex to allow concurrent reads, but the definition of std::this_thread::get_id is fuzzy when using non-standard techniques like fibers. I opted to use a standard mutex. While we are at it, fix the included headers.
2020-10-28service: Update function tablesLioncash5-1/+7
Updates function tables according to info on SwitchBrew.
2020-10-27web_backend: fix a regression introduced in 39c8d18liushuyu2-20/+2
* A regression was in 39c8d18 and token verification function was broken. * The reason being `httplib` now requires OpenSSL 1.1+ API while LibreSSL 2.x provided OpenSSL 1.0 compatible API. * The bundled LibreSSL has been updated to 3.2.2 so it now provides OpenSSL 1.1 compatible API now. * Also the path hint has been added so that it will find the correct path to the CA certs on *nix systems. * An option is provided so that *nix system distributions/providers can use their own SSL implementations when compiling Yuzu/Citra to (hopefully) complies with their maintenance guidelines. * LURLParse is also removed since `httplib` can handle `scheme:host:port` string itself now.
2020-10-27sync_manager: Amend parameter order of calls to SyncptIncr constructorLioncash2-9/+9
Corrects some cases where the arguments would be incorrectly swapped.
2020-10-27h264: Make WriteUe take a u32Lioncash2-7/+8
Enforces the type of the desired value in calling code.
2020-10-27vp9: std::move buffer within ComposeFrameHeader()Lioncash1-1/+1
We can move the buffer here to avoid a heap reallocation
2020-10-27vp9: Remove dead codeLioncash1-6/+0
2020-10-27vp9: Join declarations with assignmentsLioncash1-7/+8
2020-10-27vp9: Remove pessimizing movesLioncash1-2/+2
The move will already occur without std::move.
2020-10-27vp9: Resolve variable shadowingLioncash1-4/+4
2020-10-27nvdec: Tidy up header includesLioncash13-62/+59
Prevents a few unnecessary inclusions.
2020-10-27yuzu: settings: Enable multicore, asynch GPU, and assembly shaders by default.bunnei3-11/+11
- In general, this is now the preferred settings for most games. # Conflicts: # src/yuzu/configuration/config.cpp
2020-10-27hle/kernel: Remove unused registered_core_threads to fix data racesReinUsesLisp1-5/+0
This member was only used on asserts and it triggered data races. Remove it to fix them.
2020-10-27video_core: NVDEC Implementationameerj50-310/+3909
This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library. The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data. To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library. Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header. Async GPU is not properly implemented at the moment. Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
2020-10-27kernel: Use the current time as the default RNG seedlat9nq1-1/+1
Use the current time, not zero, as the default RNG seed.
2020-10-27controller: Pass ControllerParameters by reference in ReconfigureControllers()Lioncash4-7/+9
Prevents unnecessary copies and heap reallocations from occurring.
2020-10-27hle: services: TimeZoneContentManager: This can be made explicit.bunnei1-1/+1
2020-10-27core: cpu_manager: Add missing call to MicroProfileOnThreadExit().bunnei1-0/+2
- Fixes an occasional crash when trying to launch subsequent games.
2020-10-25general: Use template deduction guides for lock_guardLioncash2-2/+2
Same behavior, less code.
2020-10-25controller: Convert led_patterns integer literals to bool literalsLioncash1-9/+9
'bool' isn't always guaranteed to be the same size as an int, so this can technically cause truncation warnings if we support other platforms.
2020-10-25applets/profile_select: Resolve a warning in exec()Morph1-1/+1
Resolves a warning where not all control paths return a value.
2020-10-22Don't ask for profile when there's only one.Kewlan3-16/+20
2020-10-22core: Fix clang build pt.3Lioncash4-16/+6
Should finally resolve building with clang.
2020-10-21sdl_impl: Fix controller reconnection issuesMorph1-85/+84
It turns out that after a controller is disconnected, there is a chance that events from the previous controller are sent/processed after it has been disconnected. This causes the previously disconnected controller to reappear as connected due to GetSDLJoystickBySDLID() emplacing this controller back to the map. Fix this by only returning an SDLJoystick if and only if it exists in the map.
2020-10-21core: Fix clang build pt.2Lioncash2-4/+10
Resolves the clang build issue in a more unintrusive way.
2020-10-21Revert "core: Fix clang build"bunnei104-904/+665
2020-10-21video_core: Conditially activate relevant compiler warningsLioncash1-2/+4
These compiler flags aren't shared with clang, so specifying these flags unconditionally can lead to a bit of warning spam. While we're in the area, we can also enable -Wunused-but-set-parameter given this is almost always a bug.
2020-10-21kernel: Fix build with recent compiler flag changesLioncash1-4/+8
This slipped through the cracks due to another change being merged before the compiler flag changes.
2020-10-20configure_input_player: Fix modifier buttonsMorph3-25/+23
Fix them for real this time, now they finally work.
2020-10-20gl_arb_decompiler: Implement robust buffer operationsReinUsesLisp3-33/+54
This emulates the behavior we get on GLSL with regular SSBOs with a pointer + length pair. It aims to be consistent with the crashes we might get. Out of bounds stores are ignored. Atomics are ignored and return zero. Reads return zero.
2020-10-20Added remaining paramsDavid Marcec1-1/+4
2020-10-20nifm: GetAppletInfo stubDavid Marcec1-1/+8
Fixes crash for Catherine Full Body
2020-10-18core: Add boxcat sources with target_sourcesLioncash1-7/+7
Same behavior, minus a script variable.
2020-10-18core: Fix clang buildLioncash104-665/+904
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-10-17mii/manager: Make use of unused lower bound in GetRandomValue()Lioncash1-1/+1
Previously, the lower bound wasn't being used and zero was being used as the lower bound every time this function was called. This affects the outcome of some of the randomized entries a little bit, for example, the lower-bound for beard and mustache flags was supposed to be 1, not 0. Aside from these cases, the bug didn't affect anything else.
2020-10-17service: bcat: Check client connection before interacting with socket.bunnei1-0/+10
- Fixes a crash when BCAT service is offline.
2020-10-16udp/client: Make use of designated initializers in TestCommunication()Lioncash1-2/+5
Same behavior, but makes the callback list nicer to look at.
2020-10-16udp/client: Take std::function by const reference with TestCommunication()Lioncash2-5/+5
Avoids redundant copies.
2020-10-16sdl_impl: Erase the SDLJoystick entry after removing a controllerMorph1-15/+13
Previously, disconnecting a controller still leaves a null SDLJoystick entry within the vector of SDLJoysticks mapped by GUID. When a DirectInput device of the same GUID is reconnected, it adds that device to a new port causing non-detectable input. Furthermore, opening the "Configure" menu would cause yuzu to crash since it first tries to resolve the name of a null SDLJoystick entry that was not removed. Resolve this by properly erasing the SDLJoystick entry from the vector.
2020-10-16input_common/CMakeLists: Make some warnings errorsLioncash19-203/+306
Makes the input_common code warnings consistent with the rest of the codebase.
2020-10-15service: acc: Stub IManagerForApplication::StoreOpenContext.bunnei1-1/+7
- Used by Super Mario 3D All-Stars.
2020-10-14hle: service: vi: Implement BufferQueue::CancelBuffer.bunnei3-14/+53
- This is used by Super Mario 3D All-Stars.
2020-10-13kernel: Implement host thread register methods without lockingReinUsesLisp1-28/+38
Locks on GetCurrentHostThreadID were causing performance issues according to Visual Studio's profiler. It was consuming twice the time as arm_interface.Run(). The cost was not in the function itself but in the lockinig it required. Reimplement these functions using atomics and static storage instead of an unordered_map. This is a side effect to avoid locking and using linked lists for reads. Replace unordered_map with a linear search.
2020-10-13audio_core/CMakeLists: Make warnings consistent with coreLioncash6-8/+17
Normalizes the warnings shared between audio_core and core.
2020-10-13core/CMakeLists: Make some warnings errorsLioncash30-146/+144
Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
2020-10-13vk_graphics_pipeline: Manage primitive topology as fixed stateReinUsesLisp6-26/+7
Vulkan has requirements for primitive topologies that don't play nicely with yuzu's. Since it's only 4 bits, we can move it to fixed state without changing the size of the pipeline key. - Fixes a regression on recent Nvidia drivers on Fire Emblem: Three Houses.
2020-10-13filesystem: Fix CreateDirectory and DeleteFileMorph1-2/+3
Add a check if dir is nullptr (does not exist) Fixes save game creation in Hades
2020-10-13service: time: Update current time with changes to RTC setting.bunnei9-198/+341
- This can be used to advance time, e.g. for Pokemon Sword/Shield pokejobs.
2020-10-13hle: service: nvdrv: Implement nvhost_as_gpu::FreeSpace.bunnei2-0/+25
- This is used by Super Mario 3D All-Stars.
2020-10-09video_core: Enforce -Wclass-memaccessReinUsesLisp2-7/+7
2020-10-09vk_device: Block VK_EXT_extended_dynamic_state for RDNA devicesgoldenx861-0/+24
RDNA devices seem to crash when using VK_EXT_extended_dynamic_state in the latest 20.9.2 proprietary Windows drivers. As a workaround, for now we block device names corresponding to current RDNA released products.
2020-10-08shader/texture: Implement CUBE texture type for TMML and fix arraysReinUsesLisp1-19/+22
TMML takes an array argument that has no known meaning, this one appears as the first component in gpr8 followed by s, t and r. Skip this component when arrays are being used. Also implement CUBE texture types. - Used by Pikmin 3: Deluxe Demo.
2020-10-07renderer_vulkan/wrapper: Fix physical device sortingReinUsesLisp1-13/+35
The old code had a sort function that was invalid and it didn't work as expected when the base vector had a different order (e.g. renderdoc was attached). This sorts devices as expected and fixes a debug assert on MSVC.
2020-10-05Address commentsgerman2-40/+40
2020-10-04Add compatibility with only accelerometer and auto calibrate for driftgerman2-12/+106
2020-10-03video_core: Enforce -Wunused-variable and -Wunused-but-set-variableReinUsesLisp3-4/+7
2020-10-02Only use inputs corresponding to controller typegerman1-49/+58
2020-09-30Stubbed EnableSixAxisSensorFusiongerman2-1/+15
2020-09-30caps_c: Stub SetShimLibraryVersionMorph2-1/+18
- Used by caps_su SetShimLibraryVersion
2020-09-30caps_u: Stub SetShimLibraryVersionMorph2-2/+14
- Used in Super Smash Bros. Ultimate
2020-09-30caps_su: Properly stub SetShimLibraryVersionMorph1-1/+6
2020-09-30hid: Stub HomeButtonInputProtection service commandsMorph4-2/+50
- Used in 1-2 Switch. Given that we do not emulate the functionality of the home button yet, we can stub this for now.
2020-09-30Reduce the "shake" requirements when configuring UDP.Lukas Senionis1-2/+6
2020-09-30Remove ext_extended_dynamic_state blacklistMatías Locatti1-8/+0
Latest AMD 20.9.2 driver fixed this, there's no reason to keep it blocked, as the previous stable signed driver release doesn't include the extension.
2020-09-30common/wall_clock: Add virtual destructorsReinUsesLisp3-2/+4
From -fsanitize=address, this code wasn't calling the proper destructor. Adding virtual destructors for each inherited class and the base class fixes this bug. While we are at it, mark the functions as final.
2020-09-29qt/game_list: Give GameListSearchField::KeyReleaseEater a parentReinUsesLisp2-3/+4
This fixes a memory leak as KeyReleaseEater's destructor was never called.
2020-09-29First implementation of controller rumblegerman5-14/+63
2020-09-29CMakeLists: use system zstd on Linuxlat9nq1-1/+6
From what I understand, this tells CMake to use the system, not conan, version of zstd. Required to build on the coming MinGW Docker container.
2020-09-29CMakeLists: fix for finding zstd on linux-mingwlat9nq1-1/+1
2020-09-26main: Allow applets to display on top while fullscreenMorph1-6/+8
Using the Qt::WindowStaysOnTopHint flag allows these dialogs to show up on top while running in fullscreen. However, if yuzu goes out of focus (by alt-tabbing or otherwise), this flag does not seem to have an effect.
2020-09-26core: Mark GetInstance() as deprecatedLioncash1-1/+1
This way it's obvious that this function shouldn't be used in any future code.
2020-09-26frontend/controller: Eliminate dependency on the global system instanceLioncash3-5/+14
2020-09-26Add random motion input to keyboardgerman4-0/+65
2020-09-26Add random motion input to SDLgerman5-5/+230
2020-09-26command_generator: Make lookup table static constexprLioncash1-2/+3
Allows compilers to elide needing to push these values on the stack every time the function is called.
2020-09-25vk_stream_buffer: Fix initializing Vulkan with NVIDIA on Linuxlat9nq1-1/+2
The previous fix only partially solved the issue, as only certain GPUs that needed 9 or less MiB subtracted would work (i.e. GTX 980 Ti, GT 730). This takes from DXVK's example to divide `heap_size` by 2 to determine `allocable_size`. Additionally tested on my Quadro K4200, which previously required setting it to 12 to boot.
2020-09-25behavior_info: Fix typo Renerer -> RendererLioncash2-6/+6
2020-09-25cubeb_sink: Use static_cast instead of reinterpret_cast in DataCallback()Lioncash1-2/+2
Conversions from void* to the proper data type are well-defined and supported by static_cast. We don't need to use reinterpret_cast here.
2020-09-25codec: Make lookup table static constexprLioncash2-3/+4
Allows compilers to elide needing to push these values on the stack every time the function is called.
2020-09-25audio_core: Remove unnecessary inclusionsLioncash5-7/+2
Same behavior, but removes header dependencies where they don't need to be.
2020-09-25audio_core: Resolve sign conversion warningsLioncash8-25/+34
While were at it, we can also enable sign conversion warnings and other common warnings as errors to prevent these from creeping back into the codebase.
2020-09-25effect_context: Make use of explicit where applicableLioncash1-13/+12
While we're at it we can make the destructor of the base class virtual to ensure that any polymorphism issues never occur.
2020-09-25vk_command_pool: Move definition of Pool into the cpp fileLioncash2-4/+6
Allows the implementation details to be changed without recompiling any files that include this header.
2020-09-25vk_command_pool: Make use of override on destructorLioncash1-1/+1
2020-09-25vk_command_pool: Add missing header guardLioncash1-0/+2
2020-09-25More forgetting... duhLevi Behunin1-2/+2
2020-09-25service: Restore "unused" functionLioncash1-0/+17
Turns out this function is actually used, but within a trace log.
2020-09-25Forgot to apply suggestion here as wellLevi Behunin1-1/+1
2020-09-25Address CommentsLevi Behunin3-25/+34
2020-09-25Start of Integer flags implementationLevi Behunin3-3/+50
2020-09-24submission_package: Fix updates integrated into cartridge images.Morph1-3/+22
2020-09-24arithmetic_integer_immediate: Make use of std::move where applicableLioncash1-16/+19
Same behavior, minus any redundant atomic reference count increments and decrements.
2020-09-24video_core: Fix instances where msbuild always regenerated host shadersReinUsesLisp2-12/+7
When HEADER_GENERATOR was included in the DEPENDS section of custom commands, msbuild assumed this was always modified. Changing this file is not common so we can remove it from there.
2020-09-24Use different timing for motiongerman5-76/+157
2020-09-23shader/registry: Silence a -Wshadow warningLioncash2-5/+5
2020-09-23shader/registry: Remove unnecessary namespace qualifiersLioncash1-5/+3
Using statements already make these unnecessary.
2020-09-23shader/registry: Make use of designated initializers where applicableLioncash1-17/+19
Same behavior, less repetition.
2020-09-23memory: Resolve a -Wdocumentation warningLioncash1-1/+1
memory doesn't exist as a parameter any more.
2020-09-23install_dialog: Make use of [[nodiscard]] where applicableLioncash1-2/+2
Allows the compiler to warn against cases where the return value isn't used (which would be a bug).
2020-09-23install_dialog: Remove unused function prototypeLioncash1-1/+0
This function doesn't have an implementation, so it can be removed to prevent others from unintentionally using it.
2020-09-23game_list: Make game list function naming consistentLioncash3-36/+45
Makes the naming consistent with the rest of the functions that are present.
2020-09-23game_list: Eliminate redundant argument copiesLioncash2-16/+22
Several functions can be taken by const reference to avoid copies
2020-09-23control_flow: emplace elements in place within TryQuery()Lioncash1-6/+6
Places data structures where they'll eventually be moved to to avoid needing to even move them in the first place.
2020-09-23control_flow: Make use of std::move in InsertBranch()Lioncash1-7/+8
Avoids unnecessary atomic increments and decrements.
2020-09-22General: Make use of std::nullopt where applicableLioncash17-59/+60
Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals.
2020-09-22ips_layer: Eliminate a redundant copy in Parse()Lioncash1-2/+4
Prevents unnecessary copying of the line being parsed.
2020-09-21acc: Stub LoadOpenContextMorph3-1/+13
This is used in multiple games such as: - Clubhouse Games: 51 Worldwide Classics - Grandia HD Collection - XCOM 2 Collection - Baldur's Gate 1/2 - Dr Kawashima's Brain Training - Super Mario 3D All-Stars
2020-09-20renderer_opengl: Remove emulated mailbox presentationReinUsesLisp13-360/+35
Emulated mailbox presentation was causing performance issues on Nvidia's OpenGL driver. Remove it.
2020-09-19vk_query_cache: Hack counter destructor to avoid reserving queriesReinUsesLisp1-1/+10
This is a hack to destroy all HostCounter instances before the base class destructor is called. The query cache should be redesigned to have a proper ownership model instead of using shared pointers. For now, destroy the host counter hierarchy from the derived class destructor.
2020-09-19renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp42-814/+638
This reworks how host<->device synchronization works on the Vulkan backend. Instead of "protecting" resources with a fence and signalling these as free when the fence is known to be signalled by the host GPU, use timeline semaphores. Vulkan timeline semaphores allow use to work on a subset of D3D12 fences. As far as we are concerned, timeline semaphores are a value set by the host or the device that can be waited by either of them. Taking advantange of this, we can have a monolithically increasing atomic value for each submission to the graphics queue. Instead of protecting resources with a fence, we simply store the current logical tick (the atomic value stored in CPU memory). When we want to know if a resource is free, it can be compared to the current GPU tick. This greatly simplifies resource management code and the free status of resources should have less false negatives. To workaround bugs in validation layers, when these are attached there's a thread waiting for timeline semaphores.
2020-09-18Add automap feature for GC adaptergerman3-1/+103
2020-09-18fermi_2d: Make use of designated initializersLioncash2-8/+8
Same behavior, less repetition. We can also ensure all members of Config are initialized.
2020-09-18hid: Implement Get/SetNpadHandheldActivationModeMorph3-5/+28
- Used in Clubhouse Games: 51 Worldwide Classics
2020-09-18configure_input_player: Fixes motion mapping using ConfigureButtonClickMorph1-5/+8
2020-09-18am: Stub GetPreviousProgramIndexMorph2-1/+11
- Used in Super Mario 3D All-Stars
2020-09-18configure_input_player: Re-add "Clear" context menu optionMorph2-31/+66
The context menu was removed in Mjölnir Part 1 as part of the input rewrite as we were unaware of it's usage statistics. However, as this was the only way to clear the inputs of individual buttons, this PR will re-add it back in.
2020-09-18submission_package: Account for multi-content NSPsMorph1-5/+5
Previously we assumed a submission package can only contain one Program NCA with a single TitleID. However, Super Mario 3D All-Stars contains four Program NCAs, each with their unique TitleIDs. This accounts for the existence of multi-content games such as this one. - Fixes booting Super Mario 3D All-Stars from the games list.
2020-09-17decode/image: Eliminate switch fallthrough in DecodeImage()Lioncash1-0/+1
Fortunately this didn't result in any issues, given the block that code was falling through to would immediately break.
2020-09-17decoder/texture: Eliminate narrowing conversion in GetTldCode()Lioncash1-1/+1
The assignment was previously truncating a u64 value to a bool.
2020-09-17audio_core/command_generator: Use const references where applicableLioncash1-10/+11
In a lot of cases, we can make use of const references rather than non-const references. While we're in the area we can silence some truncation and sign conversion warnings.
2020-09-17audio_core/command_generator: Avoid an unnecessary copy in GenerateFinalMixCommand()Lioncash1-1/+1
2020-09-17nfp: Eliminate two unnecessary copiesLioncash1-10/+13
GetAmiiboBuffer() returns by const reference, so we can use a reference instead of taking the returned buffer by value.
2020-09-17arm_dynarmic_cp15: Initialize member variablesLioncash1-2/+2
Ensures that the member variables are always initialized to a deterministic value on creation.
2020-09-17control_metadata: Resolve typo in Portuguese language nameLioncash1-1/+1
This isn't used anywhere, so this is a trivial fix.
2020-09-17service: Remove unused funcationLioncash1-22/+0
This is now completely unused, so it can be removed.
2020-09-17service/sm: Slightly more efficient string name validationLioncash1-2/+2
We can check the end of the string first for null-termination, rather than the beginning of the string.
2020-09-17service/sm: Eliminate dependency on the global system instanceLioncash3-7/+9
2020-09-17file_sys/romfs_factory: Eliminate usage of the global system accessorLioncash5-34/+49
2020-09-17file_sys/bis_factory: Eliminate usage of the global system accessorLioncash5-11/+11
2020-09-17loader/nso: Remove unnecessary [[maybe_unused]]Lioncash1-2/+1
2020-09-16video_core: Enforce -Werror=switchReinUsesLisp7-10/+59
This forces us to fix all -Wswitch warnings in video_core.
2020-09-16core/loader: Remove dependencies on the global system instanceLioncash20-45/+85
Now all that remains is: 18 instances in file_sys code 14 instances in GDB stub code (this can be tossed wholesale) 4 instances in HLE code 2 instances in settings code.
2020-09-15nca_patch: Significantly reduce the stack usage size within SearchBucketEntry()Lioncash1-4/+4
Previously this function was using ~16KB of stack (16528 bytes), which was caused by the function arguments being taken by value rather than by reference. We can make this significantly lighter on the stack by taking them by reference.
2020-09-15nca_patch: Make SearchBucketEntry() internally linkedLioncash2-44/+43
This is only used internally and doesn't depend on any class state, so we can make it fully internal.
2020-09-15cheat_engine: Convert ExtractName into a non-template functionLioncash1-19/+17
We don't need to create two separate instantiations of the same code, we can simply make the character template argument a regular function parameter.
2020-09-15cheat_engine: Remove unnecessary system argument to CheatParser's Parse functionLioncash3-15/+9
This isn't used within the function at all in any implementations, so we can remove it entirely.
2020-09-15patch_manager: Resolve implicit truncations in FormatTitleVersion()Lioncash1-3/+4
We make it explicit that we're truncating arithmetic here to resolve compiler warnings (even if the sizes weren't u32/u64 arithmetic generally promotes to int :<)
2020-09-15patch_manager: Make use of type aliasesLioncash2-69/+79
We can use these to avoid typing the same type redundantly. This way, if these ever change, only a single location needs to be modified.
2020-09-15patch_manager: Make a few functions internally linkedLioncash2-15/+12
These functions are only used within this translation unit, so we can make them internally linked.
2020-09-15gc_adapter: Disable MSVC nonstandard extension warning on libusb.hReinUsesLisp1-0/+9
Pragma disable zero-sized array nonstandard extension warning on MSVC.
2020-09-14crypto/key_manager: Remove dependency on the global system accessorLioncash3-7/+12
We can supply the content provider as an argument instead of hardcoding a global accessor in the implementation.
2020-09-14kernel: Remove all dependencies on the global system instanceLioncash5-11/+20
With this, the kernel finally doesn't depend directly on the global system instance anymore.
2020-09-10Test: Decrease pad_update_nsFearlessTobi1-1/+1
There have been reports of quite heavy input lag in the past. Compared to Citra for example, our pad_update_ns value is very high. So let's decrease it and see if it helps with this problem.
2020-09-07service: Remove two usages of the global system accessorLioncash3-7/+5
Removes more instances of reliance on global state.
2020-09-07gc_adapter: Make DeviceConnected() a const member functionLioncash3-9/+9
This doesn't modify instance state, so it can be made const.
2020-09-07bsd: Resolve unused value within SendToImplLioncash1-0/+1
Previously the address provided to SendToImpl would never be propagated to SendTo(). This fixes that.
2020-09-07bsd: Resolve sign comparison warningsLioncash1-3/+3
2020-09-07sockets_translate: Make use of designated initializersLioncash1-12/+12
Same behavior, less typing.
2020-09-07blocking_worker: Make use of templated lambdaLioncash1-3/+2
We can simplify this a little by explicitly specifying the typename for the lambda function.
2020-09-07blocking_worker: Resolve -Wdocumentation warningLioncash1-1/+1
2020-09-06video_core: Remove all Core::System references in rendererReinUsesLisp53-633/+573
Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
2020-09-05configure_input: Hook up the motion button and checkboxMorph7-7/+19
This allows toggling motion on or off, and allows access to the motion configuration. Also changes the [waiting] text for motion buttons to Shake! as this is how motion is connected to a player.
2020-09-05Minor cleanupgerman1-19/+16
2020-09-05Add cemu hook changes related to PR #4609german8-139/+449
2020-09-05Remove RealMotionDevicegerman7-35/+41
2020-09-05configure_input_player: Show/hide motion buttons based on the controllerMorph3-103/+141
2020-09-05controllers/npad: Simplify motion entry assignmentMorph1-29/+18
Simplifies the motion assignment in the Dual Joycon entry and assigns index 1 of the motion entry (Motion 2) for the right joycon.
2020-09-05Include HID and configuration changes related to motiongerman13-16/+448
2020-09-04hid: Implement MergeSingleJoyasDualJoyMorph3-5/+24
- Used in multiple games such as Super Mario Odyssey.
2020-09-04applets/controller: Resolve several compiler warningsMorph2-7/+8
Resolves -Wsign-compare and -Wunused-variable
2020-09-04Address feedbackMorph4-2/+12
2020-09-04clang-formatMorph2-2/+4
2020-09-04applets/controller: Set min_players to have a minimum value of 1.Morph1-1/+1
- Some games like Shipped have a minimum requirement of 0 connected players and is undesired behavior. We must require a minimum of 1 player connected regardless of what games may ask.
2020-09-04applets/controller: Modify heuristic to account for certain gamesMorph1-7/+12
Now left and right joycons have the same priority (meaning both needs to be supported by the game). Explanation of the new heuristic: Assign left joycons to even player indices and right joycons to odd player indices. We do this since Captain Toad Treasure Tracker expects a left joycon for Player 1 and a right Joycon for Player 2 in 2 Player Assist mode.
2020-09-04main: Apply settings after applet configuration is complete.Morph1-0/+4
2020-09-04applets/controller: Implement fallback applet for the SDL frontendMorph3-90/+34
Implement the fallback applet for the SDL frontend, connecting only the minimum amount of players required.
2020-09-04applets/controller: Load configuration prior to setting up connectionsMorph2-23/+29
This avoids unintentionally changing the states of elements while loading them in.
2020-09-04applets/controller: Make 8 a static constexpr value of NUM_PLAYERSMorph2-15/+22
Avoids repetitive usages of the int literal '8' or calls to player_widgets.size()
2020-09-04applets/controller: Implement "Explain Text"Morph6-25/+304
"Explain Text" is additional text that is shown for each player in the controller applet.
2020-09-04Project Mjölnir: Part 2 - Controller AppletMorph20-59/+3803
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-09-03file_sys/patch_manager: Add missing includeReinUsesLisp1-0/+1
Fixes build issues
2020-09-02main: Use three dots to complete the ellipsislat9nq1-1/+1
Fixes a typo in the UI file. An ellipsis has 3 dots.
2020-09-02input_common/motion_input: Make use of Common::PI constantMorph3-5/+10
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
2020-08-31vk_device: Fix driver id check on AMD for VK_EXT_extended_dynamic_stateReinUsesLisp1-6/+9
'driver_id' can only be known on Vulkan 1.1 after creating a logical device. Move the driver id check to disable VK_EXT_extended_dynamic_state after the logical device is successfully initialized. The Vulkan device will have the extension enabled but it will not be used.
2020-08-30externals: Update Xbyak to 5.96Lioncash2-21/+21
I made a request on the Xbyak issue tracker to allow some constructors to be constexpr in order to avoid static constructors from needing to execute for some of our register constants. This request was implemented, so this updates Xbyak so that we can make use of it.
2020-08-30sdl_joystick: disable the use of the hidapi drivers due to many problems caused by them.Vitor Kiguchi1-0/+7
The main problem is the loss of compatibility with some controllers, but there are also unwanted changes to the behaviour of PS4 controllers (hardcoded lightbar color).
2020-08-30Address second batch of reviewsFearlessTobi9-30/+27
2020-08-29configure_input_player: Resolve sign conversion warnings in UpdateMappingWithDefaults()Lioncash1-2/+2
Prevents sign mismatch warnings in the loop conditionals.
2020-08-29Reolve reorder warningFearlessTobi2-3/+3
2020-08-29Address review comments and fix code compilationFearlessTobi13-155/+218
2020-08-29bootmanager: Prevent unnecessary copies in TouchUpdateEvent()Lioncash1-1/+1
The list of points is returned by const reference, so we don't need to make a copy of every element in the list.
2020-08-29game_list_p: Avoid string churn in GameListItemPath data()Lioncash1-4/+8
2020-08-29game_list_p: Mark some constants as constexprLioncash1-10/+10
Consistency change with how we mark constants in the rest of the codebase.
2020-08-29yuzu: Add motion and touch configurationFearlessTobi18-3/+1889
2020-08-29yuzu/main: Amend lifetime issues with InputSubsystemLioncash4-7/+8
Due to the way Qt performs destruction of parent/child widgets, we need to make the lifetime of the input subsystem shared across the main window and the render window.
2020-08-29yuzu/configuration: Fix index out of bounds for default_analogsMorph3-12/+13
2020-08-29sdl_impl: Reduce allocations in GetButtonMappingForDevice()Lioncash1-31/+37
These maps can be constexpr arrays of std::pair.
2020-08-29sdl_impl: Make use of std::move on std::string where applicableLioncash1-3/+3
Avoids redundant copies.
2020-08-29sdl_impl: Make use of insert_or_assign() where applicableLioncash1-14/+18
Avoids churning ParamPackage instances.
2020-08-29sdl_impl: Prevent type truncation in BuildAnalogParamPackageForButton() default argumentsLioncash1-1/+1
We need to add the 'f' suffix to make the right hand side a float and not a double.
2020-08-29sdl_impl: Simplify make_tuple callLioncash1-1/+1
The purpose of make_tuple is that you don't need to explicitly type out the types of the things that comprise said tuple. Given this just returns default values, we can simplify this a bit.
2020-08-29sdl_impl: Mark FromEvent() as a const member functionLioncash1-2/+2
This doesn't modify internal member state, so it can be marked as const.
2020-08-29input_common/main: Remove unnecessary headersLioncash3-5/+11
2020-08-29input_common/main: Remove unimplemented prototypeLioncash1-3/+0
I forgot to remove this in the rebase when removing most of the global variables within the input common codebase.
2020-08-29vk_device: Blacklist AMD proprietary from VK_EXT_extended_dynamic_stateReinUsesLisp1-1/+6
Vertex binding's <stride> is bugged on AMD's proprietary drivers when using VK_EXT_extended_dynamic_state. Blacklist it for now while we investigate how to report this issue to AMD.
2020-08-28Fix orientation errors and improve drift correctiongerman2-14/+31
2020-08-28Address commentsgerman2-85/+65
2020-08-28Implement a basic class for motion devicesgerman4-0/+279
2020-08-27input_common: Eliminate most global stateLioncash25-242/+396
Abstracts most of the input mechanisms under an InputSubsystem class that is managed by the frontends, eliminating any static constructors and destructors. This gets rid of global accessor functions and also allows the frontends to have a more fine-grained control over the lifecycle of the input subsystem. This also makes it explicit which interfaces rely on the input subsystem instead of making it opaque in the interface functions. All that remains to migrate over is the factories, which can be done in a separate change.
2020-08-27input_common/main: Add "/Mouse" to the display nameMorph1-1/+1
2020-08-27memory_manager: Make use of [[nodiscard]] in the interfaceLioncash1-17/+17
2020-08-27memory_manager: Make operator+ const qualifiedLioncash1-1/+1
This doesn't modify member state, so it can be marked as const.
2020-08-26configure_input_player: Fix modifier scale button mappingMorph2-20/+19
2020-08-26configuration/input: Add support for mouse button clicksMorph5-11/+82
Supports the Left, Right, Middle, Backward and Forward mouse buttons.
2020-08-26controllers/npad: Fix inconsistencies with controller connection statusesMorph1-1/+7
2020-08-26controllers/npad: Fix LibNX controller connection statusesMorph1-1/+9
This allows homebrew applications to be able to properly detect connected controllers.
2020-08-26controllers/npad: Fix LedPattern for P1-4Morph1-3/+3
2020-08-26input_common: Fix directional deadzone valuesMorph2-2/+2
The hardware tested value is 0.5 which translates to SHRT_MAX / 2
2020-08-26Address feedbackMorph13-96/+77
2020-08-26Project Mjölnir: Part 1Morph43-3177/+8306
Co-authored-by: James Rowe <jroweboy@gmail.com> Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-26gc_poller: Resolve compilation warnings on MSVCLioncash1-3/+5
We just need to make our intentional implicit truncations explicit.
2020-08-26hle/scheduler: Fix data race in is_context_switch_pendingReinUsesLisp1-2/+6
As reported by tsan, SelectThreads could write to is_context_switch_pending holding a mutex while SwitchToCurrent reads it without holding any. It is assumed that the author didn't want an atomic here, so the code is reordered so that whenever is_context_switch_pending is read inside SwitchToContext, the mutex is locked.
2020-08-26hle/kernel: Fix data race in GetCurrentHostThreadIDReinUsesLisp1-1/+2
As reported by tsan, host_thread_ids could be read while any of the RegisterHostThread variants were called. To fix this, lock the register mutex when yuzu is running in multicore mode and GetCurrentHostThreadID is called.
2020-08-26common/thread: Fix data race in is_setReinUsesLisp1-4/+5
As report by tsan, Event::Set can write is_set while WaitFor and friends are reading from it. To address this issue, make is_set an atomic.
2020-08-26cpu_interrupt_handler: Misc style changesReinUsesLisp2-5/+3
2020-08-26cpu_interrupt_handler: Make is_interrupted an atomicReinUsesLisp2-2/+3
Fixes a race condition detected from tsan
2020-08-25logging/settings: Increase maximum log size to 100 MB and add extended logging optionM&M5-11/+54
The extended logging option is automatically disabled on boot but can be enabled afterwards, allowing the log file to go up to 1 GB during that session. This commit also fixes a few errors that are present in the general debug menu.
2020-08-24common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORSLioncash1-4/+10
Ensures that the full set of bitwise operators are available for types that make use of this macro.
2020-08-24common/assert: Make use of C++ attribute syntaxLioncash1-3/+4
Normalizes the syntax used for attributes
2020-08-24async_shaders: Mark getters as const member functionsLioncash2-17/+15
While we're at it, we can also mark them as nodiscard.
2020-08-24memory_manager: Mark IsGranularRange() as a const member functionLioncash2-3/+3
This doesn't modify internal member state, so it can be marked as const.
2020-08-24gl_texture_cache: Take std::string by reference in DecorateViewName()Lioncash2-2/+2
LabelGLObject takes a string_view, so we don't need to make copies of the std::string.
2020-08-24video_core/fence_manager: Remove unnecessary includesLioncash3-9/+4
Avoids pulling in unnecessary things that can cause rebuilds when they aren't required.
2020-08-24video_core/host_shaders: Add CMake integration for string shadersReinUsesLisp7-42/+106
Add the necessary CMake code to copy the contents in a string source shader (GLSL or GLASM) to a header file then consumed by video_core files. This allows editting GLSL in its own files without having to maintain them in source files. For now, only OpenGL presentation shaders are moved, but we can add GLASM presentation shaders and static SPIR-V generation through glslangValidator in the future.
2020-08-24gl_shader_util: Use std::string_view instead of star pointerReinUsesLisp5-9/+21
This allows us passing any type of string and hinting the length of the string to the OpenGL driver.
2020-08-23fsp_srv: Resolve -Wunused-but-set-variable warningLioncash1-1/+8
We can just log out the parameters in the meantime.
2020-08-23file_sys: Replace inclusions with forward declarations where applicableLioncash27-37/+66
Same behavior, minus unnecessary inclusions where not necessary.
2020-08-23fsp_srv: Resolve -Wmaybe_uninitialized warning in OpenSaveDataFileSystem()Lioncash1-2/+5
Initialize id to a deterministic value and also mark the unreachable cases in the switch with UNREACHABLE().
2020-08-23registered_cache: Make use of ends_with for string suffix checkingLioncash1-2/+1
Simplifies code.
2020-08-23registered_cache: Make use of designated initializersLioncash1-15/+15
Removes the need for comments to indicate the fields being assigned.
2020-08-23key_manager: Make data arrays constexprLioncash2-75/+82
We can convert these maps into constexpr arrays to eliminate some runtime static constructors.
2020-08-23cpu_manager: Make use of ranged for where applicableLioncash1-16/+13
We can simplify a few loops by making use of ranged for.
2020-08-23core_timing: Remove unused headerLioncash3-2/+2
2020-08-23core_timing: Move clock initializer into constructor initializer listLioncash1-4/+2
Same behavior, minus unnecessary zeroing out of the pointer.
2020-08-23core_timing: Resolve sign conversion warningLioncash1-2/+2
This constant is only ever assigned to downcount, which is a s64, not a u64.
2020-08-23web_service: Move web_result.h into web_serviceLioncash7-47/+41
This is the only place it's actively used. It's also more appropriate for web-related structures to be within the web service target. Especially given this one doesn't rely on anything in the common library.
2020-08-22video_core: Initialize renderer with a GPUReinUsesLisp22-119/+172
Add an extra step in GPU initialization to be able to initialize render backends with a valid GPU instance.
2020-08-21vk_state_tracker: Fix primitive topologyReinUsesLisp3-13/+14
State track the current primitive topology with a regular comparison instead of using dirty flags. This fixes a bug in dirty flags for this particular state and it also avoids unnecessary state changes as this property is stored in a frequently changed bit field.
2020-08-20vk_device: Use Vulkan 1.0 properlyReinUsesLisp5-52/+66
Enable the required capabilities to use Vulkan 1.0 without validation errors and disable those that are not compatible with it.
2020-08-20renderer_vulkan: Create a Vulkan 1.0 instance when 1.1 is not availableReinUsesLisp3-6/+26
This commit doesn't make yuzu compatible with Vulkan 1.0 yet, it only creates an 1.0 instance.
2020-08-20Revert "common/time_zone: Simplify GetOsTimeZoneOffset()"bunnei1-5/+9
2020-08-18common/telemetry: Migrate namespace into the Common namespaceLioncash13-35/+43
Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
2020-08-18vfs_real: Resolve sign conversion warningsLioncash1-2/+2
2020-08-18vfs_real: Avoid redundant map lookupsLioncash1-30/+46
Avoids some trivially avoidable map lookups by keeping the result of find operations around and querying them.
2020-08-18common/color: Migrate code over to the Common namespaceLioncash1-2/+2
No external code makes use of this header, so we can freely change the namespace.
2020-08-18common/concepts: Move <type_traits> include out of the Common namespaceLioncash1-2/+2
This is a compiler/linker error waiting to happen.
2020-08-16Remove unneeded newlines, optional Registry in shader paramsameerj5-14/+9
Addressing feedback from Rodrigo
2020-08-16Morph: Update worker allocation commentAmeer J1-1/+1
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2020-08-16move thread 1/4 count computation into allocate workers methodameerj4-23/+14
2020-08-16Address feedback, add shader compile notifier, update setting textameerj9-162/+117
2020-08-16Vk Async Worker directly emplace in cacheameerj3-58/+41
2020-08-16Address feedback. Bruteforce delete duplicatesameerj7-80/+116
2020-08-16Vk Async pipeline compilationameerj13-20/+182
2020-08-16Preliminary effectsDavid Marcec10-35/+731
2020-08-16dynarmic: Add unsafe optimizationsMerryMage7-4/+108
2020-08-16configure_hotkeys: Don't translate empty stringsLioncash1-2/+2
There's no need to translate an empty string. This just gives translators unnecessary work.
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash40-547/+639
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
2020-08-16common: Silence two discarded result warningsLioncash2-3/+3
These are intentionally discarded internally, since the rest of the public API allows querying success. We want all non-internal uses of these functions to be explicitly checked, so we can signify that we intentionally want to discard the return values here.
2020-08-16common/time_zone: Simplify GetOsTimeZoneOffset()Lioncash1-9/+5
We can simplify this function down into a single line with the use of fmt. A benefit with the fmt approach is that the fmt variant of localtime is thread-safe as well, making GetOsTimeZoneOffset() thread-safe as well.
2020-08-16yuzu: Resolve -Wextra-semi warningsLioncash3-6/+6
While we're in the same area, we can ensure GameDir member variables are always initialized to consistent values.
2020-08-16main: Add an option to modify the currrent game's configurationlat9nq3-20/+46
Creates a new entry in the Emulation menu called "Configure Current Game..." that is only available if a game is currently being executed in yuzu. When selected, it opens the game properties dialog for the current game. Thanks to @BSoDGamingYT for reminding me to do this.
2020-08-15common/compression: Roll back std::span changesLioncash5-38/+45
Seems like all compilers don't support std::span yet.
2020-08-15common: Make use of [[nodiscard]] where applicableLioncash34-358/+343
Now that clang-format makes [[nodiscard]] attributes format sensibly, we can apply them to several functions within the common library to allow the compiler to complain about any misuses of the functions.
2020-08-14configuration_shared: Simplify name lookup in highlighting functionsLioncash7-90/+74
We can query the given object name directly from the widget itself. This removes any potential for forgetting to change the name if the widget gets renamed and makes the API much simpler (just pass in the widget, and not worry about its name).
2020-08-14yuzu: Make use of qOverload where applicableLioncash1-2/+1
Eliminates a verbose function cast.
2020-08-14time_zone_content_manager: Collapse auto and default caseLioncash1-3/+1
Prevents a useless self-assignment from occurring.
2020-08-14Disable biquad filterDavid Marcec1-8/+9
2020-08-14software_keyboard: Resolve a pessimizing move warningLioncash1-2/+1
A std::vector created in place like this is already an rvalue and doesn't need to be moved.
2020-08-14core: Resolve several -Wextra-semi warningsLioncash3-7/+12
We can amend one of the cascade macros to require semicolons in order to compile. In other cases, we can just remove the superfluous semicolons.
2020-08-14shader/memory: Amend UNIMPLEMENTED_IF_MSG without a messageLioncash1-1/+2
We need to provide a message for this variant of the macro, so we can simply log out the type being used.
2020-08-14macro-interpreter: Resolve -Wself-assign-field warningLioncash1-1/+0
This was assigning the field to itself, which is a no-op. The size doesn't change between its initial assignment and this one, so this is a safe change to make.
2020-08-14vulkan/wrapper: Avoid unnecessary copy in EnumerateInstanceExtensionProperties()Lioncash1-1/+1
Given this is implicitly creating a std::optional, we can move the vector into it.
2020-08-14gl_shader_disk_cache: Make use of std::nullopt where applicableLioncash1-11/+12
Allows the compiler to avoid unnecessarily zeroing out the internal buffer of std::optional on some implementations.
2020-08-14async_shaders: Resolve -Wpessimizing-move warningLioncash1-2/+2
Prevents pessimization of the move constructor (which thankfully didn't actually happen in practice here, given std::thread isn't copyable).
2020-08-14maxwell_3d: Resolve -Wextra-semi warningLioncash1-1/+1
Semicolons after a function definition aren't necessary.
2020-08-14Reworked ADPCM decoder to allow better streamingDavid Marcec2-33/+95
2020-08-14emu_window: Mark Scoped constructor and Acquire() as nodiscardLioncash1-2/+2
Ensures that callers make use of the constructor, preventing bugs from silently occurring.
2020-08-14kernel/scheduler: Mark SchedulerLock constructor as nodiscardLioncash1-1/+1
Allows the compiler to warn about cases where the constructor is used but then immediately discarded, which is a potential cause of locking/unlocking bugs.
2020-08-13General: Tidy up clang-format warnings part 2Lioncash17-117/+129
2020-08-12gl_shader_cache: Use std::max() for determining num_workersMorph1-1/+1
Does not allocate more threads than available in the host system for boot-time shader compilation and always allocates at least 1 thread if hardware_concurrency() returns 0.
2020-08-11textures/decoders: Fix block linear to pitch copiesReinUsesLisp3-34/+34
There were two issues with block linear copies. First the swizzling was wrong and this commit reimplements them. The other issue was that these copies are generally used to download render targets from the GPU and yuzu was not downloading them from host GPU memory unless the extreme GPU accuracy setting was selected. This commit enables cached memory reads for all accuracy levels. - Fixes level thumbnails in Super Mario Maker 2.
2020-08-10Remove UI changesameerj5-86/+5
This PR is now only the Analog devices handling the range value defaulting at 100%
2020-08-10Add range slider functionality for gc adapterameerj1-7/+7
2020-08-10undo unnecessary newlines, slider range 50-150Ameer3-6/+5
2020-08-10Address c++20 warning, fix inaccurate range text display when slide == 0Ameer1-2/+2
2020-08-10Add range slider for analog sticksAmeer4-14/+99
2020-08-09General: Tidy up clang-format warningsLioncash1-1/+1
2020-08-07common/concepts: Rename IsBaseOf to DerivedFromLioncash3-6/+8
This makes it more inline with its currently unavailable standardized analogue std::derived_from. While we're at it, we can also make the template match the requirements of the standardized variant as well.
2020-08-06freezer: Move entry finding to its own functionLioncash2-12/+21
Cleans up the callsites in other functions.
2020-08-06freezer: Take address values by valueLioncash1-3/+3
VAddr will always be 64-bit, so there's no need to take a trivial primitive alias by reference.
2020-08-06freezer: Make use of std::erase_ifLioncash1-4/+1
With C++20 we can simplify the erasing idiom.
2020-08-06cheat_engine: Resolve implicit bool->u64 conversionLioncash1-1/+1
We can just return zero here.
2020-08-06cheat_engine: Make use of designated initializersLioncash1-6/+18
Same behavior, but makes the member being assigned obvious.
2020-08-06partition_data_manager: Update master key hashesLioncash1-5/+5
Fills in some hashes that were previously unhandled.
2020-08-06partition_data_manager: Make data arrays constexprLioncash4-138/+141
Previously the constructor for all of these would run at program startup, consuming time before the application can enter main(). This is also particularly dangerous, given the logging system wouldn't have been initialized properly yet, yet the program would use the logs to signify an error. To rectify this, we can replace the literals with constexpr functions that perform the conversion at compile-time, completely eliminating the runtime cost of initializing these arrays.
2020-08-06partition_data_manager: Eliminate magic valueLioncash1-2/+2
We can use sizeof to make it obvious at the call site where the value is coming from.
2020-08-06aes_util: Make use of non-template variant of TranscodeLioncash1-1/+1
Same behavior, less template instantiations.
2020-08-06Fix thread naming on Linux, which limits names to 15 bytes.comex2-1/+13
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and do nothing. - Also, add logging in case `pthread_set_name_np` returns an error anyway. This is Linux-specific, as the Apple and BSD versions of `pthread_set_name_np return `void`. - Change the name for CPU threads in multi-core mode from "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it fits into the Linux limit. Some other thread names are also cut off, but I didn't bother addressing them as you can guess them from the truncated versions. For a CPU thread, truncation means you can't see which core it is!
2020-08-05common/virtual_buffer: drop unused includesJan Beich1-9/+0
On DragonFly and NetBSD build fails with src/common/virtual_buffer.cpp src/common/virtual_buffer.cpp:16:10: fatal error: sys/sysinfo.h: No such file or directory #include <sys/sysinfo.h> ^~~~~~~~~~~~~~~
2020-08-05system_control: Make functions internally linked where applicableLioncash2-15/+11
These functions are only ever used internally as implementation details for GenerateRandomRange(), so these can be given internal linkage.
2020-08-05kernel: Remove unused variablesLioncash2-18/+11
Resolves a few compiler warnings.
2020-08-05scheduler: Resolve sign conversion warningLioncash1-1/+2
2020-08-05address_arbiter: Resolve sign conversion warningLioncash1-1/+1
Makes our type conversion explicit.
2020-08-05ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()Lioncash1-0/+4
It's undefined behavior to use non-trivially copyable objects with std::memcpy, so we can add asserts to catch usages of these at compile-time.
2020-08-05vfs_vector: Make creation of array vfs files less verboseLioncash4-41/+41
We can add a helper function to make creation of these files nicer. While we're at it, we can eliminate an unnecessary std::array copy in the constructor. This makes the overhead on some of these functions way less intensive, given some arrays were quite large. e.g. The timezone location names are 9633 bytes in size.
2020-08-05main: Fallback to loader if no control nca is found with patch managerMorph1-6/+17
In some rare instances, the patch manager is not able to find a control nca, fallback to the previous method of parsing a control nca through the loader if this occurs.
2020-08-05main: Fix Open Save/Mod Locations for installed titlesMorph4-12/+12
Previously NAND/SDMC installed titles would open device saves when they are supposed to be user saves. This is due to the control nca not being read and thus returns 0 for both GetDefaultNormalSaveSize() and GetDeviceSaveDataSize(). Fix this by utilizing the patch manager to read the control nca.
2020-08-05game_list_worker: Do not clear entries when > 1 gamedir is presentMorph1-1/+1
Previously the map of entries was being cleared while looping through each game directory, this resulted into all game directories except the last game dir to lose content metadata information. Fix this by clearing the entries only once.
2020-08-03aes_util: Allow SetIV to be non-allocatingLioncash7-27/+36
In a few places, the data to be set as the IV is already within an array. We shouldn't require this data to be heap-allocated if it doesn't need to be. This allows certain callers to reduce heap churn.
2020-08-03perf_stats: Make use of designated initializersLioncash1-6/+7
Same behavior, but allows us to avoid a now-unnecessary zero initialization.
2020-08-03perf_stats: Mark GetMeanFrametime() as constLioncash2-9/+9
The general pattern is to mark mutexes as mutable when it comes to matters of constness, given the mutex acts as a transient member of a data structure.
2020-08-03vulkan: Silence more -Wmissing-field-initializer warningsLioncash6-3/+18
2020-08-03yuzu: Resolve C++20 deprecation warnings related to lambda capturesLioncash9-81/+88
C++20 deprecates capturing the this pointer via the '=' capture. Instead, we replace it or extend the capture specification.
2020-08-03service/ldr: Resolve sign mismatch warningsLioncash1-3/+2
We were performing an int < size_t comparison. We can just correct the type of the induction variable.
2020-08-03CMakeLists: Resolve #4478Lioncash1-1/+6
This switch is enabled by default in all recent versions of GCC and Clang.
2020-08-03tests/core_timing: Remove pragma optimize(off)Lioncash1-9/+5
I made a review comment about this in the PR that this was introduced in (#3955, commit 71c4779211dc081a3b2dd4af52edad5748e7a7f5), but it seems to have been missed. We shouldn't be using this pragma here because it's MSVC specific. This causes warnings on other compilers. The test it's surrounding is *extremely* dubious, but for the sake of silencing warnings on other compilers, we can mark "placebo" as volatile and be on with it.
2020-08-03time_zone_binary: Make use of designated initializersLioncash1-17/+25
2020-08-03logging/backend: Make use of designated initializersLioncash2-21/+15
Same behavior, less code.
2020-08-03buffer_queue: Make use of std::nulloptLioncash1-5/+6
Allows compilers to eliminate unnecessary zeroing out of the optional's buffer.
2020-08-03buffer_queue: Make use of designated initializersLioncash1-5/+5
2020-08-03profile_manager: Make use of std::nulloptLioncash1-4/+4
Allows some implementations to completely avoid unnecessarily zeroing out the internal buffer.
2020-08-03profile_manager: Make use of designated initializersLioncash1-13/+22
More compact code.
2020-08-03dmnt_cheat_vm: Make use of designated initializersLioncash1-105/+121
Allows for more compact code.
2020-08-03file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with ModeLioncash2-18/+21
Same behavior, minus a hand-rolled operator.
2020-08-03sm: Make use of IsBaseOf for GetServiceDavid Marcec1-3/+2
2020-08-03patch_manager: Resolve -Wignored-qualifier warningsLioncash1-2/+2
Top level const will always be ignored in this case, so it can be removed.
2020-08-03registered_cache: Resolve -Wmaybe_uninitialized warningsLioncash1-10/+15
While we're at it, we can avoid a redundant map lookup.
2020-08-03Place in anonymous namespaceDavid Marcec1-0/+4
2020-08-03loader: Make IdentifyFile typesafeDavid Marcec1-20/+32
Relies on #4465 for concept.h Common::IsBaseOf
2020-08-03ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465)David12-30/+64
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer With the support of C++20, we can use concepts to deduce if a type is an STL container or not. * More agressive concept for stl containers * Add -fconcepts * Move to common namespace * Add Common::IsBaseOf
2020-08-01mix buffer depoppingDavid Marcec2-30/+101
2020-07-31minor nitsMorph1-1/+3
2020-07-31am: Unstub SetScreenShotPermissionDavid Marcec2-1/+12
2020-07-30fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttributeMorph2-23/+56
Stub these 2 service commands required for Animal Crossing: New Horizons Update 1.4.0
2020-07-30fs: Rename SaveDataDescriptor to SaveDataAttributeMorph5-41/+63
2020-07-30adpcm streamingDavid Marcec4-27/+32
2020-07-29game_list_worker: Fix game list subdirectory scanningMorph1-2/+2
Oddly enough the scan that feeds the manual content provider is hardcoded to scan 2 nested directories deep. This effectively rendered the scan subdirectories setting useless as the manual content provider cannot find any games located more than 2 nested directories deep. Furthermore, this behavior causes game files to be picked up by the manual content provider even if scan subdirectories is disabled. FIx this by utilizing the behavior described when populating the game list for populating the content provider.
2020-07-29main: Add support for removing SDMC installed titlesMorph1-14/+13
2020-07-29xts_archive: Check if the file is nullptr prior to parsingMorph1-5/+9
Fixes an access violation where the file no longer exists at the specified path while being parsed.
2020-07-29registered_cache: Add support for removing folder ncasMorph2-53/+54
2020-07-29game_list: Limit context menu options for homebrewMorph1-1/+7
Hides the following options when the title id is 0: - Open Save Location - Open Mod Data Location - Open Transferable Shader Cache - All removal options except Remove Custom Configuration
2020-07-29main: Remove assert for opening savedata when program_id = 0Morph1-1/+0
2020-07-29main: Silence [[fallthrough]] warningMorph1-3/+2
2020-07-29main: Split removal cases into their individual functions and address feedbackMorph2-113/+131
2020-07-29main: Connect game list remove signals to removal functionsMorph2-5/+167
2020-07-29game_list: Add "Remove" context menuMorph2-4/+37
Adds the following actions: - Remove Installed Update - Remove All Installed DLC - Remove Shader Cache - Remove Custom Configuration - Remove All Installed Contents
2020-07-28configure_graphics: Remove Force 30 FPS modeMorph6-25/+0
The introduction of multicore rendered this setting non-functional as timing code was changed. This removes the setting entirely.
2020-07-28renderer_opengl: Use 1/4 of all threads for async shader compilationMorph1-9/+4
2020-07-28common/atomic_ops: Don't cast away volatile from pointersLioncash3-27/+30
Preserves the volatility of the pointers being casted.
2020-07-28service/bsd: Handle Poll with no entries accuratelyReinUsesLisp1-0/+5
Testing shows that Poll called with zero entries returns -1 and signals an errno of zero.
2020-07-28services/bsd: Implement most of bsd:sReinUsesLisp5-55/+911
This implements: Socket, Poll, Accept, Bind, Connect, GetPeerName, GetSockName, Listen, Fcntl, SetSockOpt, Shutdown, Recv, RecvFrom, Send, SendTo, Write, and Close The implementation was done referencing: SwIPC, switchbrew, testing with libnx and inspecting its code, general information about bsd sockets online, and analysing official software. Not everything from these service calls is implemented, but everything that is not implemented will be logged in some way.
2020-07-28service/sockets: Add worker pool abstractionReinUsesLisp1-0/+30
Manage worker threads with an easy to use abstraction. We can expand this to support thread deletion in the future.
2020-07-28service/sockets: Add worker abstraction to execute blocking calls asynchronouslyReinUsesLisp2-0/+133
This abstraction allows executing blocking functions (like recvfrom on a socket configured for blocking) without blocking the service thread. It is intended to be used with SleepClientThread.
2020-07-28service/sockets: Add translate functionsReinUsesLisp3-0/+215
These functions translate from Network enumerations/structures to guest enumerations/structures and viceversa.
2020-07-28service/sockets: Add enumerations and structuresReinUsesLisp2-0/+81
Add guest enumerations and structures used in socket services
2020-07-28services/nifm: Implement GetCurrentIpAddressReinUsesLisp1-1/+12
This is trivially implemented using the Network abstraction - Used by ftpd
2020-07-28device_memory: Remove unused system memberLioncash3-11/+4
This isn't used by anything in particular, so it can be removed.
2020-07-28cpu_manager: Remove redundant std::function declarationsLioncash1-3/+3
We can just return the function directly. Making for less reading.
2020-07-28Update src/core/hle/service/nvdrv/devices/nvmap.cppbunnei1-1/+1
Co-authored-by: LC <mathew1800@gmail.com>
2020-07-28core_timing: Make use of uintptr_t to represent user_dataLioncash15-43/+52
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
2020-07-28yuzu/main: Remove redundant usages of QStringLiteral("")Lioncash1-6/+5
An empty QStringLiteral can more efficiently be replaced with an empty QString.
2020-07-27remove unused variable;CrazyMax1-1/+0
2020-07-26GCAdapter: only join worker thread if running & joinableBrian J. Tarricone1-1/+3
2020-07-26video_core/gpu: Correct the size of the puller registersBilly Laws1-2/+2
The puller register array is made up of u32s however the `NUM_REGS` value is the size in bytes, so switch it to avoid making the struct unnecessary large. Also fix a small typo in a comment.
2020-07-26config: Make the save-as identifier more consistentlat9nq1-2/+2
Solves an issue with restoring the value upon reloading program.
2020-07-26hle: nvdrv: Rewrite of GPU memory management.bunnei6-593/+431
2020-07-26yuzu/configure_debug: Remove duplicated checkboxesFearlessTobi1-22/+0
Those are already found in the Filesystem tab. They were added back to the Debug tab by mistake in the Vulkan PR.
2020-07-26nvflinger: Mark interface functions with return values as [[nodiscard]]Lioncash1-16/+14
Not using the return value of these functions are undeniably the source of a bug. This way we allow compilers to loudly make any future misuses evident.
2020-07-26nvflinger: Use return value of Lock()Lioncash3-4/+4
comex reported in #4424 that we were incorrectly discarding the return value of Lock() which is correct.
2020-07-25common/string_util: Remove unimplemented function prototype (#4414)LC1-12/+0
This function was relocated to log.h as a constexpr function, so this can be removed.
2020-07-25Fix perf regressionDavid Marcec1-1/+2
2020-07-25vulkan: Resolve -Wmissing-field-initializer warningsLioncash2-0/+4
2020-07-25udp/client: Remove unused boost includeLioncash1-1/+0
Also silences a deprecation warning from boost on Clang/GCC.
2020-07-25gc_adapter: Resolve C++20 deprecation warningLioncash1-1/+1
2020-07-25gc_poller: Resolve -Wsign-compare warningLioncash1-1/+2
2020-07-25gc_poller: Resolve -Wredundant-move warningLioncash1-2/+1
2020-07-25lz4_compression: Make use of std::span in interfacesLioncash2-17/+14
Allows compressing the data and size parameters into one.
2020-07-25zstd_compression: Make use of std::span in interfacesLioncash3-13/+10
Allows condensing the data and size parameters into a single argument.
2020-07-25virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]Lioncash1-1/+1
This isn't used on Windows, but is used on non-Windows operating systems.
2020-07-25Fix stream channel count when outputting to stereoDavid Marcec1-1/+1
2020-07-25Address issuesDavid Marcec8-101/+104
2020-07-25Queue extra mix bufferDavid Marcec1-0/+1
2020-07-25Disable time stretcher for time beingDavid Marcec2-6/+4
2020-07-25audio_core: Apollo Part 1, AudioRenderer refactorDavid Marcec26-713/+4204
2020-07-23network: add missing include for BSDsJan Beich1-0/+2
src/core/network/network.cpp:112:28: error: use of undeclared identifier 'SHUT_RD' constexpr int SD_RECEIVE = SHUT_RD; ^ src/core/network/network.cpp:113:25: error: use of undeclared identifier 'SHUT_WR' constexpr int SD_SEND = SHUT_WR; ^ src/core/network/network.cpp:114:25: error: use of undeclared identifier 'SHUT_RDWR' constexpr int SD_BOTH = SHUT_RDWR; ^ src/core/network/network.cpp:120:37: error: unknown type name 'in_addr'; did you mean 'in_addr_t'? constexpr IPv4Address TranslateIPv4(in_addr addr) { ^~~~~~~ in_addr_t /usr/include/netdb.h:66:20: note: 'in_addr_t' declared here typedef __uint32_t in_addr_t; ^ src/core/network/network.cpp:121:27: error: member reference base type 'in_addr_t' (aka 'unsigned int') is not a structure or union const u32 bytes = addr.s_addr; ~~~~^~~~~~~ src/core/network/network.cpp:121:15: error: variables defined in a constexpr function must be initialized const u32 bytes = addr.s_addr; ^ src/core/network/network.cpp:126:10: error: incomplete result type 'sockaddr' in function definition sockaddr TranslateFromSockAddrIn(SockAddrIn input) { ^ /usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr' struct sockaddr *ai_addr; /* binary address */ ^ src/core/network/network.cpp:127:5: error: unknown type name 'sockaddr_in'; did you mean 'sockaddr'? sockaddr_in result; ^~~~~~~~~~~ sockaddr /usr/include/netdb.h:142:9: note: 'sockaddr' declared here struct sockaddr *ai_addr; /* binary address */ ^ src/core/network/network.cpp:127:17: error: variable has incomplete type 'sockaddr' sockaddr_in result; ^ /usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr' struct sockaddr *ai_addr; /* binary address */ ^ src/core/network/network.cpp:131:29: error: use of undeclared identifier 'AF_INET' result.sin_family = AF_INET; ^ src/core/network/network.cpp:135:29: error: use of undeclared identifier 'AF_INET' result.sin_family = AF_INET; ^ src/core/network/network.cpp:139:23: error: use of undeclared identifier 'htons' result.sin_port = htons(input.portno); ^ src/core/network/network.cpp:143:14: error: variable has incomplete type 'sockaddr' sockaddr addr; ^ /usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr' struct sockaddr *ai_addr; /* binary address */ ^ src/core/network/network.cpp:156:1: error: unknown type name 'linger' linger MakeLinger(bool enable, u32 linger_value) { ^ src/core/network/network.cpp:157:5: error: unknown type name 'linger' linger value; ^ src/core/network/network.cpp:185:16: error: use of undeclared identifier 'AF_INET' return AF_INET; ^ src/core/network/network.cpp:195:16: error: use of undeclared identifier 'SOCK_STREAM' return SOCK_STREAM; ^ src/core/network/network.cpp:197:16: error: use of undeclared identifier 'SOCK_DGRAM' return SOCK_DGRAM; ^ src/core/network/network.cpp:207:16: error: use of undeclared identifier 'IPPROTO_TCP' return IPPROTO_TCP; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=]
2020-07-21vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfoDavid Marcec1-1/+19
Needed for dark souls and monster hunter
2020-07-21surface_params: Make use of designated initializers where applicableLioncash1-38/+46
Provides a convenient way to avoid unnecessary zero initializing.
2020-07-21surface_params: Remove redundant assignmentLioncash1-1/+0
This is a redundant assignment that can be removed.
2020-07-21surface_params: Replace questionable usages of the comma operator with semicolonsLioncash1-9/+9
These are bugs waiting to happen.
2020-07-21video_core: Remove unused variablesLioncash8-33/+5
Silences several compiler warnings about unused variables.
2020-07-21vk_rasterizer: Remove unused variable in Clear()Lioncash1-4/+0
The relevant values are already assigned further down in the lambda, so this can be removed entirely.
2020-07-21compatible_formats: Add missing header guardLioncash1-0/+2
Prevents potential inclusion issues from occurring.
2020-07-21video_core: Allow copy elision to take place where applicableLioncash7-26/+26
Removes const from some variables that are returned from functions, as this allows the move assignment/constructors to execute for them.
2020-07-21configure_ui: Ensure a separator follows the returned pathlat9nq1-3/+5
2020-07-21configure_ui: don't use an empty stringlat9nq1-1/+3
If the user had cancelled, it would clear the text box. That behavior was sanitized underneath, but may anyways cause inconveniences.
2020-07-21main: Don't use as many string copieslat9nq1-6/+8
Co-Authored-By: LC <lioncash@users.noreply.github.com>
2020-07-21main: rewrite (save as) screenshot savinglat9nq1-9/+18
This picks a default directory and file name. If on Windows and save-as screenshot saving is enabled, it asks the user, first defaulting to the default screenshot path, and with a default filename in the format `[title_id]_[year-mt-dy_hr-mn-sc-msc].png`. Otherwise, or on Linux for now, it simply saves a file in that directory with that file name.
2020-07-21configuration: Setup UI to config screenshot path and savinglat9nq5-5/+93
This adds two options to the General -> UI tab. The first disables picking a place to save the file. The second chooses a default directory for saving screenshots.
2020-07-21common: Add a screenshots directorylat9nq3-0/+3
Adds a screenshots directory as a path managed by FileUtil.
2020-07-21video_core: Remove redundant pixel format typeDavid Marcec1-1/+0
We already get the format type before converting shadow formats and during shadow formats.
2020-07-20buffer_cache: Eliminate redundant map lookup in MarkRegionAsWritten()Lioncash1-6/+3
We can make use of emplace()'s return value to determine whether or not we need to perform an increment. emplace() performs no insertion if an element already exist, so this can eliminate a find() call.
2020-07-20wait_tree: Include Midnight Blue dark themesMorph1-1/+4
2020-07-20qt-themes: Add Midnight Blue qdarkstyle theme (2.8.1)James Rowe2-1/+3
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2020-07-20Address issuesDavid Marcec1-2/+2
2020-07-19configure_graphics_advnaced: clang-format mk iilat9nq1-3/+3
2020-07-19configure_graphics_advanced: Fix oversight from rebaselat9nq1-1/+1
2020-07-19configuration_shared: Remove unused functionslat9nq2-18/+0
These were only kept for compatibility with old code during testing.
2020-07-19configuration: Use forward declares and remove extraneous structslat9nq10-63/+59
2020-07-19configuration_shared: Make CheckState strongly typedlat9nq2-24/+23
Also gets rid of unnecessary explicit namespace usage.
2020-07-19clang-formatlat9nq5-38/+32
2020-07-19configuration_shared: Break up tracker structs to respective classeslat9nq12-49/+58
One less global variable.
2020-07-19configure_system: break instead of semicolonlat9nq1-2/+4
Makes the code more readable Co-Authored-By: LC <lioncash@users.noreply.github.com>
2020-07-19clang-formatlat9nq3-8/+11
2020-07-19configure_system: Highlight labels on startuplat9nq1-0/+5
whoops
2020-07-19configure_graphics: Fix layout in global configlat9nq1-1/+1
Fixes a regression where the global config takes up a lot of extra space.
2020-07-19configure_per_game: Improve style consistencylat9nq3-54/+43
The way the configurations are set up, it is not trivial to do this. I'll leave it as is, but the API selection, and the background color and volume slider selectors are kind of not following the style.
2020-07-19configure_system: Implement highlighted overrideslat9nq3-539/+544
2020-07-19configuration_shared: Add default combobox setup functionlat9nq3-21/+52
Not a catch-all, but helps clean up the code for when I do this a lot. Also fixes some bugs caught in configure_graphics.
2020-07-19configuration_shared: Use an int instead of a QStringlat9nq4-22/+28
I noticed some of the code could be reduced to just passing the function an int, since I was doing the same thing over and over. Also clang-formats configure_graphics
2020-07-19configure_graphics_advanced: Implement highlighted overrideslat9nq3-96/+146
2020-07-19configuration_shared: Switch back to background colorslat9nq1-2/+2
Let's see if I make up my mind.
2020-07-19configuration_shared: Better use global textlat9nq2-0/+15
Also adds trackers for graphics and advanced graphics
2020-07-19configure_audio: fix UI marginslat9nq1-1/+10
2020-07-19configure_graphics: Implement highlighted overrideslat9nq2-134/+200
2020-07-19configure_audio: Implement highlighted overrideslat9nq2-80/+87
2020-07-19configuration_shared: Require name of the widget for highlightinglat9nq3-16/+27
Prevents mass-coloring of elements later on
2020-07-19configuration_shared: Use a highlight instead of background colorlat9nq2-6/+6
Fixes visibility in the built-in dark theme
2020-07-19configure_general: Implement manual tristate buttonslat9nq2-17/+27
2020-07-19configuration_shared: Initial functions and data for manual tristatelat9nq2-0/+58
Sets up initial support for implementing colored tristate functions. These functions color a QWidget blue when it's overriding a global setting, and discolor it when not. The lack of color indicates it uses the global state, replacing the Qt::CheckState::PartiallyChecked state with the global state.
2020-07-19Fix axis thresholding while pollingameerj1-5/+2
axes were very sensitive when mapping controls.
2020-07-19swkbd: Return result for Calc request for inlined swkbdDavid Marcec2-13/+49
Fixes random swkbd popups in monster hunter
2020-07-19core/network: Add network abstractionReinUsesLisp5-0/+840
This commit adds a network abstraction designed to implement bsd:s but at the same time work as a generic abstraction to implement any networking code we have to use from core. This is implemented on top of BSD sockets on Unix systems and winsock on Windows. The code is designed around winsocks having compatibility definitions to support both BSD and Windows sockets.
2020-07-19alignment: explicitly include <new> after 723edb4c0659Jan Beich1-0/+1
In file included from src/core/hle/kernel/memory/page_table.cpp:5: src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std' return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align})); ~~~~~^ src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std' ::operator delete (p, n * sizeof(T), std::align_val_t{Align}); ~~~~~^
2020-07-18Address issuesDavid Marcec1-6/+3
2020-07-18Address trivial review comments.FearlessTobi1-1/+1
2020-07-18configure_ui: Address some review comments from the previous PRFearlessTobi2-16/+21
2020-07-18yuzu: Port translation support from CitraFearlessTobi10-84/+235
Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
2020-07-18frontend: Improve wait tree readability for dark themesDavid Marcec1-11/+44
2020-07-18gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shadersReinUsesLisp7-110/+173
NV_shader_buffer_{load,store} is a 2010 extension that allows GL applications to use what in Vulkan is known as physical pointers, this is basically C pointers. On GLASM these is exposed through the LOAD/STORE/ATOM instructions. Up until now, assembly shaders were using NV_shader_storage_buffer_object. These work fine, but have a (probably unintended) limitation that forces us to have the limit of a single stage for all shader stages. In contrast, with NV_shader_buffer_{load,store} we can pass GPU addresses to the shader through local parameters (GLASM equivalent uniform constants, or push constants on Vulkan). Local parameters have the advantage of being per stage, allowing us to generate code without worrying about binding overlaps.
2020-07-18Fix style issuesDavid Marcec2-7/+13
2020-07-18file_sys/nsp: Make SetTicketKeys actually do somethingFearlessTobi2-32/+30
Previously, the method wasn't modifying any class state and therefore not having any effects when called. Since this has been the case for a very long time now, I'm not sure if we couldn't just remove this method altogether.
2020-07-18vk_device: Fix build error on old MSVC versionsReinUsesLisp1-3/+3
Designated initializers on old MSVC versions fail to build when they take the address of a constant.
2020-07-17std::size_t where appropriate, make error message more clear if can't readameerj1-3/+4
2020-07-17alignment: Simplify AlignmentAllocator implementationLioncash1-43/+4
With C++20, much of the allocator interface has been simplified, so we can make the same adjustments.
2020-07-17Drop settings namespaceDavid Marcec1-2/+1
2020-07-17Remove duplicate configDavid Marcec2-2/+1
2020-07-17Use conditional varDavid Marcec2-9/+15
2020-07-17Drop max workers from 8->2 for testingDavid Marcec1-1/+1
2020-07-17Rebase for per game settingsDavid Marcec9-1/+53
2020-07-17async shadersDavid Marcec16-64/+598
2020-07-17macro_hle: Remove unnecessary static keywordsLioncash1-7/+4
These functions are already in an anonymous namespace which makes the functions internally linked.
2020-07-17core/CMakeLists: Add missing physical_memory.h header fileLioncash1-0/+1
Allows this header file to show up in IDE CMake generators.
2020-07-17macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()Lioncash1-2/+1
Given the expression involves a 32-bit value, this simplifies down to just: 0x3ffffff. This is likely a remnant from testing that was never cleaned up. Resolves a -Wshift-overflow warning.
2020-07-17macro_hle: Remove unnecessary std::make_pair callsLioncash1-3/+3
The purpose of make_pair is generally to deduce the types within the pair without explicitly specifying the types, so these usages were generally unnecessary, particularly when the type is enforced by the array declaration.
2020-07-17macro: Resolve missing parameter in doxygen commentLioncash1-1/+2
Resolves a -Wdocumentation warning.
2020-07-17constants: Add missing <array> includeLioncash1-0/+1
Eliminates reliance on an indirect include.
2020-07-17mii/manager: Resolve sign mismatch warningsLioncash1-3/+3
Previously the loop termination condition was testing variables of different signedness.
2020-07-17mii/manager: Make use of designated initializersLioncash1-53/+54
Allows returning the structure in a more concise manner.
2020-07-17wrapper: Make use of designated initializers where applicableLioncash1-56/+64
2020-07-17vk_texture_cache: Make use of designated initializers where applicableLioncash1-96/+135
2020-07-17vk_texture_cache: Amend mismatched access masks and indices in UploadBufferLioncash1-6/+4
Discovered while converting relevant parts of the codebase over to designated initializers.
2020-07-17vk_swapchain: Make use of designated initializers where applicableLioncash1-43/+51
2020-07-17vk_stream_buffer: Make use of designated initializers where applicableLioncash1-19/+16
2020-07-17vk_staging_buffer_pool: Make use of designated initializers where applicableLioncash1-13/+12
2020-07-17vk_shader_util: Make use of designated initializers where applicableLioncash1-7/+7
2020-07-17vk_scheduler: Make use of designated initializers where applicableLioncash1-27/+30
2020-07-17vk_sampler_cache: Make use of designated initializers where applicableLioncash1-24/+27
2020-07-17vk_resource_manager: Make use of designated initializers where applicableLioncash1-15/+14
2020-07-17vk_renderpass_cache: Make use of designated initializers where applicableLioncash1-59/+70
2020-07-17vk_rasterizer: Make use of designated initializers where applicableLioncash1-41/+47
2020-07-17vk_query_cache: Make use of designated initializers where applicableLioncash1-8/+8
2020-07-17vk_pipeline_cache: Make use of designated initializers where applicableLioncash1-31/+35
2020-07-17vk_memory_manager: Make use of designated initializers where applicableLioncash1-7/+6
2020-07-17vk_image: Make use of designated initializers where applicableLioncash1-15/+23
2020-07-17vk_descriptor_pool: Make use of designated initializers where applicableLioncash1-15/+18
2020-07-17vk_graphics_pipeline: Resolve narrowing warningsLioncash1-2/+4
For whatever reason, VK_TRUE and VK_FALSE aren't defined as having a VkBool32 type, so we need to cast to it explicitly.
2020-07-16vk_compute_pipeline: Make use of designated initializers where applicableLioncash1-63/+68
2020-07-16vk_compute_pass: Make use of designated initializers where applicableLioncash1-95/+99
Note: Some barriers can't be converted over yet, as they ICE MSVC.
2020-07-16vk_buffer_cache: Make use of designated initializers where applicableLioncash1-30/+33
Note: An array within CopyFrom() cannot be converted over yet, as it ICEs MSVC when converted over.
2020-07-16decode/other: Implement S2R.LaneIdReinUsesLisp1-2/+1
This maps to host's thread id. - Fixes graphical issues on Paper Mario.
2020-07-16gl_arb_decompiler: Execute BAR even when inside control flowReinUsesLisp1-4/+0
Unlike GLSL, GLASM allows us to call BAR inside control flow. - Fixes graphical artifacts in Paper Mario.
2020-07-16renderer_{opengl,vulkan}: Clamp shared memory to host's limitReinUsesLisp6-9/+42
This stops shaders from failing to build when the exceed host's shared memory size limit. An error is logged.
2020-07-16kernel/thread: Remove unimplemented function prototypeLioncash1-2/+0
This isn't used, so it can be removed.
2020-07-16kernel: Remove unused variablesLioncash3-7/+2
Resolves some compiler warnings in the Linux build.
2020-07-16kernel: Add missing includeLioncash1-0/+1
2020-07-16cpu_manager: Mark function getters as staticLioncash4-10/+11
All these do are return std::function instances of static functions, so these can be used without an instance of the CPU manager.
2020-07-16cpu_manager: Remove unused preemption_count variableLioncash1-1/+0
Shrinks the data structure by 8 bytes.
2020-07-16cpu_manager: Add missing includesLioncash1-0/+3
Previously this header was relying on indirect inclusions that are no longer satisfied.
2020-07-16Refactor adapter codeAmeer2-179/+44
2020-07-16hid: Only update keyboard & debug pad inputs if enabledDavid Marcec2-33/+37
Previously we would ignore this setting and would update the states regardless of the user setting
2020-07-16Check for empty section0 and CNMT prior to installMorph1-3/+19
2020-07-16Add comment to clarify the nullptr checkMorph1-0/+1
2020-07-16filesystem: Create subdirectories prior to creating a fileMorph1-0/+3
If subdirectories exist in the given path parameter and don't exist in the real filesystem create them prior to creating the files within. This fixes the softlocks upon save creation in The Legend of Zelda: Breath of the Wild
2020-07-16core_timing: Remove unused data memberLioncash1-2/+0
Shrinks the size of the CoreTiming class by 8 bytes.
2020-07-16core_timing: Make TimedCallback take std::chrono::nanosecondsLioncash16-58/+62
Enforces our desired time units directly with a concrete type.
2020-07-16core_timing: Make use of std::chrono with ScheduleEventLioncash13-49/+58
2020-07-15settings: Resolve a sign conversion warning within GetTimeZoneString()Lioncash1-5/+5
A sign conversion warning was occurring due to an int < size_t comparison.
2020-07-15kernel/process: Move name and system context to the bottom of the member listLioncash1-6/+6
These aren't directly important or commonly used within the process, so we can move these to the bottom to allow everything else to be more likely to be within a cache line.
2020-07-15kernel/handle_table: Remove usages of the global system instanceLioncash4-8/+15
Removes even more usages of the global system instance, trimming away more dependencies on global variables and making them explicit in the interface.
2020-07-15settings: Make use of std::string_view over std::string for loggingLioncash1-33/+34
In all usages of LogSetting(), string literals are provided. std::string_view is better suited here, as we won't churn a bunch of string allocations every time the settings are logged out. While we're at it, we can fold LogSetting() into LogSettings(), given it's only ever used there.
2020-07-15kernel/thread: Remove global GetCurrentThread()Lioncash3-23/+7
This is only used in one place, so we can fold it into the calling code, eliminating a place for the global system instance to be used.
2020-07-15clang formatMorph1-3/+3
2020-07-15Use proper install result when overwriting filesMorph2-3/+3
2020-07-15Remove global system instance and address feedbackMorph2-14/+10
2020-07-15registered_cache: Remove previous update/dlc if it exists on installMorph2-13/+83
- This checks for and removes old updates or dlc based on title id. If a content meta nca exists within the registered cache, it will attempt to remove all the ncas associated with the content meta before installing a new update/dlc
2020-07-15clang-formatVolcaEM1-1/+2
2020-07-15dmnt_cheat_vm: Implement opcode 0xC3 (ReadWriteStaticRegister)VolcaEM2-1/+41
This was based on Atmosphére's DMNT Cheat VM: - https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/dmnt/source/cheat/impl/dmnt_cheat_vm.hpp - https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/dmnt/source/cheat/impl/dmnt_cheat_vm.cpp From Atmosphére's documentation: "Code type 0xC3 reads or writes a static register with a given register" There are now only two remaining opcodes to implement (PauseProcess and BreakProcess) This is untested because I don't have any experience in testing cheats on yuzu
2020-07-14common/swap: Make use of std::endianLioncash1-42/+4
Allows removing a bunch of defines in favor of a two liner.
2020-07-14shader_cache: Make use of std::erase_ifLioncash1-2/+2
Now that we use C++20, we can also make use of std::erase_if instead of needing to do the erase-remove idiom.
2020-07-14clang-formatlat9nq1-2/+1
2020-07-14settings: Move settings sanitization to its own functionlat9nq4-4/+11
Creates a new function that can be expanded later to fix other settings that are known to cause emulation errors across executables.
2020-07-14Fix crash if gc configured but adapter not connectedAmeer2-15/+25
2020-07-14main: Set async gpu properly after loading per-game settinglat9nq1-0/+4
Another error that got pass me and only noticed when I was doing the per-game settings UI rework. This prevents asynchronous GPU emulation from being disabled while multi core is enabled as a result of a poorly put together per-game config.
2020-07-14configure_general: Explicitly guard use_multi_core when applying settingslat9nq1-0/+2
This is likely an oversight during a rebase. Guards use_multi_core to be only set when the global value is in use. It should not make a difference given the current code base, but makes the code sensible.
2020-07-14vk_device: Make use of designated initializers where applicableLioncash1-124/+152
Avoids redundant repetitions of variable names, and allows assignment all in one statement.
2020-07-14input_common: drop unused libusb.h includeAmeer1-1/+0
Remnant of an early implementation.
2020-07-14vk_graphics_pipeline: Make use of designated initializers where applicableLioncash1-198/+223
Avoids redundant variable name repetitions.
2020-07-13input_common: make libusb private to gc_adapterJan Beich3-3/+7
2020-07-13memory_layout: Remove unused data memberLioncash1-2/+0
This isn't used, so it can be removed entirely, shrinking the structure size by 8 bytes.
2020-07-13address_space_info: Use type alias to simplify codeLioncash1-14/+13
We can define an alias for the index arrays and then just reuse it to make the code nicer to read.
2020-07-13address_space_info: Make use of designated initializersLioncash2-46/+27
We can alter the structure so that we can use designated initializers in the array, eliminating the comments that indicate their field names.
2020-07-13video_core: Rearrange pixel format namesReinUsesLisp19-1179/+1077
Normalizes pixel format names to match Vulkan names. Previous to this commit pixel formats had no convention, leading to confusion and potential bugs.
2020-07-13video_core: Fix DXT4 and RGB565ReinUsesLisp7-37/+31
2020-07-13video_core/format_lookup_table: Add formats with existing PixelFormatReinUsesLisp1-1/+9
2020-07-13video_core: Fix B5G6R5_UNORM render target formatReinUsesLisp5-1/+10
2020-07-13video_core: Fix B5G6R5UReinUsesLisp2-2/+2
2020-07-13video_core: Implement RGBA32_SINT render targetReinUsesLisp7-58/+71
2020-07-13video_core: Implement RGBA32_SINT render targetReinUsesLisp7-0/+13
2020-07-13video_core: Implement RGBA16_SINT render targetReinUsesLisp7-0/+13
2020-07-13video_core: Implement RGBA8_SINT render targetReinUsesLisp7-0/+13
2020-07-13video_core: Implement RG32_SINT render targetReinUsesLisp7-0/+13
2020-07-13video_core: Implement RG8_SINT render target and fix RG8_UINTReinUsesLisp7-1/+14
2020-07-13video_core: Implement R8_SINT render targetReinUsesLisp7-0/+13
2020-07-13video_core: Implement R8_SNORM render targetReinUsesLisp7-0/+13
2020-07-13video_core/surface: Remove explicit values on PixelFormat's definitionReinUsesLisp1-80/+80
2020-07-13video_core/surface: Reorder render target to pixel format switchReinUsesLisp1-53/+51
2020-07-13kernel/scheduler: Use std::mutex instead of spin lockReinUsesLisp1-1/+1
Profiling shows that this is a highly contested mutex, causing dimishing results compared to a OS lock. std::mutex implementations can spin for a while before falling back to an OS lock. This avoids wasting precious CPU cycles in a no-op.
2020-07-13vk_blit_screen: Make use of designated initializers where applicableLioncash1-334/+384
Now that we make use of C++20, we can use designated initializers to make things a little nicer to read.
2020-07-13vk_state_tracker: Fix dirty flags for stencil_enable on VK_EXT_extended_dynamic_stateReinUsesLisp1-0/+1
Fixes a regression on any game using stencil on devices with VK_EXT_extended_dynamic_state.
2020-07-12udp: Silence a C++20 deprecation warningLioncash1-1/+1
C++20 deprecates using the = lambda capture to implicitly capture the this pointer. Instead, we must specify it explicitly.
2020-07-12gc_poller: Mark GCButtonFactory::GetNextInput() as constLioncash2-2/+2
This doesn't modify class instance state.
2020-07-12gc_poller: Get rid of undefined behavior in Create()Lioncash1-0/+4
Ensures that the function always has returns in all control paths.
2020-07-12gc_poller: Silence sign conversion warningsLioncash1-1/+1
2020-07-12gc_adapter: Remove deprecated usage of = in lambda capturesLioncash1-1/+1
It's deprecated in C++20 to use = to capture the this pointer. Instead, we can simply pass this as an argument to the thread constructor.
2020-07-12gc_adapter: Silence sign conversion warningsLioncash2-7/+7
2020-07-12configure_cpu: Split optimization settings off into Debug tabMerryMage9-163/+302
2020-07-12common/alignment: Fix compilation errors (#4303)Tobias1-1/+3
2020-07-12fs: Fix RomFS building when zero byte files are presentMorph4-10/+10
When zero byte files are present, the key (offset) for that file is identical to the file right after. A std::map isn't able to fit key-value pairs with identical keys (offsets), therefore, the solution is to use std::multimap which permits multiple entries with the same key. This most prominently fixes Pokemon Sword and Shield weather with any RomFS mod applied.
2020-07-12hle: service: mii: Rewrite service to properly support creation of random and default miis.bunnei9-914/+3270
2020-07-12Revert "Port citra-emu/citra#5441: "Common: remove a mod from AlignUp""bunnei1-3/+1
2020-07-11Common: remove a mod from AlignUp (#5441)Marshall Mohror1-1/+3
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions. This generates one div and a cmov which is significantly cheaper.
2020-07-11configure_cpu: Add tooltipsMerryMage1-1/+54
2020-07-11configure_cpu: Show/Hide debugging optionsMerryMage7-46/+135
2020-07-11main/profile_select: Don't prompt for profile selection when only one is availableFearlessTobi1-9/+13
2020-07-11configuration: Add settings to enable/disable specific CPU optimizationsMerryMage16-29/+404
2020-07-11CMakeLists: Make use of /std:c++latest on MSVCLioncash1-2/+2
Provides the buildbot with one builder that is always tracking the latest version of the C++ standard, allowing us to progressively rectify our code and amend any differences between standards over time instead of waiting for a complete standard change, potentially breaking a lot of code all at once.
2020-07-10vk_rasterizer: Pass <pSizes> to CmdBindVertexBuffers2EXTReinUsesLisp1-6/+6
This has been fixed in Nvidia's public beta driver 451.74. The previous beta driver will be broken, people using these will have to update.
2020-07-10Break out of scan loop if can't find adapter on first runAmeer1-0/+3
2020-07-10video_core/textures: Add and use SwizzleSliceToVoxel, and minor style changesReinUsesLisp5-84/+125
Change GOB sizes from free-functions to constexpr constants. Add SwizzleSliceToVoxel, a function that swizzles a 2D array of pixels into a 3D texture and use it for 3D copies.
2020-07-10vfs_real: Fix MoveFileMorph1-10/+17
The file wasn't closed prior to being renamed / moved, throwing an error that states "The process cannot access the file because it is being used by another process." Fix this by closing the file prior to a rename / move operation. Fixes saving in Luigi's Mansion 3 and KATANA KAMI: A Way of the Samurai Story.
2020-07-10KeyManager: Prevent writing of invalid keysMorph1-4/+8
If the keys are zero, don't write them to the autogenerated file.
2020-07-10Add additional empty check for the QStringList returned by the InstallDialogMorph1-0/+4
2020-07-10Update the install and progress dialogsMorph4-80/+65
- Remove the overwrite files checkbox, it will always overwrite - The progressbar now reflects the progress in terms of data transferred.
2020-07-10Refactor batch installing filesMorph4-196/+238
Key issues fixed: - Progress dialog showing up as white/hanging/getting stuck/unresponsive. Key changes: - Progress dialog now shows progress as a function of all files instead of per nca within a file. - Overwrite existing files will overwrite all files in the selection.
2020-07-10Add support for batch install to NANDMorph6-124/+290
This adds support to batch install files to NAND
2020-07-10bis_factory: Set User NAND free space to be 1 MiB less than total.Morph1-1/+3
2020-07-10sdmc_factory: Set the SDMC total size to 1 TiBMorph1-1/+3
We should not be limited by the SDMC's partition size, set this to 1 TiB. Hardware is limited to the max allowed by the MBR partition table which is 2 TiB.
2020-07-10bis_factory: Use hardware default NAND partition sizesMorph1-10/+11
Sets the total space of user and system partitions to their hardware defaults. Furthermore, return the total space as free space for the user partition to prevent it from reaching zero. Some games like Bioshock 2 check for the available free space prior to save creation, and we should not be limited by arbitrary limits.
2020-07-10settings: Remove storage size optionsMorph5-214/+1
2020-07-10cmake: Fix libfmt linking errorsDavid Marcec1-5/+1
2020-07-10configuration: implement per-game configurations (#4098)lat9nq57-835/+1942
* Switch game settings to use a pointer In order to add full per-game settings, we need to be able to tell yuzu to switch to using either the global or game configuration. Using a pointer makes it easier to switch. * configuration: add new UI without changing existing funcitonality The new UI also adds General, System, Graphics, Advanced Graphics, and Audio tabs, but as yet they do nothing. This commit keeps yuzu to the same functionality as originally branched. * configuration: Rename files These weren't included in the last commit. Now they are. * configuration: setup global configuration checkbox Global config checkbox now enables/disables the appropriate tabs in the game properties dialog. The use global configuration setting is now saved to the config, defaulting to true. This also addresses some changes requested in the PR. * configuration: swap to per-game config memory for properties dialog Does not set memory going in-game. Swaps to game values when opening the properties dialog, then swaps back when closing it. Uses a `memcpy` to swap. Also implements saving config files, limited to certain groups of configurations so as to not risk setting unsafe configurations. * configuration: change config interfaces to use config-specific pointers When a game is booted, we need to be able to open the configuration dialogs without changing the settings pointer in the game's emualtion. A new pointer specific to just the configuration dialogs can be used to separate changes to just those config dialogs without affecting the emulation. * configuration: boot a game using per-game settings Swaps values where needed to boot a game. * configuration: user correct config during emulation Creates a new pointer specifically for modifying the configuration while emulation is in progress. Both the regular configuration dialog and the game properties dialog now use the pointer Settings::config_values to focus edits to the correct struct. * settings: split Settings::values into two different structs By splitting the settings into two mutually exclusive structs, it becomes easier, as a developer, to determine how to use the Settings structs after per-game configurations is merged. Other benefits include only duplicating the required settings in memory. * settings: move use_docked_mode to Controls group `use_docked_mode` is set in the input settings and cannot be accessed from the system settings. Grouping it with system settings causes it to be saved with per-game settings, which may make transferring configs more difficult later on, especially since docked mode cannot be set from within the game properties dialog. * configuration: Fix the other yuzu executables and a regression In main.cpp, we have to get the title ID before the ROM is loaded, else the renderer will reflect only the global settings and now the user's game specific settings. * settings: use a template to duplicate memory for each setting Replaces the type of each variable in the Settings::Values struct with a new class that allows basic data reading and writing. The new struct Settings::Setting duplicates the data in memory and can manage global overrides per each setting. * configuration: correct add-ons config and swap settings when apropriate Any add-ons interaction happens directly through the global values struct. Swapping bewteen structs now also includes copying the necessary global configs that cannot be changed nor saved in per-game settings. General and System config menus now update based on whether it is viewing the global or per-game settings. * settings: restore old values struct No longer needed with the Settings::Setting class template. * configuration: implement hierarchical game properties dialog This sets the apropriate global or local data in each setting. * clang format * clang format take 2 can the docker container save this? * address comments and style issues * config: read and write settings with global awareness Adds new functions to read and write settings while keeping the global state in focus. Files now generated per-game are much smaller since often they only need address the global state. * settings: restore global state when necessary Upon closing a game or the game properties dialog, we need to restore all global settings to the original global state so that we can properly open the configuration dialog or boot a different game. * configuration: guard setting values incorrectly This disables setting values while a game is running if the setting is overwritten by a per game setting. * config: don't write local settings in the global config Simple guards to prevent writing the wrong settings in the wrong files. * configuration: add comments, assume less, and clang format No longer assumes that a disabled UI element means the global state is turned off, instead opting to directly answer that question. Still however assumes a game is running if it is in that state. * configuration: fix a logic error Should not be negated * restore settings' global state regardless of accept/cancel Fixes loading a properties dialog and causing the global config dialog to show local settings. * fix more logic errors Fixed the frame limit would set the global setting from the game properties dialog. Also strengthened the Settings::Setting member variables and simplified the logic in config reading (ReadSettingGlobal). * fix another logic error In my efforts to guard RestoreGlobalState, I accidentally negated the IsPowered condition. * configure_audio: set toggle_stretched_audio to tristate * fixed custom rtc and rng seed overwriting the global value * clang format * rebased * clang format take 4 * address my own review Basically revert unintended changes * settings: literal instead of casting "No need to cast, use 1U instead" Thanks, Morph! Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> * Revert "settings: literal instead of casting " This reverts commit 95e992a87c898f3e882ffdb415bb0ef9f80f613f. * main: fix status buttons reporting wrong settings after stop emulation * settings: Log UseDockedMode in the Controls group This should have happened when use_docked_mode was moved over to the controls group internally. This just reflects this in the log. * main: load settings if the file has a title id In other words, don't exit if the loader has trouble getting a title id. * use a zero * settings: initalize resolution factor with constructor instead of casting * Revert "settings: initalize resolution factor with constructor instead of casting" This reverts commit 54c35ecb46a29953842614620f9b7de1aa9d5dc8. * configure_graphics: guard device selector when Vulkan is global Prevents the user from editing the device selector if Vulkan is the global renderer backend. Also resets the vulkan_device variable when the users switches back-and-forth between global and Vulkan. * address reviewer concerns Changes function variables to const wherever they don't need to be changed. Sets Settings::Setting to final as it should not be inherited from. Sets ConfigurationShared::use_global_text to static. Co-Authored-By: VolcaEM <volcaem@users.noreply.github.com> * main: load per-game settings after LoadROM This prevents `Restart Emulation` from restoring the global settings *after* the per-game settings were applied. Thanks to BSoDGamingYT for finding this bug. * Revert "main: load per-game settings after LoadROM" This reverts commit 9d0d48c52d2dcf3bfb1806cc8fa7d5a271a8a804. * main: only restore global settings when necessary Loading the per-game settings cannot happen after the ROM is loaded, so we have to specify when to restore the global state. Again thanks to BSoD for finding the bug. * configuration_shared: address reviewer concerns except operator overrides Dropping operator override usage in next commit. Co-Authored-By: LC <lioncash@users.noreply.github.com> * settings: Drop operator overrides from Setting template Requires using GetValue and SetValue explicitly. Also reverts a change that broke title ID formatting in the game properties dialog. * complete rebase * configuration_shared: translate "Use global configuration" Uses ConfigurePerGame to do so, since its usage, at least as of now, corresponds with ConfigurationShared. * configure_per_game: address reviewer concern As far as I understand, it prevents the program from unnecessarily copying strings. Co-Authored-By: LC <lioncash@users.noreply.github.com> Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> Co-authored-by: VolcaEM <volcaem@users.noreply.github.com> Co-authored-by: LC <lioncash@users.noreply.github.com>
2020-07-10vk_stream_buffer: set allocable_size to 9 MiBlat9nq1-1/+1
This solves the crash on Linux systems running the current Linux Long Lived branch nVidia driver.
2020-07-09cmake: fix fmt linking when foundJohn Galt1-1/+5
This is a new attempt at #4206 that shouldn't break windows builds. If someone else could test on windows, it would be much appreciated. Previously, the build bot passed but the actual builds failed.
2020-07-09cmake: pass libusb include directory as wellJan Beich1-0/+1
In file included from src/input_common/gcadapter/gc_adapter.cpp:8: src/./input_common/gcadapter/gc_adapter.h:11:10: fatal error: 'libusb.h' file not found #include <libusb.h> ^~~~~~~~~~
2020-07-08Address comments for better clarity/signed dev countAmeer1-11/+15
2020-07-08Add more libusb error checksAmeer1-3/+18
2020-07-08AM: fix GetDesiredLanguage:CrazyMax1-1/+13
try to get a control metadata from application update when is failed to get from the basic version. Tested on Kirby Star Allies
2020-07-08maxwell_dma: Rename registers to match official docs and reorderReinUsesLisp2-287/+355
Rename registers in the MaxwellDMA class to match Nvidia's official documentation. This one can be found here: https://github.com/NVIDIA/open-gpu-doc/blob/master/classes/dma-copy/clb0b5.h While we are at it, reorganize the code in MaxwellDMA to be separated in different functions.
2020-07-07cpu_interrupt_handler: Remove #pragma once from .cpp fileMerryMage1-2/+0
2020-07-07Address PR feedback, fix axis button thresholdingAmeer3-58/+22
2020-07-07input_common/gcadapter: add missing C++11 header required by libc++Jan Beich1-0/+1
In file included from src/input_common/gcadapter/gc_adapter.cpp:8: src/./input_common/gcadapter/gc_adapter.h:77:10: error: no template named 'unordered_map' in namespace 'std' std::unordered_map<int, bool> buttons; ~~~~~^ src/./input_common/gcadapter/gc_adapter.h:78:10: error: no template named 'unordered_map' in namespace 'std' std::unordered_map<int, u16> axes; ~~~~~^
2020-07-07Brace the code! Fix compile error due to class member construction orderAmeer2-15/+31
2020-07-07Recalibrate reconnected controllersAmeer1-0/+5
2020-07-07Save origin state of GC controller analog features, compare against origin for input detectionAmeer3-28/+72
2020-07-07change shortcut context for other hotkeys with file open dialogAmeer1-4/+4
2020-07-07GetDisplayVersion should return a null-terminated version string.CrazyMax1-4/+16
also, in case of failed to get of the basic version, we will try get it from application update.
2020-07-06Fix ss crash on game menu, fix ss on windowed modeAmeer2-4/+6
2020-07-06configure_graphics: Make use of qOverload in signals/slotsLioncash1-2/+2
While we're in the same area, we can make use of qOverload to tidy up some function pointer casts.
2020-07-06configure_graphics: Prevent unnecessary string copies in UpdateDeviceComboBox()Lioncash1-1/+1
Unlikely to impact performance at all, but this is essentially a "free" transformation, so why not?
2020-07-05memory: Set page-table pointers before setting attribute = MemoryMerryMage1-2/+5
2020-07-05AM/ISelfController: Stub CreateManagedDisplaySeparableLayerMorph2-1/+20
Stub this by sending 1 layer id instead of 2 as yuzu does not support multiple layers per display. No adverse side effects have been observed. - Used by Animal Crossing: New Horizons Update 1.3.0
2020-07-04Fix for always firing triggers on some controllers, trigger threshold more universalAmeer2-5/+5
2020-07-03Address lioncash feedback: Log formatting, extern const PadButtonArray, little touch upsAmeer3-24/+32
2020-07-03Revert "cmake: fix fmt linking"bunnei1-1/+1
2020-07-02Fix unnecessary diffsAmeer4-29/+27
2020-07-02Add LR triggers as axes, half press to initiate a press, add GC axis id in config, clarify some code blocks for better readabilityAmeer3-35/+80
2020-07-02Rename two functions in NSVolcaEM1-2/+2
- Rename "GetShellEvent" to "GetShellEventHandle" - Rename "LaunchApplicationFromHost" to "LaunchApplication"
2020-07-02Rename GetApplicationArea2 to GetApplicationAreaSizeVolcaEM1-2/+2
2020-07-02cmake: stop linking against QGL after c6a0ab979239Jan Beich1-1/+1
2020-07-01shader_cache: Fix use-after-free and orphan invalidation cache entriesReinUsesLisp1-29/+41
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-01Reset adapter state on init, fixes errors relating driver hang from unexpected unplugAmeer2-0/+9
2020-07-01Don't handle cycles late if stretcher is activeDavid Marcec1-1/+3
Timestretcher seems to be broken
2020-07-01audio: Improving audio timing for multicore/single coreDavid Marcec2-20/+7
Fixes the issue with needing the timestretcher for multicore.
2020-07-01externals: Track opus as submodule instead of using conanDavid Marcec1-1/+1
Supersedes #4068 see for details.
2020-07-01key_manager: Correct casing of instance()Lioncash10-10/+10
Our codebase uppercases member function names.
2020-07-01key_manager: Delete move operationsLioncash1-0/+3
Prevents the singleton from being moved from.
2020-07-01key_manager: Make use of canonical deleted operator=Lioncash1-2/+2
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-01common: switch to nullptr for sysctl's empty new valueJan Beich1-4/+4
2020-06-30Address feedback regarding increments, const vars, and general cleanupAmeer2-24/+21
2020-06-30fix implicit conversion of size_t type to intAmeer1-1/+1
2020-06-30maxwell_to_gl: Implement MirrorOnceClampOGL using GL_MIRROR_CLAMP_EXTMorph1-0/+6
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-30macro: Add support for "middle methods" on the code cache (#4112)David1-8/+27
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-30common: add sysconf() fallbackJan Beich1-3/+16
src/common/memory_detect.cpp:15:10: fatal error: 'sys/sysinfo.h' file not found #include <sys/sysinfo.h> ^~~~~~~~~~~~~~~
2020-06-29maxwell_to_gl: Rename VertexType() to VertexFormat()Morph2-4/+5
2020-06-29cmake: fix fmt linkingJohn Galt1-1/+1
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-29Remove duplicate functionsVolcaEM1-2/+0
2020-06-29Use decimal instead of hexadecimalVolcaEM1-3/+5
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-06-29Fix typoVolcaEM1-1/+1
2020-06-29Clang-formatVolcaEM1-1/+1
2020-06-29service: Update function tablesVolcaEM27-157/+285
2020-06-29core_timing,scheduler: Use std::scoped_lock when possibleReinUsesLisp2-15/+12
Simplifies the cognitive load of procedures using locks and makes locks safe against exceptions.
2020-06-28ldr: Cleanup NRO & NRR structsDavid Marcec1-8/+8
2020-06-28maxwell_to_vk: Reorder vertex formats and add A2B10G10R10 for all types except floatMorph1-75/+69
2020-06-28am: Stub GetIndirectLayerConsumerHandleDavid Marcec1-1/+13
Needed by Monster Hunter Generations Ultimate
2020-06-28maxwell_to_gl: Add 32 bit component sizes to (un)signed scaled formatsMorph1-30/+4
Add 32 bit component sizes to (un)signed scaled formats and group (un)signed normalized, scaled, and integer formats together.
2020-06-28acc: ListOpenContextStoredUsers partial stubDavid Marcec5-4/+14
Needed by Baldur's Gate 1/2
2020-06-28Core/Common: Address Feedback.Fernando Sahmkow21-58/+58
2020-06-27NvFlinger: Clang Format.Fernando Sahmkow1-1/+1
2020-06-27Build System: Fix GCC & MINGW Build.Fernando Sahmkow1-0/+4
2020-06-27SVC: Implement 32-bits wrappers and update Dynarmic.Fernando Sahmkow4-34/+282
2020-06-27SVC: Add GetCurrentProcessorNumber32, CreateTransferMemory32, SetMemoryAttribute32Fernando Sahmkow2-6/+39
2020-06-27ARM: Update Dynarmic and Setup A32 according to latest interface.Fernando Sahmkow8-93/+174
2020-06-27SVC: Add GetThreadPriority32 & SetThreadPriority32Fernando Sahmkow2-2/+30
2020-06-27ArmDynarmic32: Setup CNTPCT correctlyFernando Sahmkow1-1/+1
2020-06-27Audio: Correct buffer release for host timing.Fernando Sahmkow3-1/+22
2020-06-27Common/Kernel: Corrections and small bug fixing.Fernando Sahmkow2-8/+3
2020-06-27Services/NvFlinger: Do vSync in a sepparate thread on Multicore.Fernando Sahmkow4-5/+69
2020-06-27Common/NativeClockx86: Reduce native clock accuracy further.Fernando Sahmkow1-1/+1
2020-06-27Tests/CoreTiming: Correct host timing tests.Fernando Sahmkow2-157/+14
2020-06-27ARMDynarmicInterface: Correct GCC Build Errors.Fernando Sahmkow2-6/+6
2020-06-27Common/AtomicOps: Correct GCC Intrinsic argument ordering.Fernando Sahmkow1-5/+5
2020-06-27Kernel: Correct Host Context on Threads and Scheduler.Fernando Sahmkow4-11/+11
2020-06-27YuzuQT: Hide Speed UI on Multicore.Fernando Sahmkow1-1/+1
2020-06-27Clang Format.Fernando Sahmkow14-48/+49
2020-06-27ARMInterface/Externals: Update dynarmic and fit to latest version.Fernando Sahmkow1-7/+7
2020-06-27ARMInterface: Correct rebase errors.Fernando Sahmkow3-5/+5
2020-06-27CoreTiming: Correct rebase bugs and other miscellaneous things.Fernando Sahmkow2-4/+8
2020-06-27Core: Split Microprofile Dynarmic timing per CoreFernando Sahmkow1-3/+12
2020-06-27General: Tune the priority of main emulation threads so they have higher priority than less important helper threads.Fernando Sahmkow6-0/+60
2020-06-27Dynarmic Interface: don't clear cache if JIT has not been created.Fernando Sahmkow2-0/+6
2020-06-27General: Correct rebase, sync gpu and context management.Fernando Sahmkow9-32/+45
2020-06-27CoreTiming/CycleTimer: Correct Idling.Fernando Sahmkow1-2/+5
2020-06-27SingleCore: Correct ticks reset to be on preemption.Fernando Sahmkow1-1/+1
2020-06-27General: Cleanup legacy code.Fernando Sahmkow19-740/+8
2020-06-27Kernel/svcBreak: Implement CacheInvalidation for Singlecore and correct svcBreak.Fernando Sahmkow2-3/+13
2020-06-27Bootmanager/CPU_Manager: Correct shader caches and sync GPU on OpenGL.Fernando Sahmkow2-6/+13
2020-06-27HLE_IPC: Correct HLE Event behavior on timeout.Fernando Sahmkow3-1/+19
2020-06-27SingleCore: Improve Cycle timing Behavior and replace mutex in global scheduler for spinlock.Fernando Sahmkow3-2/+4
2020-06-27FrameLimiting: Enable frame limiting for single core.Fernando Sahmkow2-1/+2
2020-06-27SingleCore: Use Cycle Timing instead of Host Timing.Fernando Sahmkow15-80/+152
2020-06-27Scheduler: Correct Reload/UnloadFernando Sahmkow2-3/+5
2020-06-27Thread: Release the ARM Interface on exitting.Fernando Sahmkow3-1/+8
2020-06-27General: Move ARM_Interface into Threads.Fernando Sahmkow18-170/+136
2020-06-27Core: Refactor ARM Interface.Fernando Sahmkow10-42/+69
2020-06-27X64 Clock: Reduce accuracy to be less or equal to guest accuracy.Fernando Sahmkow3-1/+10
2020-06-27ARM/WaitTree: Better track the CallStack for each thread.Fernando Sahmkow3-11/+74
2020-06-27SVC/ARM: Correct svcSendSyncRequest and cache ticks on arm interface.Fernando Sahmkow3-5/+20
2020-06-27SingleCore: Move Host Timing from a sepparate thread to main cpu thread.Fernando Sahmkow7-10/+48
2020-06-27GUI: Make multicore only work with Async and add GUI for multicore.Fernando Sahmkow6-5/+63
2020-06-27ARM: Addapt to new Exclusive Monitor Interface.Fernando Sahmkow5-31/+24
2020-06-27CPU_Manager: Correct stopping on SingleCore.Fernando Sahmkow1-3/+8
2020-06-27Scheduler: Correct yielding interaction with SetThreadActivity.Fernando Sahmkow1-0/+15
2020-06-27General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running.Fernando Sahmkow11-13/+87
2020-06-27General: Fix Stop functionFernando Sahmkow4-5/+25
2020-06-27Kernel: Rewind on SVC change.Fernando Sahmkow3-5/+16
2020-06-27Kernel: Preempt Single core on redudant yields.Fernando Sahmkow6-21/+42
2020-06-27CPU_Manager: Unload/Reload threads on preemption on SingleCoreFernando Sahmkow4-7/+64
2020-06-27Synchronization: Correct wide Assertion.Fernando Sahmkow1-2/+4
2020-06-27General: Initial Setup for Single Core.Fernando Sahmkow8-34/+228
2020-06-27Scheduler: Set last running time on thread.Fernando Sahmkow2-4/+2
2020-06-27Kernel: Corrections to TimeManager, Scheduler and Mutex.Fernando Sahmkow3-5/+5
2020-06-27Kernel: Fixes, corrections and asserts to scheduler and different svcs.Fernando Sahmkow8-38/+38
2020-06-27Scheduler: Correct yields.Fernando Sahmkow2-7/+25
2020-06-27Mutex: Revert workaround due to poor exclusive memory.Fernando Sahmkow1-9/+2
2020-06-27ARM/Memory: Correct Exclusive Monitor and Implement Exclusive Memory Writes.Fernando Sahmkow12-24/+325
2020-06-27SVC: WaitSynchronization add Termination Pending Result.Fernando Sahmkow2-1/+5
2020-06-27Scheduler: Remove arm_interface lock and a few corrections.Fernando Sahmkow2-17/+3
2020-06-27Yuzu/Debuggers: Correct Wait Tree for Paused threads.Fernando Sahmkow1-2/+10
2020-06-27SVC: Correct SetThreadActivity.Fernando Sahmkow4-38/+59
2020-06-27SCC: Small corrections to CancelSynchronizationFernando Sahmkow3-2/+14
2020-06-27Scheduler: Correct locking for hle threads.Fernando Sahmkow1-1/+2
2020-06-27Scheduler: Fix HLE Threads on guardFernando Sahmkow1-4/+6
2020-06-27Scheduler: Protect on closed threads.Fernando Sahmkow1-7/+17
2020-06-27Scheduler: Correct assert.Fernando Sahmkow1-4/+2
2020-06-27Core: Correct rebase.Fernando Sahmkow2-18/+11
2020-06-27Scheduler: Release old thread fiber before trying to switch to the next thread fiber.Fernando Sahmkow2-11/+35
2020-06-27NVDRV: Remove frame limiting as Host Timing already takes care.Fernando Sahmkow1-1/+0
2020-06-27Mutex: Correct Result writting to clear exclusivity.Fernando Sahmkow1-3/+11
2020-06-27SVC: Correct svcWaitForAddress and svcSignalToAddress.Fernando Sahmkow4-68/+161
2020-06-27Scheduler: Correct Select Threads Step 2.Fernando Sahmkow1-0/+1
2020-06-27Kernel: Corrections to Scheduling.Fernando Sahmkow5-19/+23
2020-06-27Kernel: Correct Signal on Thread Death and Setup Sync Objects on Thread for DebuggingFernando Sahmkow3-15/+17
2020-06-27Core: Correct HLE Event Callbacks and other issues.Fernando Sahmkow5-37/+39
2020-06-27Process: Protect TLS region and Modules.Fernando Sahmkow1-0/+4
2020-06-27General: Add AssertsFernando Sahmkow4-0/+24
2020-06-27General: Add better safety for JIT use.Fernando Sahmkow5-7/+39
2020-06-27SVC: Correct races on physical core switching.Fernando Sahmkow2-10/+10
2020-06-27NVFlinger: Lock race condition between CPU, Host Timing, VSync.Fernando Sahmkow3-0/+11
2020-06-27SVC: Add locks to the memory management.Fernando Sahmkow1-0/+21
2020-06-27SVC: Correct WaitSynchronization, WaitProcessWideKey, SignalProcessWideKey.Fernando Sahmkow9-33/+84
2020-06-27SVC: Cleanup old methods.Fernando Sahmkow1-13/+9
2020-06-27CPU_Manager: Reconfigre guest threads for dynamrmic downsidesFernando Sahmkow3-1/+7
2020-06-27SVC: Correct SendSyncRequest.Fernando Sahmkow8-54/+116
2020-06-27SVC: Correct ArbitrateUnlockFernando Sahmkow3-33/+37
2020-06-27SVC: Correct SignalEvent, ClearEvent, ResetSignal, WaitSynchronization, CancelSynchronization, ArbitrateLockFernando Sahmkow8-90/+134
2020-06-27SVC: Remove global HLE Lock.Fernando Sahmkow1-3/+0
2020-06-27SVC: Correct GetThreadPriority, SetThreadPriority, GetThreadCoreMask, SetThreadCoreMask, GetCurrentProcessorNumberFernando Sahmkow5-15/+26
2020-06-27SVC: Correct CreateThread, StartThread, ExitThread, SleepThread.Fernando Sahmkow3-37/+31
2020-06-27HostTiming: Pause the hardware clock on pause.Fernando Sahmkow7-1/+23
2020-06-27AudioCore: Use nanoseconds instead of cycles for buffer time.Fernando Sahmkow2-6/+6
2020-06-27General: Setup yuzu threads' microprofile, naming and registry.Fernando Sahmkow7-9/+25
2020-06-27CPU_Manager: remove debugging code.Fernando Sahmkow1-8/+4
2020-06-27YuzuCMD/Tester: Correct executionFernando Sahmkow2-6/+8
2020-06-27General: Recover Prometheus project from harddrive failure Fernando Sahmkow57-816/+1341
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-27nfc: Update function tableVolcaEM1-3/+3
This was based on Switchbrew page: https://switchbrew.org/wiki/NFC_services
2020-06-27ncm: Update function tableVolcaEM1-10/+10
This was based on Switchbrew page: https://switchbrew.org/wiki/NCM_services ILocationResolver's 16, 17, 18 and 19 have unofficial names
2020-06-27mm: Update function tableVolcaEM1-16/+16
This was based on Switchbrew page: https://switchbrew.org/wiki/Display_services
2020-06-27mig: Update function tableVolcaEM1-0/+6
This was based on Switchbrew page: https://switchbrew.org/wiki/Migration_services
2020-06-27ldn: Update function tableVolcaEM1-0/+1
This was based on Switchbrew page: https://switchbrew.org/wiki/LDN_services
2020-06-27Oops (fix typo)VolcaEM1-1/+1
2020-06-27lbl: Update function tableVolcaEM1-0/+1
This was based on Switchbrew page: https://switchbrew.org/wiki/Backlight_services
2020-06-27grc: Update function tableVolcaEM1-0/+3
This was based on Switchbrew page: https://switchbrew.org/wiki/GRC_services
2020-06-27friend: Update function tableVolcaEM1-0/+6
2020-06-27Fix issues caused when changing the fullscreen hotkeyKewlan1-4/+5
2020-06-27left const auto&, comment punctuation.Ameer J1-2/+2
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2020-06-27Use better names for "Unknown"sVolcaEM1-39/+39
2020-06-27Update function namesVolcaEM1-4/+4
2020-06-27btm: Give better names for unknown functionsDavid Marcec1-5/+5
2020-06-27btdrv: Update function table (#4174)VolcaEM1-83/+84
* btdrv: Update function table
2020-06-27bpc: Update function tables (#4173)VolcaEM1-7/+13
* bpc: Update function tables This was based on Switchbrew page: https://switchbrew.org/wiki/PCV_services
2020-06-27bcat: Update function tables and add missing classes (#4172)VolcaEM2-0/+5
* bcat: Update function tables and add missing classes
2020-06-27am: Update function tables and add missing classes (#4169)VolcaEM3-17/+19
* 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-27aoc: Update function table (#4170)VolcaEM1-0/+1
* aoc: Update function table * Remove comments
2020-06-27eupld: Update function tableVolcaEM1-0/+1
This was based on Switchbrew page: https://switchbrew.org/wiki/Error_Upload_services
2020-06-27es: Update function tableVolcaEM1-2/+41
This was based on Switchbrew page: https://switchbrew.org/wiki/ETicket_services
2020-06-27Update FAQ function name (2/2)VolcaEM1-2/+2
2020-06-27Update FAQ function name (1/2)VolcaEM1-1/+1
2020-06-27btm: Update function tablesVolcaEM1-71/+76
This was based on Switchbrew page: https://switchbrew.org/wiki/BTM_services "No comment" edition
2020-06-27vk_rasterizer: Use nullptr for <pSizes> in CmdBindVertexBuffers2EXTReinUsesLisp1-6/+6
Disable this temporarily.
2020-06-27vk_pipeline_cache: Avoid hashing and comparing dynamic state when possibleReinUsesLisp6-23/+51
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-27vulkan/fixed_pipeline_state: Move state out of individual structuresReinUsesLisp4-121/+84
2020-06-27vk_rasterizer: Use VK_EXT_extended_dynamic_stateReinUsesLisp5-46/+356
2020-06-27renderer_vulkan/wrapper: Add VK_EXT_extended_dynamic_state functionsReinUsesLisp2-0/+64
2020-06-27fixed_pipeline_state: Add requirements for VK_EXT_extended_dynamic_stateReinUsesLisp7-155/+143
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-27vk_device: Enable VK_EXT_extended_dynamic_state when availableReinUsesLisp2-0/+32
2020-06-27texture_cache: Test format compatibility before copyingReinUsesLisp2-6/+21
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-27video_core/compatible_formats: Table to test if two formats are legal to view or copyReinUsesLisp3-0/+196
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-26gl_buffer_cache: Copy to buffers created as STREAM_READ before downloadingReinUsesLisp5-18/+24
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-26Update function name againVolcaEM1-1/+1
2020-06-26Update function name (2/2)VolcaEM1-1/+1
2020-06-26Update function name (1/2)VolcaEM1-1/+1
2020-06-26Common: Fix non-conan buildFernando Sahmkow1-1/+2
2020-06-26caps_u: Fix GetAlbumContentsFileListForApplication stubMorph1-9/+15
2020-06-26caps: Use enum classes and check struct sizes on compile timeMorph1-34/+40
2020-06-26caps: Update copyright headersMorph14-14/+14
Updated to "yuzu Emulator Project"
2020-06-26Add a "Mute Audio" hotkeyKewlan6-3/+17
2020-06-26const& to button in button arrayAmeer J1-2/+2
Co-authored-by: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
2020-06-26Stop reading loop if error is encounteredAmeer1-4/+4
2020-06-25Clang-format againVolcaEM1-1/+1
2020-06-25Clang-formatVolcaEM1-1/+2
2020-06-25Remove unnecessary newlineVolcaEM1-1/+0
2020-06-25Fix typo 2: electric boogalooVolcaEM1-1/+1
2020-06-25Use QUrl (2/2)VolcaEM1-6/+5
2020-06-25Use QUrl (1/2)VolcaEM1-1/+1
2020-06-25Fix formattingVolcaEM1-2/+2
2020-06-25Fix typoVolcaEM1-1/+1
2020-06-25Add "Open Quickstart Guide" and "FAQ" buttons to the Help menuVolcaEM3-0/+48
While we're at it, also refactor the function used by OnOpenModsPage to be compatible with other URLs
2020-06-25gl_device: Fix IsASTCSupportedDavid Marcec1-1/+1
Other targets were never actually checked
2020-06-25memory_manager: Remove useless assertionDavid Marcec1-1/+0
num_pages is an std::size_t. It will always be >= 0
2020-06-25gl_device: Enable NV_vertex_buffer_unified_memory on Turing devicesReinUsesLisp1-19/+1
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-24hid: Stub a series of "SevenSixAxisSensor" service commandsMorph2-21/+85
- 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-24padbutton enum class and struct initiailizationAmeer3-36/+32
2020-06-24Prevent nullptr dereference on swkbd error caseDavid Marcec1-1/+1
2020-06-24prepo: : Don't read extra buffer from report unless passedDavid Marcec1-1/+6
Prepo doesn't always pass a secondary buffer, we assume it always does which leads to a bad read.
2020-06-24Mark invalid IPC buffers as ASSERT_OR_EXECUTE_MSGDavid Marcec1-25/+22
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-24buffer_cache: Use buffer methods instead of cache virtual methodsReinUsesLisp5-99/+90
2020-06-24gl_stream_buffer: Use InvalidateBufferData instead unmap and mapReinUsesLisp2-15/+5
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-24gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustnessReinUsesLisp3-9/+39
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-24gl_buffer_cache: Mark buffers as residentReinUsesLisp10-67/+111
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-24gl_device: Expose NV_vertex_buffer_unified_memory except on TuringReinUsesLisp2-1/+30
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-24gl_stream_buffer: Always use a non-coherent bufferReinUsesLisp2-14/+10
2020-06-24gl_stream_buffer: Always use persistent memory mapsReinUsesLisp2-30/+14
yuzu no longer supports platforms without persistent maps.
2020-06-24Move GetKeyCodeMapImpl to an anonymous namespaceDavid Marcec1-19/+19
2020-06-24addressed issuesDavid Marcec2-4/+7
2020-06-24clear mme draw modeDavid Marcec1-0/+3
We already draw, so we can clear it
2020-06-24Addressed issuesDavid Marcec5-13/+17
2020-06-24Fix constbuffer for 0217920100488FF7David Marcec1-6/+6
2020-06-24Macro HLE supportDavid Marcec9-10/+209
2020-06-24Fixed logging outputDavid Marcec1-1/+1
2020-06-24Implement GetKeyCodeMap & GetKeyCodeMap2David Marcec2-2/+72
Closes #3919
2020-06-24gl_shader_cache: Avoid use after move for program sizeReinUsesLisp2-6/+7
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-23cleanup check access, read, and factory GetNextInput funcs. Use size rather than magic numberAmeer4-151/+101
2020-06-23Fix deallocation of GC AdapterAmeer3-4/+10
2020-06-23yuzu_tester: Silence type conversion warningMorph1-1/+1
2020-06-23lm: Silence no return value warningMorph1-1/+2
2020-06-23Small quality of life indication that mapped button is GCAmeer1-2/+2
2020-06-23shader/half_set: Implement HSET2_IMMReinUsesLisp2-21/+75
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-23std::array and const reference passing of non-trivial objectsAmeer2-14/+13
2020-06-22Update src/input_common/main.cppameerj1-1/+1
Co-authored-by: LC <mathew1800@gmail.com> update libusb submodule (hopefully windows build error fixed)
2020-06-22account: Update function tables and add missing classes (#4145)VolcaEM5-42/+384
* account: Update function tables and add missing classes * clang-format * Add missing "public" * Add missing public again * Add missing final
2020-06-22TextureCache: Fix case where layer goes off bound.Fernando Sahmkow1-0/+3
The returned layer is expected to be between 0 and the depth of the surface, anything larger is off bounds.
2020-06-22Reorder variables to comply with the Auzure build pipelineunknown1-2/+2
2020-06-22arm_dynarmic_64: Log the instruction when an exception is raisedMorph1-2/+2
2020-06-22arm_dynarmic_32: Log under Core_ARM instead of HW_GPUMorph1-1/+1
2020-06-22renderer_vulkan: Update validation layer name and test before enablingReinUsesLisp3-5/+43
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-22Tidy up the pointers, use pair over tuple where appropriateAmeer4-24/+22
2020-06-22fix for sleep using stlAmeer1-1/+3
2020-06-22shared_ptr for the GC adapter class, constexpr constantsAmeer5-66/+52
2020-06-22std::arrays where appropriate, clear q in adapter class, other touch upsAmeer5-27/+15
2020-06-22fix include threadAmeer1-0/+1
2020-06-22Singleton GC Adapter class, remove globals, fix naming conventionAmeer8-228/+283
Fix clang formatting Manual fix for configure_input_player formatting Add missing lib usb cmake command
2020-06-21hid: Implement Get/ResetGyroscopeZeroDriftModeMorph4-6/+56
- Used by Captain Toad Treasure Tracker
2020-06-21Clang FormattingAmeer9-182/+184
2020-06-21Cleanup after linterAmeer9-167/+98
2020-06-21GC Adapter ImplementationAmeer18-161/+1159
2020-06-21Correct function name (2/2)VolcaEM1-2/+2
2020-06-21Correct function name (1/2)VolcaEM1-1/+1
2020-06-21Clang-formatVolcaEM1-1/+1
2020-06-21Remove unnecessary conversionVolcaEM1-3/+2
2020-06-21Address review comment by LioncashVolcaEM1-1/+1
Co-authored-by: LC <mathew1800@gmail.com>
2020-06-21Add a "Open Mods Page" button to the GUIVolcaEM3-0/+20
2020-06-21gl_shader_decompiler: Enable GL_EXT_texture_shadow_lod if availableMorph1-7/+43
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-21gl_device: Check for GL_EXT_texture_shadow_lodMorph2-0/+7
2020-06-21Fix: fatal error CVT1100 when compiling manifest fileFearlessTobi3-3/+3
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-20macro_jit_x64: Use ecx for shift registerMerryMage1-2/+2
shl/shr only accept cl as their second argument
2020-06-20texture_cache: Fix incorrect address used in a DeduceSurface() callLioncash1-1/+1
Previously the source was being deduced twice in a row.
2020-06-20software_keyboard: Eliminate trivial redundant copiesLioncash1-2/+2
We can just make use of moves here to get rid of two redundant copies
2020-06-20main: Append AVX and FMA instructions to cpu stringMorph1-1/+14
Append AVX and FMA instructions to cpu string if the host cpu supports them
2020-06-20common/telemetry: Add AVX512 to telemetryMorph1-0/+1
2020-06-20common/cpu_detect: Add AVX512 detectionMorph2-0/+6
2020-06-20decode/image: Implement B10G11R11FMorph1-9/+17
- Used by Kirby Star Allies
2020-06-20gl_arb_decompiler: Avoid several string copiesLioncash1-32/+31
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-20vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()Lioncash2-3/+2
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-20macro_jit_x64: Correct readability of Compile_ExtractShiftLeftImmediate()Lioncash1-3/+3
Previously dst wasn't being used.
2020-06-20macro_jit_x64: Correct readability of Compile_ExtractShiftLeftRegister()Lioncash1-3/+4
Previously dst wasn't being used.
2020-06-20macro_jit_x64: Remove unused variableLioncash1-2/+1
Removes a completely unused label and marks another variable as unused, given it seems like it has potential uses in the future.
2020-06-20memory_manager: Eliminate variable shadowingLioncash2-24/+28
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-20Add translation of "Current Boxcat Events"David Marcec1-3/+2
2020-06-20macro_jit_x64: Eliminate variable shadowing in Compile_ProcessResult()Lioncash1-2/+2
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-20buffer_cache: Eliminate local variable shadowingLioncash1-2/+1
We can just make use of the instance in the scope above this one.
2020-06-19input_common/motion_emu: Remove redundant moveMerryMage1-1/+1
Named return value optimization automatically applies here.
2020-06-19input_common/keyboard: Remove redundant moveMerryMage1-1/+1
Named return value optimization automatically applies here.
2020-06-19mii_model: Remove redundant std::moveMerryMage1-1/+1
Named return value optimization automatically applies here.
2020-06-19Fix compilation when not building with boxcatDavid Marcec2-2/+7
Fixes compilation when trying to build without boxcat enabled
2020-06-19macro_jit_x64: Remove unused function ReadMerryMage1-8/+4
2020-06-18vk_rasterizer: Don't preserve contents on full screen clearsReinUsesLisp2-7/+58
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-18vk_update_descriptor: Upload descriptor sets data directlyReinUsesLisp3-42/+30
Instead of copying to a temporary payload before sending the update task to the worker thread, insert elements to the payload directly.
2020-06-18Tests/HostTiming: Correct GCC Compile error.Fernando Sahmkow1-15/+14
2020-06-18Common/Fiber: Address Feedback and Correct Memory leaks.Fernando Sahmkow2-34/+41
2020-06-18Common/Fiber: Implement Rewind on Boost Context.Fernando Sahmkow2-2/+39
2020-06-18Common/uint128: Correct MSVC Compilation in old versions.Fernando Sahmkow1-0/+4
2020-06-18Common/Fiber: Document fiber interexchange.Fernando Sahmkow1-1/+4
2020-06-18Common/Fiber: Implement Rewinding.Fernando Sahmkow3-2/+84
2020-06-18Common/Fiber: Additional corrections to f_context.Fernando Sahmkow1-4/+4
2020-06-18Common/Fiber: Correct f_context based Fibers.Fernando Sahmkow1-6/+8
2020-06-18Host Timing: Correct clang format.Fernando Sahmkow1-1/+0
2020-06-18HostTiming: Correct rebase and implement AddTicks.Fernando Sahmkow2-1/+19
2020-06-18Core/HostTiming: Allow events to be advanced manually.Fernando Sahmkow4-31/+47
2020-06-18Common/Tests: Address FeedbackFernando Sahmkow9-39/+51
2020-06-18Common: Make MinGW build use Windows Fibers instead of fcontext_tFernando Sahmkow2-4/+4
2020-06-18Common/Tests: Clang Format.Fernando Sahmkow7-31/+41
2020-06-18Common: Correct fcontext fibers.Fernando Sahmkow1-5/+4
2020-06-18Common: Refactor & Document Wall clock.Fernando Sahmkow6-51/+50
2020-06-18Common: Implement WallClock Interface and implement a native clock for x64Fernando Sahmkow10-40/+378
2020-06-18Tests: Add base tests to host timingFernando Sahmkow5-43/+243
2020-06-18Core: Implement a Host Timer.Fernando Sahmkow5-0/+295
2020-06-18Common: Polish Fiber class, add comments, asserts and more tests.Fernando Sahmkow5-25/+147
2020-06-18Tests: Add tests for fibers and refactor/fix Fiber classFernando Sahmkow4-19/+247
2020-06-18Common: Implement a basic Fiber class.Fernando Sahmkow3-0/+204
2020-06-18Common: Implement a basic SpinLock classFernando Sahmkow3-0/+68
2020-06-18arm_dynarmic_32: Fix implicit conversion error in SetTPIDR_EL0ReinUsesLisp1-1/+1
On MSVC builds we treat conversion warnings as errors.
2020-06-18bootmanager: Remove references to OpenGL for macOSMerryMage2-2/+19
OpenGL macOS headers definitions clash heavily with each other
2020-06-18memory_manager: Explicitly specifcy std::min<size_t>MerryMage1-2/+2
2020-06-18shared_font: Service::NS::EncryptSharedFont takes a size_t&MerryMage1-1/+1
2020-06-18vk_rasterizer: BindTransformFeedbackBuffersEXT accepts a size of type VkDeviceSizeMerryMage1-1/+1
2020-06-18renderer_vulkan: Fix macOS GetBundleDirectory referenceMerryMage1-1/+3
2020-06-18memory_util: boost hashes are size_tMerryMage1-2/+2
* boost::hash_value returns a size_t * boost::hash_combine takes a size_t& argument
2020-06-18Rename PAGE_SHIFT to PAGE_BITSMerryMage2-10/+10
macOS header files #define PAGE_SHIFT
2020-06-18Move SHA256Hash to its original positionVolcaEM1-2/+2
It's not needed to have it in its previous position anymore
2020-06-18vk_sampler_cache: Emulate GL_LINEAR/NEAREST minification filtersMorph1-2/+4
Emulate GL_LINEAR/NEAREST minification filters using minLod = 0 and maxLod = 0.25 during sampler creation
2020-06-18maxwell_to_vk: Reorder filter cases and correct mipmap_filter=NoneMorph1-17/+15
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-18maxwell_to_gl: Miscellaneous changesMorph1-48/+34
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-17macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValueMerryMage2-6/+18
2020-06-17arm_dynarmic_cp15: Implement CNTPCTMerryMage1-0/+13
2020-06-17arm_dynarmic_cp15: Update CP15MerryMage4-142/+73
2020-06-17arm_dynarmic_32: InterpreterFallback should never happenMerryMage1-2/+3
2020-06-17macro_jit_x64: Optimization implicitly assumes same destinationMerryMage1-1/+2
2020-06-17macro_jit_x64: Should not skip zero registers for certain ALU opsMerryMage1-1/+3
The code generated for these ALU ops assume src_a and src_b are always valid.
2020-06-17Fix framebuffer size on fractional scaling display.Kaiwen Xu1-1/+1
2020-06-16Remove unnecessary pragmasVolcaEM1-8/+0
2020-06-16Revert IsValidNRO refactor but make it more readableVolcaEM1-26/+13
2020-06-16Update assert stringVolcaEM1-1/+1
2020-06-16gl_device: Reserve at least 4 image bindings for fragment stageMorph1-6/+14
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-15macro_jit_x64: Remove NEXT_PARAMETERMerryMage1-5/+2
Not required, as PARAMETERS can just be incremented directly.
2020-06-15macro_jit_x64: Remove unused function Compile_WriteCarryMerryMage2-9/+0
2020-06-15macro_jit_x64: Select better registersMerryMage1-8/+8
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-15macro_jit_x64: Remove REGISTERSMerryMage1-7/+3
Unnecessary since this is just an offset from STATE.
2020-06-15macro_jit_x64: Remove JITState::parametersMerryMage2-6/+3
This can be passed in as an argument instead.
2020-06-15macro_jit_x64: Remove METHOD_ADDRESS_64MerryMage1-2/+1
Unnecessary variable.
2020-06-15macro_jit_x64: Remove RESULT_64MerryMage2-16/+3
This Reg64 codepath has the exact same behaviour as the Reg32 one.
2020-06-15xbyak_abi: Prefer returning a struct to using out parameters in ABI_CalculateFrameSizeMerryMage1-17/+19
2020-06-15xbyak_abi: Register indexes should be unsignedMerryMage1-11/+12
2020-06-15xbyak_abi: Remove *GPS variants of stack manipulation functionsMerryMage2-42/+6
2020-06-15xbyak_abi: Fix ABI_PushRegistersAndAdjustStackMerryMage1-6/+2
Pushing GPRs twice.
2020-06-15video_core/macro_jit_x64: Remove initializer in member variableReinUsesLisp1-2/+2
Fix build time issues on gcc. Confirmed through asan that avoiding this initialization is safe.
2020-06-14Clang-format againVolcaEM1-2/+2
2020-06-14Use consistent variable namesVolcaEM1-4/+4
2020-06-14Clang-formatVolcaEM1-1/+2
2020-06-14Make assert strings consistentVolcaEM1-3/+3
2020-06-14Attempt to fix crashes in SSBU and refactor IsValidNROVolcaEM1-36/+59
2020-06-13audren: Implement RendererInfoDavid Marcec2-6/+26
Fixes ZLA softlock
2020-06-12gl_arb_decompiler: Implement FSwizzleAddReinUsesLisp1-4/+27
2020-06-12gl_arb_decompiler: Implement an assembly shader decompilerReinUsesLisp7-1/+2093
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-11yuzu/configuration: Show assembly shaders check boxReinUsesLisp1-3/+0
2020-06-10nvdrv: Fix GetTPCMasks for ioctl3David Marcec2-21/+22
Fixes animal crossing svcBreak on launch
2020-06-10kernel: Account for system resource size for memory usageDavid Marcec1-2/+4
GetTotalPhysicalMemoryAvailableWithoutSystemResource & GetTotalPhysicalMemoryUsedWithoutSystemResource seem to subtract the resource size from the usage.
2020-06-09buffer_cache: Avoid passing references of shared pointers and misc style changesReinUsesLisp9-174/+150
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-09gl_rasterizer: Mark vertex buffers as dirty after buffer cache invalidationReinUsesLisp1-1/+10
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-09buffer_cache: Return stream buffer invalidation in Map instead of UnmapReinUsesLisp1-7/+9
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-08Add game versio to title barunknown2-13/+17
2020-06-08texture_cache: Port original code management for 2D vs 3D texturesReinUsesLisp2-16/+35
Handle blits to images as 2D, even when they have block depth. - Fixes rendering issues on Luigi's Mansion 3
2020-06-08texture_cache: Simplify blit codeReinUsesLisp1-9/+7
2020-06-08texture_cache: Handle 3D texture blits with one layerReinUsesLisp3-5/+10
2020-06-08texture_cache: Implement rendering to 3D texturesReinUsesLisp10-139/+191
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-07rasterizer_cache: Remove files and includesReinUsesLisp7-269/+3
The rasterizer cache is no longer used. Each cache has its own generic implementation optimized for the cached data.
2020-06-07vk_pipeline_cache: Use generic shader cacheReinUsesLisp5-58/+55
Trivial port the generic shader cache to Vulkan.
2020-06-07gl_shader_cache: Use generic shader cacheReinUsesLisp4-93/+80
Trivially port the generic shader cache to OpenGL.
2020-06-07shader_cache: Implement a generic shader cacheReinUsesLisp2-0/+229
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-06yuzu/frontend: Remove internal resolution optionMorph9-113/+3
2020-06-06gl_device: Black list NVIDIA 443.24 for fast buffer uploadsReinUsesLisp1-2/+10
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-06renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabledReinUsesLisp1-4/+2
Avoids logging when it's not relevant. This can potentially reduce driver's internal thread overhead.
2020-06-05shader/texture: Join separate image and sampler pairs offlineReinUsesLisp16-88/+234
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-05service: nvhost_vic: Ignore Submit commands.bunnei2-1/+18
2020-06-05nvdrv: Stub nvdec/vic ioctls to bypass nvdec moviesZach Hilman4-3/+239
2020-06-05shader/track: Move bindless tracking to a separate functionReinUsesLisp2-25/+39
2020-06-04Downgrade "handle not signaled" error to traceDavid Marcec1-1/+1
clogs logs quite a bit
2020-06-04Default init labels and use initializer list for macro engineDavid Marcec2-2/+2
2020-06-04gl_rasterizer: Use NV_transform_feedback for XFB on assembly shadersReinUsesLisp3-1/+96
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-03Mark parameters as constDavid Marcec8-11/+11
2020-06-03Actually save the input when clearing/resetting to defaultFearlessTobi1-0/+3
Co-Authored-By: xperia64 <xperiancedapps@gmail.com>
2020-06-02Address review commentsVolcaEM1-4/+4
2020-06-02Pass by reference instead of copying parametersDavid Marcec4-7/+9
2020-06-02vk_shader_decompiler: Implement atomic image operationsReinUsesLisp1-40/+24
Implement atomic operations on images. On GLSL these are atomicImage* functions (e.g. atomicImageAdd).
2020-06-02vk_rasterizer: Implement storage texelsReinUsesLisp8-52/+120
This is the equivalent of an image buffer on OpenGL. - Used by Octopath Traveler
2020-06-02maxwell_to_vk: Add R16UI image formatReinUsesLisp2-71/+74
- Used by Octopath Traveler
2020-06-01gl_shader_decompiler: Declare gl_Layer and gl_ViewportIndex within gl_PerVertex for vertex and tessellation shadersMorph1-6/+16
2020-06-01gl_shader_decompiler: Fix geometry shader outputs for Intel driversMorph1-13/+15
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-01Clang-formatVolcaEM1-2/+1
2020-06-01hid: Stub GetXpadIDsVolcaEM2-1/+14
Allows Minecraft: Nintendo Switch Edition (a.k.a. old Minecraft) to boot and go ingame
2020-06-01gl_device: Avoid devices with CAVEAT_SUPPORT on ASTCReinUsesLisp2-8/+19
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-06-01glsl: Squash constant buffers into a single SSBO when we hit the limitReinUsesLisp7-79/+173
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-31Add comment to nrr_kindVolcaEM1-1/+1
According to Atmosphére (https://github.com/Atmosphere-NX/Atmosphere/blob/c7026b90940a1d88f9c10a6d98263bf22e654fa5/libraries/libstratosphere/include/stratosphere/ro/ro_types.hpp), nrr_kind (Atmosphére calls it "type") is 7.0.0+
2020-05-31ldr: Update NRR/NRO structs VolcaEM1-40/+72
This was based on Switchbrew pages: https://switchbrew.org/wiki/NRR https://switchbrew.org/wiki/NRO
2020-05-31gl_device: Enable compute shaders for Intel proprietary driversMorph3-13/+0
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-30shader/other: Fix hardcoded value in S2R INVOCATION_INFOReinUsesLisp1-1/+1
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-30texture_cache: More relaxed reconstructionReinUsesLisp1-13/+9
Only reupload textures when they've not been modified from the GPU.
2020-05-30Favor switch case over jump tableDavid Marcec2-18/+26
Easier to read and will emit a jump table automatically.
2020-05-30Implement macro JITDavid Marcec15-189/+1034
2020-05-30Add xbyak externalDavid Marcec4-2/+317
2020-05-30texture_cache: Only copy textures that were modified from hostReinUsesLisp1-2/+6
2020-05-30texture_cache: Reload textures when number of resources mismatchReinUsesLisp1-0/+9
2020-05-29vk_rasterizer: Skip transform feedbacks when extension is unavailableReinUsesLisp1-0/+7
Avoids calling transform feedback procedures when VK_EXT_transform_feedback is not available.
2020-05-29texture_cache: Handle overlaps with multiple subresourcesReinUsesLisp1-27/+33
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-29kernel: ResourceLimit::Reserve remove useless while loopDavid Marcec1-5/+1
Timeout is a u64, it will always be >= 0
2020-05-28maxwell_3d: Reduce severity of logs that can be spammedReinUsesLisp1-6/+7
These logs were killing performance on some games when they were spammed. Reduce them to Debug severity.
2020-05-28format_lookup_table: Implement G24S8 format as S8Z24ReinUsesLisp1-1/+2
2020-05-28Make copying directory string more conciselat9nq1-2/+1
2020-05-28Address requested changeslat9nq2-4/+4
2020-05-28*nix systems can read any-case patch directorieslat9nq2-8/+32
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-28buffer_cache: Avoid copying twice on certain casesReinUsesLisp1-17/+23
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-27texture_cache: Use unordered_map::find instead of operator[] on hot codeReinUsesLisp1-15/+19
2020-05-27texture_cache: Use small vector for surface vectorsReinUsesLisp1-9/+10
This avoids most heap allocations when collecting surfaces into a vector.
2020-05-27maxwell_3d: Initialize line widthsReinUsesLisp1-0/+2
Initialize line widths to avoid setting a line width of zero.
2020-05-27maxwell_3d: Initialize polygon modesReinUsesLisp1-0/+2
NVN expects this to be initialized as Fill, otherwise games that never bind a rasterizer state will log an invalid polygon mode.
2020-05-27Fix macOS code and change "Swapfile" to "Swap"Morph2-3/+6
2020-05-27shader/other: Implement MEMBAR.CTSReinUsesLisp4-9/+27
This silences an assertion we were hitting and uses workgroup memory barriers when the game requests it.
2020-05-26texture_cache: Fix layered null surfacesReinUsesLisp1-1/+3
Null texture cubes were not considered arrays, causing issues on Vulkan and OpenGL when creating views.
2020-05-26gl_texture_cache: Implement small texture view cache for swizzlesReinUsesLisp3-37/+44
This fixes cases where the texture swizzle was applied twice on the same draw to a texture bound to two different slots.
2020-05-26texture_cache: Implement depth stencil texture swizzlesReinUsesLisp3-36/+42
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-26gl_rasterizer: Port front face flip check from VulkanReinUsesLisp1-5/+20
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-26fixed_pipeline_state: Remove unnecessary check for front faces flipReinUsesLisp1-2/+1
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-26gl_shader_manager: Unbind GLSL program when binding a host pipelineReinUsesLisp1-0/+4
Fixes regression in Link's Awakening caused by 420cc13248350ef5c2d19e0b961cb4185cd16a8a
2020-05-22yuzu/discord_impl: Update the applicationID (#3977)Tobias1-1/+1
2020-05-22shader/other: Implement BAR.SYNC 0x0ReinUsesLisp4-0/+33
Trivially implement this particular case of BAR. Unless games use OpenCL or CUDA barriers, we shouldn't hit any other case here.
2020-05-22shader/memory: Implement non-addition operations in REDReinUsesLisp1-2/+1
Trivially implement these instructions. They are used in Astral Chain.
2020-05-22shader/other: Implement thread comparisons (NV_shader_thread_group)ReinUsesLisp4-0/+72
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-22shader_decompiler: Visit source nodes even when they assign to RZReinUsesLisp2-2/+6
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-22vk_shader_decompiler: Don't assert for void returnsReinUsesLisp1-2/+1
Atomic instructions can be used without returning anything and this is valid code. Remove the assert.
2020-05-21buffer_cache: Remove unused boost headersReinUsesLisp1-2/+0
2020-05-21map_interval: Add interval allocator and drop hackReinUsesLisp4-3/+79
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-21buffer_cache: Use boost::container::small_vector for maps in rangeReinUsesLisp1-13/+15
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-21buffer_cache: Use boost::intrusive::set for cachingReinUsesLisp6-30/+48
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-21buffer_cache: Remove shared pointersReinUsesLisp2-70/+72
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-21buffer_cache: Minor style changesReinUsesLisp2-129/+65
Minor style changes. Mostly done so I avoid editing it while doing other changes.
2020-05-21clang-formatVolcaEM1-1/+2
2020-05-21nifm: correct assert in CreateTemporaryNetworkProfileVolcaEM1-1/+1
This has been wrong since https://github.com/yuzu-emu/yuzu/commit/0432af5ad1ec34f02071f6fdc5fc78149b059f18 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-20crypto: Make KeyManager a singleton classFearlessTobi13-21/+27
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-19renderer_opengl: Add assembly program code pathsReinUsesLisp12-109/+339
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-19yuzu: Add frontend settings for assembly shadersReinUsesLisp8-0/+29
Add settings for assembly shaders. Currently hidden to avoid users from accidentally enabled them.
2020-05-18maxwell_to_vk: Add format B8G8R8A8_SRGBMorph2-2/+3
Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM Used by Bravely Default II
2020-05-18OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled.Fernando Sahmkow3-0/+9
This commit aims to help easing debugging of driver crashes without having to modify existing code.
2020-05-17main: Log host system memory parametersMorph4-0/+86
Logs both physical memory and swapfile sizes, this is useful for support.
2020-05-16file_sys: Update SystemVersion archive to version 10.0.2David Marcec1-7/+7
2020-05-16nv_flinger: Use enum for pixel format instead of u32David Marcec2-3/+11
2020-05-16DmaPusher: Remove dead code in stepDavid Marcec2-9/+1
2020-05-16vk_rasterizer: Match OpenGL's FlushAndInvalidate behaviorReinUsesLisp1-1/+3
Match OpenGL's behavior. This can fix or simplify bisecting issues on Vulkan.
2020-05-15frontend: Set minimum window size to 640x360 instead of 1280x720 (#3413)Morph6-8/+36
2020-05-13vk_rasterizer: Implement constant attributesReinUsesLisp4-13/+26
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-13vk_rasterizer: Remove buffer check in attribute selectionReinUsesLisp1-4/+0
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-13time_zone: Use std::chrono::seconds for strong typing.bunnei3-4/+5
2020-05-12Frontend: Remove tracking for context wrapperJames Rowe1-8/+8
2020-05-12hid: Clear keyboard states & fix logic issueDavid Marcec1-3/+4
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-11hle: service: time_zone_manager: Use current time zone setting.bunnei2-3/+32
2020-05-11common: Add module to get the current time zone.bunnei3-0/+68
2020-05-11core: settings: Add a setting for time zone.bunnei8-10/+282
2020-05-11fix logic error & scale sample volume based on voice volumeDavid Marcec1-7/+9
2020-05-11pass by const ref insteadDavid Marcec1-8/+7
2020-05-11audio_renderer: Better voice mixing and 6 channel downmixingDavid Marcec3-11/+96
Supersedes #3738 and #3321
2020-05-11service: fsp_srv: Stub implementation of OpenMultiCommitManager.bunnei2-1/+38
2020-05-11yuzu: game_list: Fix 'Open Save Data Location' for device saves.bunnei4-27/+49
2020-05-11file_sys: savefata_factory: Update to support DeviceSaveData.bunnei1-3/+6
2020-05-11file_sys: control_metadata: Expose device_save_data_size.bunnei2-0/+5
2020-05-11Stub SendKeyboardLockKeyEventDavid Marcec2-1/+11
Needed for Puchikon 4 SmileBASIC 1.0.0
2020-05-10gl_shader_decompiler: Properly emulate NaN behaviour on NEReinUsesLisp1-0/+9
"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-10RasterizerCache: Correct documentation.Fernando Sahmkow1-2/+2
2020-05-10VkPipelineCache: Use a null shader on invalid address.Fernando Sahmkow1-2/+1
2020-05-10VideoCore: Use SyncGuestMemory mechanism for Shader/Pipeline Cache invalidation.Fernando Sahmkow3-5/+61
2020-05-09shader_ir: Separate float-point comparisons in ordered and unorderedReinUsesLisp7-135/+163
This allows us to use native SPIR-V instructions without having to manually check for NAN.
2020-05-08Replace externals with Conan (#3735)James Rowe7-9/+10
* 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-06Menubar: fix mouse tracking bugFearlessTobi1-4/+0
Co-Authored-By: Vitor K <vitor-k@users.noreply.github.com>
2020-05-05Update src/video_core/gpu.cppbunnei1-1/+1
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-05-05Update src/video_core/gpu.cppbunnei1-1/+1
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-05-05vk_sampler_cache: Use VK_EXT_custom_border_color when availableReinUsesLisp3-2/+44
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-04vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzleReinUsesLisp8-0/+84
2020-05-04gl_rasterizer: Implement viewport swizzles with NV_viewport_swizzleReinUsesLisp2-0/+13
2020-05-04maxwell_3d: Add viewport swizzlesReinUsesLisp2-1/+24
2020-05-03kernel/memory: Remove #pragma once within cpp fileLioncash1-2/+0
This isn't necessary in a cpp file and will cause warnings on clang.
2020-05-03kernel/memory: Remove unused includesLioncash7-8/+1
Prevents header churn and needing to recompile these files if these headers are ever changed in the future.
2020-05-03kernel/memory: Remove unused variables in memory_block_managerLioncash1-3/+0
Prevents unused variable warnings.
2020-05-03kernel/memory: Make use of std::array consistently in address_space_infoLioncash1-6/+6
This allows tuning standard library implementations to enable or disable range checks at runtime, which is nicer for debugging.
2020-05-03kernel/memory: Resolve -Wshadow warningsLioncash1-4/+4
Prevents variable name clashing.
2020-05-03kernel/memory: Amend potential encoding warningsLioncash6-12/+12
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-03hle_ipc: Eliminate core memory globalsLioncash3-10/+16
We can just pass the required instances into the constructor of the request, eliminating all usages of the global system accessor.
2020-05-03settings: Add anisotropic filtering level to the yuzu configuration log (#3875)Morph1-0/+1
2020-05-03Update src/core/hle/service/am/am.cppbunnei1-1/+1
Co-authored-by: Mat M. <mathew1800@gmail.com>
2020-05-02input_common: fix build when SDL2 is disabledFearlessTobi1-0/+6
2020-05-02readable_event: Remove unnecessary semicolon in Signal()Lioncash1-4/+6
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-02vk_graphics_pipeline: Implement rasterizer_enable on VulkanReinUsesLisp3-1/+3
We can simply enable rasterizer discard matching the current pipeline key.
2020-05-02fixed_pipeline_state: explicitly use template keyword after 1f345ebe3a55Jan Beich1-2/+4
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-01nvdrv: Fix GetGpuTime stack corruptionDavid Marcec1-2/+3
IoctlGetGpuTime should be 16 bytes, not 8.
2020-05-01am: IHomeMenuFunctions:GetPopFromGeneralChannelEventDavid Marcec3-4/+20
QLaunch 1.0.0
2020-04-30maxwell_to_vk: implement missing signed int formatsDan1-2/+14
2020-04-30caps:su Stub out SetShimLibraryVersionJason Parker2-1/+13
Used by Animal Crossing: New Horizons when trying to take a picture.
2020-04-30texture: Implement R8G8UIMorph8-38/+52
- Used by The Walking Dead: The Final Season
2020-04-30fs-srv: GetFreeSpaceSize & GetTotalSpaceSizeDavid Marcec1-2/+2
Closes #3533 Turns out the functions were already implemented but just never added
2020-04-30nim: CreateServerInterface, CreateAccessorInterface, CreateAsyncInterfaceDavid Marcec1-1/+69
Closes #3026
2020-04-30caps: Add missing service names to caps:suDavid Marcec1-0/+3
SetShimLibraryVersion, SaveScreenShotEx1 & SaveScreenShotEx2 were missing
2020-04-30am: GetFriendInvitationStorageChannelEventDavid Marcec2-1/+14
Closes #3829
2020-04-29psm: Mark as debug instead of warningDavid Marcec1-7/+14
No point to emulate battery life. However options are broken out if we ever want to add a setting for it
2020-04-29am: Properly implement GetDisplayVersionDavid Marcec1-3/+14
Properly implement IApplicationFunctions::GetDisplayVersion
2020-04-29am: IsVrModeEnabled & SetVrModeEnabled fixesDavid Marcec2-16/+6
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-29acc: Return a unique value per account for GetAccountIdDavid Marcec2-5/+13
2020-04-29acc: Fix InitializeApplicationInfoDavid Marcec2-22/+15
We're not suppose to pop a u64, should just read the sent pid and check that
2020-04-29kernel: Don't fail silentlyDavid Marcec7-0/+51
2020-04-29vulkan: Remove unnecessary includesLioncash31-59/+3
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-29Don't fail silently for vi, sm, set and ns servicesDavid Marcec4-3/+27
2020-04-28shader/arithmetic_integer: Fix tracking issue in temporaryReinUsesLisp1-4/+0
This temporary is not needed as we mark Rd.CC + IADD.X as unimplemented. It caused issues when tracking global buffers.
2020-04-28Clang Format and Documentation.Fernando Sahmkow10-10/+20
2020-04-28MaxwellDMA: Optimize micro copies.Fernando Sahmkow3-0/+57
2020-04-28kernel: Bad GetInfo ids should not be marked as stubsDavid Marcec1-2/+2
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-28Updated comment to reflect ListQualifiedUsers betterDavid Marcec1-1/+3
2020-04-28style: Change AMs & Glues error codes to be dec instead of hexDavid Marcec2-7/+7
Consistency for the rest of the error codes in the codebase
2020-04-28marked stubsDavid Marcec1-4/+5
2020-04-28account: ListQualifiedUsersDavid Marcec5-3/+13
Closes #2844
2020-04-28Audin:u ListAudioIns, OpenAudioIn, ListAudioInsAuto, OpenAudioInAuto, ListAudioInsAutoFiltered, OpenAudioInProtocolSpecifiedDavid Marcec2-5/+93
Closes #2874
2020-04-28vk_rasterizer: Skip index buffer setup when vertices are zeroReinUsesLisp1-0/+3
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{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp13-16/+57
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-28VideoCore/GPU: Delegate subchannel engines to the dma pusher.Fernando Sahmkow3-4/+49
2020-04-28VideoCore/Engines: Refactor Engines CallMethod.Fernando Sahmkow13-62/+82
2020-04-28maxwell_3d: Fix depth clamping registerReinUsesLisp5-8/+5
Using deko3d as reference: https://github.com/devkitPro/deko3d/blob/4e47ba0013552e592a86ab7a2510d1e7dadf236a/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-27texture_cache: Reintroduce preserve_contents accuratelyReinUsesLisp4-41/+81
This reverts commit 94b0e2e5dae4e0bd0021ac2d8fe1ff904a93ee69. 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-26shader/memory_util: Deduplicate codeReinUsesLisp9-159/+153
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-26shader/arithmetic_integer: Fix edge case and mark IADD.X Rd.CC as unimplementedReinUsesLisp1-1/+6
IADD.X Rd.CC requires some extra logic that is not currently implemented. Abort when this is hit.
2020-04-26shader/arithmetic_integer: Change IAdd to UAdd to avoid signed overflowReinUsesLisp1-2/+2
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-26shader/arithmetic_integer: Implement IADD.XReinUsesLisp2-0/+10
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-26shader/arithmetic_integer: Implement CC for IADDReinUsesLisp4-3/+42
2020-04-26decode/register_set_predicate: Implement CCReinUsesLisp1-9/+14
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-26decode/register_set_predicate: Use move for shared pointersReinUsesLisp1-16/+17
Avoid atomic counters used by shared pointers.
2020-04-26services: hid: Stub StopSevenSixAxisSensor.M&M2-1/+13
- Used by The Legend of Zelda: Breath of the Wild v1.6.0
2020-04-25Fix the mistake in the port and update the comment for clarityVitor Kiguchi1-7/+7
2020-04-25vk_rasterizer: Pack texceptions and color formats on invalid formatsReinUsesLisp2-5/+19
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-24Add Restore Defaults and Clear options to hotkeysKewlan5-18/+116
2020-04-24Revert: shader_decode: Fix LD, LDG when track constant buffer.Fernando Sahmkow1-14/+6
2020-04-24Fix -Wdeprecated-copy warning.Markus Wick1-0/+1
2020-04-24Fix -Werror=conversion error.Markus Wick2-2/+2
2020-04-24vi: Don't let uninitialized data pass as a response for SetBufferCountDavid Marcec1-1/+9
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-24physical_core: Make use of std::make_unique instead of std::make_shared in ctorLioncash4-8/+15
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-24shared_memory: Amend doxygen referenceLioncash2-5/+5
Amends the parameter to match the documentation reference. Resolves a -Wdocumentation warning with clang.
2020-04-24svc: Re-add MapProcessCodeMemory/UnmapProcessCodeMemoryLioncash1-2/+138
These were lost in the re-implementation of the virtual memory manager.
2020-04-23svc: Remove unused variableLioncash1-3/+0
Since the VMM refactor, this is no longer used or needed.
2020-04-23page_table: Remove unused capturesLioncash1-2/+2
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-23decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bitsReinUsesLisp2-16/+37
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: https://github.com/ReinUsesLisp/nxas/blob/8dbc38995711cc12206aa370145a3a02665fd989/table.h#L68 That is itself tested against nvdisasm (Nvidia's official disassembler).
2020-04-23shader/texture: Support multiple unknown sampler propertiesReinUsesLisp2-62/+87
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-23shader_ir: Turn classes into data structuresReinUsesLisp13-299/+197
2020-04-23vk_rasterizer: Fix framebuffer creation validation errorsReinUsesLisp1-2/+4
Framebuffer creation was ignoring the number of color attachments.
2020-04-23vk_pipeline_cache: Unify pipeline cache keys into a single operationReinUsesLisp5-47/+59
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-23vk_renderpass_cache: Pack renderpass cache key to 12 bytesReinUsesLisp4-84/+59
2020-04-23kernel: memory: Improve implementation of device shared memory. (#3707)bunnei6-16/+110
* 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-23Clang Format.Fernando Sahmkow6-11/+19
2020-04-23GPU: Add Fast GPU Time Option.Fernando Sahmkow7-1/+21
2020-04-23Maxwell3D: Process Macros on MultiMethod.Fernando Sahmkow1-25/+47
2020-04-23DMAPusher: Propagate multimethod writes into the engines.Fernando Sahmkow14-14/+164
2020-04-23Update src/yuzu/main.cpp with missing constBen Russell1-1/+1
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-04-23Dump RomFS command to include UpdatesBen Russell1-1/+3
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-23Edit modifier_scale with the deadzone sliderKewlan3-30/+52
2020-04-23Fix format error in performance statisticsH27CK1-3/+4
Formatting
2020-04-23vk_pipeline_cache: Fix unintentional memcpy into optionalReinUsesLisp1-2/+4
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-23GL_Fence_Manager: use GL_TIMEOUT_IGNORED instead of a loop,Fernando Sahmkow1-2/+1
2020-04-22Add missing ;H27CK1-1/+1
2020-04-22Address Feedback.Fernando Sahmkow3-24/+18
2020-04-22Async GPU: Correct flushing behavior to be similar to old async GPU behavior.Fernando Sahmkow3-0/+11
2020-04-22MaxwellDMA: Correct copying on accuracy level.Fernando Sahmkow1-2/+7
2020-04-22ShaderCache/PipelineCache: Cache null shaders.Fernando Sahmkow4-8/+31
2020-04-22Address Feedback.Fernando Sahmkow13-132/+117
2020-04-22Fix GCC error.Fernando Sahmkow2-6/+5
2020-04-22Correct Linux Compile Error.Fernando Sahmkow2-7/+10
2020-04-22Clang format.Fernando Sahmkow1-1/+2
2020-04-22QueryCache: Only do async flushes on async gpu.Fernando Sahmkow1-1/+4
2020-04-22Async GPU: Only do reactive flushing on Extreme Level.Fernando Sahmkow1-1/+1
2020-04-22vk_fence_manager: Initial implementationReinUsesLisp8-12/+222
2020-04-22QueryCache: Implement Async Flushes.Fernando Sahmkow5-12/+77
2020-04-22OpenGL: Guarantee writes to Buffers.Fernando Sahmkow3-4/+2
2020-04-22GPU: Implement Flush Requests for Async mode.Fernando Sahmkow6-8/+70
2020-04-22FenceManager: Manage syncpoints and rename fences to semaphores.Fernando Sahmkow11-25/+123
2020-04-22BufferCache: Refactor async managing.Fernando Sahmkow2-10/+27
2020-04-22FenceManager: Implement async buffer cache flushes on High settingsFernando Sahmkow6-10/+69
2020-04-22Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan.Fernando Sahmkow5-4/+35
2020-04-22GPU: Fix rebase errors.Fernando Sahmkow2-4/+4
2020-04-22Rasterizer: Disable fence managing in synchronous gpu.Fernando Sahmkow2-1/+11
2020-04-22ThreadManager: Sync async reads on accurate gpu.Fernando Sahmkow9-8/+48
2020-04-22FenceManager: Implement should wait.Fernando Sahmkow2-2/+17
2020-04-22GPU: Implement a Fence Manager.Fernando Sahmkow6-23/+208
2020-04-22OpenGL: Implement Fencing backend.Fernando Sahmkow12-19/+94
2020-04-22TextureCache: Flush linear textures after finishing rendering.Fernando Sahmkow1-2/+8
2020-04-22GPU: Delay Fences.Fernando Sahmkow6-2/+20
2020-04-22BufferCache: Implement OnCPUWrite and SyncGuestHostFernando Sahmkow6-7/+67
2020-04-22GPU: Refactor synchronization on Async GPUFernando Sahmkow11-7/+56
2020-04-22Texture Cache: Implement OnCPUWrite and SyncGuestHostFernando Sahmkow2-3/+63
2020-04-22UI: Replasce accurate GPU option for GPU Accuracy LevelFernando Sahmkow12-28/+77
2020-04-22Add a trailing separator to the string pathMorph1-1/+1
Fixes #3643
2020-04-22Init SDL info structure and add dummy contextH27CK2-1/+4
2020-04-22vk_memory_manager: Remove unified memory model flagReinUsesLisp5-35/+6
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-22vk_rasterizer: Add lazy default buffer maker and use it for empty buffersReinUsesLisp3-4/+40
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-22gl_rasterizer: Fix buffers without sizeReinUsesLisp3-8/+13
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. https://github.com/devkitPro/deko3d/blob/1d1930beea093b5a663419e93b0649719a3ca5da/source/maxwell/gpu_3d_vbo.cpp#L62-L63
2020-04-21audio_renderer: Preliminary BehaviorInfo (#3736)David7-13/+249
* audio_renderer: Preliminary BehaviorInfo * clang format * Fixed IsRevisionSupported * fixed IsValidRevision * Fixed logic error & spelling errors & crash * Addressed issues
2020-04-21shader/arithmetic_integer: Fix LEA_IMM encodingReinUsesLisp1-2/+2
The operand order in LEA_IMM was flipped compared to nvdisasm. Fix that using nxas as reference: https://github.com/ReinUsesLisp/nxas/blob/8dbc38995711cc12206aa370145a3a02665fd989/table.h#L122
2020-04-21loader: nro: Fix process initialization using ProgramMetadata default.bunnei2-11/+14
2020-04-21loader: elf: Fix process initialization using ProgramMetadata default.bunnei1-0/+5
2020-04-21file_sys: program_metadata: Add a helper function for generating reasonable default metadata.bunnei2-1/+16
- We need this for homebrew process initialization.
2020-04-20service: Update function tablesLioncash19-7/+108
Keeps the service function tables up to date. Updated based off information on SwitchBrew.
2020-04-20npad: Lower log level for VibrateController to DebugFearlessTobi1-1/+1
2020-04-20audren: Lower log level for RequestUpdateImpl to DebugFearlessTobi1-1/+1
2020-04-20dynarmic: Add option to disable CPU JIT optimizationsMerryMage7-2/+26
2020-04-20yuzu: Option to hide mouse on inactivityFearlessTobi7-0/+78
Co-Authored-By: Vitor K <vitor-k@users.noreply.github.com>
2020-04-20Initialize quad_indexed_pass before uint8_passAmit Prakash Ambasta1-1/+1
Fixes Werror=reorder in gcc
2020-04-19service/time: Remove reliance on the global system accessorLioncash1-24/+26
Eliminates usages of the global system accessor and instead passes the existing system instance into the interfaces.
2020-04-19dma_pusher: Remove reliance on the global system instanceLioncash3-6/+11
With this, the video core is now has no calls to the global system instance at all.
2020-04-19thread: FPCR.FZ is likely not 1MerryMage1-2/+1
2020-04-19core: arm_unicorn: Fix interpret fallback by temporarily mapping instruction page.bunnei1-0/+11
2020-04-19renderer_vulkan: assume X11 if not Windows/macOS after bf1d66b7c074Jan Beich1-3/+3
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-19vulkan/wrapper: Sort physical devicesReinUsesLisp1-1/+20
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-19fixed_pipeline_state: Hash and compare the whole structureReinUsesLisp2-105/+9
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-19fixed_pipeline_state: Pack blending stateReinUsesLisp3-98/+227
Reduce FixedPipelineState's size to 364 bytes.
2020-04-19fixed_pipeline_state: Pack rasterizer stateReinUsesLisp4-163/+155
Reduce FixedPipelineState's size to 600 bytes.
2020-04-19fixed_pipeline_state: Pack depth stencil stateReinUsesLisp3-97/+140
Reduce FixedPipelineState's size to 632 bytes.
2020-04-19fixed_pipeline_state: Pack attribute stateReinUsesLisp6-101/+85
Reduce FixedPipelineState's size from 1384 to 664 bytes
2020-04-18video_core: gl_shader_decompiler: Fix implicit fallthrough errors.bunnei1-0/+1
2020-04-18service: hid: npad: Fix implicit fallthrough errors.bunnei1-0/+2
2020-04-18gl_shader_decompiler: Avoid copies where applicableLioncash1-3/+3
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-18time/system_clock_core: Remove unnecessary initializerLioncash1-1/+1
This is already initialized within the class body.
2020-04-18service/time: Mark IsStandardNetworkSystemClockAccuracySufficient as constLioncash1-1/+1
This doesn't modify internal member state.
2020-04-18service/time: Add virtual destructors where applicableLioncash3-2/+3
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-18service: Remove unused RequestParser instancesLioncash2-3/+0
These aren't used, so they should be removed to reduce compilation warnings.
2020-04-18memory/slab_heap: Make use of static_cast over reinterpret_castLioncash1-2/+2
Casting from void* with static_cast is permitted by the standard, so we can just make use of that instead.
2020-04-18loader/nso: Resolve moves not occurring in DecompressSegmentLioncash1-1/+1
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-18am: Resolve ineffective movesLioncash1-2/+2
Previously const objects were being std::moved, which results in no move actually occurring. This resolves that.
2020-04-17video_code: Fix implicit switch fallthrough.Markus Wick1-0/+2
Since yesterday, this breaks the build on linux. So let's fix it.
2020-04-17vk_stream_buffer: Fix out of memory on boot on recent Nvidia driversReinUsesLisp2-33/+48
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-17Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL"Rodrigo Locatti1-3/+1
2020-04-17core: hle: Address various feedback & code cleanup.bunnei11-251/+153
- Should be no functional changes.
2020-04-17core: device_memory: Remove incorrect usage of constexpr.bunnei1-2/+6
2020-04-17memory: Add copyright notice for Atmosphere where applicable.bunnei6-0/+18
2020-04-17kernel: Remove old VMManager class.bunnei3-1973/+0
2020-04-17loader: nso: Fix loader size and arguments.bunnei3-25/+47
2020-04-17loader: elf/kip/nro: Updates for new VMM.bunnei3-5/+7
2020-04-17service: ldr: Updates for new VMM.bunnei1-150/+215
- Includes removing some service impls. that are untested.
2020-04-17kernel: memory: page_table: Simplify GetPhysicalAddr impl.bunnei4-19/+6
2020-04-17kernel: svc: Updates for new VMM.bunnei1-488/+116
- Includes removing some SVC impls. that are untested.
2020-04-17core: memory: Fix memory access on page boundaries.bunnei1-6/+39
- Fixes Super Smash Bros. Ultimate.
2020-04-17video_core: memory_manager: Updates for Common::PageTable changes.bunnei2-67/+34
2020-04-17core: memory: Updates for new VMM.bunnei2-114/+53
2020-04-17common: page_table: Update to use VirtualBuffer and simplify.bunnei2-53/+18
2020-04-17core: gdbstub: Updates for new VMM.bunnei1-2/+2
2020-04-17core: reporter: Updates for new VMM.bunnei1-3/+5
2020-04-17memory: cheat_engine: Updates for new VMM.bunnei1-5/+8
2020-04-17arm_test_common: Updates for new VMM.bunnei1-6/+2
2020-04-17kernel: process: Updates for new VMM.bunnei2-79/+151
2020-04-17service: pl_u: Update for new shared memory layout.bunnei1-7/+5
2020-04-17service: time: Update for new shared memory layout.bunnei1-3/+2
2020-04-17service: hid: Update for new shared memory layout.bunnei1-3/+2
2020-04-17service: irs: Update for new shared memory layout.bunnei1-3/+3
2020-04-17kernel: resource_limit: Reserve physical memory.bunnei1-1/+6
2020-04-17kernel: Initialize memory layout for new VMM.bunnei2-0/+159
2020-04-17core: system: Rename GetDeviceManager -> DeviceManager.bunnei3-7/+7
- More consistent with other system components.
2020-04-17kernel: transfer_memory: Refactor for new VMM.bunnei2-130/+16
2020-04-17core: Construct/Destruct DeviceMemory on Init/Shutdown.bunnei1-4/+7
2020-04-17kernel: shared_memory: Refactor for new VMM.bunnei2-220/+58
2020-04-17core: device_memory: Update to use VirtualBuffer class.bunnei2-39/+12
2020-04-17common: Add VirtualBuffer class, to abstract memory virtualization.bunnei3-0/+112
2020-04-17kernel: errors: Add ERR_OUT_OF_RESOURCES.bunnei1-0/+1
2020-04-17kernel: process_capability: Update to use Memory::PageTable.bunnei2-23/+25
2020-04-17kernel: memory: Add PageTable class, to manage process address space.bunnei3-0/+1510
2020-04-17kernel: memory: Add MemoryLayout class, to build physical memory layout.bunnei2-0/+74
2020-04-17kernel: memory: Add MemoryManager class, to manage page heaps.bunnei3-0/+276
2020-04-17kernel: memory: Add MemoryBlockManager class, to manage memory blocks.bunnei3-0/+256
2020-04-17kernel: memory: Add PageHeap class, to manage a heap of pages.bunnei3-0/+483
2020-04-17kernel: memory: Add PageLinkedList class, to manage a list of pages.bunnei2-0/+94
2020-04-17kernel: memory: Add system_control code, which will be used for ASLR support.bunnei3-0/+61
2020-04-17physical_memory: Add missing include for <vector>.bunnei1-0/+2
2020-04-17kernel: memory: Add MemoryBlock class, for managing memory blocks and their state.bunnei2-0/+316
2020-04-17kernel: memory: Add memory_types.h, for things that are commonly used in memory code.bunnei2-0/+19
2020-04-17kernel: memory: Add SlabHeap class, for managing memory heaps.bunnei2-0/+162
- This will be used for TLS pages, among other things.
2020-04-17kernel: memory: Add AddressSpaceInfo class, for managing the memory address space.bunnei3-0/+166
2020-04-17core: device_manager: Add a simple class to manage device RAM.bunnei5-1/+118
2020-04-17dynarmic: Enable strict alignment checks.bunnei1-1/+4
- Also add a missing include.
2020-04-17common: scope_exit: Implement mechanism for canceling a scope exit.bunnei1-1/+8
2020-04-17core: memory: Move to Core::Memory namespace.bunnei37-98/+100
- helpful to disambiguate Kernel::Memory namespace.
2020-04-17common: alignment: Add a helper function for generic alignment checking.bunnei1-0/+7
2020-04-17core: kernel: Add svc_types header to include SVC-specific types.bunnei3-0/+70
2020-04-17core: kernel: Move SVC to its own namesapce.bunnei5-9/+9
2020-04-17kernel: resource_limit: Improvements to implementation.bunnei2-12/+50
2020-04-17loader: nso: Fix loading of static objects to be properly sized and aligned.bunnei1-19/+9
2020-04-17common: common_funcs: Add a macro for defining enum flag operators.bunnei1-0/+32
2020-04-17process: SetupMainThread: Zero out argument on process start.bunnei1-0/+2
2020-04-17arm_interface: Ensure ThreadContext is zero'd out.bunnei1-16/+16
2020-04-17CMakeLists: Make missing declarations a compile-time errorLioncash1-0/+1
Ensures that our code always has its linkage explicit.
2020-04-17General: Resolve warnings related to missing declarationsLioncash9-24/+25
2020-04-17gdbstub: Fix some gdbstub jankinessMerryMage1-4/+3
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-17key_manager: Resolve missing field initializer warningLioncash1-1/+2
2020-04-17decode/memory: Resolve unused variable warningLioncash1-1/+1
Only the first element of the returned pair is ever used.
2020-04-17decode/texture: Resolve unused variable warnings.Lioncash1-5/+7
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-17decode/texture: Collapse loop down into std::generateLioncash1-3/+1
Same behavior, less code.
2020-04-17decode/texture: Eliminate trivial missing field initializer warningsLioncash1-3/+4
We can just specify the initializers.
2020-04-17time_zone_manager: Resolve sign conversion warningsLioncash1-2/+2
ttis and ats will never exceed the length of INT32_MAX in our case, so this is safe.
2020-04-17CMakeLists: Enable -Wmissing-declarations on Linux buildsLioncash1-0/+1
Allows catching cases where internal linkage isn't specified for helper functions when they should be marked as such.
2020-04-17hle_ipc: Remove std::size_t casts where applicableLioncash2-21/+23
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-17maxwell_3d: Initialize format attributes constant as oneReinUsesLisp1-0/+4
nouveau expects this to be true but it doesn't set it.
2020-04-17vk_compute_pass: Implement indexed quadsReinUsesLisp5-12/+280
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-16externals: Move LibreSSL linking to httplib.Markus Wick2-11/+3
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-16input_common: Use the CMake target instead of the variable.Markus Wick1-1/+1
2020-04-16buffer_cache: Return handles instead of pointer to handlesReinUsesLisp14-228/+90
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-16decode/shift: Remove unused variable within Shift()Lioncash1-1/+0
Removes a redundant variable that is already satisfied by the IsFull() utility function.
2020-04-16surface_view: Add missing operator!= to ViewParamsLioncash2-0/+5
Provides logical symmetry to the interface.
2020-04-16surface_base: Make IsInside() a const member functionLioncash1-2/+2
This doesn't modify internal state, so this can be made const.
2020-04-16texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indicesLioncash1-3/+3
Previously these were all using the red component to derive the indices, which is definitely not intentional.
2020-04-16control_flow: Make use of std::move in TryInspectAddress()Lioncash1-3/+3
Eliminates redundant atomic reference count increments and decrements.
2020-04-16video_core: Amend doxygen comment referencesLioncash2-5/+5
Fixes broken documentation references.
2020-04-16decode/image: Fix typo in assert in GetComponentSize()Lioncash1-3/+3
2020-04-16gl_query_cache: Resolve use-after-move in CachedQuery move assignment operatorLioncash1-1/+1
Avoids potential invalid junk data from being read.
2020-04-16decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()Lioncash1-2/+2
The components' sizes were mismatched. This corrects that.
2020-04-16gl_device: Mark stage_swizzle as constexprLioncash1-1/+1
Previously this was mutable even though it shouldn't be.
2020-04-16track: Eliminate redundant copiesLioncash1-5/+6
Two variables can be references, while two others can be std::moved. Makes for 4 less atomic reference count increments and decrements.
2020-04-16CMakeLists: Specify -Wextra on linux buildsLioncash26-70/+93
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-15file_util: Early-exit in WriteArray and ReadArray if specified lengths are zeroLioncash2-9/+33
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-15CMakeLists: Make -Wreorder a compile-time errorLioncash4-5/+7
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-15kernel/thread: Resolve -Wswitch warningsLioncash1-0/+2
2020-04-15Texture Cache: Read current data when flushing a 3D segment.Fernando Sahmkow1-0/+6
This PR corrects flushing of 3D segments when data of other segments is mixed, this aims to preserve the data in place.
2020-04-15maxwell_to_vk: Add uint16 vertex formatsReinUsesLisp1-0/+8
2020-04-15maxwell_to_vk: Add missing breaksReinUsesLisp1-0/+2
Avoid invalid fallbacks.
2020-04-15vk_blit_screen: Initialize all members in VkPipelineViewportStateCreateInfoReinUsesLisp1-0/+2
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-15Texture Cache: Only do buffer copies on accurate GPU. (#3634)Fernando Sahmkow1-1/+3
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-15service: time: Implement CalculateStandardUserSystemClockDifferenceByUser.bunnei3-1/+25
- Used by Animal Crossing: New Horizons.
2020-04-15Revert "gl_shader_decompiler: Implement merges with bitfieldInsert"ReinUsesLisp1-2/+4
This reverts commit 05cf27083608bebd3ee4c38f2f948c8f2030f881. Apparently the first approach using floats instead of bitfieldInert worked better for Fire Emblem: Three Houses. Reverting to get that behavior back.
2020-04-15shader/arithmetic: Add FCMP_CR variantReinUsesLisp2-3/+6
Adds another variant of FCMP.
2020-04-14gl_rasterizer: Implement constant vertex attributesReinUsesLisp2-2/+6
Credits go to gdkchan from Ryujinx for finding constant attributes are used in retail games.
2020-04-14file_sys: patch_manager: Return early when there are no layers to apply.bunnei1-0/+6
2020-04-14service: friend: Stub IFriendService::GetBlockedUserListIds.bunnei1-1/+10
- This is safe to stub, as there should be no adverse consequences from reporting no blocked users.
2020-04-14vk_rasterizer: Default to 1 viewports with a size of 0ReinUsesLisp1-3/+6
Silence validation layer errors.
2020-04-14gl_shader_cache: Use CompileDepth::FullDecompile on GLSLReinUsesLisp1-1/+3
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-14renderer_vulkan: Integrate Nvidia Nsight Aftermath on WindowsReinUsesLisp9-22/+360
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-14yuzu/main: Add better popup texts and remove duplicated actionsFearlessTobi3-64/+18
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-13gl_texture_cache: Fix layered texture attachment base levelReinUsesLisp1-1/+1
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-13renderer_vulkan: Remove Nvidia checkpointsReinUsesLisp4-34/+0
2020-04-13renderer_vulkan: Catch device losses in more placesReinUsesLisp3-21/+29
2020-04-13gl_rasterizer: Implement line widths and smooth linesReinUsesLisp5-2/+33
Implements "legacy" features from OpenGL present on hardware such as smooth lines and line width.
2020-04-13gl_shader_decompiler: Implement merges with bitfieldInsertReinUsesLisp1-4/+2
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-12gl_shader_decompiler: Improve generated code in HMergeH*ReinUsesLisp1-6/+8
Avoiding bitwise expressions, this fixes Turing issues in shaders using half float merges that affected several games.
2020-04-12shader/video: Partially implement VMNMXReinUsesLisp3-0/+116
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-12video_core: Add MSAA registers in 3D engine and TICReinUsesLisp2-6/+76
This adds the registers used for multisampling. It doesn't implement anything for now.
2020-04-11texture_cache: Remove preserve_contentsReinUsesLisp3-47/+31
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-11renderer_vulkan: Drop Vulkan-HppReinUsesLisp51-2272/+2881
2020-04-10Buffer queue: Correct behavior of free buffer.Fernando Sahmkow2-9/+33
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-10service/vi: Partially implement BufferQueue disconnectReinUsesLisp3-10/+44
2020-04-10shader/texture: Remove type mismatches management from shader decoderReinUsesLisp1-14/+0
Since commit e22816a5bb 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-09astc: Hard code bit depth changes to 8 and use fast replicateReinUsesLisp1-21/+15
2020-04-09common/file_util: Allow access to files on network sharesBen Russell1-1/+8
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-09astc: Use boost's static_vector to avoid heap allocationsReinUsesLisp1-10/+14
2020-04-09astc: Implement a fast precompiled alternative for ReplicateReinUsesLisp1-2/+57
2020-04-09astc: Move Replicate to a constexpr LUT when possibleReinUsesLisp1-8/+38
2020-04-09astc: Make InputBitStream constexprReinUsesLisp1-11/+11
2020-04-09astc: OutputBitStream style changes and make it constexprReinUsesLisp1-32/+26
2020-04-09gl_texture_cache: Attach view instead of base texture for layered attachmentsReinUsesLisp1-2/+2
This way we are not ignoring the base layer of the current texture.
2020-04-09VkRasterizer: Eliminate Legacy code.Fernando Sahmkow1-1/+0
2020-04-09Memory: Correct GCC errors.Fernando Sahmkow2-2/+3
2020-04-08Memory: Address Feedback.Fernando Sahmkow4-4/+75
2020-04-08GPUMemoryManager: Improve safety of memory reads.Fernando Sahmkow3-55/+47
2020-04-08Place SL and SR in the right most column.Kewlan1-2/+2
2020-04-08qt/bootmanager: Remove unnecessary glBindFramebufferReinUsesLisp1-1/+0
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-08video_core/textures: Move GetMaxAnisotropy to cpp fileReinUsesLisp2-19/+23
2020-04-08video_core/texture: Use a LUT to convert sRGB texture bordersReinUsesLisp3-9/+61
This is a reversed look up table extracted from https://gist.github.com/rygorous/2203834#file-gistfile1-cpp-L41-L62 that is used in https://github.com/devkitPro/deko3d/blob/04d4e9e587fa3dc5447b43d273bc45f440226e41/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-07Addressed feedback: switched to snake case and fixed clang-format errorsSilverBeamx2-5/+6
2020-04-07Addressed feedback: removed CMake hack in favor of building the necessary strings via the supplied title formatSilverBeamx2-2/+14
2020-04-07yuzu: Drop SDL2 and Qt frontend Vulkan requirementsReinUsesLisp16-314/+371
Create Vulkan instances and surfaces from the Vulkan backend.
2020-04-07address nit.Nguyen Dac Nam1-1/+1
2020-04-07renderer_vulkan: Query device names from the backendReinUsesLisp4-35/+79
2020-04-07common/dynamic_library: Import and adapt helper from DolphinReinUsesLisp3-0/+183
2020-04-07shader/conversion: Implement I2I sign extension, saturation and selectionReinUsesLisp2-14/+101
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-07Apply suggestions from code reviewNguyen Dac Nam1-9/+9
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2020-04-07file_sys: fix LayeredFS error when loading some games made with… (#3602)enler1-1/+2
* fix LayeredFS error when loading some games made with the Unity
2020-04-06Clang Format.Fernando Sahmkow1-6/+3
2020-04-06Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing.Fernando Sahmkow7-87/+62
2020-04-06Query Cache: Use VAddr instead of physical memory for adressing.Fernando Sahmkow3-23/+22
2020-04-06Buffer Cache: Use vAddr instead of physical memory.Fernando Sahmkow12-106/+254
2020-04-06Texture Cache: Use vAddr instead of physical memory for caching.Fernando Sahmkow5-130/+81
2020-04-06GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddrFernando Sahmkow14-67/+77
2020-04-06shader_decode: SULD.D using std::pair instead of out parameternamkazy2-19/+15
2020-04-06shader_decode: SULD.D avoid duplicate code block.namkazy1-39/+2
2020-04-06shader_decode: SULD.D fix conversion error.namkazy1-3/+3
2020-04-06shader_decode: SULD.D implement bits64 and reverse shader ir init method to removed shader stage.namkazy5-46/+105
2020-04-06shader/memory: Implement RED.E.ADDReinUsesLisp5-28/+99
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-06shader/memory: Add "using std::move"ReinUsesLisp1-11/+13
2020-04-06shader/memory: Minor fixes in ATOMReinUsesLisp1-32/+30
2020-04-06yuzu: Fixes to game list sortingFearlessTobi2-8/+22
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-05silent warning (conversion error)namkazy1-3/+2
2020-04-05shader_decode: SULD.D -> SINT actually same as UNORM.namkazy1-5/+4
2020-04-05shader_decode: SULD.D fix decode SNORM componentnamkazy1-10/+9
2020-04-05clang-formatnamkazy1-2/+2
2020-04-05shader_decode: get sampler descriptor from registry.namkazy1-77/+93
2020-04-05yuzu/configuration: Only assert that all buttons exist when we are handling the click for a button deviceFearlessTobi2-14/+16
This fixes failed assertions that were present in yuzu master code for 18 months.
2020-04-05yuzu/configure_input_simple: Fix "Docked Joycons" controller profileFearlessTobi1-4/+5
This was incorrectly using PlayerIndex 1 when calling the ConfigureDialog.
2020-04-05tweaking.namkazy1-3/+3
2020-04-05clang-formatNguyen Dac Nam1-2/+1
2020-04-05cleanup unuse paramsnamkazy1-8/+6
2020-04-05cleanup debug code.namkazy1-14/+3
2020-04-05reimplement get component type, uncomment mistaken codenamkazy1-18/+93
2020-04-05remove disable optimizenamkazy1-2/+0
2020-04-05[wip] reimplement SULD.Dnamkazy1-22/+229
2020-04-05add shader stage when init shader irnamkazy4-9/+12
2020-04-05clang-fixNguyen Dac Nam1-1/+1
2020-04-05shader: image - import PredConditionNguyen Dac Nam1-0/+1
2020-04-05shader: SULD.D bits32 implement more complexer method.Nguyen Dac Nam1-4/+28
2020-04-05shader: SULD.D import StoreTypeNguyen Dac Nam1-0/+1
2020-04-05shader: implement SULD.D bits32Nguyen Dac Nam1-11/+27
2020-04-04shader/other: Add error message for some S2R registersReinUsesLisp1-0/+6
2020-04-04shader_bytecode: Rename MOV_SYS to S2RReinUsesLisp2-5/+5
2020-04-04shader_bytecode: Add encoding for BARReinUsesLisp1-0/+2
2020-04-04shader_ir: Add error message for EXIT.FCSM_TRReinUsesLisp1-0/+3
2020-04-04shader_bytecode: Add encoding for VOTE.VTGReinUsesLisp1-0/+2
2020-04-04Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"ReinUsesLisp1-4/+2
This reverts commit 41905ee467b24172ba93e3fcd665bb4e4806a45a, reversing changes made to 35145bd529c3517e2c366efc764a762092d96edf. It causes regressions in several games.
2020-04-02shader/memory: Silence no return value warningReinUsesLisp1-0/+3
Silences a warning about control paths not all returning a value.
2020-04-02shader_decompiler: Remove FragCoord.w hack and change IPA implementationReinUsesLisp4-68/+74
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-01gl_texture_cache: Fix software ASTC fallbackReinUsesLisp1-7/+12
2020-04-01vk_device: Add missing ASTC queriesReinUsesLisp1-14/+29
2020-04-01video_core: Use native ASTC when availableReinUsesLisp10-281/+176
2020-04-01gl_device: Detect if ASTC is reported and expose itReinUsesLisp2-0/+31
2020-04-01common: Port some changes from dolphin (#5127)Vitor K2-15/+16
* 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-01renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapperReinUsesLisp2-0/+17
2020-04-01renderer_vulkan/wrapper: Add command buffer handleReinUsesLisp1-0/+192
2020-04-01renderer_vulkan/wrapper: Add physical device handleReinUsesLisp2-0/+123
2020-04-01renderer_vulkan/wrapper: Add device handleReinUsesLisp2-0/+277
2020-04-01renderer_vulkan/wrapper: Add swapchain handleReinUsesLisp2-0/+15
2020-04-01renderer_vulkan/wrapper: Add fence handleReinUsesLisp1-0/+17
2020-04-01renderer_vulkan/wrapper: Add device memory handleReinUsesLisp1-0/+15
2020-04-01renderer_vulkan/wrapper: Add pool handlesReinUsesLisp2-0/+47
2020-04-01renderer_vulkan/wrapper: Add buffer and image handlesReinUsesLisp2-0/+24
2020-04-01renderer_vulkan/wrapper: Add queue handleReinUsesLisp2-0/+36
2020-04-01renderer_vulkan/wrapper: Add instance handleReinUsesLisp2-0/+87
2020-04-01capsrv: Split Capture services into individual files and stub GetAlbumContentsFileListForApplication (#3571)Morph15-151/+536
* Organize capture services into individual files * Stub GetAlbumContentsFileListForApplication * Address feedback
2020-03-31gl_rasterizer: Mark cleared textures as dirtyReinUsesLisp1-2/+5
Fixes a potential edge case where cleared textures read from the CPU were not flushed.
2020-03-31clang-formatNguyen Dac Nam1-2/+1
2020-03-31shader_decode: fix by suggestionNguyen Dac Nam1-27/+22
2020-03-30Frontend: Don't call DoneCurrent if the context isnt already currentJames Rowe2-2/+13
2020-03-30clang-formatnamkazy1-3/+3
2020-03-30gl_decompiler: min/max op not implement yetnamkazy1-0/+4
2020-03-30shader_decode: ATOM/ATOMS: add function to avoid code repetitionnamkazy2-70/+53
2020-03-30shader_decode: merge GlobalAtomicOp to AtomicOpnamkazy1-13/+1
2020-03-30shader_decode: implement ATOM operation for S32 and U32Nguyen Dac Nam1-6/+39
2020-03-30clang-formatnamkazy1-3/+3
2020-03-30shader_decode: implement ATOMS instr partial.Nguyen Dac Nam1-10/+42
2020-03-30vk_decompiler: add atomic op and handler function.Nguyen Dac Nam1-6/+25
2020-03-30gl_decompiler: add atomic opNguyen Dac Nam1-0/+16
2020-03-30shader: node - update correct commentNguyen Dac Nam1-15/+15
2020-03-30shader_decode: add Atomic op for common usageNguyen Dac Nam1-1/+15
2020-03-29Re-order the shoulder buttons both in the configuration menu, and in the code.Kewlan1-36/+36
2020-03-28shader_bytecode: Fix I2I_IMM encodingReinUsesLisp1-1/+1
2020-03-28renderer_vulkan/wrapper: Address feedbackReinUsesLisp1-3/+24
2020-03-28shader/lea: Simplify generated LEA codeReinUsesLisp1-3/+2
2020-03-28yuzu: fix the stuck in fullscreen mode bugFearlessTobi1-0/+8
Co-Authored-By: Valentin Vanelslande <vvanelslandedev@gmail.com>
2020-03-27shader/lea: Fix op_a and op_b usagesReinUsesLisp1-2/+2
They were swapped.
2020-03-27shader/lea: Remove const and use move when possibleReinUsesLisp1-11/+5
2020-03-27Set render window to also accept focus via tabbing (Qt::StrongFocus) (#5089)Vitor K1-1/+1
2020-03-27services: hid: Stub InitializeSevenSixAxisSensor.bunnei2-1/+9
- Used by Super Smash Bros. Ultimate v7.0.0.
2020-03-27services: time: Implement CalculateSpanBetween.bunnei3-1/+31
- Used by Super Smash Bros. Ultimate.
2020-03-27am: Implement VR related APIsperillamint2-3/+42
Implement (and stub) VR related APIs in AM sysmodule. This fixes issue #2938
2020-03-27renderer_vulkan/wrapper: Add owning handlesReinUsesLisp1-0/+18
2020-03-27renderer_vulkan/wrapper: Add pool allocations owning templated classReinUsesLisp1-0/+81
2020-03-27renderer_vulkan/wrapper: Add owning handle templated classReinUsesLisp1-0/+144
2020-03-27renderer_vulkan/wrapper: Add destroy and free overload setReinUsesLisp2-0/+133
2020-03-27renderer_vulkan/wrapper: Add dispatch table and loadersReinUsesLisp2-0/+283
2020-03-27renderer_vulkan/wrapper: Add exception classReinUsesLisp2-0/+34
2020-03-27renderer_vulkan/wrapper: Add ToString function for VkResultReinUsesLisp3-0/+91
2020-03-27renderer_vulkan/wrapper: Add Vulakn wrapper and a span helperReinUsesLisp2-0/+84
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-27engines/const_buffer_engine_interface: Store image format typeReinUsesLisp1-4/+10
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-27maxwell_to_vk: implement signedscaled vertex formatsDan1-0/+20
2020-03-26services: ldr: Fix MemoryState for read/write regions of NROs.bunnei1-5/+15
- Fixes #3541, used by Final Fantasy VIII Remastered.
2020-03-26Address review and fix broken yuzu-tester buildJames Rowe11-102/+83
2020-03-26shader/conversion: Fix F2F rounding operations with different sizesReinUsesLisp1-5/+10
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-26gl_rasterizer: Update stencil test regardless of it being disabledReinUsesLisp1-5/+1
2020-03-26gl_rasterizer: Synchronize stencil testing on clearsReinUsesLisp1-0/+1
2020-03-25Frontend/GPU: Refactor context managementJames Rowe29-418/+361
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-23sm/controller: Increase PointerBufferSizeFearlessTobi1-1/+1
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-23audio_core: Accept Audren REV8FearlessTobi1-1/+1
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-23xmad: fix clang build errormakigumo1-4/+5
2020-03-22apply replay logic to all writes. remove replay from MacroInterpreter::Send (@fincs)namkazy2-12/+9
2020-03-22core/web_browser: Allow WebApplet to exit gracefully when an error occursFearlessTobi1-0/+6
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-22maxwell_3d: change declaration ordernamkazy1-1/+3
2020-03-22maxwell_3d: init shadow_statenamkazy1-0/+2
2020-03-22gl_rasterizer: Use transformed viewport for depth rangesReinUsesLisp1-4/+6
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-22maxwell_3d: this seem more correct.namkazy1-2/+2
2020-03-22maxwell_3d: update comments for shadow ram usagenamkazy3-2/+6
2020-03-22marco_interpreter: write hw value when shadow ram requestedNguyen Dac Nam1-0/+6
2020-03-22maxwell_3d: track shadow ram ctrl and hw reg valueNguyen Dac Nam1-0/+10
2020-03-22maxwell_3d: implement MME shadow RAMNguyen Dac Nam1-1/+14
2020-03-19set: implement GetRegionCodeDan8-9/+72
2020-03-19vk_texture_cache: Silence misc warningsReinUsesLisp1-3/+3
2020-03-19vk_staging_buffer_pool: Silence unused constant warningReinUsesLisp1-1/+1
2020-03-19vk_rasterizer: Remove unused variableReinUsesLisp1-2/+0
2020-03-19vk_pipeline_cache: Remove unused variableReinUsesLisp1-1/+0
2020-03-19maxwell_to_vk: Sielence -Wswitch warningReinUsesLisp1-0/+2
2020-03-19gl_shader_decompiler: Remove deprecated function and its usagesReinUsesLisp1-11/+8
2020-03-19gl_rasterizer: Silence misc warningsReinUsesLisp1-7/+2
2020-03-19kepler_compute: Remove unused variablesReinUsesLisp1-8/+0
2020-03-18time_zone_content_manager: Fix out of bounds readReinUsesLisp1-1/+1
There were cases where raw_data didn't contain enough space to hold the zero terminator. This was caught with -fsanitize=address.
2020-03-18input_common/udp: Fix clang build issuesReinUsesLisp1-1/+2
2020-03-18astc: Fix clang build issuesReinUsesLisp1-12/+12
2020-03-18gl_shader_decompiler: Don't redeclare gl_VertexID and gl_InstanceIDReinUsesLisp1-8/+0
2020-03-17yuzu: Save sound output mode and set it to Stereo by defaultFearlessTobi3-0/+7
2020-03-17bcat: Disable Boxcat backend by defaultFearlessTobi2-2/+2
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-17input_common/udp: Fix Linux build by using a backwards compatible way of error checkingFearlessTobi1-1/+1
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-17gdbstub: small logic bug fix with defer_startGauvain "GovanifY" Roussel-Tarbouriech1-2/+4
2020-03-17gdbstub: Ensure gdbstub doesn't drop packets crucial to initializationGauvain "GovanifY" Roussel-Tarbouriech3-2/+16
2020-03-16renderer_opengl: Move some logic to an anonymous namespaceReinUsesLisp1-151/+151
2020-03-16renderer_opengl: Detect Nvidia Nsight as a debugging toolReinUsesLisp3-7/+22
Use getenv to detect Nsight.
2020-03-16gl_shader_decompiler: Implement legacy varyingsReinUsesLisp1-6/+57
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-16shader/shader_ir: Track usage in input attribute and of legacy varyingsReinUsesLisp3-34/+64
2020-03-16shader/shader_ir: Fix clip distance usage storesReinUsesLisp1-2/+1
2020-03-16shader/shader_ir: Change declare output attribute to a switchReinUsesLisp1-9/+9
2020-03-15maxwell_to_vk: Implement RG32 and RGB32 integer vertex formatsReinUsesLisp1-0/+4
2020-03-15vk_rasterizer: Implement layered clearsReinUsesLisp1-2/+2
2020-03-15vk_shader_decompiler: fix linux buildmakigumo1-1/+1
2020-03-15vk_rasterizer: Fix vertex range assertReinUsesLisp1-1/+1
End can be equal to start in CalculateVertexArraysSize. This is quite common when the vertex size is zero.
2020-03-15vk_rasterizer: Reimplement clears with vkCmdClearAttachmentsReinUsesLisp4-45/+53
2020-03-14renderer_opengl: Keep presentation frames in lock-step when GPU debugging.bunnei1-1/+32
- Fixes renderdoc with OpenGL renderer.
2020-03-14gl_device: Add option to check GL_EXT_debug_tool.bunnei2-0/+6
2020-03-14DirtyFlags: relax need to set render_targets as dirty Fernando Sahmkow4-13/+0
The texture cache already takes care of setting a render target to dirty when invalidated.
2020-03-14PageTable: move backing addresses to a children class as the CPU page table does not need them.Fernando Sahmkow3-4/+25
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-14astc: Fix typos from search and replaceReinUsesLisp1-3/+3
2020-03-14astc: Minor changes to InputBitStreamReinUsesLisp1-28/+34
2020-03-14astc: Pass val in Replicate by copyReinUsesLisp1-1/+1
2020-03-14astc: Call std::vector:reserve on decodedClolorValues to avoid reallocatingReinUsesLisp1-0/+2
2020-03-14clang-formatNguyen Dac Nam1-2/+1
2020-03-14nitNguyen Dac Nam1-1/+1
2020-03-14astc: Call std::vector::reserve on texelWeightValues to avoid reallocatingReinUsesLisp1-0/+2
2020-03-14astc: Create a LUT at compile time for encoding valuesReinUsesLisp1-7/+19
2020-03-14astc: Make IntegerEncodedValue a trivial structureReinUsesLisp1-212/+177
2020-03-14astc: Make IntegerEncodedValue constructor constexprReinUsesLisp1-5/+6
2020-03-14astc: Make IntegerEncodedValue trivially copyableReinUsesLisp1-9/+2
2020-03-14astc: Rename C types to common_typesReinUsesLisp1-79/+78
2020-03-14astc: Move Popcnt to an anonymous namespace and make it constexprReinUsesLisp1-9/+13
2020-03-14astc: Use common types instead of stdint.h integer typesReinUsesLisp1-284/+282
2020-03-14astc: Use 'enum class' instead of 'enum' for EIntegerEncodingReinUsesLisp1-25/+25
2020-03-13vk/gl_shader_decompiler: Silence assertion on computeReinUsesLisp2-6/+12
2020-03-13vk_shader_decompiler: Fix default varying regressionReinUsesLisp1-2/+6
2020-03-13maxwell_3d: Add padding words to XFB entriesReinUsesLisp1-2/+4
Use INSERT_UNION_PADDING_WORDS instead of alignas to ensure a size requirement.
2020-03-13gl_shader_decompiler: Fix implicit conversion errorsReinUsesLisp1-3/+3
2020-03-13vk_shader_decompiler: Fix implicit type conversionRodrigo Locatti1-1/+1
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-13vk_rasterizer: Implement transform feedback binding zeroReinUsesLisp2-0/+46
2020-03-13vk_shader_decompiler: Add XFB decorations to generic varyingsReinUsesLisp1-16/+89
2020-03-13vk_device: Enable VK_EXT_transform_feedback when availableReinUsesLisp2-7/+40
2020-03-13vk_device: Shrink formatless capability name sizeReinUsesLisp3-26/+23
2020-03-13shader/transform_feedback: Expose buffer strideReinUsesLisp3-1/+4
2020-03-13vk_shader_decompiler: Use registry for specializationReinUsesLisp4-31/+37
2020-03-13gl_rasterizer: Implement transform feedback bindingsReinUsesLisp3-10/+83
2020-03-13gl_shader_decompiler: Decorate output attributes with XFB layoutReinUsesLisp1-29/+105
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-13shader/transform_feedback: Add host API friendly TFB builderReinUsesLisp4-0/+140
2020-03-13nit & remove some optional paramNguyen Dac Nam1-10/+11
2020-03-13shader_decode: implement XMAD mode CSfuNguyen Dac Nam1-9/+41
2020-03-13fix formattingmakigumo1-1/+1
2020-03-13maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32makigumo1-1/+3
2020-03-13clang-formatNguyen Dac Nam1-4/+8
2020-03-13Apply suggestions from code reviewNguyen Dac Nam1-5/+5
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-13shader_decode: BFE add ref of reverse parallel method.Nguyen Dac Nam1-0/+3
2020-03-13shader_decode: implement BREV on BFENguyen Dac Nam1-6/+25
Implement reverse parallel follow: https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
2020-03-13shader_bytecode: update BFE instructions struct.Nguyen Dac Nam1-8/+3
2020-03-13node_helper: add IBitfieldExtract caseNguyen Dac Nam1-0/+2
2020-03-13shader_decode: Reimplement BFE instructionsNguyen Dac Nam1-25/+27
2020-03-13gl_shader_decompiler: Initialize gl_Position on vertex shadersReinUsesLisp1-0/+4
2020-03-13gl_shader_decompiler: Add missing {} on smem GLSL emissionReinUsesLisp1-1/+1
2020-03-13video_core: Implement RGBA16_SNORMReinUsesLisp8-69/+84
Implement RGBA16_SNORM with the current API. Nothing special here.
2020-03-12texture_cache: Report incompatible textures as blackReinUsesLisp1-2/+39
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-12texture_cache/surface_params: Force depth=1 on 2D texturesReinUsesLisp1-2/+4
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-12gl_shader_decompiler: Add layer component to texelFetchReinUsesLisp1-6/+9
TexelFetch was not emitting the array component generating invalid GLSL.
2020-03-12NVFlinger: Do the microprofile Flip after processing a valid frame.Fernando Sahmkow1-2/+2
2020-03-12gl_shader_decompiler: Fix regression in render target declarationsReinUsesLisp1-12/+2
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-11framebuffer_layout.h: drop the use of enum for screen dimensions.Vitor Kiguchi2-10/+10
+clang format
2020-03-11gl_shader_manager: Fix interaction between graphics and computeReinUsesLisp4-29/+39
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-10gl_rasterizer: Implement polygon modes and fill rectanglesReinUsesLisp7-2/+99
2020-03-09engines/maxwell_3d: Add TFB registers and store them in shader registryReinUsesLisp4-6/+45
2020-03-09shader/registry: Address feedbackReinUsesLisp3-13/+18
2020-03-09gl_shader_decompiler: Add identifier to decompiled codeReinUsesLisp3-8/+16
2020-03-09gl_shader_decompiler: Roll back to GLSL core 430ReinUsesLisp1-1/+1
RenderDoc won't build shaders if we use GLSL compatibility.
2020-03-09const_buffer_engine_interface: Store component typesReinUsesLisp4-46/+27
This is required for Vulkan. Sampling integer textures with float handles is illegal.
2020-03-09yuzu/loading_screen: Remove unused shader progress modeReinUsesLisp2-17/+1
2020-03-09gl_shader_cache: Reduce registry consistency to debug assertReinUsesLisp1-3/+1
Registry consistency is something that practically can't happen and it has a measurable runtime cost. Reduce it to a DEBUG_ASSERT.
2020-03-09shader/registry: Cache tessellation stateReinUsesLisp3-3/+10
2020-03-09shader/registry: Store graphics and compute metadataReinUsesLisp8-75/+176
Store information GLSL forces us to provide but it's dynamic state in hardware (workgroup sizes, primitive topology, shared memory size).
2020-03-09video_core: Rename "const buffer locker" to "registry"ReinUsesLisp16-95/+100
2020-03-09gl_shader_cache: Rework shader cache and remove post-specializationsReinUsesLisp18-1094/+544
Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
2020-03-08textures: Fix anisotropy hackReinUsesLisp1-14/+16
Previous code could generate an anisotropy value way higher than x16.
2020-03-08cubeb_sink: Don't discard other channels when performing downmixingFearlessTobi1-3/+17
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-08vk_reasterizer: fix mistype on SetupGraphicsImagesNguyen Dac Nam1-1/+1
This should use Maxwell3D engine. Fixed some GPU error on Kirby and maybe other games.
2020-03-06vk_rasterizer: Support disabled uniform buffersReinUsesLisp2-1/+9
2020-03-06maxwell_to_vk: Remove Storage capability for A1B5G5R5UReinUsesLisp1-1/+1
2020-03-04input/udp - Add minor error handling to prevent bad input from crashingJames Rowe1-4/+13
2020-03-04Frontend/SDL - Provide proper default for UDP inputJames Rowe1-1/+1
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-04input/udp - Dont log on invalid packet receivedJames Rowe1-1/+0
2020-03-03core: hle: Implement separate A32/A64 SVC interfaces.bunnei2-107/+380
2020-03-03core: Implement separate A32/A64 ARM interfaces.bunnei21-122/+454
2020-03-03core: loader: Remove check for 32-bit.bunnei1-6/+0
2020-03-03core: dynarmic: Add CP15 from Citra.bunnei3-0/+234
2020-02-29nit: move comment to right place.Nguyen Dac Nam1-2/+2
2020-02-28video_core/dirty_flags: Address feedbackReinUsesLisp1-4/+4
2020-02-28renderer_opengl: Fix edge-case where alpha testing might cull presentationReinUsesLisp2-0/+7
2020-02-28gl_texture_cache: Remove blending disable on blitsReinUsesLisp1-5/+0
Blending doesn't affect blits. Rasterizer discard does, update the commentaries.
2020-02-28gl_rasterizer: Don't disable blending on clearsReinUsesLisp1-4/+0
Blending doesn't affect clears.
2020-02-28dirty_flags: Deduplicate code between OpenGL and VulkanReinUsesLisp5-77/+73
2020-02-28vk_rasterizer: Pass Maxwell registers to dynamic updatesReinUsesLisp2-26/+21
2020-02-28state_tracker: Remove type traits with named structuresReinUsesLisp4-18/+22
2020-02-28vk_state_tracker: Implement dirty flags for stencil propertiesReinUsesLisp3-0/+21
2020-02-28vk_state_tracker: Implement dirty flags for depth boundsReinUsesLisp3-0/+14
2020-02-28vk_state_tracker: Implement dirty flags for blend constantsReinUsesLisp3-0/+14
2020-02-28vk_state_tracker: Implement dirty flags for depth biasReinUsesLisp3-0/+17
2020-02-28vk_state_tracker: Implement dirty flags for scissorsReinUsesLisp3-0/+14
2020-02-28vk_state_tracker: Initial implementationReinUsesLisp10-52/+198
Add support for render targets and viewports.
2020-02-28gl_rasterizer: Remove num vertex buffers magic numberReinUsesLisp1-2/+4
2020-02-28gl_rasterizer: Only apply polygon offset clamp if enabledReinUsesLisp1-3/+6
2020-02-28gl_state_tracker: Implement dirty flags for depth clamp enablingReinUsesLisp3-3/+15
2020-02-28gl_rasterizer: Disable scissor 0 when scissor is not used on clearReinUsesLisp1-0/+3
2020-02-28gl_rasterizer: Notify depth mask changes on clearReinUsesLisp2-1/+6
2020-02-28gl_rasterizer: Minor sort changes to clearingReinUsesLisp1-11/+9
2020-02-28maxwell_3d: Use two tables instead of three for dirty flagsReinUsesLisp1-1/+1
2020-02-28gl_state_tracker: Track state of index buffersReinUsesLisp4-5/+23
2020-02-28gl_state_tracker: Implement dirty flags for clip controlReinUsesLisp5-15/+31
2020-02-28gl_state_tracker: Implement dirty flags for point sizesReinUsesLisp3-4/+25
2020-02-28gl_state_tracker: Implement dirty flags for fragment color clampReinUsesLisp3-2/+14
2020-02-28gl_state_tracker: Implement dirty flags for logic opReinUsesLisp4-2/+22
2020-02-28gl_state_tracker: Implement dirty flags for sRGBReinUsesLisp5-2/+21
2020-02-28gl_state_tracker: Implement dirty flags for rasterize enableReinUsesLisp5-2/+21
2020-02-28gl_state_tracker: Implement dirty flags for multisampleReinUsesLisp3-0/+13
2020-02-28gl_state_tracker: Implement dirty flags for alpha testingReinUsesLisp4-6/+24
2020-02-28gl_state_tracker: Implement dirty flags for polygon offsetsReinUsesLisp4-2/+24
2020-02-28gl_state_tracker: Implement dirty flags for primitive restartReinUsesLisp3-5/+19
2020-02-28gl_state_tracker: Implement dirty flags for stencil testingReinUsesLisp4-3/+29
2020-02-28gl_state_tracker: Implement depth dirty flagsReinUsesLisp4-6/+31
2020-02-28gl_state_tracker: Implement dirty flags for front face and cullingReinUsesLisp4-7/+38
2020-02-28gl_state_tracker: Implement dirty flags for blendingReinUsesLisp5-14/+67
2020-02-28gl_state_tracker: Implement dirty flags for clip distances and shadersReinUsesLisp7-14/+43
2020-02-28gl_state_tracker: Add dirty flags for buffers and divisorsReinUsesLisp4-22/+56
2020-02-28maxwell_3d: Change write dirty flags to a bitsetReinUsesLisp3-16/+16
2020-02-28gl_state_tracker: Implement dirty flags for vertex formatsReinUsesLisp4-9/+44
2020-02-28gl_state_tracker: Implement dirty flags for color masksReinUsesLisp4-9/+53
2020-02-28gl_state_tracker: Implement dirty flags for scissorsReinUsesLisp5-10/+58
2020-02-28gl_state_tracker: Implement dirty flags for viewportsReinUsesLisp4-9/+54
2020-02-28renderer_opengl: Reintroduce dirty flags for render targetsReinUsesLisp9-13/+195
2020-02-28maxwell_3d: Flatten cull and front face registersReinUsesLisp8-50/+47
2020-02-28video_core: Reintroduce dirty flags infrastructureReinUsesLisp10-1/+72
2020-02-28gl_state: Remove completelyReinUsesLisp13-152/+4
2020-02-28gl_state: Remove program trackingReinUsesLisp9-94/+62
2020-02-28gl_state: Remove framebuffer trackingReinUsesLisp7-82/+23
2020-02-28gl_state: Remove image trackingReinUsesLisp5-24/+12
2020-02-28gl_state: Remove texture and sampler trackingReinUsesLisp5-60/+8
2020-02-28gl_state: Remove blend state trackingReinUsesLisp5-104/+28
2020-02-28gl_state: Remove stencil test trackingReinUsesLisp4-92/+18
2020-02-28gl_state: Remove clip control trackingReinUsesLisp5-19/+8
2020-02-28gl_state: Remove clip distances trackingReinUsesLisp4-29/+3
2020-02-28gl_state: Remove rasterizer disable trackingReinUsesLisp6-13/+8
2020-02-28gl_state: Remove viewport and depth range trackingReinUsesLisp7-101/+39
2020-02-28gl_state: Remove scissor test trackingReinUsesLisp6-69/+12
2020-02-28gl_state: Remove color mask trackingReinUsesLisp4-40/+12
2020-02-28gl_state: Remove clamp framebuffer color trackingReinUsesLisp3-17/+6
This commit doesn't reset it for screen draws because clamping doesn't change anything there.
2020-02-28gl_state: Remove multisample trackingReinUsesLisp3-16/+2
2020-02-28gl_state: Remove framebuffer sRGB trackingReinUsesLisp6-21/+25
2020-02-28gl_state: Remove VAO cache and trackingReinUsesLisp10-153/+53
2020-02-28gl_state: Remove depth clamp trackingReinUsesLisp4-25/+13
2020-02-28gl_state: Remove depth trackingReinUsesLisp4-34/+7
2020-02-28gl_state: Remove primitive restart trackingReinUsesLisp3-18/+2
2020-02-28gl_state: Remove logic op trackerReinUsesLisp4-24/+5
2020-02-28gl_state: Remove blend color trackingReinUsesLisp3-18/+1
2020-02-28gl_state: Remove polygon offset trackingReinUsesLisp4-39/+7
2020-02-28gl_state: Remove alpha test trackingReinUsesLisp4-21/+4
2020-02-28gl_state: Remove cull mode trackingReinUsesLisp4-19/+4
2020-02-28gl_state: Remove front face trackingReinUsesLisp4-6/+5
2020-02-28gl_state: Remove point size trackingReinUsesLisp3-22/+4
2020-02-28gl_rasterizer: Add oglEnablei helperReinUsesLisp1-0/+4
2020-02-28gl_rasterizer: Add OpenGL enable/disable helperReinUsesLisp1-0/+4
2020-02-28gl_rasterizer: Remove dirty flagsReinUsesLisp18-457/+7
2020-02-28common/math_util: Support float type rectanglesReinUsesLisp1-2/+14
2020-02-28renderer_opengl: Fix SRGB presentation frame tracking.bunnei2-5/+2
- Fixes SRGB in Super Smash Bros. Ultimate.
2020-02-28shader_decode: Fix LD, LDG when track constant bufferNguyen Dac Nam1-4/+12
2020-02-28shader_decode: keep it search on all codeNguyen Dac Nam1-4/+12
It fixed opcode LD, LDG on Pokemon Sword that can't find the constant buffer. Not sure if it helps any on visual.
2020-02-28Create an "Advanced" tab in the graphics configuration tab and add anisotropic filtering levels.Morph16-35/+245
2020-02-28renderer_opengl: Reduce swap chain size to 3.bunnei1-3/+2
2020-02-27AM/ICommonStateGetter: Stub SetLcdBacklighOffEnabled (#3454)Morph2-2/+14
* Stub SetLcdBacklighOffEnabled Used by Super Smash Bros. Ultimate We require backlight services to be implemented to turn on/off the backlight. * Address feedback
2020-02-27shader: FMUL switch to using LUT (#3441)Nguyen Dac Nam1-19/+14
* shader: add FmulPostFactor LUT table * shader: FMUL apply LUT * Update src/video_core/engines/shader_bytecode.h Co-Authored-By: Mat M. <mathew1800@gmail.com> * nit: mistype * clang-format & add missing import * shader: remove post factor LUT. * shader: move post factor LUT to function and fix incorrect order. * clang-format * shader: FMUL: add static to post factor LUT * nit: typo Co-authored-by: Mat M. <mathew1800@gmail.com>
2020-02-27renderer_opengl: Use more concise lock syntax.bunnei1-4/+4
2020-02-27renderer_opengl: Move Frame/FrameMailbox to OpenGL namespace.bunnei3-77/+42
2020-02-26vk_swapchain: Silence TOCTOU race conditionReinUsesLisp1-9/+12
It's possible that the window is resized from the moment we ask for its size to the moment a swapchain is created, causing validation issues. To workaround this Vulkan issue request the capabilities again just before creating the swapchain, making the race condition less likely.
2020-02-26ARM_Interface: Cache the JITs instead of deleting/recreating.Fernando Sahmkow2-4/+19
This was a bug inherited from citra which was fixed by then at some time. This commit corrects such bug and ensures JITs are correctly recycled.
2020-02-26renderer_opengl: Create gl_framebuffer_data if empty.bunnei1-1/+2
2020-02-26frontend: qt: bootmanager: Acquire a shared context in main emu thread.bunnei2-12/+12
2020-02-26frontend: qt: bootmanager: Vulkan: Restore support for VK backend.bunnei5-113/+145
2020-02-26frontend: qt: bootmanager: OpenGL: Implement separate presentation thread.bunnei2-222/+254
2020-02-26frontent: qt: main: Various updates/refactoring for separate presentation thread.bunnei2-29/+27
2020-02-26core: frontend: Refactor scope_acquire_window_context to scope_acquire_context.bunnei7-29/+32
2020-02-26frontend: sdl2: emu_window: Implement separate presentation thread.bunnei10-62/+79
2020-02-26renderer_opengl: Add texture mailbox support for presenter thread.bunnei4-35/+269
2020-02-26renderer_opengl: Add OGLRenderbuffer to resource/state management.bunnei4-0/+62
2020-02-26core: frontend: emu_window: Add TextureMailbox class.bunnei1-0/+41
2020-02-26core: settings: Add setting to enable vsync, which is on by default.bunnei8-0/+25
2020-02-25video_core/surface: Add R32_SINT render target formatReinUsesLisp2-0/+3
2020-02-25video_core/gpu: Remove unused functionsReinUsesLisp2-71/+0
2020-02-24yuzu: Remove exit lock for game pausingFearlessTobi1-5/+0
This removes the "exit lock" popup from yuzu when pausing a game. Motivation The exit lock feature is broken in many ways and doesn't work properly in a lot of games, causing it to appear every time you want to pause the game or stop it, even in places where it wouldn't on Switch. Additionally, the feature of pausing a game doesn't exist like this on Switch and yuzu should be guaranteed to be deterministic anyway, so pausing the emulation shouldn't be able to interrupt any critical processes in any way.
2020-02-24vk_shader_decompiler: Implement indexed texturesReinUsesLisp6-54/+99
Implement accessing textures through an index. It uses the same interface as OpenGL, the main difference is that Vulkan bindings are forced to be arrayed (the binding index doesn't change for stacked textures in SPIR-V).
2020-02-24shader: Simplify indexed sampler usagesReinUsesLisp2-20/+8
2020-02-24video_core: Implement more scaler attribute formatsReinUsesLisp3-4/+40
While changing this, fix assert in vk_shader_decompiler. We now know scaled formats are expected to be float in shaders attributes.
2020-02-23audio_core: interpolate: Improvements to fix audio crackling.bunnei2-23/+38
- Fixes audio crackling in Crash Team Racing Nitro-Fueled, Super Mario Odyssey, and others. - Addresses followup issues from #3310.
2020-02-22Scheduler: Inline global scheduler in Scheduler Lock.Fernando Sahmkow1-4/+2
2020-02-22Kernel: Correct pending feedback.Fernando Sahmkow1-3/+4
2020-02-22System: Expose Host thread registering routines from kernel.Fernando Sahmkow2-0/+14
2020-02-22Kernel: Address Feedback.Fernando Sahmkow6-30/+47
2020-02-22Kernel: Implement Scheduler locksFernando Sahmkow2-0/+89
2020-02-22Kernel: Implement Time Manager.Fernando Sahmkow5-1/+98
2020-02-22Kernel: Rename ThreadCallbackHandleTable and Setup Thread Ids on Kernel.Fernando Sahmkow5-24/+107
2020-02-22Kernel: Make global scheduler depend on KernelCoreFernando Sahmkow4-8/+24
2020-02-22audio_core: interpolate: Fix include for climits (Linux build break).bunnei1-1/+1
2020-02-21shader/texture: Fix illegal 3D texture assertReinUsesLisp1-1/+1
Fix typo in the illegal 3D texture assert logic. We care about catching arrayed 3D textures or 3D shadow textures, not regular 3D textures.
2020-02-21nit: add const to where it need.Nguyen Dac Nam1-14/+14
2020-02-21shader: implement LOP3 fast replace for old functionNguyen Dac Nam1-36/+58
ref: https://devtalk.nvidia.com/default/topic/1070081/cuda-programming-and-performance/reverse-lut-for-lop3-lut/
2020-02-21vk_device: remove left over from other branchNguyen Dac Nam1-1/+0
2020-02-20clang-formatNguyen Dac Nam1-1/+1
2020-02-20shader_decompiler: only add StorageImageReadWithoutFormat when availableNguyen Dac Nam1-1/+4
2020-02-20video_core: memory_manager: Flush/invalidate asynchronously on Unmap.bunnei1-1/+10
- Minor perf improvement.
2020-02-19shader_decompiler: add check in case of device not support ShaderStorageImageReadWithoutFormatNguyen Dac Nam1-0/+4
2020-02-19vk_device: setup shaderStorageImageReadWithoutFormatNguyen Dac Nam1-0/+5
2020-02-19vk_device: add check for shaderStorageImageReadWithoutFormatNguyen Dac Nam1-0/+7
2020-02-19shader_conversion: I2F : add Assert for case src_size is ShortNguyen Dac Nam1-0/+3
2020-02-19fix warningNguyen Dac Nam1-1/+1
2020-02-19clang-format fixNguyen Dac Nam1-1/+1
2020-02-19shader_conversion: add conversion I2F for ShortNguyen Dac Nam1-9/+6
2020-02-19vk_shader: add Capability StorageImageReadWithoutFormatNguyen Dac Nam1-0/+1
2020-02-19httplib compatibilityBrian Clinkenbeard2-7/+7
2020-02-19vk_shader: Implement function ImageLoad (Used by Kirby Start Allies)Nguyen Dac Nam1-2/+6
Please enter the commit message for your changes. Lines starting
2020-02-18fixups mistake auto commit.Nguyen Dac Nam1-9/+0
2020-02-18Update code structureNguyen Dac Nam1-0/+7
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-02-18add vertex UnsignedInt size RGBANguyen Dac Nam1-0/+2
2020-02-18add eBc2SrgbBlock to formatsNguyen Dac Nam1-0/+1
2020-02-18vulkan: add DXT23_SRGBNguyen Dac Nam1-1/+1
2020-02-18renderer_vulkan: Add the rest of case for TryConvertBorderColorNguyen Dac Nam1-3/+10
2020-02-18analog_from_button get direction implementationCJBok2-5/+19
2020-02-16texture_cache: Implement layered framebuffer attachmentsReinUsesLisp8-51/+74
Layered framebuffer attachments is a feature that allows applications to write attach layered textures to a single attachment. What layer the fragments are written to is decided from the shader using gl_Layer.
2020-02-16vk_shader_decompiler: Implement Layer output attributeReinUsesLisp1-6/+30
SPIR-V's Layer is GLSL's gl_Layer. It lets the application choose from a shader stage (vertex, tessellation or geometry) which framebuffer layer write the output fragments to.
2020-02-16texture_cache: Avoid matches in 3D texturesReinUsesLisp1-8/+11
Code before this commit was trying to match 3D textures with another target. Fix that.
2020-02-16surface_base: Implement texture buffer flushesReinUsesLisp2-0/+11
Implement downloads to guest memory from texture buffers on the generic cache and OpenGL.
2020-02-16IUserLocalCommunicationService: add function Initialize2Nguyen Dac Nam1-1/+9
2020-02-16HLE: correct function name of IUserLocalCommunicationServiceNguyen Dac Nam1-1/+1
402: function name should be Initialize2 (7.0.0+) not SetOperationMode Follow by: https://switchbrew.org/wiki/LDN_services#IUserLocalCommunicationService
2020-02-16nvhost_gpu: implement ChannelSetTimeslicenamkazy2-0/+20
2020-02-15Revert "video_core: memory_manager: Use GPU interface for cache functions."bunnei3-9/+14
2020-02-15texture: Implement R32IReinUsesLisp6-34/+46
2020-02-15shader/texture: Allow 2D shadow arrays and simplify codeReinUsesLisp1-43/+28
Shadow sampler 2D arrays are supported on OpenGL, so there's no reason to forbid these. Enable textureLod usage on these. Minor style changes.
2020-02-14maxwell_3d: Unify draw methodsReinUsesLisp6-36/+6
Pass instanced state of a draw invocation as an argument instead of having two separate virtual methods.
2020-02-14query_cache: Address feedbackReinUsesLisp2-16/+18
2020-02-14query_cache: Fix ambiguity in CacheAddr getterReinUsesLisp1-4/+5
2020-02-14query_cache: Add a recursive mutex for concurrent usageReinUsesLisp1-0/+6
2020-02-14vk_query_cache: Implement generic query cache on VulkanReinUsesLisp11-20/+327
2020-02-14query_cache: Abstract OpenGL implementationReinUsesLisp4-339/+394
Abstract the current OpenGL implementation into the VideoCommon namespace and reimplement it on top of that. Doing this avoids repeating code and logic in the Vulkan implementation.
2020-02-14gl_query_cache: Optimize query cacheReinUsesLisp6-79/+217
Use a custom cache instead of relying on a ranged cache.
2020-02-14gl_query_cache: Implement host queries using a deferred cacheReinUsesLisp7-86/+328
Instead of waiting immediately for executed commands, defer the query until the guest CPU reads it. This way we get closer to what the guest program is doing. To archive this we have to build a dependency queue, because host APIs (like OpenGL and Vulkan) use ranged queries instead of counters like NVN. Waiting for queries implicitly uses fences and this requires a command being queued, otherwise the driver will lock waiting until a timeout. To fix this when there are no commands queued, we explicitly call glFlush.
2020-02-14gl_rasterizer: Sort method declarationsReinUsesLisp1-16/+15
2020-02-14gl_rasterizer: Add queued commands counterReinUsesLisp2-0/+16
Keep track of the queued OpenGL commands that can signal a fence if waited on. As a side effect, we avoid calls to glFlush when no commands are queued.
2020-02-14maxwell_3d: Slow implementation of passed samples (query 21)ReinUsesLisp8-17/+201
Implements GL_SAMPLES_PASSED by waiting immediately for queries.
2020-02-14Add 4:3 aspect ratio and address feedbackMorph5-12/+20
2020-02-14Core: Correct compilition in GCCFernando Sahmkow1-0/+2
2020-02-14Address feedbackMorph2-18/+26
2020-02-14Use enumeration instead of magic numbersMorph2-5/+11
2020-02-14Add following aspect ratios: 16:9, 21:9, Stretch to WindowMorph9-2/+62
Available as a drop down within the configure graphics tab.
2020-02-14gl_resource_manager: Add managed query classReinUsesLisp2-0/+42
2020-02-14gl_rasterizer: Use the least generic OpenGL draw function possibleReinUsesLisp1-8/+28
This may help some implementations.
2020-02-14vk_shader_decompiler: Fix vertex id and instance idReinUsesLisp1-4/+13
Vulkan's VertexIndex and InstanceIndex don't match with hardware. This is because Nvidia implements gl_VertexID and gl_InstanceID. The math that relates these is: gl_VertexIndex = gl_BaseVertex + gl_VertexID gl_InstanceIndex = gl_InstanceIndex + gl_InstanceID To emulate it using what Vulkan's SPIR-V offers (the *Index variants) this commit substracts gl_Base* from gl_*Index to obtain the OpenGL and hardware's equivalent.
2020-02-14Core: Address FeedbackFernando Sahmkow6-24/+50
2020-02-13GPU: Address Feedback.Fernando Sahmkow2-11/+10
2020-02-12address_arbiter: Collapse loops in InsertThread() and RemoveThread()Lioncash1-19/+17
Same behavior, but without the need to explicitly loop through everything manually.
2020-02-12address_arbiter: Simplify GetThreadsWaitingOnAddress()Lioncash2-10/+9
Simplifies the overall function and also allows for it to become a const-qualified member function.
2020-02-12bcat/backend: Make formatting of passphrase consistent in NullBackend::SetPassphrase()Lioncash1-1/+1
Aligns the '=' to be consistent with the rest of the logs within this source file.
2020-02-12bcat/backend: Prevent fmt exception in debug log within NullBackend::Clear()Lioncash1-1/+1
A formatting specifier within Clear wasn't being used, which will cause fmt to throw an exception. This fixes that.
2020-02-12kernel/thread: Remove trivial usages of the global system accessorLioncash1-2/+2
We can just use the kernel member variable directly instead of going through the system to obtain the same thing.
2020-02-12Core: Set all hardware emulation constants in a single file.Fernando Sahmkow17-53/+88
2020-02-11Kernel: Refactor synchronization to better match REFernando Sahmkow23-80/+212
2020-02-11update hwopus DecodeInterleaved for FW 7.0.0+makigumo1-2/+4
trivial change, see https://switchbrew.org/wiki/Audio_services#IHardwareOpusDecoder
2020-02-11Kernel: Change WaitObject to Synchronization object. In order to better reflect RE.Fernando Sahmkow22-98/+110
2020-02-10GPU: Implement GPU Clock correctly.Fernando Sahmkow3-2/+17
2020-02-10Maxwell3D: Correct query reporting.Fernando Sahmkow2-51/+58
2020-02-09Remove option "Show files with type 'Unknown'"Morph5-15/+1
2020-02-08hle: services: Use std::shared_ptr instead of copy by value.bunnei9-50/+52
2020-02-08gpu_thread: Use MPSCQueue for GPU commands.bunnei1-1/+1
- Necessary for multiple service threads.
2020-02-08video_core: memory_manager: Use GPU interface for cache functions.bunnei3-14/+9
2020-02-06kernel: transfer_memory: Properly reserve and reset memory region.bunnei5-40/+116
2020-02-06wait_object: Make wait behavior only require one object to signal.Zach Hilman1-11/+2
- This was holdover from citra.
2020-02-06am: Correct IPC object count mismatch.bunnei1-6/+4
2020-02-06services: am: Clear events on PopOutData and PopInteractiveOutData.bunnei1-0/+2
2020-02-06am: Refactor IStorage interface.bunnei7-43/+81
2020-02-06applets: software_keyboard: Signal state change on end of interactive session.bunnei1-0/+1
2020-02-06applets: software_keyboard: Minor cleanup.bunnei1-2/+2
2020-02-06services: prepo: Fix IPC interface with SaveReport/SaveReportWithUser.bunnei1-15/+15
2020-02-06hle_ipc: Add error checking to read/write buffer access.bunnei1-8/+42
2020-02-05shader/decode: Fix constant buffer offsetsReinUsesLisp3-5/+5
Some instances were using cbuf34.offset instead of cbuf34.GetOffset(). This returned the an invalid offset. Address those instances and rename offset to "shifted_offset" to avoid future bugs.
2020-02-05maxwell_to_gl: Implement R8G8_USCALEDReinUsesLisp1-0/+8
2020-02-05maxwell_to_gl: Reduce unimplemented formats to LOG_ERRORReinUsesLisp1-8/+4
2020-02-04vk_rasterizer: Use noexcept variants of std::bitsetReinUsesLisp1-4/+5
Removes bounds checking from "texceptions" instances.
2020-02-04gl_rasterizer: Implement GL_POINT_SPRITEReinUsesLisp4-1/+9
OpenGL core defaults to GL_POINT_SPRITE, meanwhile on OpenGL compatibility we have to explicitly enable it. This fixes gl_PointCoord's behaviour.
2020-02-03input_common/udp: Ensure that UDP is shut down within Shutdown()Lioncash1-0/+1
Previously the UDP backend would never actually get shut down.
2020-02-03input_common/udp: Add missing override specifiersLioncash1-2/+2
Prevents trivial warnings and ensures interfaces are properly maintained between the base class.
2020-02-03input_common/udp: std::move SocketCallback instances where applicableLioncash1-2/+2
std::function is allowed to heap allocate if the size of the captures associated with each lambda exceed a certain threshold. This prevents potentially unnecessary reallocations from occurring.
2020-02-03input_common/udp: std::move shared_ptr within Client constructorLioncash1-1/+1
Gets rid of a trivially avoidable atomic reference count increment and decrement.
2020-02-03udp/client: Replace deprecated from_string() call with make_address_v4()Lioncash1-2/+2
Future-proofs code if boost is ever updated.
2020-02-03input_common/udp: Silence -Wreorder warning for SocketLioncash1-4/+3
Amends the constructor initializer list to specify the order of its elements in the same order that initialization would occur.
2020-02-03input_common/udp: Remove unnecessary inclusionsLioncash4-8/+4
2020-02-03input_common/udp: Add missing header guardLioncash1-0/+2
2020-02-02maxwell_3d: Fix stencil back maskReinUsesLisp1-3/+3
2020-02-02shader: Remove curly braces initializers on shared pointersReinUsesLisp5-12/+12
2020-02-02shader/shift: Implement SHIFT_RIGHT_{IMM,R}ReinUsesLisp1-26/+58
Shifts a pair of registers to the right and returns the low register.
2020-02-02shader/shift: Implement SHF_LEFT_{IMM,R}ReinUsesLisp2-10/+89
Shifts a pair of registers to the left and returns the high register.
2020-01-31Revert "system_archive: Fix Korean and Chinese fonts"bunnei5-880167/+27164
2020-01-31core/arm: Remove usage of global GetCurrentThread()Lioncash2-2/+4
Now both CPU backends go through their referenced system instance to obtain the current thread.
2020-01-31kernel/physical_core: Make use of std::unique_ptrLioncash2-4/+10
shared_ptr was used in 2d1984c20c75e03ec79eeb3806b12efa1679b977 due to a misunderstanding of how the language generates move constructors and move assignment operators. If a destructor is user-provided, then the compiler won't generate the move constructor and move assignment operators by default--they must be explicitly opted into. The reason for the compilation errors is due to the fact that the language will fall back to attempting to use the copy constructor/copy assignment operators if the respective move constructor or move assignment operator is unavailable. Given that we explicitly opt into them now, the the move constructor and move assignment operators will be generated as expected.
2020-01-31core/cpu_manager: Remove unused includesLioncash1-2/+0
Nothing from these headers are used within this source file, so we can remove them.
2020-01-31kernel/physical_core: Remove unused kernel reference member variableLioncash3-11/+7
This isn't used within the class, so it can be removed to simplify the overall interface. While we're in the same area, we can simplify a unique_ptr reset() call.
2020-01-30gl_rasterizer: Fix instanced draw arraysReinUsesLisp2-106/+28
glDrawArrays was being used when the draw had a base instance specified. This commit removes the draw parameters abstraction and fixes the mentioned issue.
2020-01-29yuzu/bootmanager: Define Vulkan widget only when enabledReinUsesLisp1-0/+2
2020-01-29yuzu_cmd: Fix memcpy on Vulkan handlersReinUsesLisp2-9/+10
2020-01-29yuzu: Implement Vulkan frontendReinUsesLisp24-171/+1089
Adds a Qt and SDL2 frontend for Vulkan. It also finishes the missing bits on Vulkan initialization.
2020-01-29web_service/telemetry_json: Report USER_CONFIGReinUsesLisp1-0/+1
2020-01-29settings: Add settings for graphics backendReinUsesLisp6-3/+48
2020-01-29core: Only wait for idle on gpu_core when it was initializedReinUsesLisp1-1/+3
This fixes crashes when a Vulkan device fails to initialize.
2020-01-29shader/other: Fix skips for SYNC and BRKReinUsesLisp1-2/+2
2020-01-29shader/other: Stub S2R LaneIdReinUsesLisp1-1/+4
2020-01-29buffer_cache: Delay buffer destructionsReinUsesLisp1-1/+4
Delay buffer destruction some extra frames to avoid destroying buffers that are still being used from older frames. This happens on Nvidia's driver with mailbox.
2020-01-29clangCJBok1-2/+2
2020-01-29minor correctionsCJBok1-2/+2
2020-01-28GUI: Togglable graphics settings buttons in status barCJBok2-7/+95
2020-01-28gl_shader_decompiler: Remove UNIMPLEMENTED for gl_PointSizeReinUsesLisp1-1/+0
This was implemented by a previous commit and it's no longer required.
2020-01-28gl_texture_cache: Silence implicit sign cast warningsReinUsesLisp1-3/+6
2020-01-27System: Address FeedbackFernando Sahmkow11-24/+30
2020-01-27shader/bfi: Implement register-constant buffer variantReinUsesLisp2-2/+7
It's the same as the variant that was implemented, but it takes the operands from another source.
2020-01-27shader/arithmetic: Implement FCMPReinUsesLisp2-1/+17
Compares the third operand with zero, then selects between the first and second.
2020-01-27texture_cache/surface_base: Fix layered break downReinUsesLisp1-1/+1
Layered break downs was passing "layer" as a "depth" parameter. This commit addresses that.
2020-01-27gl_texture_cache: Properly implement depth/stencil samplingReinUsesLisp1-4/+27
This addresses the long standing issue of compatibility vs. core profiles on OpenGL, properly implementing depth vs. stencil sampling depending on the texture swizzle.
2020-01-26System: Correct PrepareReschedule.Fernando Sahmkow1-1/+1
2020-01-26Kernel: Remove a few global instances from the kernel.Fernando Sahmkow2-2/+2
2020-01-26Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager.Fernando Sahmkow15-128/+115
This commit instends on better naming the new purpose of this classes.
2020-01-26ArmInterface: Delegate Exclusive monitor factory to exclusive monitor interfasce.Fernando Sahmkow3-16/+24
2020-01-26shader/memory: Implement ATOM.ADDReinUsesLisp5-39/+86
ATOM operates atomically on global memory. For now only add ATOM.ADD since that's what was found in commercial games. This asserts for ATOM.ADD.S32 (handling the others as unimplemented), although ATOM.ADD.U32 shouldn't be any different. This change forces us to change the default type on SPIR-V storage buffers from float to uint. We could also alias the buffers, but it's simpler for now to just use uint. While we are at it, abstract the code to avoid repetition.
2020-01-25Core: Refactor CPU Management.Fernando Sahmkow10-224/+168
This commit moves ARM Interface and Scheduler handling into the kernel.
2020-01-25Shader_IR: Address feedback.Fernando Sahmkow10-36/+40
2020-01-25shader/memory: Implement STL.S16 and STS.S16ReinUsesLisp1-3/+10
2020-01-25shader/memory: Implement unaligned LDL.S16 and LDS.S16ReinUsesLisp1-5/+3
2020-01-25shader/memory: Move unaligned load/store to functionsReinUsesLisp1-18/+27
2020-01-25shader/memory: Implement LDL.S16 and LDS.S16ReinUsesLisp1-12/+23
2020-01-25bsd: Stub several more functions.bunnei2-4/+48
- Required for Little Town Hero to boot further.
2020-01-24Disable clang-format for font filesFearlessTobi3-0/+6
2020-01-24Shader_IR: Change name of TrackSampler function so it does not confuse with the type.Fernando Sahmkow3-7/+10
2020-01-24Shader_IR: Corrections, styling and extras.Fernando Sahmkow1-2/+4
2020-01-24Shader_IR: Correct Custom Variable assignment.Fernando Sahmkow2-0/+4
2020-01-24Shader_IR: Propagate bindless index into the GL compiler.Fernando Sahmkow5-24/+54
2020-01-24Shader_IR: Implement Injectable Custom Variables to the IR.Fernando Sahmkow5-1/+70
2020-01-24GL Backend: Introduce indexed samplers into the GL backendFernando Sahmkow2-10/+39
2020-01-24Shader_IR: deduce size of indexed samplersFernando Sahmkow4-8/+60
2020-01-24Shader_IR: Setup Indexed Samplers on the IRFernando Sahmkow1-20/+46
2020-01-24Shader_IR: Implement initial code for tracking indexed samplers.Fernando Sahmkow4-0/+139
2020-01-24Shader_IR: Address FeedbackFernando Sahmkow5-35/+37
2020-01-24Shader_IR: Allow constant access of guest driver.Fernando Sahmkow7-1/+18
2020-01-24Shader_IR: Address FeedbackFernando Sahmkow4-21/+29
2020-01-24Guest_driver: Correct compiling errors in GCC.Fernando Sahmkow2-1/+5
2020-01-24Shader_IR: Store Bound buffer on Shader UsageFernando Sahmkow5-5/+41
2020-01-24GPU: Implement guest driver profile and deduce texture handler sizes.Fernando Sahmkow13-0/+127
2020-01-24Kernel: Implement Physical Core.Fernando Sahmkow2-0/+81
2020-01-24vk_shader_decompiler: Disable default values on unwritten render targetsReinUsesLisp3-19/+16
Some games like The Legend of Zelda: Breath of the Wild assign render targets without writing them from the fragment shader. This generates Vulkan validation errors, so silence these I previously introduced a commit to set "vec4(0, 0, 0, 1)" for these attachments. The problem is that this is not what games expect. This commit reverts that change.
2020-01-24audio_core: Switch to a faster interpolation techniqueFearlessTobi2-48/+159
2020-01-24yuzu/configuration: create UI tab and move gamelist settings thereFearlessTobi8-104/+76
2020-01-23common/logging: don't use regex for path trimmingBreadFish644-36/+23
2020-01-23Replace GetString with Get functionFearlessTobi1-2/+2
This should hopefully fix compilation errors.
2020-01-23Address second part of review commentsFearlessTobi4-14/+18
2020-01-23Address review commentsFearlessTobi4-65/+72
2020-01-23Input: UDP Client to provide motion and touch controlsfearlessTobi13-4/+897
An implementation of the cemuhook motion/touch protocol, this adds the ability for users to connect several different devices to citra to send direct motion and touch data to citra. Co-Authored-By: jroweboy <jroweboy@gmail.com>
2020-01-23service: time: Implement ToPosixTimeWithMyRule.bunnei4-1/+34
- Used by Pokemon Mystery Dungeon.
2020-01-23loader: provide default arguments (zero byte) to NSOsMichael Scire2-3/+10
Certain newer unity games (Terraria, Pokemon Mystery Dungeon) require that the argument region be populated. Failure to do so results in an integer underflow in argument count, and eventually an unmapped read at 0x800000000. Providing this default fixes this. Note that the behavior of official software is as yet unverified, arguments-wise.
2020-01-22GUI: fix minor issues with dark themesBartosz Kaszubowski1-3/+3
GUI: rename and reorder themes
2020-01-21gl_shader_cache: Disable fastmath on NvidiaReinUsesLisp1-0/+4
2020-01-20vk_blit_screen: Address feedbackReinUsesLisp4-22/+25
2020-01-20time: Fix month off-by-one error.bunnei1-2/+2
- Fixes timestamp in ZLA and Astral Chain saves.
2020-01-20yuzu_qt: config: Move audio to its own tab.bunnei1-3/+3
- We have some important audio settings, makes them more discoverable.
2020-01-20vk_blit_screen: Initial implementationReinUsesLisp3-0/+745
This abstraction takes care of presenting accelerated and non-accelerated or "framebuffer" images to the Vulkan swapchain.
2020-01-19GUI/gamelist: add "None" as an option for second row and remove dynamically duplicate row options (#3309)Bartosz Kaszubowski3-14/+53
* GUI/gamelist: add "None" as an option for second row and remove duplicated row options * fix clang-format warnings
2020-01-19vk_shader_decompiler: Implement UAtomicAdd (ATOMS) on SPIR-VReinUsesLisp1-3/+11
Also updates sirit to include atomic instructions.
2020-01-19system_archive: Fix Chinese fontFearlessTobi2-13582/+694524
Adds the proper OSS font for the Chinese language.
2020-01-19system_archive: Fix Korean fontFearlessTobi2-13582/+185637
Fixes Korean fonts when using Open-source system archives.
2020-01-19CMake: Create thin archives on LinuxLéo Lam1-0/+9
This significantly reduces unnecessary disk writes and space usage when building Citra. libcore.a is now only ~1MB rather than several hundred megabytes.
2020-01-18gl_state: Use bool instead of GLbooleanReinUsesLisp2-3/+3
This fixes template resolution considering GLboolean an integer instead of a bool.
2020-01-18vk_graphics_pipeline: Set front facing properlyReinUsesLisp2-2/+2
Front face was being forced to a certain value when cull face is disabled. Set a default value on initialization and drop the forcefully set front facing value with culling disabled.
2020-01-18core/memory: Create a special MapMemoryRegion for physical memory.Markus Wick4-4/+31
This allows us to create a fastmem arena within the memory.cpp helpers.
2020-01-18core/hle: Simplify PhysicalMemory usage in vm_manager.Markus Wick1-23/+11
2020-01-18core/loaders: Simplify PhysicalMemory usage.Markus Wick3-8/+12
It is currently a std::vector, however we might want to replace it with a more fancy allocator. So we can't use the C++ iterators any more.
2020-01-18Remove unused CPU Vendor string and telemtry fieldJames Rowe3-114/+0
The information is duplicated in the brand string and the telemetry field is unused
2020-01-18vk_rasterizer: Address feedbackReinUsesLisp2-25/+32
2020-01-18gl_shader_decompiler: Fix decompilation of condition codesReinUsesLisp1-27/+5
Use Visit instead of reimplementing it. Fixes unimplemented negations for condition codes.
2020-01-18Add headbar icon on LinuxTotalCaesar6591-1/+1
2020-01-17vk_rasterizer: Implement Vulkan's rasterizerReinUsesLisp3-1/+1386
This abstraction is Vulkan's equivalent to OpenGL's rasterizer. It takes care of joining all parts of the backend and rendering accordingly on demand.
2020-01-17renderer_vulkan: Add header as placeholderReinUsesLisp2-0/+73
2020-01-16vk_texture_cache: Address feedbackReinUsesLisp2-22/+8
2020-01-16shader/memory: Implement ATOMS.ADD.U32ReinUsesLisp5-3/+74
2020-01-16format_lookup_table: Fix ZF32_X24S8 component typesReinUsesLisp1-1/+1
Component types for ZF32_X24S8 were using UNORM. Drivers will set FLOAT, UINT, UNORM, UNORM; causing a format mismatch. This commit addresses that.
2020-01-16vk_texture_cache: Fix typo in commentaryRodrigo Locatti1-1/+1
Co-Authored-By: MysticExile <30736337+MysticExile@users.noreply.github.com>
2020-01-16maxwell_3d: Make dirty_pointers privateLioncash1-2/+2
This isn't used outside of the class itself, so we can make it private for the time being.
2020-01-16Fix git version in scm_rev.cppJames Rowe1-0/+5
2020-01-15gl_state: Implement PROGRAM_POINT_SIZEReinUsesLisp4-2/+13
For gl_PointSize to have effect we have to activate GL_PROGRAM_POINT_SIZE.
2020-01-15renderer_opengl/utils: Remove unused header inclusionsLioncash1-3/+0
Nothing from these headers are used, so they can be removed.
2020-01-15renderer_opengl/utils: Forward declare private structsLioncash2-12/+16
Keeps the definitions hidden and allows changes to the structs without needing to recompile all users of classes containing said structs.
2020-01-15Moved analog direction logic to sdl_implCJBok3-9/+48
2020-01-14Corrected directional states sensitivityCJBok1-9/+9
2020-01-14gl_texture_cache: Use local variables to simplify DownloadTextureReinUsesLisp1-6/+4
2020-01-14gl_texture_cache: Fix format for RGBX16FReinUsesLisp1-1/+1
2020-01-14gl_texture_cache: Use Snorm internal format for RG8SReinUsesLisp1-1/+1
2020-01-14gl_texture_cache: Use Snorm internal format for ABGR8SReinUsesLisp1-1/+1
2020-01-14control_flow: Silence -Wreorder warning for CFGRebuildStateLioncash1-1/+1
Organizes the initializer list in the same order that the variables would actually be initialized in.
2020-01-14gl_shader_cache: Remove unused STAGE_RESERVED_UBOS constantLioncash1-3/+0
Given this isn't used, this can be removed entirely.
2020-01-14gl_shader_cache: std::move entries in CachedShader constructorLioncash1-3/+4
Avoids several reallocations of std::vector instances where applicable.
2020-01-14gl_shader_cache: Remove unused entries variable in BuildShader()Lioncash1-1/+0
Eliminates a few unnecessary constructions of std::vectors.
2020-01-14vk_texture_cache: Implement generic texture cache on VulkanReinUsesLisp4-1/+733
It currently ignores PBO linearizations since these should be dropped as soon as possible on OpenGL.
2020-01-14texture_cache/surface_params: Make GetNumLayers publicReinUsesLisp1-4/+5
2020-01-13GUI: add few missing hotkeys to main menuBartosz Kaszubowski2-0/+17
2020-01-12GUI/configure: resize hotkeys column to contentBartosz Kaszubowski1-0/+1
2020-01-11core/kernel: Fix GetTotalPhysicalMemoryUsed.Markus Wick1-2/+2
module._memory was already moved over to a new shared_ptr. So code_memory_size was not increased at all. This lowers the heap space and so saves a bit of memory, usually between 50 to 100 MB. This fixes a regression of c0a01f3adc466d07fc27020048e82cca60988970
2020-01-11vk_compute_pass: Address feedbackRodrigo Locatti1-0/+2
Comment hardcoded SPIR-V modules.
2020-01-10maxwell_to_vk: Implement GL_CLAMP hacking Nvidia's driverReinUsesLisp3-6/+11
Nvidia's driver defaults invalid enumerations to GL_CLAMP. Vulkan doesn't expose GL_CLAMP through its API, but we can hack it on Nvidia's driver using the internal driver defaults.
2020-01-09shader_ir/texture: Simplify AOFFI codeReinUsesLisp1-10/+6
2020-01-09shader_ir/memory: Implement u16 and u8 for STG and LDGReinUsesLisp2-34/+52
Using the same technique we used for u8 on LDG, implement u16. In the case of STG, load memory and insert the value we want to set into it with bitfieldInsert. Then set that value.
2020-01-09hid: Fix analog sticks directional statesCJBok1-12/+12
2020-01-08vk_compute_pass: Add compute passes to emulate missing Vulkan featuresReinUsesLisp3-0/+416
This currently only supports quad arrays and u8 indices. In the future we can remove quad arrays with a table written from the CPU, but this was used to bootstrap the other passes helpers and it was left in the code. The blob code is generated from the "shaders/" directory. Read the instructions there to know how to generate the SPIR-V.
2020-01-08vk_shader_util: Add helper to build SPIR-V shadersReinUsesLisp3-0/+53
2020-01-07vk_pipeline_cache: Initial implementationReinUsesLisp2-1/+460
Given a pipeline key, this cache returns a pipeline abstraction (for graphics or compute).
2020-01-07vk_graphics_pipeline: Initial implementationReinUsesLisp4-0/+395
This abstractio represents the state of the 3D engine at a given draw. Instead of changing individual bits of the pipeline how it's done in APIs like D3D11, OpenGL and NVN; on Vulkan we are forced to put everything together into a single, immutable object. It takes advantage of the few dynamic states Vulkan offers.
2020-01-07vk_compute_pipeline: Initial implementationReinUsesLisp4-0/+219
This abstraction represents a Vulkan compute pipeline.
2020-01-07vk_pipeline_cache: Add file and define descriptor update template fillerReinUsesLisp3-0/+67
This function allows us to share code between compute and graphics pipelines compilation.
2020-01-07fixed_pipeline_state: Add depth clampReinUsesLisp2-10/+18
2020-01-07vk_rasterizer: Add placeholderReinUsesLisp2-0/+14
2020-01-06vk_renderpass_cache: Initial implementationReinUsesLisp3-0/+199
The renderpass cache is used to avoid creating renderpasses on each draw. The hashed structure is not currently optimized.
2020-01-06vk_update_descriptor: Initial implementationReinUsesLisp3-1/+146
The update descriptor is used to store in flat memory a large chunk of staging data used to update descriptor sets through templates. It provides a push interface to easily insert descriptors following the current pipeline. The order used in the descriptor update template has to be implicitly followed. We can catch bugs here using validation layers.
2020-01-06vk_stream_buffer/vk_buffer_cache: Avoid halting and use generic cacheReinUsesLisp4-62/+340
The stream buffer before this commit once it was full (no more bytes to write before looping) waiting for all previous operations to finish. This was a temporary solution and had a noticeable performance penalty in performance (from what a profiler showed). To avoid this mark with fences usages of the stream buffer and once it loops wait for them to be signaled. On average this will never wait. Each fence knows where its usage finishes, resulting in a non-paged stream buffer. On the other side, the buffer cache is reimplemented using the generic buffer cache. It makes use of the staging buffer pool and the new stream buffer.
2020-01-06vk_memory_manager: Misc changesReinUsesLisp2-88/+142
* Allocate memory in discrete exponentially increasing chunks until the 128 MiB threshold. Allocations larger thant that increase linearly by 256 MiB (depending on the required size). This allows to use small allocations for small resources. * Move memory maps to a RAII abstraction. To optimize for debugging tools (like RenderDoc) users will map/unmap on usage. If this ever becomes a noticeable overhead (from my profiling it doesn't) we can transparently move to persistent memory maps without harming the API, getting optimal performance for both gameplay and debugging. * Improve messages on exceptional situations. * Fix typos "requeriments" -> "requirements". * Small style changes.
2020-01-06vk_buffer_cache: Temporarily remove buffer cacheReinUsesLisp2-226/+0
This is intended for a follow up commit to avoid circular dependencies.
2020-01-06yuzu/bootmanager: Remove {glx,wgl}MakeCurrent on SwapBuffersReinUsesLisp1-9/+2
MakeCurrent is a costly (according to Nsight's profiler it takes a tenth of a millisecond to complete), and we don't have a reason to call it because: - Qt no longer signals a warning if it's not called - yuzu no longer supports macOS
2020-01-05service: time: Implement GetStandardLocalSystemClock.bunnei3-1/+9
2020-01-04time: Remove overflow error checking (currently breaks ADO builds).bunnei2-18/+2
2020-01-04service: time: Implement GetClockSnapshotFromSystemClockContext.bunnei3-3/+27
2020-01-04service: time: Implement IsStandardNetworkSystemClockAccuracySufficient.bunnei5-1/+51
2020-01-04system_archive: Add a basic HLE implementation for time zone binary.bunnei4-1/+675
2020-01-04service: time: Rewrite implementation of glue services.bunnei35-444/+2834
2020-01-04Shader_IR: Address FeedbackFernando Sahmkow5-38/+19
2020-01-04core: Initialize several structs that make use of Common::UUID.bunnei5-100/+101
2020-01-04Shader_IR: Implement TXD Array.Fernando Sahmkow1-5/+12
This commit extends the compilation of TXD to support array samplers on TXD.
2020-01-04service: vi: Implement CloseLayer.bunnei5-11/+48
- Needed for Undertale.
2020-01-03Update src/video_core/renderer_vulkan/vk_descriptor_pool.cppRodrigo Locatti1-1/+1
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-01-03const correctionCJBok1-1/+1
2020-01-03clangCJBok1-22/+22
2020-01-03Update configure_input_player.cppCJBok1-23/+23
2020-01-03Added deadzone controls for sdl engine at input settingsCJBok3-24/+129
2020-01-03yuzu: Remove Maxwell debuggerReinUsesLisp14-640/+0
This was carried from Citra and wasn't really used on yuzu. It also adds some runtime overhead. This commit removes it from yuzu's codebase.
2020-01-01vk_descriptor_pool: Initial implementationReinUsesLisp3-0/+147
Create a large descriptor pool where we allocate all our descriptors from. It has to be wide enough to support any pipeline, hence its large numbers. If the descritor pool is filled, we allocate more memory at that moment. This way we can take advantage of permissive drivers like Nvidia's that allocate more descriptors than what the spec requires.
2020-01-01core/memory + arm/dynarmic: Use a global offset within our arm page table.Markus Wick2-9/+17
This saves us two x64 instructions per load/store instruction. TODO: Clean up our memory code. We can use this optimization here as well.
2019-12-30Shader_IR: add the ability to amend code in the shader ir.Fernando Sahmkow5-3/+72
This commit introduces a mechanism by which shader IR code can be amended and extended. This useful for track algorithms where certain information can derived from before the track such as indexes to array samplers.
2019-12-30vk_image: Avoid unnecesary equalsRodrigo Locatti1-1/+1
2019-12-30video_core: Block in WaitFence.Markus Wick3-5/+9
This function is called rarely and blocks quite often for a long time. So don't waste power and let the CPU sleep. This might also increase the performance as the other cores might be allowed to clock higher.
2019-12-29vk_staging_buffer_pool: Initialize last epoch to zeroRodrigo Locatti1-1/+1
2019-12-26gl_rasterizer: Allow rendering without fragment shaderReinUsesLisp2-0/+7
Rendering without a fragment shader is usually used in depth-only passes.
2019-12-25vk_staging_buffer_pool: Add a staging pool for temporary operationsReinUsesLisp3-0/+212
The job of this abstraction is to provide staging buffers for temporary operations. Think of image uploads or buffer uploads to device memory. It automatically deletes unused buffers.
2019-12-25vk_image: Add an image object abstractionReinUsesLisp3-0/+192
This object's job is to contain an image and manage its transitions. Since Nvidia hardware doesn't know what a transition is but Vulkan requires them anyway, we have to state track image subresources individually. To avoid the overhead of tracking each subresource in images with many subresources (think of cubemap arrays with several mipmaps), this commit tracks when subresources have diverged. As long as this doesn't happen we can check the state of the first subresource (that will be shared with all subresources) and update accordingly. Image transitions are deferred to the scheduler command buffer.
2019-12-25NvServices: Correct Ioctl Remap.Fernando Sahmkow2-3/+5
This commit corrects a padding value in Ioctl Remap that was actually an offset to the mapping address.
2019-12-24fixed_pipeline_state: Define symetric operator!= and mark as noexceptReinUsesLisp2-40/+92
Marks as noexcept Hash, operator== and operator!= for consistency.
2019-12-23fixed_pipeline_state: Define structure and loadersReinUsesLisp3-0/+528
The intention behind this hasheable structure is to describe the state of fixed function pipeline state that gets compiled to a single graphics pipeline state object. This is all dynamic state in OpenGL but Vulkan wants it in an immutable state, even if hardware can edit it freely. In this commit the structure is defined in an optimized state (it uses booleans, has paddings and many data entries that can be packed to single integers). This is intentional as an initial implementation that is easier to debug, implement and review. It will be optimized in later stages, or it might change if Vulkan gets more dynamic states.
2019-12-23maxwell_3d: Add depth bounds registersReinUsesLisp1-6/+14
2019-12-23maxwell_to_gl: Implement missing primitive topologiesReinUsesLisp1-4/+18
Many of these topologies are exclusively available in OpenGL.
2019-12-22Texture Cache: Improve documentationFernando Sahmkow2-4/+5
2019-12-22Texture Cache: Address FeedbackFernando Sahmkow2-11/+11
2019-12-22Texture Cache: Add HLE methods for building 3D textures within the GPU in certain scenarios.Fernando Sahmkow4-1/+143
This commit adds a series of HLE methods for handling 3D textures in general. This helps games that generate 3D textures on every frame and may reduce loading times for certain games.
2019-12-21gl_shader_cache: Update commentary for shared memoryReinUsesLisp1-9/+6
Remove false commentary. Not dividing by 4 the size of shared memory is not a hack; it describes the number of integers, not bytes. While we are at it sort the generated code to put preprocessor lines on the top.
2019-12-21gl_shader_cache: Remove unused entry in GetPrimitiveDescriptionReinUsesLisp1-11/+9
2019-12-21vk_shader_decompiler: Use Visit instead of reimplementing itReinUsesLisp1-23/+1
ExprCondCode visit implements the generic Visit. Use this instead of that one. As an intended side effect this fixes unwritten memory usages in cases when a negation of a condition code is used.
2019-12-20shader/p2r: Implement P2R PrReinUsesLisp1-1/+15
P2R dumps predicate or condition codes state to a register. This is useful for unit testing.
2019-12-20shader/r2p: Refactor P2R to support P2RReinUsesLisp2-17/+33
2019-12-19vk_resource_manager: Add entry to VKFence to test its usageReinUsesLisp1-0/+8
2019-12-19vk_reosurce_manager: Add assert for releasing fencesReinUsesLisp1-0/+1
Notify the programmer when a request to release a fence is invalid because the fence is already free.
2019-12-19vk_resource_manager: Implement VKFenceWatch move constructorReinUsesLisp2-0/+32
This allows us to put VKFenceWatch inside a std::vector without storing it in heap. On move we have to signal the fences where the new protected resource is, adding some overhead.
2019-12-19vk_device: Add entry to catch device lossesReinUsesLisp3-1/+40
VK_NV_device_diagnostic_checkpoints allows us to push data to a Vulkan queue and then query it even after a device loss. This allows us to push the current pipeline object and see what was the call that killed the device.
2019-12-19vk_shader_decompiler: Fix full decompilationReinUsesLisp1-3/+5
When full decompilation was enabled, labels were not being inserted and instructions were misused. Fix these bugs.
2019-12-19vk_shader_decompiler: Skip NDC correction when it is nativeReinUsesLisp2-1/+2
Avoid changing gl_Position when the NDC used by the game is [0, 1] (Vulkan's native).
2019-12-19vk_shader_decompiler: Normalize output fragment attachmentsReinUsesLisp2-12/+12
Some games write from fragment shaders to an unexistant framebuffer attachment or they don't write to one when it exists in the framebuffer. Fix this by skipping writes or adding zeroes.
2019-12-19vk_device: Add query for RGBA8UintReinUsesLisp1-0/+1
2019-12-19vk_shader_decompiler: Update sirit and implement Texture AOFFIReinUsesLisp1-22/+30
2019-12-18gl_rasterizer: Implement RASTERIZE_ENABLEReinUsesLisp6-4/+28
RASTERIZE_ENABLE is the opposite of GL_RASTERIZER_DISCARD. Implement it naturally using this. NVN games expect rasterize to be enabled by default, reflect that in our initial GPU state.
2019-12-18shader/memory: Implement LDG.U8 and unaligned U8 loadsReinUsesLisp1-6/+32
LDG can load single bytes instead of full integers or packs of integers. These have the advantage of loading bytes that are not aligned to 4 bytes. To emulate these this commit gets the byte being referenced (by doing "address & 3" and then using that to extract the byte from the loaded integer: result = bitfieldExtract(loaded_integer, (address % 4) * 8, 8)
2019-12-18shader/conversion: Implement byte selector in I2FReinUsesLisp1-2/+13
I2F's byte selector is used to choose what bytes to convert to float. e.g. if the input is 0xaabbccdd and the selector is ".B3" it will convert 0xaa. The default (when it's not shown in nvdisasm) is ".B0", in that example the default would convert 0xdd to float.
2019-12-18shader/texture: Properly shrink unused entries in size mismatchesReinUsesLisp1-4/+9
When a image format mismatches we were inserting zeroes to the texture itself. This was not handling cases were the mismatch uses less coordinates than the guest shader code. Address that by resizing the vector.
2019-12-18gl_shader_decompiler: Add missing DeclareImagesReinUsesLisp1-0/+1
2019-12-18shader_bytecode: Fix TLD4S encodingReinUsesLisp1-1/+1
2019-12-17common: SPSCQueue: Notify after incrementing queue size.bunnei1-2/+9
2019-12-16renderer_vulkan/shader: Add helper GLSL shadersReinUsesLisp4-0/+122
These shaders are used to specify code that is not dynamically generated in the Vulkan backend. Instead of packing it inside the build system, it's manually built and copied to the C++ file to avoid adding unnecessary build time dependencies. quad_array should be dropped in the future since it can be emulated with a memory pool generated from the CPU.
2019-12-16shader/texture: Implement TLD4.PTPReinUsesLisp5-56/+120
2019-12-16shader/texture: Enable arrayed TLD4ReinUsesLisp1-1/+0
2019-12-16gl_shader_decompiler: Rename "sepparate" to "separate"ReinUsesLisp1-3/+3
2019-12-16shader/texture: Implement AOFFI for TLD4SReinUsesLisp1-13/+18
2019-12-16shader/texture: Remove unnecesary parenthesisReinUsesLisp1-2/+2
2019-12-13maxwell_to_vk: Improve image format table and add more formatsReinUsesLisp2-89/+127
A1B5G5R5 uses A1R5G5B5. This is flipped with image view swizzles; flushing is still not properly implemented on Vulkan for this particular format.
2019-12-13maxwell_to_vk: Implement more vertex formatsReinUsesLisp1-7/+81
2019-12-13maxwell_to_vk: Implement more primitive topologiesReinUsesLisp2-2/+11
Add an extra argument to query device capabilities in the future. The intention behind this is to use native quads, quad strips, line loops and polygons if these are released for Vulkan.
2019-12-13maxwell_to_vk: Approach GL_CLAMP closer to the GL specReinUsesLisp3-9/+17
The OpenGL spec defines GL_CLAMP's formula similarly to CLAMP_TO_EDGE and CLAMP_TO_BORDER depending on the filter mode used. It doesn't exactly behave like this, but it's the closest we can get with what Vulkan offers without emulating it by injecting shader code.
2019-12-13maxwell_to_vk: Use VK_EXT_index_type_uint8 when availableReinUsesLisp2-4/+7
2019-12-13vk_scheduler: Delegate commands to a worker thread and state trackReinUsesLisp2-37/+311
Introduce a worker thread approach for delegating Vulkan work derived from dxvk's approach. https://github.com/doitsujin/dxvk Now that the scheduler is what handles all Vulkan work related to command streaming, store state tracking in itself. This way we can know when to reupload Vulkan dynamic state to the queue (since this one is invalidated between command buffers unlike NVN). We can also store the renderpass state and graphics pipeline bound to avoid redundant binds and renderpass begins/ends.
2019-12-12Shader_IR: Correct TLD4S Depth Compare.Fernando Sahmkow2-9/+16
2019-12-12Shader_Ir: Correct TLD4S encoding and implement f16 flag.Fernando Sahmkow3-11/+15
2019-12-12Gl_Shader_compiler: Correct Depth Compare for Texture Gather operations.Fernando Sahmkow1-8/+21
2019-12-12Shader_Ir: default failed tracks on bindless samplers to null values.Fernando Sahmkow2-24/+77
2019-12-11Gl_Rasterizer: Skip Tesselation Control and Eval stages as they are un implemented.Fernando Sahmkow1-0/+8
This commit ensures the OGL backend does not execute tesselation shader stages as they are currently unimplemented.
2019-12-11Added missing includeJoel Holdsworth1-0/+1
2019-12-11Kernel: Correct behavior of Address Arbiter threads. (#3165)Fernando Sahmkow3-24/+67
* Kernel: Correct behavior of Address Arbiter threads. This corrects arbitration threads to behave just like in Horizon OS. They are added into a container and released according to what priority they had when added. Horizon OS does not reorder them if their priority changes. * Kernel: Address Feedback.
2019-12-11kernel/svc: Correct function signature of SignalProcessWideKeyLioncash2-9/+6
This function doesn't actually return a result code, so we can amend the signature of it to match.
2019-12-11gl_device: Enable compute shaders for Intel Mesa driversReinUsesLisp1-1/+4
Previously we naively checked for "Intel" in GL_VENDOR, but this includes both Intel's proprietary driver and the mesa driver. Re-enable compute shaders for mesa.
2019-12-11gl_shader_cache: Add missing new-line on emitted GLSLReinUsesLisp1-2/+2
Add missing new-line. This caused shaders using local memory and shared memory to inject a preprocessor GLSL line after an expression (resulting in invalid code). It looked like this: shared uint smem[8];#define LOCAL_MEMORY_SIZE 16 It should look like this (addressed by this commit): shared uint smem[8]; \#define LOCAL_MEMORY_SIZE 16
2019-12-11Maxwell3D: Implement Depth Mode.Fernando Sahmkow4-8/+15
This commit finishes adding depth mode that was reverted before due to other unresolved issues.
2019-12-10shader: Implement MEMBAR.GLReinUsesLisp5-1/+46
Implement using memoryBarrier in GLSL and OpMemoryBarrier on SPIR-V.
2019-12-10vk_shader_decompiler: Fix build issues on old gcc versionsReinUsesLisp1-2/+3
2019-12-10vk_shader_decompiler: Reduce YNegate's severityReinUsesLisp1-1/+1
2019-12-10shader_ir/other: Implement S2R InvocationIdReinUsesLisp4-0/+9
2019-12-10vk_shader_decompiler: Misc changesReinUsesLisp2-697/+1648
Update Sirit and its usage in vk_shader_decompiler. Highlights: - Implement tessellation shaders - Implement geometry shaders - Implement some missing features - Use native half float instructions when available.
2019-12-10shader: Keep track of shaders using warp instructionsReinUsesLisp2-0/+8
2019-12-10shader_ir/memory: Implement patch storesReinUsesLisp4-20/+38
2019-12-09vk_device: Misc changesReinUsesLisp2-117/+276
- Setup more features and requirements. - Improve logging for missing features. - Collect telemetry parameters. - Add queries for more image formats. - Query push constants limits. - Optionally enable some extensions.
2019-12-09externals: Update Vulkan-HeadersReinUsesLisp2-2/+14
2019-12-08kernel: Remove unnecessary includesLioncash15-11/+17
Over the course of the changes to the kernel code, a few includes are no longer necessary, particularly with the change over to std::shared_ptr from Boost's intrusive_ptr.
2019-12-08kernel/svc: Provide implementations for svcDumpInfo/svcDumpInfoNewLioncash2-2/+24
These are fairly trivial to implement, we can just do nothing. This also provides a spot for us to potentially dump out any relevant info in the future (e.g. for debugging purposes with homebrew, etc). While we're at it, we can also correct the names of both of these supervisor calls.