Commit Graph

1988 Commits

Author SHA1 Message Date
Abandoned Cart fe46213beb Remove "Group Games By Format" option 2023-04-22 19:54:04 +01:00
Abandoned Cart 0b453ca4ed Simplify placeholder for empty items 2023-04-22 19:54:04 +01:00
Abandoned Cart b82452f8f8 Remove HeaderItem as a DataItem type 2023-04-22 19:54:04 +01:00
Dima 1841727c56 Remove header rom filter 2023-04-22 19:54:04 +01:00
Billy Laws d3d36c6fa0 Update hades 2023-04-16 16:31:42 +01:00
Billy Laws 6a57fd16fb Don't bail out when invalid desc types are encountered
This caused graphical artifacts and didn't particularly help prevent crashes.
2023-04-16 16:31:42 +01:00
Billy Laws 34611ba180 Optimise waiter queue push 2023-04-16 16:31:42 +01:00
Billy Laws e63108bff1 Mark app as being a game 2023-04-16 16:31:42 +01:00
Billy Laws 9caa845d4f Avoid using interconnect for texture data copies
Since the interonnect copies aren't visible or tracked by texture manager, this could cause the texture manager to effectively miss the upload.
2023-04-16 16:31:42 +01:00
Billy Laws 4192873744 Fix TLS writes from X2/3
These mistakenly used the wrong source register.
2023-04-16 16:31:42 +01:00
Billy Laws 5bcc79ef80 Ensure SVC trampoline is always correctly sized
Despite the trampoline size being hardcoded, it was previously dynamic and could change based off of the value stored in the target register potentially leading to instructions being missed.
2023-04-16 16:31:42 +01:00
Billy Laws e0c487f607 Fix system register state handling
We failed to preserve NCSZ, and and we stored instead of loaded FPCR when returning to guest.
2023-04-16 16:31:42 +01:00
Billy Laws 77ca290a78 Silence counter reset warnings
Some games reset all counters at the start of a frame.
2023-04-16 16:31:42 +01:00
Billy Laws 7d0b7f0b71 Handle OOB blits by adding to the texture base offset
The previous method would cause OOB reads for the last row to clamp, and adding an extra row would potentially encounter unmapped memory. So use this technique based on how Ryu does it.
2023-04-16 16:31:42 +01:00
Dima 6aef7fdd1e Stub some services 2023-04-03 10:30:20 +01:00
Billy Laws 5c83dec85f Update shader compiler 2023-04-02 17:35:12 +01:00
Billy Laws bbc8ccb823 Treat partially unmapped textures as unmapped 2023-04-02 17:35:12 +01:00
Billy Laws bbe4872a95 Fix missed CachedMappedBufferView initialisation 2023-04-02 17:35:12 +01:00
Billy Laws 7bfe63f679 Enable adreno/mali LLVM misopt workaround
Fixes animal crossing character issues, see shader compiler commit for details.
2023-04-02 17:35:12 +01:00
Billy Laws 737fb2207d Avoid submitting executions on semaphore incrs
This avoids breaking RPs which helps perf, and since we have our own sync logic we don't need to match the guest here.
2023-04-02 17:35:12 +01:00
Billy Laws 99a7b77948 Remove broken descriptor aliasing quirk
This can be fixed in the shader compiler by just naming cbufs differently.
2023-04-02 17:35:12 +01:00
Billy Laws c440575a56 Add partial conditional rendering support
Disabled for cases where the results come from queries rn, however still functional for cases like AC which don't use it with queries.
2023-04-02 17:35:12 +01:00
Billy Laws a2798a9184 Implement support for occulusion queries
These are mostly implemented how you would expect, however as opposed to copying out query pool results immeditely, doing so is delayed until the RP end in order to avoid splits.
2023-04-02 17:35:12 +01:00
Billy Laws 202c97a1eb Introduce several new node insertion functions for use with queries
Queries need the ability to insert commands at the beginning and end of RPs.
2023-04-02 17:35:12 +01:00
Billy Laws 9a51b5f54e Update audio-core 2023-04-02 17:33:57 +01:00
lynxnb 816599749b Fix Android Studio OSC layout preview (again)
The layout preview/editor doesn't instantiate an Application instance, therefore accessing `displayMetrics` from the app context would lead to a crash, and the view being mocked in the preview.
Additionally a default grid value is defined for `AlignmentGridView` to avoid a crash because of an invalid iteration step in the drawing loop.
2023-04-02 18:16:10 +02:00
lynxnb 3cbbdeda33 Improve OSC default position of sticks and buttons 2023-04-02 18:16:10 +02:00
lynxnb a799cb63f1 Add separate L3 and R3 buttons to OSC
As part of this commit, a `defaultEnabled` property was added to `OnScreenButton` to determine the default visibility of buttons. This is required because L3 and R3 should be hidden by default and only enabled by the user on demand.
Additionally, the buttons' mask values were added to `ButtonId` members, as adding entries in the middle of the class conflicted with the `ordinal` enum property, making it unfit to use for our purposes.
Finally, the `ControllerType` class was extended with an array of optional buttons. Optional buttons represent buttons that are allowed to be displayed on screen, but shouldn't be included in the controller mapping activity.
2023-04-02 18:16:10 +02:00
lynxnb acdf4e6823 Introduce constants for default OSC config values 2023-04-02 18:16:10 +02:00
lynxnb 83bc93601f Use `EFFECT_TICK` instead of `CLICK` as OSC vibration effect 2023-04-02 18:16:10 +02:00
lynxnb 88e6fc9888 Implement OSC snap to grid functionality 2023-04-02 18:16:10 +02:00
lynxnb 88084016a1 Implement OSC per-button scale functionality 2023-04-02 18:16:10 +02:00
lynxnb 2794af6d06 OSC: delegate config reset to individual buttons 2023-04-02 18:16:10 +02:00
lynxnb 3fc09f0953 Add `OnScreenButton` properties' missing comments 2023-04-02 18:16:10 +02:00
lynxnb 81eb8fd231 Rework OSC edit mode handling for better extensibility
Edit mode configuration parameters are now shared between the view and the buttons in a small `OnScreenEditInfo` object, avoiding variable duplication about edit state. The `editingTouchHandler` has also been simplified to only lookup the button if one wasn't being edited already.
2023-04-02 18:16:10 +02:00
lynxnb c4d0d02509 Simplify `OnScreenConfiguration`
`ControllerConfigurationDummy` was removed as it isn't needed anymore, and the remaining classes simplified.
2023-04-02 18:16:10 +02:00
lynxnb 17f45c0366 Retrieve the vibrator service outside of OSC View
Retrieving the vibrator service inside the view crashes the layout editor. Fix by retrieving it in the activity and passing it to the view.
2023-04-02 18:16:10 +02:00
kikimanjaro 0eed72664d Add automatic refreshing games list 2023-04-02 16:52:37 +02:00
Billy Laws d00fcee79d Prevent aaudio backend usage 2023-03-27 22:31:14 +01:00
Billy Laws 9555082763 Update audio-core 2023-03-27 22:31:14 +01:00
Billy Laws 653bfba23b Use OpenSL over AAudio
AAudio lacks support for multiple streams on some devices, whereas OpenSL doesn't.
2023-03-27 22:31:14 +01:00
Billy Laws 7d573db80b Make GetTimeTicks return the time in guest ticks as opposed to host
This is required by audren.
2023-03-27 22:31:14 +01:00
Billy Laws d5a15faab7 Greatly simplify circular buffer logic, fixing several bugs 2023-03-27 22:31:14 +01:00
Billy Laws 01febe75c4 Reimplement audout and audren using yuzu audio_core
The yuzu audio_core code is mostly untouched, with a set of wrappers used to bridge it with skyline kernel primitives. Huge thanks to maide and their advice, whom without this wouldn't have been possible.
2023-03-27 22:31:14 +01:00
PabloG02 ef5456f939 Hide Debug preferences from search on release builds and remove settings that don't support per-game configuration instead of hiding them 2023-03-25 22:54:27 +00:00
PabloG02 44cbf26b72 Add search functionality to settings
Multiple terms search is also available by separating individual terms with commas.
2023-03-25 22:54:27 +00:00
lynxnb 61c45e02c8 Fix FABs being too big in `OnScreenEditActivity` 2023-03-22 21:57:50 +01:00
lynxnb ab553c9671 Use MD3 divider in `ControllerActivity` 2023-03-22 21:57:50 +01:00
lynxnb 236b754559 Implement Material You theming support
Material You is disabled by default, it can be toggled in settings.
2023-03-22 21:57:50 +01:00
lynxnb d3d22670f9 Use `MaterialAlertDialogBuilder` in `PreferenceDialogFragment`s
`PreferenceDialogFragment`s have been extended to use `MaterialAlertDialogBuilder`, which results in Material Design 3 dialogs. `DialogFragment` creation logic has been moved to `SettingsActivity` to reduce code duplication.
2023-03-22 21:57:50 +01:00
lynxnb a4a5bedeea Remove icon padding from the left side of preferences
`ProfilePicturePreference` image preview has been moved to the right side as a result.
2023-03-22 21:57:50 +01:00
lynxnb 6fcb09bd2d Override the default `PreferenceScreen` divider with an MD3 one 2023-03-22 21:57:50 +01:00
lynxnb b12a2bdc3e Replace preference checkboxes with material switches 2023-03-22 21:57:50 +01:00
lynxnb ee2716403e Update dialogs' drag handle to use `BottomSheetDragHandleView` 2023-03-22 21:57:50 +01:00
lynxnb 2bcf0e2abd Update themes and styles to Material Design 3
This commit transitions all layouts and views to the use the new stuff from MD3.
2023-03-22 21:57:50 +01:00
Billy Laws ba33e8cbf5
Update edge credits 2023-03-21 17:44:12 +00:00
Billy Laws 1f0d297221 Fix infinite loop when reading dirty buffers with direct mem
The code didn't account for interval Queries returning zero when reaching the end.
2023-03-19 13:52:15 +00:00
Billy Laws 0b551e04db Return a null handle when reading from an unbound cbuf 2023-03-19 13:52:15 +00:00
Billy Laws 8d9b0041b4 Return a dummy buffer when encountering unbound SSBOs 2023-03-19 13:52:15 +00:00
Billy Laws d893777262 Flush deferred draws before executing macro HLE and cleanup 2023-03-19 13:52:15 +00:00
Billy Laws c928084bb1 Show a toast when per-game settings are active 2023-03-19 13:52:15 +00:00
Billy Laws 6433a1722d Update adrenotools for 8G2 DMI 2023-03-19 13:52:15 +00:00
Billy Laws 0f33055176 Fixup accidental change 2023-03-19 13:52:15 +00:00
Billy Laws 3901ecbf49 Hook up indirect draws into usagetracker
Now usagetracker is properly in place, indirect draw HLE can be used without requiring any hacks. Dirtiness is now ignored when fetching macro arguments, and it's now the duty of the HLE impls themselves to perform flushing if they require it.
2023-03-19 13:52:15 +00:00
Billy Laws 04f3fa4b7f Implement basic indirect draw macro HLE
This still requires usagetracker to avoid redundantly performing indirect draws when the memory isn't dirty, and to allow for using it with direct memory, but it's a start.
2023-03-19 13:52:15 +00:00
Billy Laws 2444f2e81d Fix HLE macro code to not hash all of macro memory + update args struct
We incorrectly hashed the entirety of macro memory starting from the macro base address, as opposed to just the macro itself.
2023-03-19 13:52:15 +00:00
Billy Laws b313dcbdca Avoid dereferencing macro argument pointers in memory where possible
Indirect draws are implemented by having the macro arguments overflow into a seperate GP Entry that points directly to the indirect argument buffer. To HLE indirect draws a buffer needs to be created from this pointer, and it cannot be dereferenced on the CPU at any point to avoid hitting traps.
2023-03-19 13:52:15 +00:00
Billy Laws 2b93604da0 Use hades HLE replacement for constant buffer attributes
In the cases of indirect draws, we don't know the vertex offset to write into the driver info constant buffer ahead of time, and to do it at draw time on the GPU would mean marking the constant buffer as GPU dirty (slow). HLE them in the shader instead using the host draw parameters extension.
2023-03-19 13:52:15 +00:00
Billy Laws 7e1c58accc Implement indirect draws in the Maxwell 3D interconnect
These will be used by the HLE indirect draw macro to perform indirect draws without waiting for GPU idle.
2023-03-19 13:52:15 +00:00
Billy Laws 49cd2a71cc Introduce GPU checkpoints for crash debugging
When GPU crashes aren't reproducable in renderdoc, it helps to have someway to figure out what exactly is going on when a crash happens or what operation caused it. Add a checkpoint system that reports the GPU execution state in perfetto in time with actual GPU execution, and use flow events to show the event's path through execution, vulkan record and executor record stages.
2023-03-19 13:52:15 +00:00
Billy Laws d5b6c68ae4 Split out common parts of Maxwell 3D draws
These will be able to be shared between indirect and normal draws.
2023-03-19 13:52:15 +00:00
Billy Laws 779ba3de05 Commonise full pipeline barrier recording 2023-03-19 13:52:15 +00:00
Billy Laws a65aa28df2 Avoid redundant GPU-dirty propagation for direct buffer recreation 2023-03-19 13:52:15 +00:00
Billy Laws 4a3a40aa40 Add more perfetto tracepoints 2023-03-19 13:52:15 +00:00
Billy Laws c15b89975b Allocate a general purpose GPU-side debug tracing buffer
Can be used for checkpoints, etc.
2023-03-19 13:52:15 +00:00
Billy Laws c36b8e843e Add index buffer size estimation via mapping size
This is useful for indirect draws, where we don't know the underlying index buffer size and also don't know the index count.
2023-03-19 13:52:15 +00:00
Billy Laws 0deff5e37a Set a higher perfetto size hint to avoid packet loss 2023-03-19 13:52:15 +00:00
Billy Laws 4bb2a41594 Use usagetracker to determine if pushbuffers need to flush the GPU 2023-03-19 13:52:15 +00:00
Billy Laws 090151f0c3 Introduce usage tracker for dirty tracking within an execution
This is neccessary as e.g. shaders can be updated through a mirror and never hit modification traps. By tracking which addresses have sequenced writes applied, the shader manager can then correctly detect if a given shader has been modified by the GPU.
2023-03-19 13:52:15 +00:00
Billy Laws f64860c93e Commonise buffer interval list code
This will be reused for usagetracker.
2023-03-19 13:52:15 +00:00
Abandoned Cart 0949d51871 Clear or suppress some easy lint warnings 2023-03-18 16:16:15 +01:00
Abandoned Cart 94459e01a4 useLegacyPackaging for extractNativeLibs
"PackagingOptions.jniLibs.useLegacyPackaging should be set to true because android:extractNativeLibs is set to "true" in AndroidManifest.xml"
2023-03-18 16:15:51 +01:00
Abandoned Cart e08525679c Suppress a linear configuration warning
Due to the way Android Studio reads gradle configuration, a false positive warning for incompatible Java versions is fired when the Kotlin Java version is not specified first.
2023-03-18 16:15:51 +01:00
Abandoned Cart e68baf9088 Centralize missingIcon and condition for use in DataItem
`One missing Bitmap to rule them all and one condition to find them.` Also eliminates passing that condition between methods. The data class can simply return the same instance every time it's necessary.
2023-03-15 14:25:24 +01:00
Abandoned Cart 905c0a47fa Allow the options, even if they're useless
Since this is instantiated in `onCreate` and may be recycled with different settings, relying on the audio to be disabled to determine if a mute action is available seems like a risky gamble.
2023-03-14 23:22:32 +00:00
Abandoned Cart 39393ec310 Move picture-in-picture configuration to method
This will also make the transition to per-game settings less of a collision later.
2023-03-14 23:22:32 +00:00
Abandoned Cart a906c6d689 Use BuildConfig package name to forgo Context
This should adapt to the package name, despite not actually relying on the value of it to function. Intents are one of the most analyzed items for vulnerabilities and exploits.
2023-03-14 23:22:32 +00:00
Abandoned Cart bd9050f6c7 Add an emulator pause button to the OSC 2023-03-14 23:22:32 +00:00
Abandoned Cart 69e322b76b Pausing should mute audio for looped music
Also adds pausing the surface in onPause and restoring it in onResume to avoid wasting resources when the activity is legitimately in the background.
2023-03-14 23:22:32 +00:00
Abandoned Cart df96d74ca1 No use assigning null surface if null already
This also prevents any possibility a null value is falsely assigned to a valid surface for whatever reason.
2023-03-14 23:22:32 +00:00
Abandoned Cart 95a679e5cd Add an action to pause the emulator process 2023-03-14 23:22:32 +00:00
Abandoned Cart a1143ee5de Respect the existing "mute" user preference 2023-03-14 23:22:32 +00:00
Abandoned Cart bdc368e039 Add a mute button as a PiP window action 2023-03-14 23:22:32 +00:00
Abandoned Cart 4298415134 Add picture in picture for emulation activity 2023-03-14 23:22:32 +00:00
Billy Laws 179363a5e7 Fix depth-stencil formats 2023-03-14 23:22:12 +00:00
PabloG02 b4280a61ac Stub `IApplicationFunctions::GetSaveDataSize` 2023-03-11 18:27:36 +00:00
Abandoned Cart 6703a875f0 Support deprecation of `getSerializableExtra` 2023-03-11 18:27:15 +00:00
Billy Laws 6d582566f9 Use AdaptiveSingleWaiterConditionVariable for thread scheduling
Some games, for example PGLE, have heavy contention in code that locks mutexes for only a brief period of time. This heavy contention over multiple threads results in futex latency (often ~20us) impacting performance heavily. Using an adaptive condition variable helps to reduce this latency.
2023-03-11 18:26:02 +00:00
Billy Laws b1e57bc7bc Introduce adapting condition variable class
By spin waiting for a small period before falling back to an actual condition variable, some of the overheads inherent to futex's can be avoided. The used constants were tuned for optimal performance on 8G1 on Skyrim and PGLE.
2023-03-11 18:26:02 +00:00
TheASVigilante 444e35e34f Fix swizzling regression + minor optimizations to swizzling 2023-03-06 21:56:31 +00:00