Commit graph

19428 commits

Author SHA1 Message Date
yzct12345
133e23fe1c logging: Display backtrace on crash
This implements backtraces so we don't have to tell users how to use gdb anymore.

This prints a backtrace after abort or segfault is detected. It also fixes the log getting cut off with the last line containing only a bracket. This change lets us know what caused a crash not just what happened the few seconds before it.

I only know how to add support for Linux with GCC. Also this doesn't work outside of C/C++ such as in dynarmic or certain parts of graphics drivers. The good thing is that it'll try and just crash again but the stack frames are still there so the core dump will work just like before.
2021-08-13 18:58:35 +00:00
yzct12345
aee8cc20ea logging: Simplify and make thread-safe
This simplifies the logging system.

This also fixes some lost messages on startup.

The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.

With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2021-08-13 18:39:45 +00:00
bunnei
5364981133 Merge pull request #6862 from german77/badsdl
input_common: Disable sdl raw input mode
2021-08-12 21:14:26 -07:00
bunnei
1b274368b1 Merge pull request #6838 from ameerj/sws-align
vic: Specify sws_scale height stride.
2021-08-12 11:28:33 -07:00
german77
134a2c23ac input_common: Disable sdl raw input mode 2021-08-12 13:17:07 -05:00
Mai M
7aac209980 Merge pull request #6855 from german77/sdl16
externals: Update sdl2 to 2.0.16
2021-08-11 23:14:53 -04:00
Mai M
4b1b33bcad Merge pull request #6860 from lat9nq/ranged-settings-2
settings: Fix MSVC issues
2021-08-11 17:53:09 -04:00
lat9nq
6ebd0fe021 settings: Fix MSVC issues
According to https://stackoverflow.com/questions/469508, we run into a
MSVC bug (since VS 2005) when using diamond inheritance for
RangedSetting.

This explicitly implements those functions in RangedSetting. GetValue is
implemented as just calling the inherited version. The explicit
converson operator is reimplemented. I opted for this over ignoring the
warning with a pragma since this specifies the inherited behavior, and I
have now less faith in MSVC to pick the right one.

