Commit graph

20974 commits

Author SHA1 Message Date
lat9nq
0b10017932 yuzu_cmd: Allow user to specify config file location
Adds an option `-c` or `--config` with one required argument that allows
the user to specify to where the config file is located. Useful for
scripts that run specific games with different preferences for settings.
2022-03-15 03:48:40 -04:00
Fernando S
1077f95f7c Merge pull request #8008 from ameerj/rescale-offsets-array
rescaling_pass: Fix rescaling Color2DArray ImageFetch offsets
2022-03-15 00:08:22 +01:00
Fernando S
ad660f91ed Merge pull request #8000 from liamwhite/hagi
Initial support for Wii Hagi emulator
2022-03-15 00:08:05 +01:00
bunnei
52db7331df Merge pull request #8015 from FernandoS27/fix-global-mem
Shader decompiler: Fix storage tracking in deko3d.
2022-03-14 16:03:23 -07:00
byte[]
7c081ca937 Maxwell3D: Link to override constant definition in nouveau 2022-03-14 11:06:25 -04:00
Fernando S
756fbb7ad7 Merge pull request #8016 from merryhime/kill-mem-use
dynarmic: Reduce size of code caches
2022-03-14 16:04:46 +01:00
byte[]
2f745c6c00 Maxwell3D: restore original topology when topology overrides are disabled 2022-03-14 11:00:08 -04:00
Liam
6202688c91 Maxwell3D: Use override constants from nouveau
This fixes some incorrect rendering in Sunshine
2022-03-14 10:11:58 -04:00
Merry
eb30b2382a dynarmic: Reduce size of code caches 2022-03-13 22:17:14 +00:00
Fernando Sahmkow
05054d1dc2 Shader decompiler: do constant propgation before texture pass. 2022-03-13 21:49:40 +01:00
Fernando Sahmkow
fc8251e043 Shader decompiler: Fix storage tracking in deko3d. 2022-03-13 17:41:16 +01:00
bunnei
c7c318b73a Merge pull request #8007 from ameerj/vs-2022-errors
emit_spirv, vk_compute_pass: Resolve VS2022 compiler errors
2022-03-13 03:43:06 -07:00
merry
771006f6a8 Merge pull request #8009 from ameerj/dynarmic-exclusives-config
config: Write dynarmic exclusive memory configs
2022-03-13 07:42:38 +00:00
ameerj
4a525deb87 config: Write dynarmic exclusive memory configs
Ensures the configs are written and saved between boots
2022-03-12 03:42:50 -05:00
ameerj
1888b552e3 rescaling_pass: Fix rescaling Color2DArray ImageFetch offsets
ImageFetch offsets for 2D array coordinates have a different composite size than the coordinates. The rescaling pass was not taking this into account.

Fixes broken shaders when scaling is enabled in Astral Chain, and likely other titles.
2022-03-12 03:31:56 -05:00
ameerj
048522e98b emit_spirv, vk_compute_pass: Resolve VS2022 compiler errors 2022-03-12 02:54:33 -05:00
bunnei
56b249780d Merge pull request #7997 from Wunkolo/cpu_detect_more
cpu_detect: Add additional x86 flags and telemetry
2022-03-11 17:26:41 -08:00
Liam
db6b7f70b7 Maxwell3D: Restrict topology override effect to after the register is set 2022-03-11 19:42:12 -05:00
bunnei
bf810f9e10 Merge pull request #8003 from yuzu-emu/revert-7982-fix_cmake_missing_qt5_dbus
Revert "build(cmake): fix missing Qt5::DBus target on linux"
2022-03-11 15:22:30 -08:00
bunnei
e8ada87451 Revert "build(cmake): fix missing Qt5::DBus target on linux" 2022-03-11 15:22:24 -08:00
Wunkolo
c802f8fbd2 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
21ccb35705 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
61e810ba10 Maxwell3D: mark index buffers as dirty after updating counts 2022-03-11 08:51:22 -05:00
bunnei
df405f81b7 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
0a1d21d82e 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
de42319556 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
d64f866600 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
a993e93abd 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
c5bb496565 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
7cb99ccf23 cpu_detect: Revert __cpuid{ex} array-type argument
Restores compatibility with MSVC's `__cpuid` intrinsic.
2022-03-09 19:50:01 -08:00
bunnei
23a072fc7a Merge pull request #7936 from Wunkolo/cpu_detect
cpu_detect: Refactor detection of processor features
2022-03-09 15:34:42 -08:00
Wunkolo
b603adb6ac cpu_detect: Add missing lzcnt detection 2022-03-09 13:57:47 -08:00
Wunkolo
4aa5b5779b 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
14618c0e98 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
609c64196b cpu_detect: Utilize Bit<N> utility function 2022-03-09 13:57:47 -08:00
Wunkolo
31f8d6f0cf 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
fbf00e7fbc 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
685526c857 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
86eaedbf19 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
d1aae938a9 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
b50dd6199e 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
062d95753f 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
0e203d30f9 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
9dd48f8f89 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
173ddc9e6b 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
e3f8340bec 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
3e2bc9e813 Merge pull request #7930 from asLody/dma-semaphore
MaxwellDMA: Implement semaphore operations
2022-03-07 21:53:38 +01:00
lat9nq
7df809b8b1 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
3ec2e46e15 MaxwellDMA: Implement semaphore operations 2022-03-07 13:46:18 +08:00
Ameer J
7d636e10d7 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