forked from ShuriZma/suyu
1
0
Fork 0
Commit Graph

21761 Commits

Author SHA1 Message Date
bunnei 15fdc2cd09
Revert "build(cmake): fix missing Qt5::DBus target on linux" 2022-03-11 15:22:24 -08:00
Wunkolo d248c1203e cpu_detect: Add additional x86 flags and telemetry
Adds detection of additional CPU flags to cpu_detect and additions to telemetry output.

This is not exhaustive but guided by features that [dynarmic utilizes](bcfe377aaa/src/dynarmic/backend/x64/host_feature.h (L12-L33)) as well as features that are currently utilized but not reported to telemetry(invariant_tsc). This is intended to guide future optimizations.

AVX512 in particular is broken up into its individual subsets and some other processor features such as [sha](https://en.wikipedia.org/wiki/Intel_SHA_extensions) and [gfni](https://en.wikipedia.org/wiki/AVX-512#GFNI) are added to have some forward-facing data-points.

What used to be a single `CPU_Extension_x64_AVX512` telemetry field
is also broken up into individual `CPU_Extension_x64_AVX512{F,VL,CD,...}` fields.
2022-03-11 10:27:00 -08:00
Wunkolo 29a7a61806 common/telemetry: Update `AddField` name type to `string_view`
Non-owning `string_view` is flexable and
avoids some of the many redundant copies made over `std::string`
2022-03-11 10:26:59 -08:00
Liam 70e632f153 Maxwell3D: mark index buffers as dirty after updating counts 2022-03-11 08:51:22 -05:00
bunnei 8180b262fc
Merge pull request #7982 from BytesGalore/fix_cmake_missing_qt5_dbus
build(cmake): fix missing Qt5::DBus target on linux
2022-03-10 23:12:33 -08:00
Liam 82c3042c0f TextureCacheRuntime: allow converting D24S8 to ABGR8
I can't see how this would be useful, but Galaxy uses it.
2022-03-10 20:25:34 -05:00
Liam f1521183f8 Maxwell3D: read small-index draw and primitive topology override registers
This allows Galaxy and Sunshine to render for the first time.
2022-03-10 19:21:04 -05:00
Mai M e200161982
Merge pull request #7999 from merryhime/fix-7992
backend: Ensure backend_thread is destructed before message_queue
2022-03-10 08:07:41 -05:00
Merry 22f50c6bc1 backend: Ensure backend_thread is destructed before message_queue
Ensures that stop_token signals that stop has been requested before destruction of conditional_variable
2022-03-10 10:49:15 +00:00
Morph 52f8f00434
Merge pull request #7998 from Wunkolo/cpuid_array
cpu_detect: Revert `__cpuid{ex}` array-type argument
2022-03-10 00:09:36 -05:00
Wunkolo d9b1199ffb cpu_detect: Revert `__cpuid{ex}` array-type argument
Restores compatibility with MSVC's `__cpuid` intrinsic.
2022-03-09 19:50:01 -08:00
bunnei 9a97ef4647
Merge pull request #7936 from Wunkolo/cpu_detect
cpu_detect: Refactor detection of processor features
2022-03-09 15:34:42 -08:00
Wunkolo 873a9fa7e5 cpu_detect: Add missing `lzcnt` detection 2022-03-09 13:57:47 -08:00
Wunkolo ec5f3351b6 cpu_detect: Refactor cpu/manufacturer identification
Set the zero-enum value to Unknown
Move the Manufacterer enum into the CPUCaps structure namespace
Add "ParseManufacturer" utility-function
Fix cpu/brand string buffer sizes(!)
2022-03-09 13:57:47 -08:00
Wunkolo 86e9e60f07 cpu_detect: Update array-types to `span` and `array`
Update some uses of `int` into some more explicitly sized types as well
2022-03-09 13:57:47 -08:00
Wunkolo 3c33ba7f18 cpu_detect: Utilize `Bit<N>` utility function 2022-03-09 13:57:47 -08:00
Wunkolo d233de8194 cpu_detect: Compact capability fields
As this structure gets more explicit, bools can be bitfields and
small enums can use smaller types for their span of values.
2022-03-09 13:57:47 -08:00
Wunkolo add2cfcb96 bit_util: Add `bit` utility function
Extracts a singular bit, as a bool, from the specified compile-time index.
2022-03-09 13:57:47 -08:00
bunnei 6f670381cf
Merge pull request #7975 from bunnei/ldr-fix
hle: service: ldr: Use deterministic addresses when mapping NROs.
2022-03-08 17:39:03 -08:00
bunnei 853e58e593 hle: service: ldr: Use deterministic addresses when mapping NROs.
- Instead of randomization, choose in-order addresses for where to map NROs into memory.
- This results in predictable behavior when debugging and consistent behavior when reproducing issues.
2022-03-08 17:38:20 -08:00
bunnei f2743b41b0
Merge pull request #7986 from lat9nq/vk-callback
core, video_core: Fix two crashes when failing to create the emulated GPU instance
2022-03-08 12:36:57 -08:00
Fernando S 35309f27ed
Merge pull request #7989 from degasus/maxwell_LUT3
shader_recompiler/LOP3: Use brute force python results within switch/case.
2022-03-08 15:40:31 +01:00
Markus Wick c78c8190d5 shader_recompiler/LOP3: Use brute force python results within switch/case.
Thanks to @asLody for optimizing this function. This raised the focus that this function should be optimized more.

The current table assumes that the host GPU is able to invert for free, so only AND,OR,XOR are accumulated in the performance metrik.

Performance results:

Instructions
0: 8
1: 30
2: 114
3: 80
4: 24

Latency
0: 8
1: 30
2: 194
3: 24
2022-03-08 09:44:28 +01:00
bunnei 1f37896066
Merge pull request #7974 from bunnei/improve-code-mem
Kernel Memory Updates (Part 5): Revamp MapCodeMemory and UnmapCodeMemory.
2022-03-07 20:28:39 -08:00
bunnei 749f76e6fe hle: kernel: KPageTable: Improve implementations of MapCodeMemory and UnmapCodeMemory.
- This makes these functions more accurate to the real HOS implementations.
- Fixes memory access issues in Super Smash Bros. Ultimate that occur when un/mapping NROs.
2022-03-07 17:18:20 -08:00
lat9nq b5e60ae1b0 video_core: Cancel Scoped's exit call on GPU failure
When CreateRenderer fails, the GraphicsContext that was std::move'd into
it is destroyed before the Scoped that was created to manage its
currency. In that case, the GraphicsContext::Scoped will still call its
destructor at the ending of the function. And because the context is
destroyed, the Scoped will cause a crash as it attempts to call a
destroyed object's DoneCurrent function.

Since we know when the call would be invalid, call the Scoped's Cancel
method. This prevents it from calling a method on a destroyed object.
2022-03-07 18:21:56 -05:00
lat9nq 1f24a4e520 emu_window: Create a way to Cancel the exit of a Scoped
If a GraphicsContext is destroyed before its Scoped is destroyed, this
causes a crash as the Scoped tries to call a method in the destroyed
context on exit.

Add a way to Cancel the call when we know that calling the
GraphicsContext will not work.
2022-03-07 18:21:56 -05:00
Fernando S 58b52f4884
Merge pull request #7930 from asLody/dma-semaphore
MaxwellDMA: Implement semaphore operations
2022-03-07 21:53:38 +01:00
lat9nq 381f1dd2c9 core: Don't shutdown a null GPU
When CreateGPU fails, yuzu would try and shutdown the GPU instance
regardless of whether any instance was actually created.

Check for nullptr before calling its methods to prevent a crash.
2022-03-07 15:25:20 -05:00
Lody 4498908e72 MaxwellDMA: Implement semaphore operations 2022-03-07 13:46:18 +08:00
Ameer J 370e480c8c
gl_graphics_pipeline: Improve shader builder synchronization using fences (#7969)
* gl_graphics_pipeline: Improve shader builder synchronization

Make use of GLsync objects to ensure better synchronization between shader builder threads and the main context

* gl_graphics_pipeline: Make built_fence access threadsafe

* gl_graphics_pipeline: Use GLsync objects only when building in parallel

* gl_graphics_pipeline: Replace GetSync calls with non-blocking waits

The spec states that a ClientWait on a Fence object ensures the changes propagate to the calling context
2022-03-06 16:46:49 +01:00
BytesGalore fc84649aab build(cmake): fix missing Qt5::DBus link target 2022-03-06 12:21:46 +01:00
BytesGalore 5784aa1064
Merge branch 'yuzu-emu:master' into master 2022-03-06 11:38:18 +01:00
Fernando S 5192c64991
Merge pull request #7973 from Morph1984/debug-crash
host_memory: Fix fastmem crashes in debug builds
2022-03-06 04:49:27 +01:00
BytesGalore e4e92cb75c
loader: log the type of mismatching file-extension 2022-03-03 06:45:13 +01:00
bunnei a31c195749
Merge pull request #7935 from Wunkolo/logging-join-fix
logging: Convert `backend_thread` into an `std::jthread`
2022-03-02 19:09:26 -08:00
bunnei 3ab82e7582
Merge pull request #7956 from bunnei/improve-mem-manager
Kernel Memory Updates (Part 4): Revamp KMemoryManager & other fixes
2022-03-02 17:55:51 -08:00
Morph b33f23cc46 host_memory: Fix fastmem crashes in debug builds
It is possible for virtual_offset to not be 0 when the iterator is at the beginning, and thus, std::prev(it) may be evaluated, leading to a crash in debug mode.

Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
2022-03-02 18:36:59 -05:00
Fernando S e06a133717
Merge pull request #7959 from merryhime/cmpxchg
dynarmic: Inline exclusive memory accesses
2022-03-01 22:50:52 +01:00
Mai M 3c47570563
Merge pull request #7967 from zhaobot/tx-update-20220301023432
Update translations (2022-03-01)
2022-03-01 00:50:28 -05:00
The yuzu Community b4c919eba8 Update translations (2022-03-01) 2022-03-01 02:34:54 +00:00
german77 03d671fabc applet: mii: Simple implementation of mii applet 2022-02-28 18:53:41 -06:00
Mai M 96dbb9233a
Merge pull request #7963 from ameerj/gl_fence_nit
gl_fence_manager: Minor optimization to signal querying
2022-02-28 19:53:24 -05:00
Mai M fdf81cd112
Merge pull request #7966 from merryhime/cmake-ffmpeg-endif
ffmpeg: Fix mis-maching argument warning for endif
2022-02-28 19:51:10 -05:00
Merry c4df0d8cdc ffmpeg: Fix mis-maching argument warning for endif 2022-02-28 21:08:12 +00:00
merry ec9689f200 dynarmic: Update to latest master 2022-02-28 20:10:13 +00:00
bunnei 14d28a043d hle: kernel: Re-create memory layout at initialization.
- As this can only be derived once.
2022-02-27 18:00:09 -08:00
bunnei 16e5954fcb hle: kernel: Remove unused pool locals. 2022-02-27 18:00:09 -08:00
bunnei f87f076162 hle: kernel: k_memory_manager: Rework for latest kernel behavior.
- Updates the KMemoryManager implementation against latest documentation.
- Reworks KMemoryLayout to be accessed throughout the kernel.
- Fixes an issue with pool sizes being incorrectly reported.
2022-02-27 18:00:09 -08:00
Wunkolo 913c2bd2cb logging: Convert `backend_thread` into an `std::jthread`
Was getting an unhandled `invalid_argument` [exception](https://en.cppreference.com/w/cpp/thread/thread/join) during
shutdown on my linux machine. This removes the need for a `StopBackendThread` function entirely since `jthread`
[automatically handles both checking if the thread is joinable and stopping the token before attempting to join](https://en.cppreference.com/w/cpp/thread/jthread/~jthread) in the case that `StartBackendThread` was never called.
2022-02-27 16:23:52 -08:00