2022-05-15 07:30:15 -04:00
|
|
|
|
using ARMeilleure.Translation;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
using Avalonia;
|
2023-01-08 12:46:25 -05:00
|
|
|
|
using Avalonia.Controls;
|
|
|
|
|
using Avalonia.Controls.ApplicationLifetimes;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using Avalonia.Input;
|
|
|
|
|
using Avalonia.Threading;
|
|
|
|
|
using LibHac.Tools.FsSystem;
|
|
|
|
|
using Ryujinx.Audio.Backends.Dummy;
|
|
|
|
|
using Ryujinx.Audio.Backends.OpenAL;
|
|
|
|
|
using Ryujinx.Audio.Backends.SDL2;
|
|
|
|
|
using Ryujinx.Audio.Backends.SoundIo;
|
|
|
|
|
using Ryujinx.Audio.Integration;
|
|
|
|
|
using Ryujinx.Ava.Common;
|
|
|
|
|
using Ryujinx.Ava.Common.Locale;
|
|
|
|
|
using Ryujinx.Ava.Input;
|
2022-12-29 09:24:05 -05:00
|
|
|
|
using Ryujinx.Ava.UI.Helpers;
|
|
|
|
|
using Ryujinx.Ava.UI.Models;
|
2023-01-15 19:14:01 -05:00
|
|
|
|
using Ryujinx.Ava.UI.Renderer;
|
2023-01-08 12:46:25 -05:00
|
|
|
|
using Ryujinx.Ava.UI.ViewModels;
|
2022-12-29 09:24:05 -05:00
|
|
|
|
using Ryujinx.Ava.UI.Windows;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using Ryujinx.Common;
|
|
|
|
|
using Ryujinx.Common.Configuration;
|
Add ldn:u implementation, INetworkClient interface and DisabledLdnClient (#5652)
* Impl first attempt to LDN
* Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Mac addresses are now randomly assigned on the server. (fixes joining lobbies)
- Fixed the "connected" handler for stations to actually find a
- Added info retrieval when connected to a station.
- Users that disconnect are now removed from rooms they were in. (still need to broadcast tho)
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
* We may just be "initialized". Ignore this for now.
* Lots of WIP
* Add Disconnect packet
* Improve signalling of internal events.
* Fix scan.
* Fix some more stupid things.
* Enable NoDelay on all sockets.
* Add station accept policy, disconnect function.
* Limit max number of games.
* Split out networking stuff from HLE, so it can be swapped.
* Update logging calls.
* Missed a spot.
* Call SignalDisconnect instead of SetState
* Add comment to GetNetworkInfo
* Update configuration + UI
Now has its own tab, more options.
* Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
* some cleanup
* More fix
* Correctly handle errors when connecting.
* Disable *Private call and clean symbols
* Structs cleanup
* Big cleanup
* Fix InvalidHandle (in MK8D and other games)
* Add Reject and Private Network support (v1)
RyuLdn Version bumped to 1.
* Add Initialize Packet
Allows users to keep Mac Addresses assigned by the server.
* Add SetWirelessControllerRestriction and some cleanup
* LDN-2 Initial Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
* Misc Changes
* Fix GetNetworkInfo
* Fix some small issues
* Implement GetNetworkInfoLatestUpdate
* Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
* Fix ARMS Scan (and other games using wrong LocalCommunicationId
* Fix latest update when host leaves
* Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
* Fix the localCommunicationId = -1
* Don't set Connect flag for nodes already in the room before joining.
* Make IUserLocalCommunicationService disposable
* Don't dispose if there's no client.
* LDN-2-2 Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Put sockets behind an interface, so that they can be swapped for something proxyable
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
Misc Changes
Fix GetNetworkInfo
Fix some small issues
Disable LAN by default til the config is added.
Fix Splatoon 2
- Stub nfp IUser::StartDetection / IUser::StopDetection.
- Stub ntc IEnsureNetworkClockAvailabilityService and needed calls.
Cleanup previous fixes
Stub IAudioInManager/IAudioIn for Splatoon 2 LAN
Add LAN settings to multiplayer tab
LAN Play > LAN Mode
Implement GetNetworkInfoLatestUpdate
Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
Fix ARMS Scan (and other games using wrong LocalCommunicationId
Fix latest update when host leaves
Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
Fix the localCommunicationId = -1
Don't set Connect flag for nodes already in the room before joining.
Make IUserLocalCommunicationService disposable
Fix crash when using LAN mode on linux.
Actually use that call
Don't dispose if there's no client.
Fix the settings window crash
Fix configurationFileUpdated
* Make LDN compatible with Ryujinx/Ryujinx#3805
* Ava: Add Ldn options to SettingsNetworkTab
* Ava: Add update events for multiplayer options
* Apply formatting
* Remove LdnHelper
* ldn: Fix hardcoded /24 subnet mask
* Fix naming rule violations
* Add missing summary doc tag
* Remove NetCoreServer dependency
* Address code style issues and typos
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Call CloseStation/CloseAccessPoint to reduce code duplication
* Fix typo
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Fix missing trailing commas
* Extract AddressList from AddressEntry
* Use AcceptPolicy as a type for LdnNetworkInfo.StationAcceptPolicy
* Add Flags attribute to ScanFilterFlag
* Rename struct members for LdnNetworkInfo
* Remove extra line
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Extract NetworkErrorMessage from NetworkError
* Fix missing trailing commas
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2023-09-25 17:50:43 -04:00
|
|
|
|
using Ryujinx.Common.Configuration.Multiplayer;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using Ryujinx.Common.Logging;
|
2022-12-15 12:07:31 -05:00
|
|
|
|
using Ryujinx.Common.SystemInterop;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using Ryujinx.Graphics.GAL;
|
|
|
|
|
using Ryujinx.Graphics.GAL.Multithreading;
|
|
|
|
|
using Ryujinx.Graphics.Gpu;
|
|
|
|
|
using Ryujinx.Graphics.OpenGL;
|
Vulkan backend (#2518)
* WIP Vulkan implementation
* No need to initialize attributes on the SPIR-V backend anymore
* Allow multithreading shaderc and vkCreateShaderModule
You'll only really see the benefit here with threaded-gal or parallel shader cache compile.
Fix shaderc multithreaded changes
Thread safety for shaderc Options constructor
Dunno how they managed to make a constructor not thread safe, but you do you. May avoid some freezes.
* Support multiple levels/layers for blit.
Fixes MK8D when scaled, maybe a few other games. AMD software "safe" blit not supported right now.
* TextureStorage should hold a ref of the foreign storage, otherwise it might be freed while in use
* New depth-stencil blit method for AMD
* Workaround for AMD driver bug
* Fix some tessellation related issues (still doesn't work?)
* Submit command buffer before Texture GetData. (UE4 fix)
* DrawTexture support
* Fix BGRA on OpenGL backend
* Fix rebase build break
* Support format aliasing on SetImage
* Fix uniform buffers being lost when bindings are out of order
* Fix storage buffers being lost when bindings are out of order
(also avoid allocations when changing bindings)
* Use current command buffer for unscaled copy (perf)
Avoids flushing commands and renting a command buffer when fulfilling copy dependencies and when games do unscaled copies.
* Update to .net6
* Update Silk.NET to version 2.10.1
Somehow, massive performance boost. Seems like their vtable for looking up vulkan methods was really slow before.
* Fix PrimitivesGenerated query, disable Transform Feedback queries for now
Lets Splatoon 2 work on nvidia. (mostly)
* Update counter queue to be similar to the OGL one
Fixes softlocks when games had to flush counters.
* Don't throw when ending conditional rendering for now
This should be re-enabled when conditional rendering is enabled on nvidia etc.
* Update findMSB/findLSB to match master's instruction enum
* Fix triangle overlay on SMO, Captain Toad, maybe others?
* Don't make Intel Mesa pay for Intel Windows bugs
* Fix samplers with MinFilter Linear or Nearest (fixes New Super Mario Bros U Deluxe black borders)
* Update Spv.Generator
* Add alpha test emulation on shader (but no shader specialisation yet...)
* Fix R4G4B4A4Unorm texture format permutation
* Validation layers should be enabled for any log level other than None
* Add barriers around vkCmdCopyImage
Write->Read barrier for src image (we want to wait for a write to read it)
Write->Read barrier for dst image (we want to wait for the copy to complete before use)
* Be a bit more careful with texture access flags, since it can be used for anything
* Device local mapping for all buffers
May avoid issues with drivers with NVIDIA on linux/older gpus on windows when using large buffers (?)
Also some performance things and fixes issues with opengl games loading textures weird.
* Cleanup, disable device local buffers for now.
* Add single queue support
Multiqueue seems to be a bit more responsive on NVIDIA. Should fix texture flush on intel. AMD has been forced to single queue for an experiment.
* Fix some validation errors around extended dynamic state
* Remove Intel bug workaround, it was fixed on the latest driver
* Use circular queue for checking consumption on command buffers
Speeds up games that spam command buffers a little. Avoids checking multiple command buffers if multiple are active at once.
* Use SupportBufferUpdater, add single layer flush
* Fix counter queue leak when game decides to use host conditional rendering
* Force device local storage for textures (fixes linux performance)
* Port #3019
* Insert barriers around vkCmdBlitImage (may fix some amd flicker)
* Fix transform feedback on Intel, gl_Position feedback and clears to inexistent depth buffers
* Don't pause transform feedback for multi draw
* Fix draw outside of render pass and missing capability
* Workaround for wrong last attribute on AMD (affects FFVII, STRIKERS1945, probably more)
* Better workaround for AMD vertex buffer size alignment issue
* More instructions + fixes on SPIR-V backend
* Allow custom aspect ratio on Vulkan
* Correct GTK UI status bar positions
* SPIR-V: Functions must always end with a return
* SPIR-V: Fix ImageQuerySizeLod
* SPIR-V: Set DepthReplacing execution mode when FragDepth is modified
* SPIR-V: Implement LoopContinue IR instruction
* SPIR-V: Geometry shader support
* SPIR-V: Use correct binding number on storage buffers array
* Reduce allocations for Spir-v serialization
Passes BinaryWriter instead of the stream to Write and WriteOperand
- Removes creation of BinaryWriter for each instruction
- Removes allocations for literal string
* Some optimizations to Spv.Generator
- Dictionary for lookups of type declarations, constants, extinst
- LiteralInteger internal data format -> ushort
- Deterministic HashCode implementation to avoid spirv result not being the same between runs
- Inline operand list instead of List<T>, falls back to array if many operands. (large performance boost)
TODO: improve instruction allocation, structured program creator, ssa?
* Pool Spv.Generator resources, cache delegates, spv opts
- Pools for Instructions and LiteralIntegers. Can be passed in when creating the generator module.
- NewInstruction is called instead of new Instruction()
- Ryujinx SpirvGenerator passes in some pools that are static. The idea is for these to be shared between threads eventually.
- Estimate code size when creating the output MemoryStream
- LiteralInteger pools using ThreadStatic pools that are initialized before and after creation... not sure of a better way since the way these are created is via implicit cast.
Also, cache delegates for Spv.Generator for functions that are passed around to GenerateBinary etc, since passing the function raw creates a delegate on each call.
TODO: update python spv cs generator to make the coregrammar with NewInstruction and the `params` overloads.
* LocalDefMap for Ssa Rewriter
Rather than allocating a large array of all registers for each block in the shader, allocate one array of all registers and clear it between blocks. Reduces allocations in the shader translator.
* SPIR-V: Transform feedback support
* SPIR-V: Fragment shader interlock support (and image coherency)
* SPIR-V: Add early fragment tests support
* SPIR-V: Implement SwizzleAdd, add missing Triangles ExecutionMode for geometry shaders, remove SamplerType field from TextureMeta
* Don't pass depth clip state right now (fix decals)
Explicitly disabling it is incorrect. OpenGL currently automatically disables based on depth clamp, which is the behaviour if this state is omitted.
* Multisampling support
* Multisampling: Use resolve if src samples count > dst samples count
* Multisampling: We can only resolve for unscaled copies
* SPIR-V: Only add FSI exec mode if used.
* SPIR-V: Use ConstantComposite for Texture Offset Vector
Fixes a bunch of freezes with SPIR-V on AMD hardware, and validation errors. Note: Obviously assumes input offsets are constant, which they currently are.
* SPIR-V: Don't OpReturn if we already OpExit'ed
Fixes spir-v parse failure and stack smashing in RADV (obviously you still need bolist)
* SPIR-V: Only use input attribute type for input attributes
Output vertex attributes should always be of type float.
* Multithreaded Pipeline Compilation
* Address some feedback
* Make this 32
* Update topology with GpuAccessorState
* Cleanup for merge (note: disables spir-v)
* Make more robust to shader compilation failure
- Don't freeze when GLSL compilation fails
- Background SPIR-V pipeline compile failure results in skipped draws, similar to GLSL compilation failure.
* Fix Multisampling
* Only update fragment scale count if a vertex texture needs a scale.
Fixes a performance regression introduced by texture scaling in the vertex stage where support buffer updates would be very frequent, even at 1x, if any textures were used on the vertex stage.
This check doesn't exactly look cheap (a flag in the shader stage would probably be preferred), but it is much cheaper than uploading scales in both vulkan and opengl, so it will do for now.
* Use a bitmap to do granular tracking for buffer uploads.
This path is only taken if the much faster check of "is the buffer rented at all" is triggered, so it doesn't actually end up costing too much, and the time saved by not ending render passes (and on gpu for not waiting on barriers) is probably helpful.
Avoids ending render passes to update buffer data (not all the time)
- 140-180 to 35-45 in SMO metro kingdom (these updates are in the UI)
- Very variable 60-150(!) to 16-25 in mario kart 8 (these updates are in the UI)
As well as allowing more data to be preloaded persistently, this will also allow more data to be loaded in the preload buffer, which should be faster as it doesn't need to insert barriers between draws. (and on tbdr, does not need to flush and reload tile memory)
Improves performance in GPU limited scenarios. Should notably improve performance on TBDR gpus. Still a lot more to do here.
* Copy query results after RP ends, rather than ending to copy
We need to end the render pass to get the data (submit command buffer) anyways...
Reduces render passes created in games that use queries.
* Rework Query stuff a bit to avoid render pass end
Tries to reset returned queries in background when possible, rather than ending the render pass.
Still ends render pass when resetting a counter after draws, but maybe that can be solved too. (by just pulling an empty object off the pool?)
* Remove unnecessary lines
Was for testing
* Fix validation error for query reset
Need to think of a better way to do this.
* SPIR-V: Fix SwizzleAdd and some validation errors
* SPIR-V: Implement attribute indexing and StoreAttribute
* SPIR-V: Fix TextureSize for MS and Buffer sampler types
* Fix relaunch issues
* SPIR-V: Implement LogicalExclusiveOr
* SPIR-V: Constant buffer indexing support
* Ignore unsupported attributes rather than throwing (matches current GLSL behaviour)
* SPIR-V: Implement tessellation support
* SPIR-V: Geometry shader passthrough support
* SPIR-V: Implement StoreShader8/16 and StoreStorage8/16
* SPIR-V: Resolution scale support and fix TextureSample multisample with LOD bug
* SPIR-V: Fix field index for scale count
* SPIR-V: Fix another case of wrong field index
* SPIRV/GLSL: More scaling related fixes
* SPIR-V: Fix ImageLoad CompositeExtract component type
* SPIR-V: Workaround for Intel FrontFacing bug
* Enable SPIR-V backend by default
* Allow null samplers (samplers are not required when only using texelFetch to access the texture)
* Fix some validation errors related to texel block view usage flag and invalid image barrier base level
* Use explicit subgroup size if we can (might fix some block flickering on AMD)
* Take componentMask and scissor into account when clearing framebuffer attachments
* Add missing barriers around CmdFillBuffer (fixes Monster Hunter Rise flickering on NVIDIA)
* Use ClampToEdge for Clamp sampler address mode on Vulkan (fixes Hollow Knight)
Clamp is unsupported on Vulkan, but ClampToEdge behaves almost the same. ClampToBorder on the other hand (which was being used before) is pretty different
* Shader specialization for new Vulkan required state (fixes remaining alpha test issues, vertex stretching on AMD on Crash Bandicoot, etc)
* Check if the subgroup size is supported before passing a explicit size
* Only enable ShaderFloat64 if the GPU supports it
* We don't need to recompile shaders if alpha test state changed but alpha test is disabled
* Enable shader cache on Vulkan and implement MultiplyHighS32/U32 on SPIR-V (missed those before)
* Fix pipeline state saving before it is updated.
This should fix a few warnings and potential stutters due to bad pipeline states being saved in the cache. You may need to clear your guest cache.
* Allow null samplers on OpenGL backend
* _unit0Sampler should be set only for binding 0
* Remove unused PipelineConverter format variable (was causing IOR)
* Raise textures limit to 64 on Vulkan
* No need to pack the shader binaries if shader cache is disabled
* Fix backbuffer not being cleared and scissor not being re-enabled on OpenGL
* Do not clear unbound framebuffer color attachments
* Geometry shader passthrough emulation
* Consolidate UpdateDepthMode and GetDepthMode implementation
* Fix A1B5G5R5 texture format and support R4G4 on Vulkan
* Add barrier before use of some modified images
* Report 32 bit query result on AMD windows (smo issue)
* Add texture recompression support (disabled for now)
It recompresses ASTC textures into BC7, which might reduce VRAM usage significantly on games that uses ASTC textures
* Do not report R4G4 format as supported on Vulkan
It was causing mario head to become white on Super Mario 64 (???)
* Improvements to -1 to 1 depth mode.
- Transformation is only applied on the last stage in the vertex pipeline.
- Should fix some issues with geometry and tessellation (hopefully)
- Reading back FragCoord Z on fragment will transform back to -1 to 1.
* Geometry Shader index count from ThreadsPerInputPrimitive
Generally fixes SPIR-V emitting too many triangles, may change games in OpenGL
* Remove gl_FragDepth scaling
This is always 0-1; the other two issues were causing the problems. Fixes regression with Xenoblade.
* Add Gl StencilOp enum values to Vulkan
* Update guest cache to v1.1 (due to specialization state changes)
This will explode your shader cache from earlier vulkan build, but it must be done. :pensive:
* Vulkan/SPIR-V support for viewport inverse
* Fix typo
* Don't create query pools for unsupported query types
* Return of the Vector Indexing Bug
One day, everyone will get this right.
* Check for transform feedback query support
Sometimes transform feedback is supported without the query type.
* Fix gl_FragCoord.z transformation
FragCoord.z is always in 0-1, even when the real depth range is -1 to 1. Turns out the only bug was geo and tess stage outputs.
Fixes Pokemon Sword/Shield, possibly others.
* Fix Avalonia Rebase
Vulkan is currently not available on Avalonia, but the build does work and you can use opengl.
* Fix headless build
* Add support for BC6 and BC7 decompression, decompress all BC formats if they are not supported by the host
* Fix BCn 4/5 conversion, GetTextureTarget
BCn 4/5 could generate invalid data when a line's size in bytes was not divisible by 4, which both backends expect.
GetTextureTarget was not creating a view with the replacement format.
* Fix dependency
* Fix inverse viewport transform vector type on SPIR-V
* Do not require null descriptors support
* If MultiViewport is not supported, do not try to set more than one viewport/scissor
* Bounds check on bitmap add.
* Flush queries on attachment change rather than program change
Occlusion queries are usually used in a depth only pass so the attachments changing is a better indication of the query block ending.
Write mask changes are also considered since some games do depth only pass by setting 0 write mask on all the colour targets.
* Add support for avalonia (#6)
* add avalonia support
* only lock around skia flush
* addressed review
* cleanup
* add fallback size if avalonia attempts to render but the window size is 0. read desktop scale after enabling dpi check
* fix getting window handle on linux. skip render is size is 0
* Combine non-buffer with buffer image descriptor sets
* Support multisample texture copy with automatic resolve on Vulkan
* Remove old CompileShader methods from the Vulkan backend
* Add minimal pipeline layouts that only contains used bindings
They are used by helper shaders, the intention is avoiding needing to recompile the shaders (from GLSL to SPIR-V) if the bindings changes on the translated guest shaders
* Pre-compile helper shader as SPIR-V, and some fixes
* Remove pre-compiled shaderc binary for Windows as its no longer needed by default
* Workaround RADV crash
Enabling the descriptor indexing extension, even if it is not used, forces the radv driver to use "bolist".
* Use RobustBufferAccess on NVIDIA gpus
Avoids the SMO waterfall triangle on older NVIDIA gpus.
* Implement GPU selector and expose texture recompression on the UI and config
* Fix and enable background compute shader compilation
Also disables warnings from shader cache pipeline misses.
* Fix error due to missing subpass dependency when Attachment Write -> Shader Read barriers are added
* If S8D24 is not supported, use D32FS8
* Ensure all fences are destroyed on dispose
* Pre-allocate arrays up front on DescriptorSetUpdater, allows the removal of some checks
* Add missing clear layer parameter after rebase
* Use selected gpu from config for avalonia (#7)
* use configured device
* address review
* Fix D32S8 copy workaround (AMD)
Fixes water in Pokemon Legends Arceus on AMD GPUs. Possibly fixes other things.
* Use push descriptors for uniform buffer updates (disabled for now)
* Push descriptor support check, buffer redundancy checks
Should make push descriptors faster, needs more testing though.
* Increase light command buffer pool to 2 command buffers, throw rather than returning invalid cbs
* Adjust bindings array sizes
* Force submit command buffers if memory in use by its resources is high
* Add workaround for AMD GCN cubemap view sins
`ImageCreateCubeCompatibleBit` seems to generally break 2D array textures with mipmaps... even if they are eventually aliased as a cubemap with mipmaps. Forcing a copy here works around the issue.
This could be used in future if enabling this bit reduces performance on certain GPUs. (mobile class is generally a worry)
Currently also enabled on Linux as I don't know if they managed to dodge this bug (someone please tell me). Not enabled on Vega at the moment, but easy to add if the issue is there.
* Add mobile, non-RX variants to the GCN regex.
Also make sure that the 3 digit ones only include numbers starting with 7 or 8.
* Increase image limit per stage from 8 to 16
Xenoblade Chronicles 2 was hiting the limit of 8
* Minor code cleanup
* Fix NRE caused by SupportBufferUpdater calling pipeline ClearBuffer
* Add gpu selector to Avalonia (#8)
* Add gpu selector to avalonia settings
* show backend label on window
* some fixes
* address review
* Minor changes to the Avalonia UI
* Update graphics window UI and locales. (#9)
* Update xaml and update locales
* locale updates
Did my best here but likely needs to be checked by native speakers, especially the use of ampersands in greek, russian and turkish?
* Fix locales with more (?) correct translations.
* add separator to render widget
* fix spanish and portuguese
* Add new IdList, replaces buffer list that could not remove elements and had unbounded growth
* Don't crash the settings window if Vulkan is not supported
* Fix Actions menu not being clickable on GTK UI after relaunch
* Rename VulkanGraphicsDevice to VulkanRenderer and Renderer to OpenGLRenderer
* Fix IdList and make it not thread safe
* Revert useless OpenGL format table changes
* Fix headless project build
* List throws ArgumentOutOfRangeException
* SPIR-V: Fix tessellation
* Increase shader cache version due to tessellation fix
* Reduce number of Sync objects created (improves perf in some specific titles)
* Fix vulkan validation errors for NPOT compressed upload and GCN workaround.
* Add timestamp to the shader cache and force rebuild if host cache is outdated
* Prefer Mail box present mode for popups (#11)
* Prefer Mail box present mode
* fix debug
* switch present mode when vsync is toggled
* only disable vsync on the main window
* SPIR-V: Fix geometry shader input load with transform feedback
* BC7 Encoder: Prefer more precision on alpha rather than RGB when alpha is 0
* Fix Avalonia build
* Address initial PR feedback
* Only set transform feedback outputs on last vertex stage
* Address riperiperi PR feedback
* Remove outdated comment
* Remove unused constructor
* Only throw for negative results
* Throw for QueueSubmit and other errors
No point in delaying the inevitable
* Transform feedback decorations inside gl_PerVertex struct breaks the NVIDIA compiler
* Fix some resolution scale issues
* No need for two UpdateScale calls
* Fix comments on SPIR-V generator project
* Try to fix shader local memory size
On DOOM, a shader is using local memory, but both Low and High size are 0, CRS size is 1536, it seems to store on that region?
* Remove RectangleF that is now unused
* Fix ImageGather with multiple offsets
Needs ImageGatherExtended capability, and must use `ConstantComposite` instead of `CompositeConstruct`
* Address PR feedback from jD in all projects except Avalonia
* Address most of jD PR feedback on Avalonia
* Remove unsafe
* Fix VulkanSkiaGpu
* move present mode request out of Create Swapchain method
* split more parts of create swapchain
* addressed reviews
* addressed review
* Address second batch of jD PR feedback
* Fix buffer <-> image copy row length and height alignment
AlignUp helper does not support NPOT alignment, and ASTC textures can have NPOT block sizes
* Better fix for NPOT alignment issue
* Use switch expressions on Vulkan EnumConversion
Thanks jD
* Fix Avalonia build
* Add Vulkan selection prompt on startup
* Grammar fixes on Vulkan prompt message
* Add missing Vulkan migration flag
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: MutantAura <44103205+MutantAura@users.noreply.github.com>
2022-07-31 17:26:06 -04:00
|
|
|
|
using Ryujinx.Graphics.Vulkan;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
using Ryujinx.HLE;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using Ryujinx.HLE.FileSystem;
|
|
|
|
|
using Ryujinx.HLE.HOS;
|
|
|
|
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
|
|
|
|
using Ryujinx.HLE.HOS.SystemState;
|
|
|
|
|
using Ryujinx.Input;
|
|
|
|
|
using Ryujinx.Input.HLE;
|
2023-06-28 20:39:22 -04:00
|
|
|
|
using Ryujinx.Ui.App.Common;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using Ryujinx.Ui.Common;
|
|
|
|
|
using Ryujinx.Ui.Common.Configuration;
|
|
|
|
|
using Ryujinx.Ui.Common.Helper;
|
2023-05-08 07:05:37 -04:00
|
|
|
|
using Silk.NET.Vulkan;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using SixLabors.ImageSharp;
|
|
|
|
|
using SixLabors.ImageSharp.Formats.Png;
|
|
|
|
|
using SixLabors.ImageSharp.PixelFormats;
|
|
|
|
|
using SixLabors.ImageSharp.Processing;
|
2022-09-19 14:05:26 -04:00
|
|
|
|
using SPB.Graphics.Vulkan;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using System;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
using System.Collections.Generic;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2023-01-14 19:05:44 -05:00
|
|
|
|
using static Ryujinx.Ava.UI.Helpers.Win32NativeInterop;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
using AntiAliasing = Ryujinx.Common.Configuration.AntiAliasing;
|
2023-01-08 12:46:25 -05:00
|
|
|
|
using Image = SixLabors.ImageSharp.Image;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using InputManager = Ryujinx.Input.HLE.InputManager;
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
using IRenderer = Ryujinx.Graphics.GAL.IRenderer;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using Key = Ryujinx.Input.Key;
|
|
|
|
|
using MouseButton = Ryujinx.Input.MouseButton;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
using ScalingFilter = Ryujinx.Common.Configuration.ScalingFilter;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
using Size = Avalonia.Size;
|
|
|
|
|
using Switch = Ryujinx.HLE.Switch;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.Ava
|
|
|
|
|
{
|
2022-07-05 14:06:31 -04:00
|
|
|
|
internal class AppHost
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private const int CursorHideIdleTime = 5; // Hide Cursor seconds.
|
2022-07-24 14:44:47 -04:00
|
|
|
|
private const float MaxResolutionScale = 4.0f; // Max resolution hotkeys can scale to before wrapping.
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private const int TargetFps = 60;
|
|
|
|
|
private const float VolumeDelta = 0.05f;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private static readonly Cursor _invisibleCursor = new(StandardCursorType.None);
|
|
|
|
|
private readonly IntPtr _invisibleCursorWin;
|
|
|
|
|
private readonly IntPtr _defaultCursorWin;
|
2022-10-02 05:38:37 -04:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private readonly long _ticksPerFrame;
|
2022-09-19 14:05:26 -04:00
|
|
|
|
private readonly Stopwatch _chrono;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private long _ticks;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private readonly AccountManager _accountManager;
|
2022-06-23 14:59:02 -04:00
|
|
|
|
private readonly UserChannelPersistence _userChannelPersistence;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private readonly InputManager _inputManager;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
private readonly MainWindowViewModel _viewModel;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private readonly IKeyboard _keyboardInterface;
|
|
|
|
|
private readonly TopLevel _topLevel;
|
|
|
|
|
public RendererHost RendererHost;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
private readonly GraphicsDebugLevel _glLogLevel;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private float _newVolume;
|
|
|
|
|
private KeyboardHotkeyState _prevHotkeyState;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
private long _lastCursorMoveTime;
|
2023-05-14 10:34:31 -04:00
|
|
|
|
private bool _isCursorInRenderer = true;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
private bool _isStopped;
|
|
|
|
|
private bool _isActive;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
private bool _renderingStarted;
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private readonly ManualResetEvent _gpuDoneEvent;
|
2023-05-31 17:43:20 -04:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private IRenderer _renderer;
|
|
|
|
|
private readonly Thread _renderingThread;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
private readonly CancellationTokenSource _gpuCancellationTokenSource;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
private WindowsMultimediaTimerResolution _windowsMultimediaTimerResolution;
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private bool _dialogShown;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
private readonly bool _isFirmwareTitle;
|
|
|
|
|
|
|
|
|
|
private readonly object _lockObject = new();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
public event EventHandler AppExit;
|
|
|
|
|
public event EventHandler<StatusUpdatedEventArgs> StatusUpdatedEvent;
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
public VirtualFileSystem VirtualFileSystem { get; }
|
|
|
|
|
public ContentManager ContentManager { get; }
|
|
|
|
|
public NpadManager NpadManager { get; }
|
2022-05-15 07:30:15 -04:00
|
|
|
|
public TouchScreenManager TouchScreenManager { get; }
|
2023-07-07 17:03:27 -04:00
|
|
|
|
public Switch Device { get; set; }
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
public int Width { get; private set; }
|
|
|
|
|
public int Height { get; private set; }
|
|
|
|
|
public string ApplicationPath { get; private set; }
|
|
|
|
|
public bool ScreenshotRequested { get; set; }
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
public AppHost(
|
2023-07-07 17:03:27 -04:00
|
|
|
|
RendererHost renderer,
|
|
|
|
|
InputManager inputManager,
|
|
|
|
|
string applicationPath,
|
|
|
|
|
VirtualFileSystem virtualFileSystem,
|
|
|
|
|
ContentManager contentManager,
|
|
|
|
|
AccountManager accountManager,
|
2022-05-15 07:30:15 -04:00
|
|
|
|
UserChannelPersistence userChannelPersistence,
|
2023-07-07 17:03:27 -04:00
|
|
|
|
MainWindowViewModel viewmodel,
|
|
|
|
|
TopLevel topLevel)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
_viewModel = viewmodel;
|
|
|
|
|
_inputManager = inputManager;
|
|
|
|
|
_accountManager = accountManager;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
_userChannelPersistence = userChannelPersistence;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
_renderingThread = new Thread(RenderLoop) { Name = "GUI.RenderThread" };
|
|
|
|
|
_lastCursorMoveTime = Stopwatch.GetTimestamp();
|
|
|
|
|
_glLogLevel = ConfigurationState.Instance.Logger.GraphicsDebugLevel;
|
|
|
|
|
_topLevel = topLevel;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_inputManager.SetMouseDriver(new AvaloniaMouseDriver(_topLevel, renderer));
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
_keyboardInterface = (IKeyboard)_inputManager.KeyboardDriver.GetGamepad("0");
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
NpadManager = _inputManager.CreateNpadManager();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
TouchScreenManager = _inputManager.CreateTouchScreenManager();
|
2023-07-07 17:03:27 -04:00
|
|
|
|
ApplicationPath = applicationPath;
|
|
|
|
|
VirtualFileSystem = virtualFileSystem;
|
|
|
|
|
ContentManager = contentManager;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
RendererHost = renderer;
|
2023-01-15 19:14:01 -05:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
_chrono = new Stopwatch();
|
2022-09-19 14:05:26 -04:00
|
|
|
|
_ticksPerFrame = Stopwatch.Frequency / TargetFps;
|
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
if (ApplicationPath.StartsWith("@SystemContent"))
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
ApplicationPath = VirtualFileSystem.SwitchPathToSystemPath(ApplicationPath);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
_isFirmwareTitle = true;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-01 21:29:47 -04:00
|
|
|
|
ConfigurationState.Instance.HideCursor.Event += HideCursorState_Changed;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
_topLevel.PointerMoved += TopLevel_PointerEnteredOrMoved;
|
|
|
|
|
_topLevel.PointerEntered += TopLevel_PointerEnteredOrMoved;
|
|
|
|
|
_topLevel.PointerExited += TopLevel_PointerExited;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-14 19:05:44 -05:00
|
|
|
|
if (OperatingSystem.IsWindows())
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
_invisibleCursorWin = CreateEmptyCursor();
|
|
|
|
|
_defaultCursorWin = CreateArrowCursor();
|
2023-01-14 19:05:44 -05:00
|
|
|
|
}
|
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
ConfigurationState.Instance.System.IgnoreMissingServices.Event += UpdateIgnoreMissingServicesState;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
ConfigurationState.Instance.Graphics.AspectRatio.Event += UpdateAspectRatioState;
|
|
|
|
|
ConfigurationState.Instance.System.EnableDockedMode.Event += UpdateDockedModeState;
|
|
|
|
|
ConfigurationState.Instance.System.AudioVolume.Event += UpdateAudioVolumeState;
|
|
|
|
|
ConfigurationState.Instance.System.EnableDockedMode.Event += UpdateDockedModeState;
|
|
|
|
|
ConfigurationState.Instance.System.AudioVolume.Event += UpdateAudioVolumeState;
|
|
|
|
|
ConfigurationState.Instance.Graphics.AntiAliasing.Event += UpdateAntiAliasing;
|
|
|
|
|
ConfigurationState.Instance.Graphics.ScalingFilter.Event += UpdateScalingFilter;
|
|
|
|
|
ConfigurationState.Instance.Graphics.ScalingFilterLevel.Event += UpdateScalingFilterLevel;
|
2023-08-07 13:54:05 -04:00
|
|
|
|
ConfigurationState.Instance.Graphics.EnableColorSpacePassthrough.Event += UpdateColorSpacePassthrough;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-10-25 18:32:13 -04:00
|
|
|
|
ConfigurationState.Instance.System.EnableInternetAccess.Event += UpdateEnableInternetAccessState;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
ConfigurationState.Instance.Multiplayer.LanInterfaceId.Event += UpdateLanInterfaceIdState;
|
Add ldn:u implementation, INetworkClient interface and DisabledLdnClient (#5652)
* Impl first attempt to LDN
* Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Mac addresses are now randomly assigned on the server. (fixes joining lobbies)
- Fixed the "connected" handler for stations to actually find a
- Added info retrieval when connected to a station.
- Users that disconnect are now removed from rooms they were in. (still need to broadcast tho)
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
* We may just be "initialized". Ignore this for now.
* Lots of WIP
* Add Disconnect packet
* Improve signalling of internal events.
* Fix scan.
* Fix some more stupid things.
* Enable NoDelay on all sockets.
* Add station accept policy, disconnect function.
* Limit max number of games.
* Split out networking stuff from HLE, so it can be swapped.
* Update logging calls.
* Missed a spot.
* Call SignalDisconnect instead of SetState
* Add comment to GetNetworkInfo
* Update configuration + UI
Now has its own tab, more options.
* Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
* some cleanup
* More fix
* Correctly handle errors when connecting.
* Disable *Private call and clean symbols
* Structs cleanup
* Big cleanup
* Fix InvalidHandle (in MK8D and other games)
* Add Reject and Private Network support (v1)
RyuLdn Version bumped to 1.
* Add Initialize Packet
Allows users to keep Mac Addresses assigned by the server.
* Add SetWirelessControllerRestriction and some cleanup
* LDN-2 Initial Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
* Misc Changes
* Fix GetNetworkInfo
* Fix some small issues
* Implement GetNetworkInfoLatestUpdate
* Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
* Fix ARMS Scan (and other games using wrong LocalCommunicationId
* Fix latest update when host leaves
* Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
* Fix the localCommunicationId = -1
* Don't set Connect flag for nodes already in the room before joining.
* Make IUserLocalCommunicationService disposable
* Don't dispose if there's no client.
* LDN-2-2 Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Put sockets behind an interface, so that they can be swapped for something proxyable
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
Misc Changes
Fix GetNetworkInfo
Fix some small issues
Disable LAN by default til the config is added.
Fix Splatoon 2
- Stub nfp IUser::StartDetection / IUser::StopDetection.
- Stub ntc IEnsureNetworkClockAvailabilityService and needed calls.
Cleanup previous fixes
Stub IAudioInManager/IAudioIn for Splatoon 2 LAN
Add LAN settings to multiplayer tab
LAN Play > LAN Mode
Implement GetNetworkInfoLatestUpdate
Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
Fix ARMS Scan (and other games using wrong LocalCommunicationId
Fix latest update when host leaves
Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
Fix the localCommunicationId = -1
Don't set Connect flag for nodes already in the room before joining.
Make IUserLocalCommunicationService disposable
Fix crash when using LAN mode on linux.
Actually use that call
Don't dispose if there's no client.
Fix the settings window crash
Fix configurationFileUpdated
* Make LDN compatible with Ryujinx/Ryujinx#3805
* Ava: Add Ldn options to SettingsNetworkTab
* Ava: Add update events for multiplayer options
* Apply formatting
* Remove LdnHelper
* ldn: Fix hardcoded /24 subnet mask
* Fix naming rule violations
* Add missing summary doc tag
* Remove NetCoreServer dependency
* Address code style issues and typos
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Call CloseStation/CloseAccessPoint to reduce code duplication
* Fix typo
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Fix missing trailing commas
* Extract AddressList from AddressEntry
* Use AcceptPolicy as a type for LdnNetworkInfo.StationAcceptPolicy
* Add Flags attribute to ScanFilterFlag
* Rename struct members for LdnNetworkInfo
* Remove extra line
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Extract NetworkErrorMessage from NetworkError
* Fix missing trailing commas
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2023-09-25 17:50:43 -04:00
|
|
|
|
ConfigurationState.Instance.Multiplayer.Mode.Event += UpdateMultiplayerModeState;
|
2023-04-16 11:25:20 -04:00
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
_gpuCancellationTokenSource = new CancellationTokenSource();
|
2023-05-31 17:43:20 -04:00
|
|
|
|
_gpuDoneEvent = new ManualResetEvent(false);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
private void TopLevel_PointerEnteredOrMoved(object sender, PointerEventArgs e)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-14 19:05:44 -05:00
|
|
|
|
if (sender is MainWindow window)
|
2023-01-08 12:46:25 -05:00
|
|
|
|
{
|
|
|
|
|
_lastCursorMoveTime = Stopwatch.GetTimestamp();
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
var point = e.GetCurrentPoint(window).Position;
|
|
|
|
|
var bounds = RendererHost.EmbeddedWindow.Bounds;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
_isCursorInRenderer = point.X >= bounds.X &&
|
|
|
|
|
point.X <= bounds.Width + bounds.X &&
|
|
|
|
|
point.Y >= bounds.Y &&
|
|
|
|
|
point.Y <= bounds.Height + bounds.Y;
|
2023-01-08 12:46:25 -05:00
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
2023-05-14 10:34:31 -04:00
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
private void TopLevel_PointerExited(object sender, PointerEventArgs e)
|
2023-05-14 10:34:31 -04:00
|
|
|
|
{
|
|
|
|
|
_isCursorInRenderer = false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-27 16:11:55 -05:00
|
|
|
|
private void UpdateScalingFilterLevel(object sender, ReactiveEventArgs<int> e)
|
|
|
|
|
{
|
|
|
|
|
_renderer.Window?.SetScalingFilter((Graphics.GAL.ScalingFilter)ConfigurationState.Instance.Graphics.ScalingFilter.Value);
|
|
|
|
|
_renderer.Window?.SetScalingFilterLevel(ConfigurationState.Instance.Graphics.ScalingFilterLevel.Value);
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private void UpdateScalingFilter(object sender, ReactiveEventArgs<ScalingFilter> e)
|
2023-02-27 16:11:55 -05:00
|
|
|
|
{
|
|
|
|
|
_renderer.Window?.SetScalingFilter((Graphics.GAL.ScalingFilter)ConfigurationState.Instance.Graphics.ScalingFilter.Value);
|
|
|
|
|
_renderer.Window?.SetScalingFilterLevel(ConfigurationState.Instance.Graphics.ScalingFilterLevel.Value);
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-08-07 13:54:05 -04:00
|
|
|
|
private void UpdateColorSpacePassthrough(object sender, ReactiveEventArgs<bool> e)
|
|
|
|
|
{
|
|
|
|
|
_renderer.Window?.SetColorSpacePassthrough((bool)ConfigurationState.Instance.Graphics.EnableColorSpacePassthrough.Value);
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-14 19:05:44 -05:00
|
|
|
|
private void ShowCursor()
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-14 19:05:44 -05:00
|
|
|
|
Dispatcher.UIThread.Post(() =>
|
|
|
|
|
{
|
|
|
|
|
_viewModel.Cursor = Cursor.Default;
|
|
|
|
|
|
|
|
|
|
if (OperatingSystem.IsWindows())
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
SetCursor(_defaultCursorWin);
|
2023-01-14 19:05:44 -05:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void HideCursor()
|
|
|
|
|
{
|
|
|
|
|
Dispatcher.UIThread.Post(() =>
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
_viewModel.Cursor = _invisibleCursor;
|
2023-01-14 19:05:44 -05:00
|
|
|
|
|
|
|
|
|
if (OperatingSystem.IsWindows())
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
SetCursor(_invisibleCursorWin);
|
2023-01-14 19:05:44 -05:00
|
|
|
|
}
|
|
|
|
|
});
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void SetRendererWindowSize(Size size)
|
|
|
|
|
{
|
|
|
|
|
if (_renderer != null)
|
|
|
|
|
{
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
double scale = _topLevel.RenderScaling;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2022-09-19 14:05:26 -04:00
|
|
|
|
_renderer.Window?.SetSize((int)(size.Width * scale), (int)(size.Height * scale));
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-21 19:42:55 -05:00
|
|
|
|
private void Renderer_ScreenCaptured(object sender, ScreenCaptureImageInfo e)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
|
|
|
|
if (e.Data.Length > 0 && e.Height > 0 && e.Width > 0)
|
|
|
|
|
{
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
lock (_lockObject)
|
|
|
|
|
{
|
2023-01-10 12:45:55 -05:00
|
|
|
|
DateTime currentTime = DateTime.Now;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
string filename = $"ryujinx_capture_{currentTime.Year}-{currentTime.Month:D2}-{currentTime.Day:D2}_{currentTime.Hour:D2}-{currentTime.Minute:D2}-{currentTime.Second:D2}.png";
|
2023-01-29 06:37:52 -05:00
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
string directory = AppDataManager.Mode switch
|
|
|
|
|
{
|
2023-05-28 16:44:46 -04:00
|
|
|
|
AppDataManager.LaunchMode.Portable or AppDataManager.LaunchMode.Custom => Path.Combine(AppDataManager.BaseDirPath, "screenshots"),
|
2023-07-07 17:03:27 -04:00
|
|
|
|
_ => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "Ryujinx"),
|
2022-05-15 07:30:15 -04:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
string path = Path.Combine(directory, filename);
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Directory.CreateDirectory(directory);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Logger.Error?.Print(LogClass.Application, $"Failed to create directory at path {directory}. Error : {ex.GetType().Name}", "Screenshot");
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Image image = e.IsBgra ? Image.LoadPixelData<Bgra32>(e.Data, e.Width, e.Height)
|
|
|
|
|
: Image.LoadPixelData<Rgba32>(e.Data, e.Width, e.Height);
|
|
|
|
|
|
|
|
|
|
if (e.FlipX)
|
|
|
|
|
{
|
|
|
|
|
image.Mutate(x => x.Flip(FlipMode.Horizontal));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (e.FlipY)
|
|
|
|
|
{
|
|
|
|
|
image.Mutate(x => x.Flip(FlipMode.Vertical));
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
image.SaveAsPng(path, new PngEncoder
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
ColorType = PngColorType.Rgb,
|
2022-05-15 07:30:15 -04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
image.Dispose();
|
|
|
|
|
|
|
|
|
|
Logger.Notice.Print(LogClass.Application, $"Screenshot saved to {path}", "Screenshot");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Logger.Error?.Print(LogClass.Application, $"Screenshot is empty. Size : {e.Data.Length} bytes. Resolution : {e.Width}x{e.Height}", "Screenshot");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Start()
|
|
|
|
|
{
|
|
|
|
|
if (OperatingSystem.IsWindows())
|
|
|
|
|
{
|
|
|
|
|
_windowsMultimediaTimerResolution = new WindowsMultimediaTimerResolution(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DisplaySleep.Prevent();
|
|
|
|
|
|
|
|
|
|
NpadManager.Initialize(Device, ConfigurationState.Instance.Hid.InputConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse);
|
|
|
|
|
TouchScreenManager.Initialize(Device);
|
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.IsGameRunning = true;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
var activeProcess = Device.Processes.ActiveApplication;
|
2023-03-31 15:16:46 -04:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
string titleNameSection = string.IsNullOrWhiteSpace(activeProcess.Name) ? string.Empty : $" {activeProcess.Name}";
|
2023-04-11 21:09:47 -04:00
|
|
|
|
string titleVersionSection = string.IsNullOrWhiteSpace(activeProcess.DisplayVersion) ? string.Empty : $" v{activeProcess.DisplayVersion}";
|
2023-07-07 17:03:27 -04:00
|
|
|
|
string titleIdSection = $" ({activeProcess.ProgramIdText.ToUpper()})";
|
|
|
|
|
string titleArchSection = activeProcess.Is64Bit ? " (64-bit)" : " (32-bit)";
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
Dispatcher.UIThread.InvokeAsync(() =>
|
|
|
|
|
{
|
2023-04-11 21:09:47 -04:00
|
|
|
|
_viewModel.Title = $"Ryujinx {Program.Version} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}";
|
2022-05-15 07:30:15 -04:00
|
|
|
|
});
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
_viewModel.SetUiProgressHandlers(Device);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
RendererHost.BoundsChanged += Window_BoundsChanged;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
_isActive = true;
|
|
|
|
|
|
|
|
|
|
_renderingThread.Start();
|
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.Volume = ConfigurationState.Instance.System.AudioVolume.Value;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
MainLoop();
|
|
|
|
|
|
|
|
|
|
Exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void UpdateIgnoreMissingServicesState(object sender, ReactiveEventArgs<bool> args)
|
|
|
|
|
{
|
|
|
|
|
if (Device != null)
|
|
|
|
|
{
|
|
|
|
|
Device.Configuration.IgnoreMissingServices = args.NewValue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void UpdateAspectRatioState(object sender, ReactiveEventArgs<AspectRatio> args)
|
|
|
|
|
{
|
|
|
|
|
if (Device != null)
|
|
|
|
|
{
|
|
|
|
|
Device.Configuration.AspectRatio = args.NewValue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
private void UpdateAntiAliasing(object sender, ReactiveEventArgs<AntiAliasing> e)
|
2023-02-27 16:11:55 -05:00
|
|
|
|
{
|
|
|
|
|
_renderer?.Window?.SetAntiAliasing((Graphics.GAL.AntiAliasing)e.NewValue);
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
private void UpdateDockedModeState(object sender, ReactiveEventArgs<bool> e)
|
|
|
|
|
{
|
|
|
|
|
Device?.System.ChangeDockedModeState(e.NewValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void UpdateAudioVolumeState(object sender, ReactiveEventArgs<float> e)
|
|
|
|
|
{
|
|
|
|
|
Device?.SetVolume(e.NewValue);
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
Dispatcher.UIThread.Post(() =>
|
|
|
|
|
{
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.Volume = e.NewValue;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-25 18:32:13 -04:00
|
|
|
|
private void UpdateEnableInternetAccessState(object sender, ReactiveEventArgs<bool> e)
|
|
|
|
|
{
|
|
|
|
|
Device.Configuration.EnableInternetAccess = e.NewValue;
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-16 11:25:20 -04:00
|
|
|
|
private void UpdateLanInterfaceIdState(object sender, ReactiveEventArgs<string> e)
|
|
|
|
|
{
|
|
|
|
|
Device.Configuration.MultiplayerLanInterfaceId = e.NewValue;
|
|
|
|
|
}
|
|
|
|
|
|
Add ldn:u implementation, INetworkClient interface and DisabledLdnClient (#5652)
* Impl first attempt to LDN
* Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Mac addresses are now randomly assigned on the server. (fixes joining lobbies)
- Fixed the "connected" handler for stations to actually find a
- Added info retrieval when connected to a station.
- Users that disconnect are now removed from rooms they were in. (still need to broadcast tho)
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
* We may just be "initialized". Ignore this for now.
* Lots of WIP
* Add Disconnect packet
* Improve signalling of internal events.
* Fix scan.
* Fix some more stupid things.
* Enable NoDelay on all sockets.
* Add station accept policy, disconnect function.
* Limit max number of games.
* Split out networking stuff from HLE, so it can be swapped.
* Update logging calls.
* Missed a spot.
* Call SignalDisconnect instead of SetState
* Add comment to GetNetworkInfo
* Update configuration + UI
Now has its own tab, more options.
* Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
* some cleanup
* More fix
* Correctly handle errors when connecting.
* Disable *Private call and clean symbols
* Structs cleanup
* Big cleanup
* Fix InvalidHandle (in MK8D and other games)
* Add Reject and Private Network support (v1)
RyuLdn Version bumped to 1.
* Add Initialize Packet
Allows users to keep Mac Addresses assigned by the server.
* Add SetWirelessControllerRestriction and some cleanup
* LDN-2 Initial Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
* Misc Changes
* Fix GetNetworkInfo
* Fix some small issues
* Implement GetNetworkInfoLatestUpdate
* Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
* Fix ARMS Scan (and other games using wrong LocalCommunicationId
* Fix latest update when host leaves
* Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
* Fix the localCommunicationId = -1
* Don't set Connect flag for nodes already in the room before joining.
* Make IUserLocalCommunicationService disposable
* Don't dispose if there's no client.
* LDN-2-2 Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Put sockets behind an interface, so that they can be swapped for something proxyable
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
Misc Changes
Fix GetNetworkInfo
Fix some small issues
Disable LAN by default til the config is added.
Fix Splatoon 2
- Stub nfp IUser::StartDetection / IUser::StopDetection.
- Stub ntc IEnsureNetworkClockAvailabilityService and needed calls.
Cleanup previous fixes
Stub IAudioInManager/IAudioIn for Splatoon 2 LAN
Add LAN settings to multiplayer tab
LAN Play > LAN Mode
Implement GetNetworkInfoLatestUpdate
Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
Fix ARMS Scan (and other games using wrong LocalCommunicationId
Fix latest update when host leaves
Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
Fix the localCommunicationId = -1
Don't set Connect flag for nodes already in the room before joining.
Make IUserLocalCommunicationService disposable
Fix crash when using LAN mode on linux.
Actually use that call
Don't dispose if there's no client.
Fix the settings window crash
Fix configurationFileUpdated
* Make LDN compatible with Ryujinx/Ryujinx#3805
* Ava: Add Ldn options to SettingsNetworkTab
* Ava: Add update events for multiplayer options
* Apply formatting
* Remove LdnHelper
* ldn: Fix hardcoded /24 subnet mask
* Fix naming rule violations
* Add missing summary doc tag
* Remove NetCoreServer dependency
* Address code style issues and typos
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Call CloseStation/CloseAccessPoint to reduce code duplication
* Fix typo
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Fix missing trailing commas
* Extract AddressList from AddressEntry
* Use AcceptPolicy as a type for LdnNetworkInfo.StationAcceptPolicy
* Add Flags attribute to ScanFilterFlag
* Rename struct members for LdnNetworkInfo
* Remove extra line
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Extract NetworkErrorMessage from NetworkError
* Fix missing trailing commas
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2023-09-25 17:50:43 -04:00
|
|
|
|
private void UpdateMultiplayerModeState(object sender, ReactiveEventArgs<MultiplayerMode> e)
|
|
|
|
|
{
|
|
|
|
|
Device.Configuration.MultiplayerMode = e.NewValue;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
public void Stop()
|
|
|
|
|
{
|
|
|
|
|
_isActive = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Exit()
|
|
|
|
|
{
|
|
|
|
|
(_keyboardInterface as AvaloniaKeyboard)?.Clear();
|
|
|
|
|
|
|
|
|
|
if (_isStopped)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_isStopped = true;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
_isActive = false;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DisposeContext()
|
|
|
|
|
{
|
|
|
|
|
Dispose();
|
|
|
|
|
|
|
|
|
|
_isActive = false;
|
|
|
|
|
|
2023-05-31 17:43:20 -04:00
|
|
|
|
// NOTE: The render loop is allowed to stay alive until the renderer itself is disposed, as it may handle resource dispose.
|
|
|
|
|
// We only need to wait for all commands submitted during the main gpu loop to be processed.
|
|
|
|
|
_gpuDoneEvent.WaitOne();
|
|
|
|
|
_gpuDoneEvent.Dispose();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
DisplaySleep.Restore();
|
|
|
|
|
|
|
|
|
|
NpadManager.Dispose();
|
|
|
|
|
TouchScreenManager.Dispose();
|
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
DisposeGpu();
|
|
|
|
|
|
|
|
|
|
AppExit?.Invoke(this, EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Dispose()
|
|
|
|
|
{
|
2023-03-31 15:16:46 -04:00
|
|
|
|
if (Device.Processes != null)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
MainWindowViewModel.UpdateGameMetadata(Device.Processes.ActiveApplication.ProgramIdText);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ConfigurationState.Instance.System.IgnoreMissingServices.Event -= UpdateIgnoreMissingServicesState;
|
2023-07-07 17:03:27 -04:00
|
|
|
|
ConfigurationState.Instance.Graphics.AspectRatio.Event -= UpdateAspectRatioState;
|
|
|
|
|
ConfigurationState.Instance.System.EnableDockedMode.Event -= UpdateDockedModeState;
|
|
|
|
|
ConfigurationState.Instance.System.AudioVolume.Event -= UpdateAudioVolumeState;
|
|
|
|
|
ConfigurationState.Instance.Graphics.ScalingFilter.Event -= UpdateScalingFilter;
|
|
|
|
|
ConfigurationState.Instance.Graphics.ScalingFilterLevel.Event -= UpdateScalingFilterLevel;
|
|
|
|
|
ConfigurationState.Instance.Graphics.AntiAliasing.Event -= UpdateAntiAliasing;
|
2023-08-07 13:54:05 -04:00
|
|
|
|
ConfigurationState.Instance.Graphics.EnableColorSpacePassthrough.Event -= UpdateColorSpacePassthrough;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
_topLevel.PointerMoved -= TopLevel_PointerEnteredOrMoved;
|
|
|
|
|
_topLevel.PointerEntered -= TopLevel_PointerEnteredOrMoved;
|
|
|
|
|
_topLevel.PointerExited -= TopLevel_PointerExited;
|
2023-01-08 12:46:25 -05:00
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
_gpuCancellationTokenSource.Cancel();
|
|
|
|
|
_gpuCancellationTokenSource.Dispose();
|
2022-11-24 09:08:27 -05:00
|
|
|
|
|
2022-09-19 14:05:26 -04:00
|
|
|
|
_chrono.Stop();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DisposeGpu()
|
|
|
|
|
{
|
|
|
|
|
if (OperatingSystem.IsWindows())
|
|
|
|
|
{
|
|
|
|
|
_windowsMultimediaTimerResolution?.Dispose();
|
|
|
|
|
_windowsMultimediaTimerResolution = null;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
if (RendererHost.EmbeddedWindow is EmbeddedWindowOpenGL openGlWindow)
|
2023-06-11 12:31:22 -04:00
|
|
|
|
{
|
|
|
|
|
// Try to bind the OpenGL context before calling the shutdown event.
|
|
|
|
|
openGlWindow.MakeCurrent(false, false);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-06-11 12:31:22 -04:00
|
|
|
|
Device.DisposeGpu();
|
2022-11-24 09:08:27 -05:00
|
|
|
|
|
2023-06-11 12:31:22 -04:00
|
|
|
|
// Unbind context and destroy everything.
|
|
|
|
|
openGlWindow.MakeCurrent(true, false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Device.DisposeGpu();
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
2023-05-01 21:29:47 -04:00
|
|
|
|
private void HideCursorState_Changed(object sender, ReactiveEventArgs<HideCursorMode> state)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-05-01 21:29:47 -04:00
|
|
|
|
if (state.NewValue == HideCursorMode.OnIdle)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-14 19:05:44 -05:00
|
|
|
|
_lastCursorMoveTime = Stopwatch.GetTimestamp();
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<bool> LoadGuestApplication()
|
|
|
|
|
{
|
|
|
|
|
InitializeSwitchInstance();
|
|
|
|
|
MainWindow.UpdateGraphicsConfig();
|
|
|
|
|
|
|
|
|
|
SystemVersion firmwareVersion = ContentManager.GetCurrentFirmwareVersion();
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (!SetupValidator.CanStartApplication(ContentManager, ApplicationPath, out UserError userError))
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
|
|
|
|
{
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (SetupValidator.CanFixStartApplication(ContentManager, ApplicationPath, userError, out firmwareVersion))
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (userError == UserError.NoFirmware)
|
|
|
|
|
{
|
|
|
|
|
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
|
|
|
|
LocaleManager.Instance[LocaleKeys.DialogFirmwareNoFirmwareInstalledMessage],
|
2023-01-20 20:06:19 -05:00
|
|
|
|
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogFirmwareInstallEmbeddedMessage, firmwareVersion.VersionString),
|
2023-01-08 12:46:25 -05:00
|
|
|
|
LocaleManager.Instance[LocaleKeys.InputDialogYes],
|
|
|
|
|
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
|
|
|
|
"");
|
|
|
|
|
|
|
|
|
|
if (result != UserResult.Yes)
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
await UserErrorDialog.ShowUserErrorDialog(userError);
|
2023-01-08 12:46:25 -05:00
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (!SetupValidator.TryFixStartApplication(ContentManager, ApplicationPath, userError, out _))
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
await UserErrorDialog.ShowUserErrorDialog(userError);
|
2023-01-08 12:46:25 -05:00
|
|
|
|
Device.Dispose();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
// Tell the user that we installed a firmware for them.
|
|
|
|
|
if (userError == UserError.NoFirmware)
|
|
|
|
|
{
|
|
|
|
|
firmwareVersion = ContentManager.GetCurrentFirmwareVersion();
|
|
|
|
|
|
|
|
|
|
_viewModel.RefreshFirmwareStatus();
|
|
|
|
|
|
|
|
|
|
await ContentDialogHelper.CreateInfoDialog(
|
2023-01-20 20:06:19 -05:00
|
|
|
|
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogFirmwareInstalledMessage, firmwareVersion.VersionString),
|
|
|
|
|
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogFirmwareInstallEmbeddedSuccessMessage, firmwareVersion.VersionString),
|
2023-01-08 12:46:25 -05:00
|
|
|
|
LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
|
|
|
|
"",
|
|
|
|
|
LocaleManager.Instance[LocaleKeys.RyujinxInfo]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
await UserErrorDialog.ShowUserErrorDialog(userError);
|
2023-01-08 12:46:25 -05:00
|
|
|
|
Device.Dispose();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Logger.Notice.Print(LogClass.Application, $"Using Firmware Version: {firmwareVersion?.VersionString}");
|
|
|
|
|
|
|
|
|
|
if (_isFirmwareTitle)
|
|
|
|
|
{
|
|
|
|
|
Logger.Info?.Print(LogClass.Application, "Loading as Firmware Title (NCA).");
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
if (!Device.LoadNca(ApplicationPath))
|
|
|
|
|
{
|
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
else if (Directory.Exists(ApplicationPath))
|
|
|
|
|
{
|
|
|
|
|
string[] romFsFiles = Directory.GetFiles(ApplicationPath, "*.istorage");
|
|
|
|
|
|
|
|
|
|
if (romFsFiles.Length == 0)
|
|
|
|
|
{
|
|
|
|
|
romFsFiles = Directory.GetFiles(ApplicationPath, "*.romfs");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (romFsFiles.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
Logger.Info?.Print(LogClass.Application, "Loading as cart with RomFS.");
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
if (!Device.LoadCart(ApplicationPath, romFsFiles[0]))
|
|
|
|
|
{
|
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Logger.Info?.Print(LogClass.Application, "Loading as cart WITHOUT RomFS.");
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
if (!Device.LoadCart(ApplicationPath))
|
|
|
|
|
{
|
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (File.Exists(ApplicationPath))
|
|
|
|
|
{
|
2022-11-24 09:08:27 -05:00
|
|
|
|
switch (Path.GetExtension(ApplicationPath).ToLowerInvariant())
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
|
|
|
|
case ".xci":
|
|
|
|
|
{
|
|
|
|
|
Logger.Info?.Print(LogClass.Application, "Loading as XCI.");
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
if (!Device.LoadXci(ApplicationPath))
|
|
|
|
|
{
|
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case ".nca":
|
|
|
|
|
{
|
|
|
|
|
Logger.Info?.Print(LogClass.Application, "Loading as NCA.");
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
if (!Device.LoadNca(ApplicationPath))
|
|
|
|
|
{
|
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case ".nsp":
|
|
|
|
|
case ".pfs0":
|
|
|
|
|
{
|
|
|
|
|
Logger.Info?.Print(LogClass.Application, "Loading as NSP.");
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
if (!Device.LoadNsp(ApplicationPath))
|
|
|
|
|
{
|
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
{
|
|
|
|
|
Logger.Info?.Print(LogClass.Application, "Loading as homebrew.");
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
2023-03-31 15:16:46 -04:00
|
|
|
|
if (!Device.LoadProgram(ApplicationPath))
|
|
|
|
|
{
|
|
|
|
|
Device.Dispose();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
catch (ArgumentOutOfRangeException)
|
|
|
|
|
{
|
|
|
|
|
Logger.Error?.Print(LogClass.Application, "The specified file is not supported by Ryujinx.");
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
Device.Dispose();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Logger.Warning?.Print(LogClass.Application, "Please specify a valid XCI/NCA/NSP/PFS0/NRO file.");
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
Device.Dispose();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-31 15:16:46 -04:00
|
|
|
|
DiscordIntegrationModule.SwitchToPlayingState(Device.Processes.ActiveApplication.ProgramIdText, Device.Processes.ActiveApplication.Name);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-06-28 20:39:22 -04:00
|
|
|
|
ApplicationLibrary.LoadAndSaveMetaData(Device.Processes.ActiveApplication.ProgramIdText, appMetadata =>
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-05-11 19:56:37 -04:00
|
|
|
|
appMetadata.LastPlayed = DateTime.UtcNow;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal void Resume()
|
|
|
|
|
{
|
|
|
|
|
Device?.System.TogglePauseEmulation(false);
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.IsPaused = false;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal void Pause()
|
|
|
|
|
{
|
|
|
|
|
Device?.System.TogglePauseEmulation(true);
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.IsPaused = true;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void InitializeSwitchInstance()
|
|
|
|
|
{
|
2023-01-10 12:45:55 -05:00
|
|
|
|
// Initialize KeySet.
|
2022-05-15 07:30:15 -04:00
|
|
|
|
VirtualFileSystem.ReloadKeySet();
|
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
// Initialize Renderer.
|
Vulkan backend (#2518)
* WIP Vulkan implementation
* No need to initialize attributes on the SPIR-V backend anymore
* Allow multithreading shaderc and vkCreateShaderModule
You'll only really see the benefit here with threaded-gal or parallel shader cache compile.
Fix shaderc multithreaded changes
Thread safety for shaderc Options constructor
Dunno how they managed to make a constructor not thread safe, but you do you. May avoid some freezes.
* Support multiple levels/layers for blit.
Fixes MK8D when scaled, maybe a few other games. AMD software "safe" blit not supported right now.
* TextureStorage should hold a ref of the foreign storage, otherwise it might be freed while in use
* New depth-stencil blit method for AMD
* Workaround for AMD driver bug
* Fix some tessellation related issues (still doesn't work?)
* Submit command buffer before Texture GetData. (UE4 fix)
* DrawTexture support
* Fix BGRA on OpenGL backend
* Fix rebase build break
* Support format aliasing on SetImage
* Fix uniform buffers being lost when bindings are out of order
* Fix storage buffers being lost when bindings are out of order
(also avoid allocations when changing bindings)
* Use current command buffer for unscaled copy (perf)
Avoids flushing commands and renting a command buffer when fulfilling copy dependencies and when games do unscaled copies.
* Update to .net6
* Update Silk.NET to version 2.10.1
Somehow, massive performance boost. Seems like their vtable for looking up vulkan methods was really slow before.
* Fix PrimitivesGenerated query, disable Transform Feedback queries for now
Lets Splatoon 2 work on nvidia. (mostly)
* Update counter queue to be similar to the OGL one
Fixes softlocks when games had to flush counters.
* Don't throw when ending conditional rendering for now
This should be re-enabled when conditional rendering is enabled on nvidia etc.
* Update findMSB/findLSB to match master's instruction enum
* Fix triangle overlay on SMO, Captain Toad, maybe others?
* Don't make Intel Mesa pay for Intel Windows bugs
* Fix samplers with MinFilter Linear or Nearest (fixes New Super Mario Bros U Deluxe black borders)
* Update Spv.Generator
* Add alpha test emulation on shader (but no shader specialisation yet...)
* Fix R4G4B4A4Unorm texture format permutation
* Validation layers should be enabled for any log level other than None
* Add barriers around vkCmdCopyImage
Write->Read barrier for src image (we want to wait for a write to read it)
Write->Read barrier for dst image (we want to wait for the copy to complete before use)
* Be a bit more careful with texture access flags, since it can be used for anything
* Device local mapping for all buffers
May avoid issues with drivers with NVIDIA on linux/older gpus on windows when using large buffers (?)
Also some performance things and fixes issues with opengl games loading textures weird.
* Cleanup, disable device local buffers for now.
* Add single queue support
Multiqueue seems to be a bit more responsive on NVIDIA. Should fix texture flush on intel. AMD has been forced to single queue for an experiment.
* Fix some validation errors around extended dynamic state
* Remove Intel bug workaround, it was fixed on the latest driver
* Use circular queue for checking consumption on command buffers
Speeds up games that spam command buffers a little. Avoids checking multiple command buffers if multiple are active at once.
* Use SupportBufferUpdater, add single layer flush
* Fix counter queue leak when game decides to use host conditional rendering
* Force device local storage for textures (fixes linux performance)
* Port #3019
* Insert barriers around vkCmdBlitImage (may fix some amd flicker)
* Fix transform feedback on Intel, gl_Position feedback and clears to inexistent depth buffers
* Don't pause transform feedback for multi draw
* Fix draw outside of render pass and missing capability
* Workaround for wrong last attribute on AMD (affects FFVII, STRIKERS1945, probably more)
* Better workaround for AMD vertex buffer size alignment issue
* More instructions + fixes on SPIR-V backend
* Allow custom aspect ratio on Vulkan
* Correct GTK UI status bar positions
* SPIR-V: Functions must always end with a return
* SPIR-V: Fix ImageQuerySizeLod
* SPIR-V: Set DepthReplacing execution mode when FragDepth is modified
* SPIR-V: Implement LoopContinue IR instruction
* SPIR-V: Geometry shader support
* SPIR-V: Use correct binding number on storage buffers array
* Reduce allocations for Spir-v serialization
Passes BinaryWriter instead of the stream to Write and WriteOperand
- Removes creation of BinaryWriter for each instruction
- Removes allocations for literal string
* Some optimizations to Spv.Generator
- Dictionary for lookups of type declarations, constants, extinst
- LiteralInteger internal data format -> ushort
- Deterministic HashCode implementation to avoid spirv result not being the same between runs
- Inline operand list instead of List<T>, falls back to array if many operands. (large performance boost)
TODO: improve instruction allocation, structured program creator, ssa?
* Pool Spv.Generator resources, cache delegates, spv opts
- Pools for Instructions and LiteralIntegers. Can be passed in when creating the generator module.
- NewInstruction is called instead of new Instruction()
- Ryujinx SpirvGenerator passes in some pools that are static. The idea is for these to be shared between threads eventually.
- Estimate code size when creating the output MemoryStream
- LiteralInteger pools using ThreadStatic pools that are initialized before and after creation... not sure of a better way since the way these are created is via implicit cast.
Also, cache delegates for Spv.Generator for functions that are passed around to GenerateBinary etc, since passing the function raw creates a delegate on each call.
TODO: update python spv cs generator to make the coregrammar with NewInstruction and the `params` overloads.
* LocalDefMap for Ssa Rewriter
Rather than allocating a large array of all registers for each block in the shader, allocate one array of all registers and clear it between blocks. Reduces allocations in the shader translator.
* SPIR-V: Transform feedback support
* SPIR-V: Fragment shader interlock support (and image coherency)
* SPIR-V: Add early fragment tests support
* SPIR-V: Implement SwizzleAdd, add missing Triangles ExecutionMode for geometry shaders, remove SamplerType field from TextureMeta
* Don't pass depth clip state right now (fix decals)
Explicitly disabling it is incorrect. OpenGL currently automatically disables based on depth clamp, which is the behaviour if this state is omitted.
* Multisampling support
* Multisampling: Use resolve if src samples count > dst samples count
* Multisampling: We can only resolve for unscaled copies
* SPIR-V: Only add FSI exec mode if used.
* SPIR-V: Use ConstantComposite for Texture Offset Vector
Fixes a bunch of freezes with SPIR-V on AMD hardware, and validation errors. Note: Obviously assumes input offsets are constant, which they currently are.
* SPIR-V: Don't OpReturn if we already OpExit'ed
Fixes spir-v parse failure and stack smashing in RADV (obviously you still need bolist)
* SPIR-V: Only use input attribute type for input attributes
Output vertex attributes should always be of type float.
* Multithreaded Pipeline Compilation
* Address some feedback
* Make this 32
* Update topology with GpuAccessorState
* Cleanup for merge (note: disables spir-v)
* Make more robust to shader compilation failure
- Don't freeze when GLSL compilation fails
- Background SPIR-V pipeline compile failure results in skipped draws, similar to GLSL compilation failure.
* Fix Multisampling
* Only update fragment scale count if a vertex texture needs a scale.
Fixes a performance regression introduced by texture scaling in the vertex stage where support buffer updates would be very frequent, even at 1x, if any textures were used on the vertex stage.
This check doesn't exactly look cheap (a flag in the shader stage would probably be preferred), but it is much cheaper than uploading scales in both vulkan and opengl, so it will do for now.
* Use a bitmap to do granular tracking for buffer uploads.
This path is only taken if the much faster check of "is the buffer rented at all" is triggered, so it doesn't actually end up costing too much, and the time saved by not ending render passes (and on gpu for not waiting on barriers) is probably helpful.
Avoids ending render passes to update buffer data (not all the time)
- 140-180 to 35-45 in SMO metro kingdom (these updates are in the UI)
- Very variable 60-150(!) to 16-25 in mario kart 8 (these updates are in the UI)
As well as allowing more data to be preloaded persistently, this will also allow more data to be loaded in the preload buffer, which should be faster as it doesn't need to insert barriers between draws. (and on tbdr, does not need to flush and reload tile memory)
Improves performance in GPU limited scenarios. Should notably improve performance on TBDR gpus. Still a lot more to do here.
* Copy query results after RP ends, rather than ending to copy
We need to end the render pass to get the data (submit command buffer) anyways...
Reduces render passes created in games that use queries.
* Rework Query stuff a bit to avoid render pass end
Tries to reset returned queries in background when possible, rather than ending the render pass.
Still ends render pass when resetting a counter after draws, but maybe that can be solved too. (by just pulling an empty object off the pool?)
* Remove unnecessary lines
Was for testing
* Fix validation error for query reset
Need to think of a better way to do this.
* SPIR-V: Fix SwizzleAdd and some validation errors
* SPIR-V: Implement attribute indexing and StoreAttribute
* SPIR-V: Fix TextureSize for MS and Buffer sampler types
* Fix relaunch issues
* SPIR-V: Implement LogicalExclusiveOr
* SPIR-V: Constant buffer indexing support
* Ignore unsupported attributes rather than throwing (matches current GLSL behaviour)
* SPIR-V: Implement tessellation support
* SPIR-V: Geometry shader passthrough support
* SPIR-V: Implement StoreShader8/16 and StoreStorage8/16
* SPIR-V: Resolution scale support and fix TextureSample multisample with LOD bug
* SPIR-V: Fix field index for scale count
* SPIR-V: Fix another case of wrong field index
* SPIRV/GLSL: More scaling related fixes
* SPIR-V: Fix ImageLoad CompositeExtract component type
* SPIR-V: Workaround for Intel FrontFacing bug
* Enable SPIR-V backend by default
* Allow null samplers (samplers are not required when only using texelFetch to access the texture)
* Fix some validation errors related to texel block view usage flag and invalid image barrier base level
* Use explicit subgroup size if we can (might fix some block flickering on AMD)
* Take componentMask and scissor into account when clearing framebuffer attachments
* Add missing barriers around CmdFillBuffer (fixes Monster Hunter Rise flickering on NVIDIA)
* Use ClampToEdge for Clamp sampler address mode on Vulkan (fixes Hollow Knight)
Clamp is unsupported on Vulkan, but ClampToEdge behaves almost the same. ClampToBorder on the other hand (which was being used before) is pretty different
* Shader specialization for new Vulkan required state (fixes remaining alpha test issues, vertex stretching on AMD on Crash Bandicoot, etc)
* Check if the subgroup size is supported before passing a explicit size
* Only enable ShaderFloat64 if the GPU supports it
* We don't need to recompile shaders if alpha test state changed but alpha test is disabled
* Enable shader cache on Vulkan and implement MultiplyHighS32/U32 on SPIR-V (missed those before)
* Fix pipeline state saving before it is updated.
This should fix a few warnings and potential stutters due to bad pipeline states being saved in the cache. You may need to clear your guest cache.
* Allow null samplers on OpenGL backend
* _unit0Sampler should be set only for binding 0
* Remove unused PipelineConverter format variable (was causing IOR)
* Raise textures limit to 64 on Vulkan
* No need to pack the shader binaries if shader cache is disabled
* Fix backbuffer not being cleared and scissor not being re-enabled on OpenGL
* Do not clear unbound framebuffer color attachments
* Geometry shader passthrough emulation
* Consolidate UpdateDepthMode and GetDepthMode implementation
* Fix A1B5G5R5 texture format and support R4G4 on Vulkan
* Add barrier before use of some modified images
* Report 32 bit query result on AMD windows (smo issue)
* Add texture recompression support (disabled for now)
It recompresses ASTC textures into BC7, which might reduce VRAM usage significantly on games that uses ASTC textures
* Do not report R4G4 format as supported on Vulkan
It was causing mario head to become white on Super Mario 64 (???)
* Improvements to -1 to 1 depth mode.
- Transformation is only applied on the last stage in the vertex pipeline.
- Should fix some issues with geometry and tessellation (hopefully)
- Reading back FragCoord Z on fragment will transform back to -1 to 1.
* Geometry Shader index count from ThreadsPerInputPrimitive
Generally fixes SPIR-V emitting too many triangles, may change games in OpenGL
* Remove gl_FragDepth scaling
This is always 0-1; the other two issues were causing the problems. Fixes regression with Xenoblade.
* Add Gl StencilOp enum values to Vulkan
* Update guest cache to v1.1 (due to specialization state changes)
This will explode your shader cache from earlier vulkan build, but it must be done. :pensive:
* Vulkan/SPIR-V support for viewport inverse
* Fix typo
* Don't create query pools for unsupported query types
* Return of the Vector Indexing Bug
One day, everyone will get this right.
* Check for transform feedback query support
Sometimes transform feedback is supported without the query type.
* Fix gl_FragCoord.z transformation
FragCoord.z is always in 0-1, even when the real depth range is -1 to 1. Turns out the only bug was geo and tess stage outputs.
Fixes Pokemon Sword/Shield, possibly others.
* Fix Avalonia Rebase
Vulkan is currently not available on Avalonia, but the build does work and you can use opengl.
* Fix headless build
* Add support for BC6 and BC7 decompression, decompress all BC formats if they are not supported by the host
* Fix BCn 4/5 conversion, GetTextureTarget
BCn 4/5 could generate invalid data when a line's size in bytes was not divisible by 4, which both backends expect.
GetTextureTarget was not creating a view with the replacement format.
* Fix dependency
* Fix inverse viewport transform vector type on SPIR-V
* Do not require null descriptors support
* If MultiViewport is not supported, do not try to set more than one viewport/scissor
* Bounds check on bitmap add.
* Flush queries on attachment change rather than program change
Occlusion queries are usually used in a depth only pass so the attachments changing is a better indication of the query block ending.
Write mask changes are also considered since some games do depth only pass by setting 0 write mask on all the colour targets.
* Add support for avalonia (#6)
* add avalonia support
* only lock around skia flush
* addressed review
* cleanup
* add fallback size if avalonia attempts to render but the window size is 0. read desktop scale after enabling dpi check
* fix getting window handle on linux. skip render is size is 0
* Combine non-buffer with buffer image descriptor sets
* Support multisample texture copy with automatic resolve on Vulkan
* Remove old CompileShader methods from the Vulkan backend
* Add minimal pipeline layouts that only contains used bindings
They are used by helper shaders, the intention is avoiding needing to recompile the shaders (from GLSL to SPIR-V) if the bindings changes on the translated guest shaders
* Pre-compile helper shader as SPIR-V, and some fixes
* Remove pre-compiled shaderc binary for Windows as its no longer needed by default
* Workaround RADV crash
Enabling the descriptor indexing extension, even if it is not used, forces the radv driver to use "bolist".
* Use RobustBufferAccess on NVIDIA gpus
Avoids the SMO waterfall triangle on older NVIDIA gpus.
* Implement GPU selector and expose texture recompression on the UI and config
* Fix and enable background compute shader compilation
Also disables warnings from shader cache pipeline misses.
* Fix error due to missing subpass dependency when Attachment Write -> Shader Read barriers are added
* If S8D24 is not supported, use D32FS8
* Ensure all fences are destroyed on dispose
* Pre-allocate arrays up front on DescriptorSetUpdater, allows the removal of some checks
* Add missing clear layer parameter after rebase
* Use selected gpu from config for avalonia (#7)
* use configured device
* address review
* Fix D32S8 copy workaround (AMD)
Fixes water in Pokemon Legends Arceus on AMD GPUs. Possibly fixes other things.
* Use push descriptors for uniform buffer updates (disabled for now)
* Push descriptor support check, buffer redundancy checks
Should make push descriptors faster, needs more testing though.
* Increase light command buffer pool to 2 command buffers, throw rather than returning invalid cbs
* Adjust bindings array sizes
* Force submit command buffers if memory in use by its resources is high
* Add workaround for AMD GCN cubemap view sins
`ImageCreateCubeCompatibleBit` seems to generally break 2D array textures with mipmaps... even if they are eventually aliased as a cubemap with mipmaps. Forcing a copy here works around the issue.
This could be used in future if enabling this bit reduces performance on certain GPUs. (mobile class is generally a worry)
Currently also enabled on Linux as I don't know if they managed to dodge this bug (someone please tell me). Not enabled on Vega at the moment, but easy to add if the issue is there.
* Add mobile, non-RX variants to the GCN regex.
Also make sure that the 3 digit ones only include numbers starting with 7 or 8.
* Increase image limit per stage from 8 to 16
Xenoblade Chronicles 2 was hiting the limit of 8
* Minor code cleanup
* Fix NRE caused by SupportBufferUpdater calling pipeline ClearBuffer
* Add gpu selector to Avalonia (#8)
* Add gpu selector to avalonia settings
* show backend label on window
* some fixes
* address review
* Minor changes to the Avalonia UI
* Update graphics window UI and locales. (#9)
* Update xaml and update locales
* locale updates
Did my best here but likely needs to be checked by native speakers, especially the use of ampersands in greek, russian and turkish?
* Fix locales with more (?) correct translations.
* add separator to render widget
* fix spanish and portuguese
* Add new IdList, replaces buffer list that could not remove elements and had unbounded growth
* Don't crash the settings window if Vulkan is not supported
* Fix Actions menu not being clickable on GTK UI after relaunch
* Rename VulkanGraphicsDevice to VulkanRenderer and Renderer to OpenGLRenderer
* Fix IdList and make it not thread safe
* Revert useless OpenGL format table changes
* Fix headless project build
* List throws ArgumentOutOfRangeException
* SPIR-V: Fix tessellation
* Increase shader cache version due to tessellation fix
* Reduce number of Sync objects created (improves perf in some specific titles)
* Fix vulkan validation errors for NPOT compressed upload and GCN workaround.
* Add timestamp to the shader cache and force rebuild if host cache is outdated
* Prefer Mail box present mode for popups (#11)
* Prefer Mail box present mode
* fix debug
* switch present mode when vsync is toggled
* only disable vsync on the main window
* SPIR-V: Fix geometry shader input load with transform feedback
* BC7 Encoder: Prefer more precision on alpha rather than RGB when alpha is 0
* Fix Avalonia build
* Address initial PR feedback
* Only set transform feedback outputs on last vertex stage
* Address riperiperi PR feedback
* Remove outdated comment
* Remove unused constructor
* Only throw for negative results
* Throw for QueueSubmit and other errors
No point in delaying the inevitable
* Transform feedback decorations inside gl_PerVertex struct breaks the NVIDIA compiler
* Fix some resolution scale issues
* No need for two UpdateScale calls
* Fix comments on SPIR-V generator project
* Try to fix shader local memory size
On DOOM, a shader is using local memory, but both Low and High size are 0, CRS size is 1536, it seems to store on that region?
* Remove RectangleF that is now unused
* Fix ImageGather with multiple offsets
Needs ImageGatherExtended capability, and must use `ConstantComposite` instead of `CompositeConstruct`
* Address PR feedback from jD in all projects except Avalonia
* Address most of jD PR feedback on Avalonia
* Remove unsafe
* Fix VulkanSkiaGpu
* move present mode request out of Create Swapchain method
* split more parts of create swapchain
* addressed reviews
* addressed review
* Address second batch of jD PR feedback
* Fix buffer <-> image copy row length and height alignment
AlignUp helper does not support NPOT alignment, and ASTC textures can have NPOT block sizes
* Better fix for NPOT alignment issue
* Use switch expressions on Vulkan EnumConversion
Thanks jD
* Fix Avalonia build
* Add Vulkan selection prompt on startup
* Grammar fixes on Vulkan prompt message
* Add missing Vulkan migration flag
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: MutantAura <44103205+MutantAura@users.noreply.github.com>
2022-07-31 17:26:06 -04:00
|
|
|
|
IRenderer renderer;
|
|
|
|
|
|
2023-01-15 19:14:01 -05:00
|
|
|
|
if (ConfigurationState.Instance.Graphics.GraphicsBackend.Value == GraphicsBackend.Vulkan)
|
Vulkan backend (#2518)
* WIP Vulkan implementation
* No need to initialize attributes on the SPIR-V backend anymore
* Allow multithreading shaderc and vkCreateShaderModule
You'll only really see the benefit here with threaded-gal or parallel shader cache compile.
Fix shaderc multithreaded changes
Thread safety for shaderc Options constructor
Dunno how they managed to make a constructor not thread safe, but you do you. May avoid some freezes.
* Support multiple levels/layers for blit.
Fixes MK8D when scaled, maybe a few other games. AMD software "safe" blit not supported right now.
* TextureStorage should hold a ref of the foreign storage, otherwise it might be freed while in use
* New depth-stencil blit method for AMD
* Workaround for AMD driver bug
* Fix some tessellation related issues (still doesn't work?)
* Submit command buffer before Texture GetData. (UE4 fix)
* DrawTexture support
* Fix BGRA on OpenGL backend
* Fix rebase build break
* Support format aliasing on SetImage
* Fix uniform buffers being lost when bindings are out of order
* Fix storage buffers being lost when bindings are out of order
(also avoid allocations when changing bindings)
* Use current command buffer for unscaled copy (perf)
Avoids flushing commands and renting a command buffer when fulfilling copy dependencies and when games do unscaled copies.
* Update to .net6
* Update Silk.NET to version 2.10.1
Somehow, massive performance boost. Seems like their vtable for looking up vulkan methods was really slow before.
* Fix PrimitivesGenerated query, disable Transform Feedback queries for now
Lets Splatoon 2 work on nvidia. (mostly)
* Update counter queue to be similar to the OGL one
Fixes softlocks when games had to flush counters.
* Don't throw when ending conditional rendering for now
This should be re-enabled when conditional rendering is enabled on nvidia etc.
* Update findMSB/findLSB to match master's instruction enum
* Fix triangle overlay on SMO, Captain Toad, maybe others?
* Don't make Intel Mesa pay for Intel Windows bugs
* Fix samplers with MinFilter Linear or Nearest (fixes New Super Mario Bros U Deluxe black borders)
* Update Spv.Generator
* Add alpha test emulation on shader (but no shader specialisation yet...)
* Fix R4G4B4A4Unorm texture format permutation
* Validation layers should be enabled for any log level other than None
* Add barriers around vkCmdCopyImage
Write->Read barrier for src image (we want to wait for a write to read it)
Write->Read barrier for dst image (we want to wait for the copy to complete before use)
* Be a bit more careful with texture access flags, since it can be used for anything
* Device local mapping for all buffers
May avoid issues with drivers with NVIDIA on linux/older gpus on windows when using large buffers (?)
Also some performance things and fixes issues with opengl games loading textures weird.
* Cleanup, disable device local buffers for now.
* Add single queue support
Multiqueue seems to be a bit more responsive on NVIDIA. Should fix texture flush on intel. AMD has been forced to single queue for an experiment.
* Fix some validation errors around extended dynamic state
* Remove Intel bug workaround, it was fixed on the latest driver
* Use circular queue for checking consumption on command buffers
Speeds up games that spam command buffers a little. Avoids checking multiple command buffers if multiple are active at once.
* Use SupportBufferUpdater, add single layer flush
* Fix counter queue leak when game decides to use host conditional rendering
* Force device local storage for textures (fixes linux performance)
* Port #3019
* Insert barriers around vkCmdBlitImage (may fix some amd flicker)
* Fix transform feedback on Intel, gl_Position feedback and clears to inexistent depth buffers
* Don't pause transform feedback for multi draw
* Fix draw outside of render pass and missing capability
* Workaround for wrong last attribute on AMD (affects FFVII, STRIKERS1945, probably more)
* Better workaround for AMD vertex buffer size alignment issue
* More instructions + fixes on SPIR-V backend
* Allow custom aspect ratio on Vulkan
* Correct GTK UI status bar positions
* SPIR-V: Functions must always end with a return
* SPIR-V: Fix ImageQuerySizeLod
* SPIR-V: Set DepthReplacing execution mode when FragDepth is modified
* SPIR-V: Implement LoopContinue IR instruction
* SPIR-V: Geometry shader support
* SPIR-V: Use correct binding number on storage buffers array
* Reduce allocations for Spir-v serialization
Passes BinaryWriter instead of the stream to Write and WriteOperand
- Removes creation of BinaryWriter for each instruction
- Removes allocations for literal string
* Some optimizations to Spv.Generator
- Dictionary for lookups of type declarations, constants, extinst
- LiteralInteger internal data format -> ushort
- Deterministic HashCode implementation to avoid spirv result not being the same between runs
- Inline operand list instead of List<T>, falls back to array if many operands. (large performance boost)
TODO: improve instruction allocation, structured program creator, ssa?
* Pool Spv.Generator resources, cache delegates, spv opts
- Pools for Instructions and LiteralIntegers. Can be passed in when creating the generator module.
- NewInstruction is called instead of new Instruction()
- Ryujinx SpirvGenerator passes in some pools that are static. The idea is for these to be shared between threads eventually.
- Estimate code size when creating the output MemoryStream
- LiteralInteger pools using ThreadStatic pools that are initialized before and after creation... not sure of a better way since the way these are created is via implicit cast.
Also, cache delegates for Spv.Generator for functions that are passed around to GenerateBinary etc, since passing the function raw creates a delegate on each call.
TODO: update python spv cs generator to make the coregrammar with NewInstruction and the `params` overloads.
* LocalDefMap for Ssa Rewriter
Rather than allocating a large array of all registers for each block in the shader, allocate one array of all registers and clear it between blocks. Reduces allocations in the shader translator.
* SPIR-V: Transform feedback support
* SPIR-V: Fragment shader interlock support (and image coherency)
* SPIR-V: Add early fragment tests support
* SPIR-V: Implement SwizzleAdd, add missing Triangles ExecutionMode for geometry shaders, remove SamplerType field from TextureMeta
* Don't pass depth clip state right now (fix decals)
Explicitly disabling it is incorrect. OpenGL currently automatically disables based on depth clamp, which is the behaviour if this state is omitted.
* Multisampling support
* Multisampling: Use resolve if src samples count > dst samples count
* Multisampling: We can only resolve for unscaled copies
* SPIR-V: Only add FSI exec mode if used.
* SPIR-V: Use ConstantComposite for Texture Offset Vector
Fixes a bunch of freezes with SPIR-V on AMD hardware, and validation errors. Note: Obviously assumes input offsets are constant, which they currently are.
* SPIR-V: Don't OpReturn if we already OpExit'ed
Fixes spir-v parse failure and stack smashing in RADV (obviously you still need bolist)
* SPIR-V: Only use input attribute type for input attributes
Output vertex attributes should always be of type float.
* Multithreaded Pipeline Compilation
* Address some feedback
* Make this 32
* Update topology with GpuAccessorState
* Cleanup for merge (note: disables spir-v)
* Make more robust to shader compilation failure
- Don't freeze when GLSL compilation fails
- Background SPIR-V pipeline compile failure results in skipped draws, similar to GLSL compilation failure.
* Fix Multisampling
* Only update fragment scale count if a vertex texture needs a scale.
Fixes a performance regression introduced by texture scaling in the vertex stage where support buffer updates would be very frequent, even at 1x, if any textures were used on the vertex stage.
This check doesn't exactly look cheap (a flag in the shader stage would probably be preferred), but it is much cheaper than uploading scales in both vulkan and opengl, so it will do for now.
* Use a bitmap to do granular tracking for buffer uploads.
This path is only taken if the much faster check of "is the buffer rented at all" is triggered, so it doesn't actually end up costing too much, and the time saved by not ending render passes (and on gpu for not waiting on barriers) is probably helpful.
Avoids ending render passes to update buffer data (not all the time)
- 140-180 to 35-45 in SMO metro kingdom (these updates are in the UI)
- Very variable 60-150(!) to 16-25 in mario kart 8 (these updates are in the UI)
As well as allowing more data to be preloaded persistently, this will also allow more data to be loaded in the preload buffer, which should be faster as it doesn't need to insert barriers between draws. (and on tbdr, does not need to flush and reload tile memory)
Improves performance in GPU limited scenarios. Should notably improve performance on TBDR gpus. Still a lot more to do here.
* Copy query results after RP ends, rather than ending to copy
We need to end the render pass to get the data (submit command buffer) anyways...
Reduces render passes created in games that use queries.
* Rework Query stuff a bit to avoid render pass end
Tries to reset returned queries in background when possible, rather than ending the render pass.
Still ends render pass when resetting a counter after draws, but maybe that can be solved too. (by just pulling an empty object off the pool?)
* Remove unnecessary lines
Was for testing
* Fix validation error for query reset
Need to think of a better way to do this.
* SPIR-V: Fix SwizzleAdd and some validation errors
* SPIR-V: Implement attribute indexing and StoreAttribute
* SPIR-V: Fix TextureSize for MS and Buffer sampler types
* Fix relaunch issues
* SPIR-V: Implement LogicalExclusiveOr
* SPIR-V: Constant buffer indexing support
* Ignore unsupported attributes rather than throwing (matches current GLSL behaviour)
* SPIR-V: Implement tessellation support
* SPIR-V: Geometry shader passthrough support
* SPIR-V: Implement StoreShader8/16 and StoreStorage8/16
* SPIR-V: Resolution scale support and fix TextureSample multisample with LOD bug
* SPIR-V: Fix field index for scale count
* SPIR-V: Fix another case of wrong field index
* SPIRV/GLSL: More scaling related fixes
* SPIR-V: Fix ImageLoad CompositeExtract component type
* SPIR-V: Workaround for Intel FrontFacing bug
* Enable SPIR-V backend by default
* Allow null samplers (samplers are not required when only using texelFetch to access the texture)
* Fix some validation errors related to texel block view usage flag and invalid image barrier base level
* Use explicit subgroup size if we can (might fix some block flickering on AMD)
* Take componentMask and scissor into account when clearing framebuffer attachments
* Add missing barriers around CmdFillBuffer (fixes Monster Hunter Rise flickering on NVIDIA)
* Use ClampToEdge for Clamp sampler address mode on Vulkan (fixes Hollow Knight)
Clamp is unsupported on Vulkan, but ClampToEdge behaves almost the same. ClampToBorder on the other hand (which was being used before) is pretty different
* Shader specialization for new Vulkan required state (fixes remaining alpha test issues, vertex stretching on AMD on Crash Bandicoot, etc)
* Check if the subgroup size is supported before passing a explicit size
* Only enable ShaderFloat64 if the GPU supports it
* We don't need to recompile shaders if alpha test state changed but alpha test is disabled
* Enable shader cache on Vulkan and implement MultiplyHighS32/U32 on SPIR-V (missed those before)
* Fix pipeline state saving before it is updated.
This should fix a few warnings and potential stutters due to bad pipeline states being saved in the cache. You may need to clear your guest cache.
* Allow null samplers on OpenGL backend
* _unit0Sampler should be set only for binding 0
* Remove unused PipelineConverter format variable (was causing IOR)
* Raise textures limit to 64 on Vulkan
* No need to pack the shader binaries if shader cache is disabled
* Fix backbuffer not being cleared and scissor not being re-enabled on OpenGL
* Do not clear unbound framebuffer color attachments
* Geometry shader passthrough emulation
* Consolidate UpdateDepthMode and GetDepthMode implementation
* Fix A1B5G5R5 texture format and support R4G4 on Vulkan
* Add barrier before use of some modified images
* Report 32 bit query result on AMD windows (smo issue)
* Add texture recompression support (disabled for now)
It recompresses ASTC textures into BC7, which might reduce VRAM usage significantly on games that uses ASTC textures
* Do not report R4G4 format as supported on Vulkan
It was causing mario head to become white on Super Mario 64 (???)
* Improvements to -1 to 1 depth mode.
- Transformation is only applied on the last stage in the vertex pipeline.
- Should fix some issues with geometry and tessellation (hopefully)
- Reading back FragCoord Z on fragment will transform back to -1 to 1.
* Geometry Shader index count from ThreadsPerInputPrimitive
Generally fixes SPIR-V emitting too many triangles, may change games in OpenGL
* Remove gl_FragDepth scaling
This is always 0-1; the other two issues were causing the problems. Fixes regression with Xenoblade.
* Add Gl StencilOp enum values to Vulkan
* Update guest cache to v1.1 (due to specialization state changes)
This will explode your shader cache from earlier vulkan build, but it must be done. :pensive:
* Vulkan/SPIR-V support for viewport inverse
* Fix typo
* Don't create query pools for unsupported query types
* Return of the Vector Indexing Bug
One day, everyone will get this right.
* Check for transform feedback query support
Sometimes transform feedback is supported without the query type.
* Fix gl_FragCoord.z transformation
FragCoord.z is always in 0-1, even when the real depth range is -1 to 1. Turns out the only bug was geo and tess stage outputs.
Fixes Pokemon Sword/Shield, possibly others.
* Fix Avalonia Rebase
Vulkan is currently not available on Avalonia, but the build does work and you can use opengl.
* Fix headless build
* Add support for BC6 and BC7 decompression, decompress all BC formats if they are not supported by the host
* Fix BCn 4/5 conversion, GetTextureTarget
BCn 4/5 could generate invalid data when a line's size in bytes was not divisible by 4, which both backends expect.
GetTextureTarget was not creating a view with the replacement format.
* Fix dependency
* Fix inverse viewport transform vector type on SPIR-V
* Do not require null descriptors support
* If MultiViewport is not supported, do not try to set more than one viewport/scissor
* Bounds check on bitmap add.
* Flush queries on attachment change rather than program change
Occlusion queries are usually used in a depth only pass so the attachments changing is a better indication of the query block ending.
Write mask changes are also considered since some games do depth only pass by setting 0 write mask on all the colour targets.
* Add support for avalonia (#6)
* add avalonia support
* only lock around skia flush
* addressed review
* cleanup
* add fallback size if avalonia attempts to render but the window size is 0. read desktop scale after enabling dpi check
* fix getting window handle on linux. skip render is size is 0
* Combine non-buffer with buffer image descriptor sets
* Support multisample texture copy with automatic resolve on Vulkan
* Remove old CompileShader methods from the Vulkan backend
* Add minimal pipeline layouts that only contains used bindings
They are used by helper shaders, the intention is avoiding needing to recompile the shaders (from GLSL to SPIR-V) if the bindings changes on the translated guest shaders
* Pre-compile helper shader as SPIR-V, and some fixes
* Remove pre-compiled shaderc binary for Windows as its no longer needed by default
* Workaround RADV crash
Enabling the descriptor indexing extension, even if it is not used, forces the radv driver to use "bolist".
* Use RobustBufferAccess on NVIDIA gpus
Avoids the SMO waterfall triangle on older NVIDIA gpus.
* Implement GPU selector and expose texture recompression on the UI and config
* Fix and enable background compute shader compilation
Also disables warnings from shader cache pipeline misses.
* Fix error due to missing subpass dependency when Attachment Write -> Shader Read barriers are added
* If S8D24 is not supported, use D32FS8
* Ensure all fences are destroyed on dispose
* Pre-allocate arrays up front on DescriptorSetUpdater, allows the removal of some checks
* Add missing clear layer parameter after rebase
* Use selected gpu from config for avalonia (#7)
* use configured device
* address review
* Fix D32S8 copy workaround (AMD)
Fixes water in Pokemon Legends Arceus on AMD GPUs. Possibly fixes other things.
* Use push descriptors for uniform buffer updates (disabled for now)
* Push descriptor support check, buffer redundancy checks
Should make push descriptors faster, needs more testing though.
* Increase light command buffer pool to 2 command buffers, throw rather than returning invalid cbs
* Adjust bindings array sizes
* Force submit command buffers if memory in use by its resources is high
* Add workaround for AMD GCN cubemap view sins
`ImageCreateCubeCompatibleBit` seems to generally break 2D array textures with mipmaps... even if they are eventually aliased as a cubemap with mipmaps. Forcing a copy here works around the issue.
This could be used in future if enabling this bit reduces performance on certain GPUs. (mobile class is generally a worry)
Currently also enabled on Linux as I don't know if they managed to dodge this bug (someone please tell me). Not enabled on Vega at the moment, but easy to add if the issue is there.
* Add mobile, non-RX variants to the GCN regex.
Also make sure that the 3 digit ones only include numbers starting with 7 or 8.
* Increase image limit per stage from 8 to 16
Xenoblade Chronicles 2 was hiting the limit of 8
* Minor code cleanup
* Fix NRE caused by SupportBufferUpdater calling pipeline ClearBuffer
* Add gpu selector to Avalonia (#8)
* Add gpu selector to avalonia settings
* show backend label on window
* some fixes
* address review
* Minor changes to the Avalonia UI
* Update graphics window UI and locales. (#9)
* Update xaml and update locales
* locale updates
Did my best here but likely needs to be checked by native speakers, especially the use of ampersands in greek, russian and turkish?
* Fix locales with more (?) correct translations.
* add separator to render widget
* fix spanish and portuguese
* Add new IdList, replaces buffer list that could not remove elements and had unbounded growth
* Don't crash the settings window if Vulkan is not supported
* Fix Actions menu not being clickable on GTK UI after relaunch
* Rename VulkanGraphicsDevice to VulkanRenderer and Renderer to OpenGLRenderer
* Fix IdList and make it not thread safe
* Revert useless OpenGL format table changes
* Fix headless project build
* List throws ArgumentOutOfRangeException
* SPIR-V: Fix tessellation
* Increase shader cache version due to tessellation fix
* Reduce number of Sync objects created (improves perf in some specific titles)
* Fix vulkan validation errors for NPOT compressed upload and GCN workaround.
* Add timestamp to the shader cache and force rebuild if host cache is outdated
* Prefer Mail box present mode for popups (#11)
* Prefer Mail box present mode
* fix debug
* switch present mode when vsync is toggled
* only disable vsync on the main window
* SPIR-V: Fix geometry shader input load with transform feedback
* BC7 Encoder: Prefer more precision on alpha rather than RGB when alpha is 0
* Fix Avalonia build
* Address initial PR feedback
* Only set transform feedback outputs on last vertex stage
* Address riperiperi PR feedback
* Remove outdated comment
* Remove unused constructor
* Only throw for negative results
* Throw for QueueSubmit and other errors
No point in delaying the inevitable
* Transform feedback decorations inside gl_PerVertex struct breaks the NVIDIA compiler
* Fix some resolution scale issues
* No need for two UpdateScale calls
* Fix comments on SPIR-V generator project
* Try to fix shader local memory size
On DOOM, a shader is using local memory, but both Low and High size are 0, CRS size is 1536, it seems to store on that region?
* Remove RectangleF that is now unused
* Fix ImageGather with multiple offsets
Needs ImageGatherExtended capability, and must use `ConstantComposite` instead of `CompositeConstruct`
* Address PR feedback from jD in all projects except Avalonia
* Address most of jD PR feedback on Avalonia
* Remove unsafe
* Fix VulkanSkiaGpu
* move present mode request out of Create Swapchain method
* split more parts of create swapchain
* addressed reviews
* addressed review
* Address second batch of jD PR feedback
* Fix buffer <-> image copy row length and height alignment
AlignUp helper does not support NPOT alignment, and ASTC textures can have NPOT block sizes
* Better fix for NPOT alignment issue
* Use switch expressions on Vulkan EnumConversion
Thanks jD
* Fix Avalonia build
* Add Vulkan selection prompt on startup
* Grammar fixes on Vulkan prompt message
* Add missing Vulkan migration flag
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: MutantAura <44103205+MutantAura@users.noreply.github.com>
2022-07-31 17:26:06 -04:00
|
|
|
|
{
|
2023-01-15 19:14:01 -05:00
|
|
|
|
renderer = new VulkanRenderer(
|
2023-05-08 07:05:37 -04:00
|
|
|
|
Vk.GetApi(),
|
2023-07-07 17:03:27 -04:00
|
|
|
|
(RendererHost.EmbeddedWindow as EmbeddedWindowVulkan).CreateSurface,
|
2023-01-15 19:14:01 -05:00
|
|
|
|
VulkanHelper.GetRequiredInstanceExtensions,
|
|
|
|
|
ConfigurationState.Instance.Graphics.PreferredGpu.Value);
|
Vulkan backend (#2518)
* WIP Vulkan implementation
* No need to initialize attributes on the SPIR-V backend anymore
* Allow multithreading shaderc and vkCreateShaderModule
You'll only really see the benefit here with threaded-gal or parallel shader cache compile.
Fix shaderc multithreaded changes
Thread safety for shaderc Options constructor
Dunno how they managed to make a constructor not thread safe, but you do you. May avoid some freezes.
* Support multiple levels/layers for blit.
Fixes MK8D when scaled, maybe a few other games. AMD software "safe" blit not supported right now.
* TextureStorage should hold a ref of the foreign storage, otherwise it might be freed while in use
* New depth-stencil blit method for AMD
* Workaround for AMD driver bug
* Fix some tessellation related issues (still doesn't work?)
* Submit command buffer before Texture GetData. (UE4 fix)
* DrawTexture support
* Fix BGRA on OpenGL backend
* Fix rebase build break
* Support format aliasing on SetImage
* Fix uniform buffers being lost when bindings are out of order
* Fix storage buffers being lost when bindings are out of order
(also avoid allocations when changing bindings)
* Use current command buffer for unscaled copy (perf)
Avoids flushing commands and renting a command buffer when fulfilling copy dependencies and when games do unscaled copies.
* Update to .net6
* Update Silk.NET to version 2.10.1
Somehow, massive performance boost. Seems like their vtable for looking up vulkan methods was really slow before.
* Fix PrimitivesGenerated query, disable Transform Feedback queries for now
Lets Splatoon 2 work on nvidia. (mostly)
* Update counter queue to be similar to the OGL one
Fixes softlocks when games had to flush counters.
* Don't throw when ending conditional rendering for now
This should be re-enabled when conditional rendering is enabled on nvidia etc.
* Update findMSB/findLSB to match master's instruction enum
* Fix triangle overlay on SMO, Captain Toad, maybe others?
* Don't make Intel Mesa pay for Intel Windows bugs
* Fix samplers with MinFilter Linear or Nearest (fixes New Super Mario Bros U Deluxe black borders)
* Update Spv.Generator
* Add alpha test emulation on shader (but no shader specialisation yet...)
* Fix R4G4B4A4Unorm texture format permutation
* Validation layers should be enabled for any log level other than None
* Add barriers around vkCmdCopyImage
Write->Read barrier for src image (we want to wait for a write to read it)
Write->Read barrier for dst image (we want to wait for the copy to complete before use)
* Be a bit more careful with texture access flags, since it can be used for anything
* Device local mapping for all buffers
May avoid issues with drivers with NVIDIA on linux/older gpus on windows when using large buffers (?)
Also some performance things and fixes issues with opengl games loading textures weird.
* Cleanup, disable device local buffers for now.
* Add single queue support
Multiqueue seems to be a bit more responsive on NVIDIA. Should fix texture flush on intel. AMD has been forced to single queue for an experiment.
* Fix some validation errors around extended dynamic state
* Remove Intel bug workaround, it was fixed on the latest driver
* Use circular queue for checking consumption on command buffers
Speeds up games that spam command buffers a little. Avoids checking multiple command buffers if multiple are active at once.
* Use SupportBufferUpdater, add single layer flush
* Fix counter queue leak when game decides to use host conditional rendering
* Force device local storage for textures (fixes linux performance)
* Port #3019
* Insert barriers around vkCmdBlitImage (may fix some amd flicker)
* Fix transform feedback on Intel, gl_Position feedback and clears to inexistent depth buffers
* Don't pause transform feedback for multi draw
* Fix draw outside of render pass and missing capability
* Workaround for wrong last attribute on AMD (affects FFVII, STRIKERS1945, probably more)
* Better workaround for AMD vertex buffer size alignment issue
* More instructions + fixes on SPIR-V backend
* Allow custom aspect ratio on Vulkan
* Correct GTK UI status bar positions
* SPIR-V: Functions must always end with a return
* SPIR-V: Fix ImageQuerySizeLod
* SPIR-V: Set DepthReplacing execution mode when FragDepth is modified
* SPIR-V: Implement LoopContinue IR instruction
* SPIR-V: Geometry shader support
* SPIR-V: Use correct binding number on storage buffers array
* Reduce allocations for Spir-v serialization
Passes BinaryWriter instead of the stream to Write and WriteOperand
- Removes creation of BinaryWriter for each instruction
- Removes allocations for literal string
* Some optimizations to Spv.Generator
- Dictionary for lookups of type declarations, constants, extinst
- LiteralInteger internal data format -> ushort
- Deterministic HashCode implementation to avoid spirv result not being the same between runs
- Inline operand list instead of List<T>, falls back to array if many operands. (large performance boost)
TODO: improve instruction allocation, structured program creator, ssa?
* Pool Spv.Generator resources, cache delegates, spv opts
- Pools for Instructions and LiteralIntegers. Can be passed in when creating the generator module.
- NewInstruction is called instead of new Instruction()
- Ryujinx SpirvGenerator passes in some pools that are static. The idea is for these to be shared between threads eventually.
- Estimate code size when creating the output MemoryStream
- LiteralInteger pools using ThreadStatic pools that are initialized before and after creation... not sure of a better way since the way these are created is via implicit cast.
Also, cache delegates for Spv.Generator for functions that are passed around to GenerateBinary etc, since passing the function raw creates a delegate on each call.
TODO: update python spv cs generator to make the coregrammar with NewInstruction and the `params` overloads.
* LocalDefMap for Ssa Rewriter
Rather than allocating a large array of all registers for each block in the shader, allocate one array of all registers and clear it between blocks. Reduces allocations in the shader translator.
* SPIR-V: Transform feedback support
* SPIR-V: Fragment shader interlock support (and image coherency)
* SPIR-V: Add early fragment tests support
* SPIR-V: Implement SwizzleAdd, add missing Triangles ExecutionMode for geometry shaders, remove SamplerType field from TextureMeta
* Don't pass depth clip state right now (fix decals)
Explicitly disabling it is incorrect. OpenGL currently automatically disables based on depth clamp, which is the behaviour if this state is omitted.
* Multisampling support
* Multisampling: Use resolve if src samples count > dst samples count
* Multisampling: We can only resolve for unscaled copies
* SPIR-V: Only add FSI exec mode if used.
* SPIR-V: Use ConstantComposite for Texture Offset Vector
Fixes a bunch of freezes with SPIR-V on AMD hardware, and validation errors. Note: Obviously assumes input offsets are constant, which they currently are.
* SPIR-V: Don't OpReturn if we already OpExit'ed
Fixes spir-v parse failure and stack smashing in RADV (obviously you still need bolist)
* SPIR-V: Only use input attribute type for input attributes
Output vertex attributes should always be of type float.
* Multithreaded Pipeline Compilation
* Address some feedback
* Make this 32
* Update topology with GpuAccessorState
* Cleanup for merge (note: disables spir-v)
* Make more robust to shader compilation failure
- Don't freeze when GLSL compilation fails
- Background SPIR-V pipeline compile failure results in skipped draws, similar to GLSL compilation failure.
* Fix Multisampling
* Only update fragment scale count if a vertex texture needs a scale.
Fixes a performance regression introduced by texture scaling in the vertex stage where support buffer updates would be very frequent, even at 1x, if any textures were used on the vertex stage.
This check doesn't exactly look cheap (a flag in the shader stage would probably be preferred), but it is much cheaper than uploading scales in both vulkan and opengl, so it will do for now.
* Use a bitmap to do granular tracking for buffer uploads.
This path is only taken if the much faster check of "is the buffer rented at all" is triggered, so it doesn't actually end up costing too much, and the time saved by not ending render passes (and on gpu for not waiting on barriers) is probably helpful.
Avoids ending render passes to update buffer data (not all the time)
- 140-180 to 35-45 in SMO metro kingdom (these updates are in the UI)
- Very variable 60-150(!) to 16-25 in mario kart 8 (these updates are in the UI)
As well as allowing more data to be preloaded persistently, this will also allow more data to be loaded in the preload buffer, which should be faster as it doesn't need to insert barriers between draws. (and on tbdr, does not need to flush and reload tile memory)
Improves performance in GPU limited scenarios. Should notably improve performance on TBDR gpus. Still a lot more to do here.
* Copy query results after RP ends, rather than ending to copy
We need to end the render pass to get the data (submit command buffer) anyways...
Reduces render passes created in games that use queries.
* Rework Query stuff a bit to avoid render pass end
Tries to reset returned queries in background when possible, rather than ending the render pass.
Still ends render pass when resetting a counter after draws, but maybe that can be solved too. (by just pulling an empty object off the pool?)
* Remove unnecessary lines
Was for testing
* Fix validation error for query reset
Need to think of a better way to do this.
* SPIR-V: Fix SwizzleAdd and some validation errors
* SPIR-V: Implement attribute indexing and StoreAttribute
* SPIR-V: Fix TextureSize for MS and Buffer sampler types
* Fix relaunch issues
* SPIR-V: Implement LogicalExclusiveOr
* SPIR-V: Constant buffer indexing support
* Ignore unsupported attributes rather than throwing (matches current GLSL behaviour)
* SPIR-V: Implement tessellation support
* SPIR-V: Geometry shader passthrough support
* SPIR-V: Implement StoreShader8/16 and StoreStorage8/16
* SPIR-V: Resolution scale support and fix TextureSample multisample with LOD bug
* SPIR-V: Fix field index for scale count
* SPIR-V: Fix another case of wrong field index
* SPIRV/GLSL: More scaling related fixes
* SPIR-V: Fix ImageLoad CompositeExtract component type
* SPIR-V: Workaround for Intel FrontFacing bug
* Enable SPIR-V backend by default
* Allow null samplers (samplers are not required when only using texelFetch to access the texture)
* Fix some validation errors related to texel block view usage flag and invalid image barrier base level
* Use explicit subgroup size if we can (might fix some block flickering on AMD)
* Take componentMask and scissor into account when clearing framebuffer attachments
* Add missing barriers around CmdFillBuffer (fixes Monster Hunter Rise flickering on NVIDIA)
* Use ClampToEdge for Clamp sampler address mode on Vulkan (fixes Hollow Knight)
Clamp is unsupported on Vulkan, but ClampToEdge behaves almost the same. ClampToBorder on the other hand (which was being used before) is pretty different
* Shader specialization for new Vulkan required state (fixes remaining alpha test issues, vertex stretching on AMD on Crash Bandicoot, etc)
* Check if the subgroup size is supported before passing a explicit size
* Only enable ShaderFloat64 if the GPU supports it
* We don't need to recompile shaders if alpha test state changed but alpha test is disabled
* Enable shader cache on Vulkan and implement MultiplyHighS32/U32 on SPIR-V (missed those before)
* Fix pipeline state saving before it is updated.
This should fix a few warnings and potential stutters due to bad pipeline states being saved in the cache. You may need to clear your guest cache.
* Allow null samplers on OpenGL backend
* _unit0Sampler should be set only for binding 0
* Remove unused PipelineConverter format variable (was causing IOR)
* Raise textures limit to 64 on Vulkan
* No need to pack the shader binaries if shader cache is disabled
* Fix backbuffer not being cleared and scissor not being re-enabled on OpenGL
* Do not clear unbound framebuffer color attachments
* Geometry shader passthrough emulation
* Consolidate UpdateDepthMode and GetDepthMode implementation
* Fix A1B5G5R5 texture format and support R4G4 on Vulkan
* Add barrier before use of some modified images
* Report 32 bit query result on AMD windows (smo issue)
* Add texture recompression support (disabled for now)
It recompresses ASTC textures into BC7, which might reduce VRAM usage significantly on games that uses ASTC textures
* Do not report R4G4 format as supported on Vulkan
It was causing mario head to become white on Super Mario 64 (???)
* Improvements to -1 to 1 depth mode.
- Transformation is only applied on the last stage in the vertex pipeline.
- Should fix some issues with geometry and tessellation (hopefully)
- Reading back FragCoord Z on fragment will transform back to -1 to 1.
* Geometry Shader index count from ThreadsPerInputPrimitive
Generally fixes SPIR-V emitting too many triangles, may change games in OpenGL
* Remove gl_FragDepth scaling
This is always 0-1; the other two issues were causing the problems. Fixes regression with Xenoblade.
* Add Gl StencilOp enum values to Vulkan
* Update guest cache to v1.1 (due to specialization state changes)
This will explode your shader cache from earlier vulkan build, but it must be done. :pensive:
* Vulkan/SPIR-V support for viewport inverse
* Fix typo
* Don't create query pools for unsupported query types
* Return of the Vector Indexing Bug
One day, everyone will get this right.
* Check for transform feedback query support
Sometimes transform feedback is supported without the query type.
* Fix gl_FragCoord.z transformation
FragCoord.z is always in 0-1, even when the real depth range is -1 to 1. Turns out the only bug was geo and tess stage outputs.
Fixes Pokemon Sword/Shield, possibly others.
* Fix Avalonia Rebase
Vulkan is currently not available on Avalonia, but the build does work and you can use opengl.
* Fix headless build
* Add support for BC6 and BC7 decompression, decompress all BC formats if they are not supported by the host
* Fix BCn 4/5 conversion, GetTextureTarget
BCn 4/5 could generate invalid data when a line's size in bytes was not divisible by 4, which both backends expect.
GetTextureTarget was not creating a view with the replacement format.
* Fix dependency
* Fix inverse viewport transform vector type on SPIR-V
* Do not require null descriptors support
* If MultiViewport is not supported, do not try to set more than one viewport/scissor
* Bounds check on bitmap add.
* Flush queries on attachment change rather than program change
Occlusion queries are usually used in a depth only pass so the attachments changing is a better indication of the query block ending.
Write mask changes are also considered since some games do depth only pass by setting 0 write mask on all the colour targets.
* Add support for avalonia (#6)
* add avalonia support
* only lock around skia flush
* addressed review
* cleanup
* add fallback size if avalonia attempts to render but the window size is 0. read desktop scale after enabling dpi check
* fix getting window handle on linux. skip render is size is 0
* Combine non-buffer with buffer image descriptor sets
* Support multisample texture copy with automatic resolve on Vulkan
* Remove old CompileShader methods from the Vulkan backend
* Add minimal pipeline layouts that only contains used bindings
They are used by helper shaders, the intention is avoiding needing to recompile the shaders (from GLSL to SPIR-V) if the bindings changes on the translated guest shaders
* Pre-compile helper shader as SPIR-V, and some fixes
* Remove pre-compiled shaderc binary for Windows as its no longer needed by default
* Workaround RADV crash
Enabling the descriptor indexing extension, even if it is not used, forces the radv driver to use "bolist".
* Use RobustBufferAccess on NVIDIA gpus
Avoids the SMO waterfall triangle on older NVIDIA gpus.
* Implement GPU selector and expose texture recompression on the UI and config
* Fix and enable background compute shader compilation
Also disables warnings from shader cache pipeline misses.
* Fix error due to missing subpass dependency when Attachment Write -> Shader Read barriers are added
* If S8D24 is not supported, use D32FS8
* Ensure all fences are destroyed on dispose
* Pre-allocate arrays up front on DescriptorSetUpdater, allows the removal of some checks
* Add missing clear layer parameter after rebase
* Use selected gpu from config for avalonia (#7)
* use configured device
* address review
* Fix D32S8 copy workaround (AMD)
Fixes water in Pokemon Legends Arceus on AMD GPUs. Possibly fixes other things.
* Use push descriptors for uniform buffer updates (disabled for now)
* Push descriptor support check, buffer redundancy checks
Should make push descriptors faster, needs more testing though.
* Increase light command buffer pool to 2 command buffers, throw rather than returning invalid cbs
* Adjust bindings array sizes
* Force submit command buffers if memory in use by its resources is high
* Add workaround for AMD GCN cubemap view sins
`ImageCreateCubeCompatibleBit` seems to generally break 2D array textures with mipmaps... even if they are eventually aliased as a cubemap with mipmaps. Forcing a copy here works around the issue.
This could be used in future if enabling this bit reduces performance on certain GPUs. (mobile class is generally a worry)
Currently also enabled on Linux as I don't know if they managed to dodge this bug (someone please tell me). Not enabled on Vega at the moment, but easy to add if the issue is there.
* Add mobile, non-RX variants to the GCN regex.
Also make sure that the 3 digit ones only include numbers starting with 7 or 8.
* Increase image limit per stage from 8 to 16
Xenoblade Chronicles 2 was hiting the limit of 8
* Minor code cleanup
* Fix NRE caused by SupportBufferUpdater calling pipeline ClearBuffer
* Add gpu selector to Avalonia (#8)
* Add gpu selector to avalonia settings
* show backend label on window
* some fixes
* address review
* Minor changes to the Avalonia UI
* Update graphics window UI and locales. (#9)
* Update xaml and update locales
* locale updates
Did my best here but likely needs to be checked by native speakers, especially the use of ampersands in greek, russian and turkish?
* Fix locales with more (?) correct translations.
* add separator to render widget
* fix spanish and portuguese
* Add new IdList, replaces buffer list that could not remove elements and had unbounded growth
* Don't crash the settings window if Vulkan is not supported
* Fix Actions menu not being clickable on GTK UI after relaunch
* Rename VulkanGraphicsDevice to VulkanRenderer and Renderer to OpenGLRenderer
* Fix IdList and make it not thread safe
* Revert useless OpenGL format table changes
* Fix headless project build
* List throws ArgumentOutOfRangeException
* SPIR-V: Fix tessellation
* Increase shader cache version due to tessellation fix
* Reduce number of Sync objects created (improves perf in some specific titles)
* Fix vulkan validation errors for NPOT compressed upload and GCN workaround.
* Add timestamp to the shader cache and force rebuild if host cache is outdated
* Prefer Mail box present mode for popups (#11)
* Prefer Mail box present mode
* fix debug
* switch present mode when vsync is toggled
* only disable vsync on the main window
* SPIR-V: Fix geometry shader input load with transform feedback
* BC7 Encoder: Prefer more precision on alpha rather than RGB when alpha is 0
* Fix Avalonia build
* Address initial PR feedback
* Only set transform feedback outputs on last vertex stage
* Address riperiperi PR feedback
* Remove outdated comment
* Remove unused constructor
* Only throw for negative results
* Throw for QueueSubmit and other errors
No point in delaying the inevitable
* Transform feedback decorations inside gl_PerVertex struct breaks the NVIDIA compiler
* Fix some resolution scale issues
* No need for two UpdateScale calls
* Fix comments on SPIR-V generator project
* Try to fix shader local memory size
On DOOM, a shader is using local memory, but both Low and High size are 0, CRS size is 1536, it seems to store on that region?
* Remove RectangleF that is now unused
* Fix ImageGather with multiple offsets
Needs ImageGatherExtended capability, and must use `ConstantComposite` instead of `CompositeConstruct`
* Address PR feedback from jD in all projects except Avalonia
* Address most of jD PR feedback on Avalonia
* Remove unsafe
* Fix VulkanSkiaGpu
* move present mode request out of Create Swapchain method
* split more parts of create swapchain
* addressed reviews
* addressed review
* Address second batch of jD PR feedback
* Fix buffer <-> image copy row length and height alignment
AlignUp helper does not support NPOT alignment, and ASTC textures can have NPOT block sizes
* Better fix for NPOT alignment issue
* Use switch expressions on Vulkan EnumConversion
Thanks jD
* Fix Avalonia build
* Add Vulkan selection prompt on startup
* Grammar fixes on Vulkan prompt message
* Add missing Vulkan migration flag
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: MutantAura <44103205+MutantAura@users.noreply.github.com>
2022-07-31 17:26:06 -04:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
renderer = new OpenGLRenderer();
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
BackendThreading threadingMode = ConfigurationState.Instance.Graphics.BackendThreading;
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
var isGALThreaded = threadingMode == BackendThreading.On || (threadingMode == BackendThreading.Auto && renderer.PreferThreading);
|
|
|
|
|
if (isGALThreaded)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
|
|
|
|
renderer = new ThreadedRenderer(renderer);
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
Logger.Info?.PrintMsg(LogClass.Gpu, $"Backend Threading ({threadingMode}): {isGALThreaded}");
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
// Initialize Configuration.
|
2023-07-07 17:03:27 -04:00
|
|
|
|
var memoryConfiguration = ConfigurationState.Instance.System.ExpandRam.Value ? MemoryConfiguration.MemoryConfiguration6GiB : MemoryConfiguration.MemoryConfiguration4GiB;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
HLEConfiguration configuration = new(VirtualFileSystem,
|
2023-01-10 12:45:55 -05:00
|
|
|
|
_viewModel.LibHacHorizonManager,
|
|
|
|
|
ContentManager,
|
|
|
|
|
_accountManager,
|
|
|
|
|
_userChannelPersistence,
|
|
|
|
|
renderer,
|
|
|
|
|
InitializeAudio(),
|
|
|
|
|
memoryConfiguration,
|
|
|
|
|
_viewModel.UiHandler,
|
|
|
|
|
(SystemLanguage)ConfigurationState.Instance.System.Language.Value,
|
|
|
|
|
(RegionCode)ConfigurationState.Instance.System.Region.Value,
|
|
|
|
|
ConfigurationState.Instance.Graphics.EnableVsync,
|
|
|
|
|
ConfigurationState.Instance.System.EnableDockedMode,
|
|
|
|
|
ConfigurationState.Instance.System.EnablePtc,
|
|
|
|
|
ConfigurationState.Instance.System.EnableInternetAccess,
|
|
|
|
|
ConfigurationState.Instance.System.EnableFsIntegrityChecks ? IntegrityCheckLevel.ErrorOnInvalid : IntegrityCheckLevel.None,
|
|
|
|
|
ConfigurationState.Instance.System.FsGlobalAccessLogMode,
|
|
|
|
|
ConfigurationState.Instance.System.SystemTimeOffset,
|
|
|
|
|
ConfigurationState.Instance.System.TimeZone,
|
|
|
|
|
ConfigurationState.Instance.System.MemoryManagerMode,
|
|
|
|
|
ConfigurationState.Instance.System.IgnoreMissingServices,
|
|
|
|
|
ConfigurationState.Instance.Graphics.AspectRatio,
|
2023-01-29 06:37:52 -05:00
|
|
|
|
ConfigurationState.Instance.System.AudioVolume,
|
2023-04-16 11:25:20 -04:00
|
|
|
|
ConfigurationState.Instance.System.UseHypervisor,
|
Add ldn:u implementation, INetworkClient interface and DisabledLdnClient (#5652)
* Impl first attempt to LDN
* Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Mac addresses are now randomly assigned on the server. (fixes joining lobbies)
- Fixed the "connected" handler for stations to actually find a
- Added info retrieval when connected to a station.
- Users that disconnect are now removed from rooms they were in. (still need to broadcast tho)
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
* We may just be "initialized". Ignore this for now.
* Lots of WIP
* Add Disconnect packet
* Improve signalling of internal events.
* Fix scan.
* Fix some more stupid things.
* Enable NoDelay on all sockets.
* Add station accept policy, disconnect function.
* Limit max number of games.
* Split out networking stuff from HLE, so it can be swapped.
* Update logging calls.
* Missed a spot.
* Call SignalDisconnect instead of SetState
* Add comment to GetNetworkInfo
* Update configuration + UI
Now has its own tab, more options.
* Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
* some cleanup
* More fix
* Correctly handle errors when connecting.
* Disable *Private call and clean symbols
* Structs cleanup
* Big cleanup
* Fix InvalidHandle (in MK8D and other games)
* Add Reject and Private Network support (v1)
RyuLdn Version bumped to 1.
* Add Initialize Packet
Allows users to keep Mac Addresses assigned by the server.
* Add SetWirelessControllerRestriction and some cleanup
* LDN-2 Initial Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
* Misc Changes
* Fix GetNetworkInfo
* Fix some small issues
* Implement GetNetworkInfoLatestUpdate
* Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
* Fix ARMS Scan (and other games using wrong LocalCommunicationId
* Fix latest update when host leaves
* Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
* Fix the localCommunicationId = -1
* Don't set Connect flag for nodes already in the room before joining.
* Make IUserLocalCommunicationService disposable
* Don't dispose if there's no client.
* LDN-2-2 Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Put sockets behind an interface, so that they can be swapped for something proxyable
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
Misc Changes
Fix GetNetworkInfo
Fix some small issues
Disable LAN by default til the config is added.
Fix Splatoon 2
- Stub nfp IUser::StartDetection / IUser::StopDetection.
- Stub ntc IEnsureNetworkClockAvailabilityService and needed calls.
Cleanup previous fixes
Stub IAudioInManager/IAudioIn for Splatoon 2 LAN
Add LAN settings to multiplayer tab
LAN Play > LAN Mode
Implement GetNetworkInfoLatestUpdate
Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
Fix ARMS Scan (and other games using wrong LocalCommunicationId
Fix latest update when host leaves
Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
Fix the localCommunicationId = -1
Don't set Connect flag for nodes already in the room before joining.
Make IUserLocalCommunicationService disposable
Fix crash when using LAN mode on linux.
Actually use that call
Don't dispose if there's no client.
Fix the settings window crash
Fix configurationFileUpdated
* Make LDN compatible with Ryujinx/Ryujinx#3805
* Ava: Add Ldn options to SettingsNetworkTab
* Ava: Add update events for multiplayer options
* Apply formatting
* Remove LdnHelper
* ldn: Fix hardcoded /24 subnet mask
* Fix naming rule violations
* Add missing summary doc tag
* Remove NetCoreServer dependency
* Address code style issues and typos
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Call CloseStation/CloseAccessPoint to reduce code duplication
* Fix typo
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Fix missing trailing commas
* Extract AddressList from AddressEntry
* Use AcceptPolicy as a type for LdnNetworkInfo.StationAcceptPolicy
* Add Flags attribute to ScanFilterFlag
* Rename struct members for LdnNetworkInfo
* Remove extra line
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Extract NetworkErrorMessage from NetworkError
* Fix missing trailing commas
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2023-09-25 17:50:43 -04:00
|
|
|
|
ConfigurationState.Instance.Multiplayer.LanInterfaceId.Value,
|
|
|
|
|
ConfigurationState.Instance.Multiplayer.Mode);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
Device = new Switch(configuration);
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
private static IHardwareDeviceDriver InitializeAudio()
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
var availableBackends = new List<AudioBackend>
|
2023-01-10 12:45:55 -05:00
|
|
|
|
{
|
|
|
|
|
AudioBackend.SDL2,
|
|
|
|
|
AudioBackend.SoundIo,
|
|
|
|
|
AudioBackend.OpenAl,
|
2023-07-07 17:03:27 -04:00
|
|
|
|
AudioBackend.Dummy,
|
2023-01-10 12:45:55 -05:00
|
|
|
|
};
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
AudioBackend preferredBackend = ConfigurationState.Instance.System.AudioBackend.Value;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
for (int i = 0; i < availableBackends.Count; i++)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-10 12:45:55 -05:00
|
|
|
|
if (availableBackends[i] == preferredBackend)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-10 12:45:55 -05:00
|
|
|
|
availableBackends.RemoveAt(i);
|
|
|
|
|
availableBackends.Insert(0, preferredBackend);
|
|
|
|
|
break;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
|
|
|
|
static IHardwareDeviceDriver InitializeAudioBackend<T>(AudioBackend backend, AudioBackend nextBackend) where T : IHardwareDeviceDriver, new()
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-10 12:45:55 -05:00
|
|
|
|
if (T.IsSupported)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-10 12:45:55 -05:00
|
|
|
|
return new T();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
Logger.Warning?.Print(LogClass.Audio, $"{backend} is not supported, falling back to {nextBackend}.");
|
|
|
|
|
|
|
|
|
|
return null;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
IHardwareDeviceDriver deviceDriver = null;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
for (int i = 0; i < availableBackends.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
AudioBackend currentBackend = availableBackends[i];
|
2023-07-07 17:03:27 -04:00
|
|
|
|
AudioBackend nextBackend = i + 1 < availableBackends.Count ? availableBackends[i + 1] : AudioBackend.Dummy;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
deviceDriver = currentBackend switch
|
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
AudioBackend.SDL2 => InitializeAudioBackend<SDL2HardwareDeviceDriver>(AudioBackend.SDL2, nextBackend),
|
2023-01-10 12:45:55 -05:00
|
|
|
|
AudioBackend.SoundIo => InitializeAudioBackend<SoundIoHardwareDeviceDriver>(AudioBackend.SoundIo, nextBackend),
|
2023-07-07 17:03:27 -04:00
|
|
|
|
AudioBackend.OpenAl => InitializeAudioBackend<OpenALHardwareDeviceDriver>(AudioBackend.OpenAl, nextBackend),
|
|
|
|
|
_ => new DummyHardwareDeviceDriver(),
|
2023-01-10 12:45:55 -05:00
|
|
|
|
};
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
if (deviceDriver != null)
|
|
|
|
|
{
|
|
|
|
|
ConfigurationState.Instance.System.AudioBackend.Value = currentBackend;
|
|
|
|
|
break;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
MainWindowViewModel.SaveConfig();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
return deviceDriver;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
private void Window_BoundsChanged(object sender, Size e)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-07-07 17:03:27 -04:00
|
|
|
|
Width = (int)e.Width;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
Height = (int)e.Height;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2022-09-19 14:05:26 -04:00
|
|
|
|
SetRendererWindowSize(e);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void MainLoop()
|
|
|
|
|
{
|
|
|
|
|
while (_isActive)
|
|
|
|
|
{
|
|
|
|
|
UpdateFrame();
|
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
// Polling becomes expensive if it's not slept.
|
2022-05-15 07:30:15 -04:00
|
|
|
|
Thread.Sleep(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-07 19:28:53 -05:00
|
|
|
|
private void RenderLoop()
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
|
|
|
|
Dispatcher.UIThread.InvokeAsync(() =>
|
|
|
|
|
{
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (_viewModel.StartGamesInFullscreen)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.WindowState = WindowState.FullScreen;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (_viewModel.WindowState == WindowState.FullScreen)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.ShowMenuAndStatusBar = false;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
_renderer = Device.Gpu.Renderer is ThreadedRenderer tr ? tr.BaseRenderer : Device.Gpu.Renderer;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
_renderer.ScreenCaptured += Renderer_ScreenCaptured;
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
(RendererHost.EmbeddedWindow as EmbeddedWindowOpenGL)?.InitializeBackgroundContext(_renderer);
|
2022-08-16 12:32:37 -04:00
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
Device.Gpu.Renderer.Initialize(_glLogLevel);
|
|
|
|
|
|
2023-02-27 16:11:55 -05:00
|
|
|
|
_renderer?.Window?.SetAntiAliasing((Graphics.GAL.AntiAliasing)ConfigurationState.Instance.Graphics.AntiAliasing.Value);
|
|
|
|
|
_renderer?.Window?.SetScalingFilter((Graphics.GAL.ScalingFilter)ConfigurationState.Instance.Graphics.ScalingFilter.Value);
|
|
|
|
|
_renderer?.Window?.SetScalingFilterLevel(ConfigurationState.Instance.Graphics.ScalingFilterLevel.Value);
|
2023-08-07 13:54:05 -04:00
|
|
|
|
_renderer?.Window?.SetColorSpacePassthrough(ConfigurationState.Instance.Graphics.EnableColorSpacePassthrough.Value);
|
2023-02-27 16:11:55 -05:00
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
Width = (int)RendererHost.Bounds.Width;
|
|
|
|
|
Height = (int)RendererHost.Bounds.Height;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
Ava UI: Avalonia 11 & FluentAvalonia 2 Support (#4362)
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190dba48e405a833f654691e47509a29792
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb377a0ca1a8b51700300422422c8c37
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74488a419074ae1d484e54a00bc01973
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea086d9219f890e33cf81d566d96b9ae
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47e60aadefd59a75e43549793481f853
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082b10f335f81487f22b7eeb86075e09e
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb98072adc240c2eb2d26d25fa119fe7d
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff04633d261b9a43db792f6438df63f40
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a033dbf70258c4c0e5a848263b16bbd
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a6f19ac0a85b08aece3c1a1e196e379
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc6b8e523d61abb7e79ceaa95a558c6c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292beda825fa76e05ad2e561c6d571c95
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044cbf8c89935f14b8c7e085ad729f0e28
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b9ca6b698917ded3ef6db6e6716cad1
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes #4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2023-08-11 20:47:22 -04:00
|
|
|
|
_renderer.Window.SetSize((int)(Width * _topLevel.RenderScaling), (int)(Height * _topLevel.RenderScaling));
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2022-09-19 14:05:26 -04:00
|
|
|
|
_chrono.Start();
|
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
Device.Gpu.Renderer.RunLoop(() =>
|
|
|
|
|
{
|
|
|
|
|
Device.Gpu.SetGpuThread();
|
|
|
|
|
Device.Gpu.InitializeShaderCache(_gpuCancellationTokenSource.Token);
|
|
|
|
|
Translator.IsReadyForTranslation.Set();
|
|
|
|
|
|
2023-02-07 19:28:53 -05:00
|
|
|
|
_renderer.Window.ChangeVSyncMode(Device.EnableDeviceVsync);
|
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
while (_isActive)
|
|
|
|
|
{
|
2022-09-19 14:05:26 -04:00
|
|
|
|
_ticks += _chrono.ElapsedTicks;
|
|
|
|
|
|
|
|
|
|
_chrono.Restart();
|
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
if (Device.WaitFifo())
|
|
|
|
|
{
|
|
|
|
|
Device.Statistics.RecordFifoStart();
|
|
|
|
|
Device.ProcessFrame();
|
|
|
|
|
Device.Statistics.RecordFifoEnd();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
while (Device.ConsumeFrameAvailable())
|
|
|
|
|
{
|
|
|
|
|
if (!_renderingStarted)
|
|
|
|
|
{
|
|
|
|
|
_renderingStarted = true;
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.SwitchToRenderer(false);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
Device.PresentFrame(() => (RendererHost.EmbeddedWindow as EmbeddedWindowOpenGL)?.SwapBuffers());
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
2022-09-19 14:05:26 -04:00
|
|
|
|
if (_ticks >= _ticksPerFrame)
|
|
|
|
|
{
|
|
|
|
|
UpdateStatus();
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-31 17:43:20 -04:00
|
|
|
|
|
|
|
|
|
// Make sure all commands in the run loop are fully executed before leaving the loop.
|
|
|
|
|
if (Device.Gpu.Renderer is ThreadedRenderer threaded)
|
|
|
|
|
{
|
|
|
|
|
threaded.FlushThreadedCommands();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_gpuDoneEvent.Set();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
});
|
|
|
|
|
|
2023-07-07 17:03:27 -04:00
|
|
|
|
(RendererHost.EmbeddedWindow as EmbeddedWindowOpenGL)?.MakeCurrent(true);
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
2022-09-19 14:05:26 -04:00
|
|
|
|
public void UpdateStatus()
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-10 12:45:55 -05:00
|
|
|
|
// Run a status update only when a frame is to be drawn. This prevents from updating the ui and wasting a render when no frame is queued.
|
2023-01-03 13:45:08 -05:00
|
|
|
|
string dockedMode = ConfigurationState.Instance.System.EnableDockedMode ? LocaleManager.Instance[LocaleKeys.Docked] : LocaleManager.Instance[LocaleKeys.Handheld];
|
2023-01-29 06:37:52 -05:00
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
if (GraphicsConfig.ResScale != 1)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-01-10 12:45:55 -05:00
|
|
|
|
dockedMode += $" ({GraphicsConfig.ResScale}x)";
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs(
|
|
|
|
|
Device.EnableDeviceVsync,
|
2023-01-03 13:45:08 -05:00
|
|
|
|
LocaleManager.Instance[LocaleKeys.VolumeShort] + $": {(int)(Device.GetVolume() * 100)}%",
|
2023-01-15 19:14:01 -05:00
|
|
|
|
ConfigurationState.Instance.Graphics.GraphicsBackend.Value == GraphicsBackend.Vulkan ? "Vulkan" : "OpenGL",
|
2022-05-15 07:30:15 -04:00
|
|
|
|
dockedMode,
|
|
|
|
|
ConfigurationState.Instance.Graphics.AspectRatio.Value.ToText(),
|
2023-01-03 13:45:08 -05:00
|
|
|
|
LocaleManager.Instance[LocaleKeys.Game] + $": {Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)",
|
2022-05-15 07:30:15 -04:00
|
|
|
|
$"FIFO: {Device.Statistics.GetFifoPercent():00.00} %",
|
Vulkan backend (#2518)
* WIP Vulkan implementation
* No need to initialize attributes on the SPIR-V backend anymore
* Allow multithreading shaderc and vkCreateShaderModule
You'll only really see the benefit here with threaded-gal or parallel shader cache compile.
Fix shaderc multithreaded changes
Thread safety for shaderc Options constructor
Dunno how they managed to make a constructor not thread safe, but you do you. May avoid some freezes.
* Support multiple levels/layers for blit.
Fixes MK8D when scaled, maybe a few other games. AMD software "safe" blit not supported right now.
* TextureStorage should hold a ref of the foreign storage, otherwise it might be freed while in use
* New depth-stencil blit method for AMD
* Workaround for AMD driver bug
* Fix some tessellation related issues (still doesn't work?)
* Submit command buffer before Texture GetData. (UE4 fix)
* DrawTexture support
* Fix BGRA on OpenGL backend
* Fix rebase build break
* Support format aliasing on SetImage
* Fix uniform buffers being lost when bindings are out of order
* Fix storage buffers being lost when bindings are out of order
(also avoid allocations when changing bindings)
* Use current command buffer for unscaled copy (perf)
Avoids flushing commands and renting a command buffer when fulfilling copy dependencies and when games do unscaled copies.
* Update to .net6
* Update Silk.NET to version 2.10.1
Somehow, massive performance boost. Seems like their vtable for looking up vulkan methods was really slow before.
* Fix PrimitivesGenerated query, disable Transform Feedback queries for now
Lets Splatoon 2 work on nvidia. (mostly)
* Update counter queue to be similar to the OGL one
Fixes softlocks when games had to flush counters.
* Don't throw when ending conditional rendering for now
This should be re-enabled when conditional rendering is enabled on nvidia etc.
* Update findMSB/findLSB to match master's instruction enum
* Fix triangle overlay on SMO, Captain Toad, maybe others?
* Don't make Intel Mesa pay for Intel Windows bugs
* Fix samplers with MinFilter Linear or Nearest (fixes New Super Mario Bros U Deluxe black borders)
* Update Spv.Generator
* Add alpha test emulation on shader (but no shader specialisation yet...)
* Fix R4G4B4A4Unorm texture format permutation
* Validation layers should be enabled for any log level other than None
* Add barriers around vkCmdCopyImage
Write->Read barrier for src image (we want to wait for a write to read it)
Write->Read barrier for dst image (we want to wait for the copy to complete before use)
* Be a bit more careful with texture access flags, since it can be used for anything
* Device local mapping for all buffers
May avoid issues with drivers with NVIDIA on linux/older gpus on windows when using large buffers (?)
Also some performance things and fixes issues with opengl games loading textures weird.
* Cleanup, disable device local buffers for now.
* Add single queue support
Multiqueue seems to be a bit more responsive on NVIDIA. Should fix texture flush on intel. AMD has been forced to single queue for an experiment.
* Fix some validation errors around extended dynamic state
* Remove Intel bug workaround, it was fixed on the latest driver
* Use circular queue for checking consumption on command buffers
Speeds up games that spam command buffers a little. Avoids checking multiple command buffers if multiple are active at once.
* Use SupportBufferUpdater, add single layer flush
* Fix counter queue leak when game decides to use host conditional rendering
* Force device local storage for textures (fixes linux performance)
* Port #3019
* Insert barriers around vkCmdBlitImage (may fix some amd flicker)
* Fix transform feedback on Intel, gl_Position feedback and clears to inexistent depth buffers
* Don't pause transform feedback for multi draw
* Fix draw outside of render pass and missing capability
* Workaround for wrong last attribute on AMD (affects FFVII, STRIKERS1945, probably more)
* Better workaround for AMD vertex buffer size alignment issue
* More instructions + fixes on SPIR-V backend
* Allow custom aspect ratio on Vulkan
* Correct GTK UI status bar positions
* SPIR-V: Functions must always end with a return
* SPIR-V: Fix ImageQuerySizeLod
* SPIR-V: Set DepthReplacing execution mode when FragDepth is modified
* SPIR-V: Implement LoopContinue IR instruction
* SPIR-V: Geometry shader support
* SPIR-V: Use correct binding number on storage buffers array
* Reduce allocations for Spir-v serialization
Passes BinaryWriter instead of the stream to Write and WriteOperand
- Removes creation of BinaryWriter for each instruction
- Removes allocations for literal string
* Some optimizations to Spv.Generator
- Dictionary for lookups of type declarations, constants, extinst
- LiteralInteger internal data format -> ushort
- Deterministic HashCode implementation to avoid spirv result not being the same between runs
- Inline operand list instead of List<T>, falls back to array if many operands. (large performance boost)
TODO: improve instruction allocation, structured program creator, ssa?
* Pool Spv.Generator resources, cache delegates, spv opts
- Pools for Instructions and LiteralIntegers. Can be passed in when creating the generator module.
- NewInstruction is called instead of new Instruction()
- Ryujinx SpirvGenerator passes in some pools that are static. The idea is for these to be shared between threads eventually.
- Estimate code size when creating the output MemoryStream
- LiteralInteger pools using ThreadStatic pools that are initialized before and after creation... not sure of a better way since the way these are created is via implicit cast.
Also, cache delegates for Spv.Generator for functions that are passed around to GenerateBinary etc, since passing the function raw creates a delegate on each call.
TODO: update python spv cs generator to make the coregrammar with NewInstruction and the `params` overloads.
* LocalDefMap for Ssa Rewriter
Rather than allocating a large array of all registers for each block in the shader, allocate one array of all registers and clear it between blocks. Reduces allocations in the shader translator.
* SPIR-V: Transform feedback support
* SPIR-V: Fragment shader interlock support (and image coherency)
* SPIR-V: Add early fragment tests support
* SPIR-V: Implement SwizzleAdd, add missing Triangles ExecutionMode for geometry shaders, remove SamplerType field from TextureMeta
* Don't pass depth clip state right now (fix decals)
Explicitly disabling it is incorrect. OpenGL currently automatically disables based on depth clamp, which is the behaviour if this state is omitted.
* Multisampling support
* Multisampling: Use resolve if src samples count > dst samples count
* Multisampling: We can only resolve for unscaled copies
* SPIR-V: Only add FSI exec mode if used.
* SPIR-V: Use ConstantComposite for Texture Offset Vector
Fixes a bunch of freezes with SPIR-V on AMD hardware, and validation errors. Note: Obviously assumes input offsets are constant, which they currently are.
* SPIR-V: Don't OpReturn if we already OpExit'ed
Fixes spir-v parse failure and stack smashing in RADV (obviously you still need bolist)
* SPIR-V: Only use input attribute type for input attributes
Output vertex attributes should always be of type float.
* Multithreaded Pipeline Compilation
* Address some feedback
* Make this 32
* Update topology with GpuAccessorState
* Cleanup for merge (note: disables spir-v)
* Make more robust to shader compilation failure
- Don't freeze when GLSL compilation fails
- Background SPIR-V pipeline compile failure results in skipped draws, similar to GLSL compilation failure.
* Fix Multisampling
* Only update fragment scale count if a vertex texture needs a scale.
Fixes a performance regression introduced by texture scaling in the vertex stage where support buffer updates would be very frequent, even at 1x, if any textures were used on the vertex stage.
This check doesn't exactly look cheap (a flag in the shader stage would probably be preferred), but it is much cheaper than uploading scales in both vulkan and opengl, so it will do for now.
* Use a bitmap to do granular tracking for buffer uploads.
This path is only taken if the much faster check of "is the buffer rented at all" is triggered, so it doesn't actually end up costing too much, and the time saved by not ending render passes (and on gpu for not waiting on barriers) is probably helpful.
Avoids ending render passes to update buffer data (not all the time)
- 140-180 to 35-45 in SMO metro kingdom (these updates are in the UI)
- Very variable 60-150(!) to 16-25 in mario kart 8 (these updates are in the UI)
As well as allowing more data to be preloaded persistently, this will also allow more data to be loaded in the preload buffer, which should be faster as it doesn't need to insert barriers between draws. (and on tbdr, does not need to flush and reload tile memory)
Improves performance in GPU limited scenarios. Should notably improve performance on TBDR gpus. Still a lot more to do here.
* Copy query results after RP ends, rather than ending to copy
We need to end the render pass to get the data (submit command buffer) anyways...
Reduces render passes created in games that use queries.
* Rework Query stuff a bit to avoid render pass end
Tries to reset returned queries in background when possible, rather than ending the render pass.
Still ends render pass when resetting a counter after draws, but maybe that can be solved too. (by just pulling an empty object off the pool?)
* Remove unnecessary lines
Was for testing
* Fix validation error for query reset
Need to think of a better way to do this.
* SPIR-V: Fix SwizzleAdd and some validation errors
* SPIR-V: Implement attribute indexing and StoreAttribute
* SPIR-V: Fix TextureSize for MS and Buffer sampler types
* Fix relaunch issues
* SPIR-V: Implement LogicalExclusiveOr
* SPIR-V: Constant buffer indexing support
* Ignore unsupported attributes rather than throwing (matches current GLSL behaviour)
* SPIR-V: Implement tessellation support
* SPIR-V: Geometry shader passthrough support
* SPIR-V: Implement StoreShader8/16 and StoreStorage8/16
* SPIR-V: Resolution scale support and fix TextureSample multisample with LOD bug
* SPIR-V: Fix field index for scale count
* SPIR-V: Fix another case of wrong field index
* SPIRV/GLSL: More scaling related fixes
* SPIR-V: Fix ImageLoad CompositeExtract component type
* SPIR-V: Workaround for Intel FrontFacing bug
* Enable SPIR-V backend by default
* Allow null samplers (samplers are not required when only using texelFetch to access the texture)
* Fix some validation errors related to texel block view usage flag and invalid image barrier base level
* Use explicit subgroup size if we can (might fix some block flickering on AMD)
* Take componentMask and scissor into account when clearing framebuffer attachments
* Add missing barriers around CmdFillBuffer (fixes Monster Hunter Rise flickering on NVIDIA)
* Use ClampToEdge for Clamp sampler address mode on Vulkan (fixes Hollow Knight)
Clamp is unsupported on Vulkan, but ClampToEdge behaves almost the same. ClampToBorder on the other hand (which was being used before) is pretty different
* Shader specialization for new Vulkan required state (fixes remaining alpha test issues, vertex stretching on AMD on Crash Bandicoot, etc)
* Check if the subgroup size is supported before passing a explicit size
* Only enable ShaderFloat64 if the GPU supports it
* We don't need to recompile shaders if alpha test state changed but alpha test is disabled
* Enable shader cache on Vulkan and implement MultiplyHighS32/U32 on SPIR-V (missed those before)
* Fix pipeline state saving before it is updated.
This should fix a few warnings and potential stutters due to bad pipeline states being saved in the cache. You may need to clear your guest cache.
* Allow null samplers on OpenGL backend
* _unit0Sampler should be set only for binding 0
* Remove unused PipelineConverter format variable (was causing IOR)
* Raise textures limit to 64 on Vulkan
* No need to pack the shader binaries if shader cache is disabled
* Fix backbuffer not being cleared and scissor not being re-enabled on OpenGL
* Do not clear unbound framebuffer color attachments
* Geometry shader passthrough emulation
* Consolidate UpdateDepthMode and GetDepthMode implementation
* Fix A1B5G5R5 texture format and support R4G4 on Vulkan
* Add barrier before use of some modified images
* Report 32 bit query result on AMD windows (smo issue)
* Add texture recompression support (disabled for now)
It recompresses ASTC textures into BC7, which might reduce VRAM usage significantly on games that uses ASTC textures
* Do not report R4G4 format as supported on Vulkan
It was causing mario head to become white on Super Mario 64 (???)
* Improvements to -1 to 1 depth mode.
- Transformation is only applied on the last stage in the vertex pipeline.
- Should fix some issues with geometry and tessellation (hopefully)
- Reading back FragCoord Z on fragment will transform back to -1 to 1.
* Geometry Shader index count from ThreadsPerInputPrimitive
Generally fixes SPIR-V emitting too many triangles, may change games in OpenGL
* Remove gl_FragDepth scaling
This is always 0-1; the other two issues were causing the problems. Fixes regression with Xenoblade.
* Add Gl StencilOp enum values to Vulkan
* Update guest cache to v1.1 (due to specialization state changes)
This will explode your shader cache from earlier vulkan build, but it must be done. :pensive:
* Vulkan/SPIR-V support for viewport inverse
* Fix typo
* Don't create query pools for unsupported query types
* Return of the Vector Indexing Bug
One day, everyone will get this right.
* Check for transform feedback query support
Sometimes transform feedback is supported without the query type.
* Fix gl_FragCoord.z transformation
FragCoord.z is always in 0-1, even when the real depth range is -1 to 1. Turns out the only bug was geo and tess stage outputs.
Fixes Pokemon Sword/Shield, possibly others.
* Fix Avalonia Rebase
Vulkan is currently not available on Avalonia, but the build does work and you can use opengl.
* Fix headless build
* Add support for BC6 and BC7 decompression, decompress all BC formats if they are not supported by the host
* Fix BCn 4/5 conversion, GetTextureTarget
BCn 4/5 could generate invalid data when a line's size in bytes was not divisible by 4, which both backends expect.
GetTextureTarget was not creating a view with the replacement format.
* Fix dependency
* Fix inverse viewport transform vector type on SPIR-V
* Do not require null descriptors support
* If MultiViewport is not supported, do not try to set more than one viewport/scissor
* Bounds check on bitmap add.
* Flush queries on attachment change rather than program change
Occlusion queries are usually used in a depth only pass so the attachments changing is a better indication of the query block ending.
Write mask changes are also considered since some games do depth only pass by setting 0 write mask on all the colour targets.
* Add support for avalonia (#6)
* add avalonia support
* only lock around skia flush
* addressed review
* cleanup
* add fallback size if avalonia attempts to render but the window size is 0. read desktop scale after enabling dpi check
* fix getting window handle on linux. skip render is size is 0
* Combine non-buffer with buffer image descriptor sets
* Support multisample texture copy with automatic resolve on Vulkan
* Remove old CompileShader methods from the Vulkan backend
* Add minimal pipeline layouts that only contains used bindings
They are used by helper shaders, the intention is avoiding needing to recompile the shaders (from GLSL to SPIR-V) if the bindings changes on the translated guest shaders
* Pre-compile helper shader as SPIR-V, and some fixes
* Remove pre-compiled shaderc binary for Windows as its no longer needed by default
* Workaround RADV crash
Enabling the descriptor indexing extension, even if it is not used, forces the radv driver to use "bolist".
* Use RobustBufferAccess on NVIDIA gpus
Avoids the SMO waterfall triangle on older NVIDIA gpus.
* Implement GPU selector and expose texture recompression on the UI and config
* Fix and enable background compute shader compilation
Also disables warnings from shader cache pipeline misses.
* Fix error due to missing subpass dependency when Attachment Write -> Shader Read barriers are added
* If S8D24 is not supported, use D32FS8
* Ensure all fences are destroyed on dispose
* Pre-allocate arrays up front on DescriptorSetUpdater, allows the removal of some checks
* Add missing clear layer parameter after rebase
* Use selected gpu from config for avalonia (#7)
* use configured device
* address review
* Fix D32S8 copy workaround (AMD)
Fixes water in Pokemon Legends Arceus on AMD GPUs. Possibly fixes other things.
* Use push descriptors for uniform buffer updates (disabled for now)
* Push descriptor support check, buffer redundancy checks
Should make push descriptors faster, needs more testing though.
* Increase light command buffer pool to 2 command buffers, throw rather than returning invalid cbs
* Adjust bindings array sizes
* Force submit command buffers if memory in use by its resources is high
* Add workaround for AMD GCN cubemap view sins
`ImageCreateCubeCompatibleBit` seems to generally break 2D array textures with mipmaps... even if they are eventually aliased as a cubemap with mipmaps. Forcing a copy here works around the issue.
This could be used in future if enabling this bit reduces performance on certain GPUs. (mobile class is generally a worry)
Currently also enabled on Linux as I don't know if they managed to dodge this bug (someone please tell me). Not enabled on Vega at the moment, but easy to add if the issue is there.
* Add mobile, non-RX variants to the GCN regex.
Also make sure that the 3 digit ones only include numbers starting with 7 or 8.
* Increase image limit per stage from 8 to 16
Xenoblade Chronicles 2 was hiting the limit of 8
* Minor code cleanup
* Fix NRE caused by SupportBufferUpdater calling pipeline ClearBuffer
* Add gpu selector to Avalonia (#8)
* Add gpu selector to avalonia settings
* show backend label on window
* some fixes
* address review
* Minor changes to the Avalonia UI
* Update graphics window UI and locales. (#9)
* Update xaml and update locales
* locale updates
Did my best here but likely needs to be checked by native speakers, especially the use of ampersands in greek, russian and turkish?
* Fix locales with more (?) correct translations.
* add separator to render widget
* fix spanish and portuguese
* Add new IdList, replaces buffer list that could not remove elements and had unbounded growth
* Don't crash the settings window if Vulkan is not supported
* Fix Actions menu not being clickable on GTK UI after relaunch
* Rename VulkanGraphicsDevice to VulkanRenderer and Renderer to OpenGLRenderer
* Fix IdList and make it not thread safe
* Revert useless OpenGL format table changes
* Fix headless project build
* List throws ArgumentOutOfRangeException
* SPIR-V: Fix tessellation
* Increase shader cache version due to tessellation fix
* Reduce number of Sync objects created (improves perf in some specific titles)
* Fix vulkan validation errors for NPOT compressed upload and GCN workaround.
* Add timestamp to the shader cache and force rebuild if host cache is outdated
* Prefer Mail box present mode for popups (#11)
* Prefer Mail box present mode
* fix debug
* switch present mode when vsync is toggled
* only disable vsync on the main window
* SPIR-V: Fix geometry shader input load with transform feedback
* BC7 Encoder: Prefer more precision on alpha rather than RGB when alpha is 0
* Fix Avalonia build
* Address initial PR feedback
* Only set transform feedback outputs on last vertex stage
* Address riperiperi PR feedback
* Remove outdated comment
* Remove unused constructor
* Only throw for negative results
* Throw for QueueSubmit and other errors
No point in delaying the inevitable
* Transform feedback decorations inside gl_PerVertex struct breaks the NVIDIA compiler
* Fix some resolution scale issues
* No need for two UpdateScale calls
* Fix comments on SPIR-V generator project
* Try to fix shader local memory size
On DOOM, a shader is using local memory, but both Low and High size are 0, CRS size is 1536, it seems to store on that region?
* Remove RectangleF that is now unused
* Fix ImageGather with multiple offsets
Needs ImageGatherExtended capability, and must use `ConstantComposite` instead of `CompositeConstruct`
* Address PR feedback from jD in all projects except Avalonia
* Address most of jD PR feedback on Avalonia
* Remove unsafe
* Fix VulkanSkiaGpu
* move present mode request out of Create Swapchain method
* split more parts of create swapchain
* addressed reviews
* addressed review
* Address second batch of jD PR feedback
* Fix buffer <-> image copy row length and height alignment
AlignUp helper does not support NPOT alignment, and ASTC textures can have NPOT block sizes
* Better fix for NPOT alignment issue
* Use switch expressions on Vulkan EnumConversion
Thanks jD
* Fix Avalonia build
* Add Vulkan selection prompt on startup
* Grammar fixes on Vulkan prompt message
* Add missing Vulkan migration flag
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: MutantAura <44103205+MutantAura@users.noreply.github.com>
2022-07-31 17:26:06 -04:00
|
|
|
|
$"GPU: {_renderer.GetHardwareInfo().GpuVendor}"));
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task ShowExitPrompt()
|
|
|
|
|
{
|
|
|
|
|
bool shouldExit = !ConfigurationState.Instance.ShowConfirmExit;
|
|
|
|
|
if (!shouldExit)
|
|
|
|
|
{
|
|
|
|
|
if (_dialogShown)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_dialogShown = true;
|
2023-01-10 12:45:55 -05:00
|
|
|
|
|
2022-07-24 13:38:38 -04:00
|
|
|
|
shouldExit = await ContentDialogHelper.CreateStopEmulationDialog();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
_dialogShown = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (shouldExit)
|
|
|
|
|
{
|
|
|
|
|
Stop();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool UpdateFrame()
|
|
|
|
|
{
|
|
|
|
|
if (!_isActive)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-14 19:05:44 -05:00
|
|
|
|
NpadManager.Update(ConfigurationState.Instance.Graphics.AspectRatio.Value.ToFloat());
|
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (_viewModel.IsActive)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-05-01 21:29:47 -04:00
|
|
|
|
if (_isCursorInRenderer)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-05-01 21:29:47 -04:00
|
|
|
|
if (ConfigurationState.Instance.Hid.EnableMouse)
|
2023-01-14 19:05:44 -05:00
|
|
|
|
{
|
|
|
|
|
HideCursor();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2023-05-01 21:29:47 -04:00
|
|
|
|
switch (ConfigurationState.Instance.HideCursor.Value)
|
|
|
|
|
{
|
|
|
|
|
case HideCursorMode.Never:
|
|
|
|
|
ShowCursor();
|
|
|
|
|
break;
|
|
|
|
|
case HideCursorMode.OnIdle:
|
|
|
|
|
if (Stopwatch.GetTimestamp() - _lastCursorMoveTime >= CursorHideIdleTime * Stopwatch.Frequency)
|
|
|
|
|
{
|
|
|
|
|
HideCursor();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ShowCursor();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HideCursorMode.Always:
|
|
|
|
|
HideCursor();
|
|
|
|
|
break;
|
|
|
|
|
}
|
2023-01-14 19:05:44 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2023-05-01 21:29:47 -04:00
|
|
|
|
ShowCursor();
|
2023-01-14 19:05:44 -05:00
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
2023-01-14 19:05:44 -05:00
|
|
|
|
Dispatcher.UIThread.Post(() =>
|
|
|
|
|
{
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (_keyboardInterface.GetKeyboardStateSnapshot().IsPressed(Key.Delete) && _viewModel.WindowState != WindowState.FullScreen)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
2023-03-31 15:16:46 -04:00
|
|
|
|
Device.Processes.ActiveApplication.DiskCacheLoadState?.Cancel();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
KeyboardHotkeyState currentHotkeyState = GetHotkeyState();
|
|
|
|
|
|
|
|
|
|
if (currentHotkeyState != _prevHotkeyState)
|
|
|
|
|
{
|
|
|
|
|
switch (currentHotkeyState)
|
|
|
|
|
{
|
|
|
|
|
case KeyboardHotkeyState.ToggleVSync:
|
|
|
|
|
Device.EnableDeviceVsync = !Device.EnableDeviceVsync;
|
2022-08-16 12:32:37 -04:00
|
|
|
|
|
2022-05-15 07:30:15 -04:00
|
|
|
|
break;
|
|
|
|
|
case KeyboardHotkeyState.Screenshot:
|
|
|
|
|
ScreenshotRequested = true;
|
|
|
|
|
break;
|
|
|
|
|
case KeyboardHotkeyState.ShowUi:
|
2023-06-11 09:34:56 -04:00
|
|
|
|
_viewModel.ShowMenuAndStatusBar = !_viewModel.ShowMenuAndStatusBar;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
break;
|
|
|
|
|
case KeyboardHotkeyState.Pause:
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (_viewModel.IsPaused)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
|
|
|
|
Resume();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Pause();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case KeyboardHotkeyState.ToggleMute:
|
|
|
|
|
if (Device.IsAudioMuted())
|
|
|
|
|
{
|
|
|
|
|
Device.SetVolume(ConfigurationState.Instance.System.AudioVolume);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Device.SetVolume(0);
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.Volume = Device.GetVolume();
|
2022-05-15 07:30:15 -04:00
|
|
|
|
break;
|
2022-07-24 14:44:47 -04:00
|
|
|
|
case KeyboardHotkeyState.ResScaleUp:
|
|
|
|
|
GraphicsConfig.ResScale = GraphicsConfig.ResScale % MaxResolutionScale + 1;
|
|
|
|
|
break;
|
|
|
|
|
case KeyboardHotkeyState.ResScaleDown:
|
|
|
|
|
GraphicsConfig.ResScale =
|
|
|
|
|
(MaxResolutionScale + GraphicsConfig.ResScale - 2) % MaxResolutionScale + 1;
|
|
|
|
|
break;
|
2022-10-02 05:38:37 -04:00
|
|
|
|
case KeyboardHotkeyState.VolumeUp:
|
|
|
|
|
_newVolume = MathF.Round((Device.GetVolume() + VolumeDelta), 2);
|
|
|
|
|
Device.SetVolume(_newVolume);
|
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.Volume = Device.GetVolume();
|
2022-10-02 05:38:37 -04:00
|
|
|
|
break;
|
|
|
|
|
case KeyboardHotkeyState.VolumeDown:
|
|
|
|
|
_newVolume = MathF.Round((Device.GetVolume() - VolumeDelta), 2);
|
|
|
|
|
Device.SetVolume(_newVolume);
|
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
_viewModel.Volume = Device.GetVolume();
|
2022-10-02 05:38:37 -04:00
|
|
|
|
break;
|
2022-05-15 07:30:15 -04:00
|
|
|
|
case KeyboardHotkeyState.None:
|
|
|
|
|
(_keyboardInterface as AvaloniaKeyboard).Clear();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_prevHotkeyState = currentHotkeyState;
|
|
|
|
|
|
|
|
|
|
if (ScreenshotRequested)
|
|
|
|
|
{
|
|
|
|
|
ScreenshotRequested = false;
|
|
|
|
|
_renderer.Screenshot();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-10 12:45:55 -05:00
|
|
|
|
// Touchscreen.
|
2022-05-15 07:30:15 -04:00
|
|
|
|
bool hasTouch = false;
|
|
|
|
|
|
2023-01-08 12:46:25 -05:00
|
|
|
|
if (_viewModel.IsActive && !ConfigurationState.Instance.Hid.EnableMouse)
|
2022-05-15 07:30:15 -04:00
|
|
|
|
{
|
|
|
|
|
hasTouch = TouchScreenManager.Update(true, (_inputManager.MouseDriver as AvaloniaMouseDriver).IsButtonPressed(MouseButton.Button1), ConfigurationState.Instance.Graphics.AspectRatio.Value.ToFloat());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!hasTouch)
|
|
|
|
|
{
|
|
|
|
|
Device.Hid.Touchscreen.Update();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Device.Hid.DebugPad.Update();
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private KeyboardHotkeyState GetHotkeyState()
|
|
|
|
|
{
|
|
|
|
|
KeyboardHotkeyState state = KeyboardHotkeyState.None;
|
|
|
|
|
|
|
|
|
|
if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ToggleVsync))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.ToggleVSync;
|
|
|
|
|
}
|
|
|
|
|
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.Screenshot))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.Screenshot;
|
|
|
|
|
}
|
|
|
|
|
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ShowUi))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.ShowUi;
|
|
|
|
|
}
|
|
|
|
|
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.Pause))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.Pause;
|
|
|
|
|
}
|
|
|
|
|
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ToggleMute))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.ToggleMute;
|
|
|
|
|
}
|
2022-07-24 14:44:47 -04:00
|
|
|
|
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ResScaleUp))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.ResScaleUp;
|
|
|
|
|
}
|
|
|
|
|
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ResScaleDown))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.ResScaleDown;
|
|
|
|
|
}
|
2022-10-02 05:38:37 -04:00
|
|
|
|
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.VolumeUp))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.VolumeUp;
|
|
|
|
|
}
|
|
|
|
|
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.VolumeDown))
|
|
|
|
|
{
|
|
|
|
|
state = KeyboardHotkeyState.VolumeDown;
|
|
|
|
|
}
|
2022-05-15 07:30:15 -04:00
|
|
|
|
|
|
|
|
|
return state;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-07 17:03:27 -04:00
|
|
|
|
}
|