Commit Graph

1958 Commits

Author SHA1 Message Date
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
TheASVigilante
3e1db818cf Address review 2023-03-06 21:56:31 +00:00