In addition, we mark destructors as virtual to silence what I believe is
a fair MSVC compilation error.
2021-08-11 17:12:14 -04:00
bunnei
8212eb9900 Merge pull request #6776 from lat9nq/ranged-settings
settings: Implement settings ranges
2021-08-10 21:19:01 -07:00
german77
51d94e7bea externals: Update sdl2 to 2.0.16 2021-08-10 19:16:30 -05:00
Fernando S
254526c3d2 Merge pull request #6820 from yzct12345/split-cache
texture_cache: Split out template definitions
2021-08-10 12:23:05 +02:00
Ameer J
6f2c0e3ae0 Merge pull request #6837 from german77/no-pause-screenshot
main: Avoid stopping emulation when taking a screenshot
2021-08-09 23:49:48 -04:00
ameerj
8236b4f4d7 vic: Specify sws_scale height stride.
Silences a sws_scale runtime warning about unaligned strides.
2021-08-09 23:24:16 -04:00
bunnei
ea4923218a Merge pull request #6823 from yzct12345/memory-cleanup
memory: Clean up code
2021-08-09 17:09:56 -07:00
bunnei
9cc4c9e0b6 Merge pull request #6839 from ameerj/frame-cap-positon
configure_general: Swap positions of speed limit and frame limit options
2021-08-09 12:32:07 -07:00
Mai M
d49016380e Merge pull request #6844 from ameerj/vp9-empty-frame
vp9: Ensure the first frame is complete
2021-08-08 19:02:39 -04:00
bunnei
2c332d055d Merge pull request #6843 from FernandoS27/lives-in-a-pineapple-under-the-sea-2
yuzu-cmd/CMakeLists: Correct attribution for this function.
2021-08-08 11:31:47 -07:00
Fernando Sahmkow
f76d1a1dae yuzu-cmd/CMakeLists: Correct attribution for this function. 2021-08-08 20:24:53 +02:00
ameerj
4cd45cf374 vp9: Ensure the first frame is complete
Silences a runtime error due to the first frame missing the frame data, and being set to hidden despite being a key-frame.
2021-08-08 13:49:00 -04:00
yzct12345
3c7d3363c1 texture_cache: Address ameerj's review 2021-08-08 11:02:51 +00:00
Fernando S
d107b31b66 Merge pull request #6834 from K0bin/buffer-image-granularity
Respect Vulkan bufferImageGranularity
2021-08-08 11:57:40 +02:00
bunnei
0db9964080 Merge pull request #6698 from german77/SDL_QoL
input_common: Improve SDL joystick and hide toggle option
2021-08-08 02:44:42 -07:00
bunnei
0c5acc8913 Merge pull request #6817 from gidoly/patch-1
Add description to fast gpu time option
2021-08-08 01:11:47 -07:00
ameerj
24e2e4288e configure_general: Swap positions of speed limit and frame limit options 2021-08-08 01:00:40 -04:00
german77
32e0572a68 input_common: Improve SDL joystick and hide toggle option 2021-08-07 23:11:23 -05:00
bunnei
551b61a46e Merge pull request #6827 from Morph1984/uuid-hash
common: uuid: Add hash function for UUID
2021-08-07 17:18:46 -07:00
german77
56090126ec main: Avoid stopping emulation when taking a screenshot 2021-08-07 15:45:29 -05:00
bunnei
7f907227dd Merge pull request #6830 from ameerj/nvdec-unimpld-codec
nvdec: Better logging for unimplemented codecs
2021-08-07 12:37:39 -07:00
Robin Kertels
f8f27b6caf vulkan_memory_allocator: Respect bufferImageGranularity 2021-08-07 15:28:05 +02:00
bunnei
f5bab36b38 Merge pull request #6795 from sankasan/cmd-remove-cursor-fullscreen
yuzu-cmd: hide mouse cursor when started fullscreen
2021-08-07 02:00:29 -07:00
bunnei
249bc8fdc9 Merge pull request #6815 from german77/ui_improvements
settings_ui: Add emulated joystick position dot to controller preview
2021-08-06 23:54:23 -07:00
ameerj
f52a3de990 nvdec: Better logging for unimplemented codecs 2021-08-07 01:08:33 -04:00
bunnei
6bb6ae6dcb Merge pull request #6791 from ameerj/astc-opt
astc_decoder: Various performance and memory optimizations
2021-08-06 21:45:24 -07:00
yzct12345
b61be44dbc memory: Address lioncash's review 2021-08-07 03:03:21 +00:00
yzct12345
a21f46127b memory: Dedup Read and Write and fix logging bugs 2021-08-07 01:32:06 +00:00
yzct12345
0cef80ec92 texture_cache: Address ameerj's review 2021-08-07 01:27:47 +00:00
bunnei
cb6d198101 Merge pull request #6799 from ameerj/vp9-fixes
nvdec: Fix VP9 reference frame refreshes
2021-08-06 17:46:46 -07:00
ameerj
0c28433539 nvhost_nvdec_common: Remove BufferMap
This was mainly used to keep track of mapped buffers for later unmapping.  Since unmap is no longer implemented, this no longer seves a valuable purpose.
2021-08-06 20:11:12 -04:00
ameerj
b34ded024c vp9: Cleanup unused variables
With reference frames refreshes fix, we no longer need to buffer two frames in advance.
We can also remove other unused or otherwise unneeded variables.
2021-08-06 20:08:11 -04:00
ameerj
27969c5943 vp9: Fix reference frame refreshes
This resolves the artifacting when decoding VP9 streams.
2021-08-06 20:08:08 -04:00
ameerj
7acf5d8bfd nvhost_nvdec_common: Stub UnmapBuffer Ioctl
Skip unmapping nvdec buffers to avoid breaking the continuity of the VP9 reference frame addresses, and the risk of invalidating data before the async GPU thread is done with it.
2021-08-06 20:06:30 -04:00
bunnei
6c222a04a5 Merge pull request #6822 from yzct12345/clion-assert
assert: Avoid empty macros
2021-08-05 22:29:45 -07:00
Morph
93697805a7 common: uuid: Add hash function for UUID
Used when UUID is a key in an unordered_map. The hash is produced by XORing the high and low 64-bits of the UUID together.
2021-08-06 00:41:55 -04:00
yzct12345
7a421e7e33 memory: Clean up CopyBlock too 2021-08-05 21:09:08 +00:00
gidoly
d5ab9ff29d Update configure_graphics_advanced.ui
add description too fast gpu time
2021-08-06 06:08:12 +09:00
yzct12345
e99a125e19 texture_cache: Don't change copyright year 2021-08-05 20:52:12 +00:00
yzct12345
4436e63616 texture_cache: Address ameerj's review 2021-08-05 20:46:24 +00:00
yzct12345
fa26e226de memory: Address lioncash's review 2021-08-05 20:29:43 +00:00
bunnei
1822aa11eb Merge pull request #6813 from Morph1984/hex-string-to-uuid
common: uuid: Add hex string to UUID constructor
2021-08-05 13:29:11 -07:00
yzct12345
cbe093e865 memory: Clean up code 2021-08-05 20:11:14 +00:00