This reverts commit 9677ddaa5d.
SixLabors.ImageShar switched to a shady and vague license starting with 2.x
without mentioning it on their changelog.
As a result we are staying on 1.x (licensed under Apache-2) and will
seak an alternative package.
* Track buffer migrations and flush source on incomplete copy
Makes sure that the modified range list is always from the latest iteration of the buffer, and flushes earlier iterations of a buffer if the data has not been migrated yet.
* Cleanup 1
* Reduce cost for redundant signal checks on Vulkan
* Only inherit the range list if there are pending ranges.
* Fix OpenGL
* Address Feedback
* Whoops
* ava: Cleanup RenderTimer
* ava: Remove ContentControl from RendererHost
* ava: Remove unused actual scale factor
* ava: Enable UseGpu for Linux
* ava: Set better initial size & Scale the window properly
* ava: Realign properties
* ava: Use explicit type & specify where the note applies
* Ensure that vertex attribute buffer index is valid on GPU
* Remove vertex buffer validation code from OpenGL
* Remove some fields that are no longer necessary
Polygon topology wasn't really supported and would only work on OpenGL on drivers that haven't removed it. As an alternative, this PR makes all cases of polygon topology use triangle fan. The topology type and transform feedback type have not been changed, as I don't think geo shader/tfb should be used with polygons.
The OpenGL spec states:
Only convex polygons are guaranteed to be drawn correctly by the GL.
For convex polygons, triangle fan is equivalent to polygon. I imagine this is probably how it works on device, as this get-out-of-jail-free card is too enticing to pass up.
This fixes the stat display in Pokemon S/V.
* amadeus: Allow OOB read of GC-ADPCM coefficients
Fixes "Ninja Gaiden Sigma 2" and possibly "NINJA GAIDEN 3: Razor's Edge"
* amadeus: Fix wrong variable usage in delay effect
We should transform the delay line values, not the input.
* amadeus: Update GroupedBiquadFilterCommand documentation
* amadeus: Simplify PoolMapper alignment checks
* amadeus: Update Surround delay effect matrix to REV11
* amadeus: Add drop parameter support and use 32 bits integers for estimate time
Also implement accurate ExecuteAudioRendererRendering stub.
* Address gdkchan's comments
* Address gdkchan's other comments
* Address gdkchan's comment
* bsd: Fix eventfd broken logic
This commit fix eventfd logic being broken.
The following changes were made:
- EventFd IPC definition had argument inverted
- EventFd events weren't fired correctly
- Poll logic was wrong and unfinished for eventfd
- Reintroduce workaround from #3385 but in a safer way, and spawn 4
threads.
* ipc: Rework a bit for multithreads
* Clean up debug logs
* Make server thread yield when managed lock isn't availaible
* Fix replyTargetHandle not being added in the proper locking scope
* Simplify some scopes
* Address gdkchan's comments
* Revert IPC workaround for now
* Reintroduce the EventFileDescriptor workaround
This replacement is meant to be done with the original identified byteOffset, not the one assigned later on by the below conditionals (that already has the constant offset added, for instance).
This fixes videos being pixelated in Xenoblade 3, and other regressions that might have happened since #3847.
* common: Make BinaryReaderExtensions Read & Write take unamanged types
This allows us to not rely on Marshal.PtrToStructure and Marshal.StructureToPtr for those.
* common: Make MemoryHelper Read & Write takes unamanged types
* Update Marshal.SizeOf => Unsafe.SizeOf when appropriate and start moving software applet to unmanaged types
* ui: Only wait on _exitEvent when MainLoop is active under GTK
This fixes a dispose issue under Horizon/GTK, we don't check if the ApplicationClient is null so it throw NCE. We don't check if the main loop is active and waiting an event which is set in the main loop... So that could lead to a freeze.
Everything works fine in GTK now.
Related issue: https://github.com/Ryujinx/Ryujinx/issues/3873
As a side note, same kind of issue appear in Avalonia UI too. Firmware's popup doesn't show anything and the emulator just freeze.
* TSRBerry's change
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
* Fix Avalonia crashing/freezing
* Add Avalonia OpenGL fixes
* Fix firmware popup on windows
* Fixes everything
* Add _initialized bool to VulkanRenderer and OpenGL Window
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
* GAL: Send all buffer assignments at once rather than individually
The `(int first, BufferRange[] ranges)` method call has very significant performance implications when the bindings are spread out, which they generally always are in Vulkan. This change makes it so that these methods are only called a maximum of one time per draw.
Significantly improves GPU thread performance in Pokemon Scarlet/Violet.
* Address Feedback
Removed SetUniformBuffers(int first, ReadOnlySpan<BufferRange> buffers)
* GPU: Access non-prefetch command buffers directly
Saves allocating new arrays for them constantly - they can be quite small so it can be very wasteful. About 0.4% of GPU thread in SMO, but was a bit higher in S/V when I checked.
Assumes that non-prefetch command buffers won't be randomly clobbered before they finish executing, though that's probably a safe bet.
* Small change while I'm here
* Address feedback
I did this on ncbuffer2 when we were using it for LDN 3, but I noticed that it can apply to the current buffer manager too, and it's an easy performance win.
The only buffer access that can come from another thread is the overlap search for buffers that have been unmapped. Everything else, including modifications, come from the main GPU thread. That means we only need to lock the range list when it's being modified, as that's the only time where we'll cause a race with the unmapped handler.
This has a significant performance improvements in situations where FIFO is high, like the other two PRs. Joined together they give a nice boost (73.6 master -> 79 -> 83 fps in SMO).
Since we move to .NET7, JsonSerializer now needs to have explicit options as arguments, which leads to some warnings in Avalonia project. This is fixed by using our `JsonHelper` class.