* Compare aligned size for largest mip level when considering sampler resize
When selecting a texture that's a view for a sampler resize, we should take care that resizing it doesn't change the aligned size of any larger mip levels.
This PR covers two cases:
- When creating a view of the texture, we check that the aligned size of the view shifted up to level 0 still matches the aligned size of the container. If it does not, a copy dependency is created rather than resizing.
- When searching for a texture for sampler, textures that do _not_ match our aligned size when both are shifted up by its base level are not considered an exact match, as resizing the found texture will cause the mip 0 aligned size to change. It will create a copy dependency view instead.
Fixes graphical errors and crashes (on flush) in various Unity games that use render-to-texture.
* Move shared code to its own method.
* Add CPU register printout when guest crashes/breaks execution
* Print out registers when undefined instruction is hit
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Fixes after rebase
* Address gdkchan's comments
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Mary <me@thog.eu>
* input: Implement a SDL2 keyboard backend
Add a new keyboard backend to the Ryujinx.Input.SDL2 project.
This is currently unused.
* Address Ac_k's comments
* Address gdkchan's comments
* Use branch instead of tailcall for recursive calls
Use a branch instead of doing a tailcall for recursive calls. This
avoids having to store the dispatch address, setting up the epilogue and
keeps guest registers in host registers for longer.
The rejit check is moved down into the entry block so that the rejit
behaviour remains the same as before.
* Set PTC version
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Move shader resource descriptor creation out of the backend
* Remove now unused code, and other nits
* Shader cache version bump
* Nits
* Set format for bindless image load/store
* Fix buffer write flag
* Pass CbufSlot when getting info from the texture descriptor
Fixes some issues with bindless textures, when CbufSlot is not equal to the current TextureBufferIndex.
Specifically fixes a random chance of full screen colour flickering in Super Mario Party.
* Apply suggestions from code review
Oops
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Allow `LocalVariable` to be assigned more than once
This allows us to write flow controls like loops and if-elses with
LocalVariables participating in phi nodes.
* Add `GetLocalNumber` to operand
I found some mistake I made back when I first wrote the mapping for
Miria.
This fix:
- an offset by one after the tilde key in the mapping.
- F30 being mapped to F29.
This fix an issue when after a relaunch of a game containing other
games (embedded games), the renderer window size would be 1x1.
This bug was introduced by #2260.
This PR addresses the following issues:
- SM was previously instancied once and reused on all sessions. This
could cause inconsistency on the service initialization.
- TIPC replies were not matching what is generated on hardware.
* audio: Implement a SDL2 backend
This adds support to SDL2 as an audio backend.
It has the same compatibility level as OpenAL without its issues.
I also took the liberty of restructuring the SDL2 code to have one
shared project between audio and input.
The configuration version was also incremented.
* Address gdkchan's comments
* Fix update logic
* Add an heuristic to pick the correct target sample count wanted by the game
* Address gdkchan's comments
* Address Ac_k's comments
* Fix audren output
* Address gdkchan's comments
* gtk3: Add base for future Vulkan integration
This PR puts in place the fondation for the future Vulkan integration on
the GTK3 UI.
This also updated SPB to 0.0.3-build14 that fixed a use after free on
XErrorHandler on Linux.
* Address rip's comments
* Merge GLWidget inside GLRenderer
* Clean up and deduplicate renderer implementations
* Address shahil's comments
* Address Ac_K's comments
* Address gdkchan's comments
* hid: Rewrite shared memory management
This entirely rewrite our ancient (and original) HID shared memory
interface to be more usable and accurate.
HID update logics were updated to reflect those changes but should work
still the same way it previously did.
This need heavy testing just in case to avoid possible regressions.
* Silence warnings
* Address gdkchan's comments
* Address Ac_K's comments
* Address one missing nit
* Make all title id instances unsigned
* Replace address and size with ulong instead of signed types
Long overdue change.
Also change some logics here and there to optimize with the new memory
manager.
* Address Ac_K's comments
* Remove uneeded cast all around
* Fixes some others misalignment
This fix a possible crash with raw keyboard input since Miria.
I took the liberty to move the the keyboard update to avoid possible duplicate update if we end up having two keyboards in use.