Commit graph

14508 commits

Author SHA1 Message Date
bunnei
7892effd22 Merge pull request #3655 from FearlessTobi/ui-retext-yuzu
yuzu/main: Add better popup texts and remove duplicated actions
2020-04-19 02:16:50 -04:00
bunnei
5122792d3f Merge pull request #3679 from lioncash/track
track: Eliminate redundant copies
2020-04-19 01:22:47 -04:00
bunnei
8895964653 Merge pull request #3720 from jbeich/freebsd
Unbreak Vulkan on FreeBSD
2020-04-19 01:20:59 -04:00
bunnei
5ce3dc16a5 core: arm_unicorn: Fix interpret fallback by temporarily mapping instruction page. 2020-04-19 00:53:23 -04:00
Rodrigo Locatti
3fa8a21647 Merge pull request #3719 from jbeich/clang
Unbreak -Werror=implicit-fallthrough with Clang
2020-04-18 21:43:12 -03:00
Jan Beich
cc5e71c5ad renderer_vulkan: assume X11 if not Windows/macOS after 30bbdc653c
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateInstance:131: Presentation not supported on this platform
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateSurface:378: Presentation not supported on this platform
Core <Critical> core/core.cpp:Load:199: Failed to initialize system (Error 5)!
2020-04-19 00:32:23 +00:00
ReinUsesLisp
fcbe714435 vulkan/wrapper: Sort physical devices
Sort discrete GPUs over the rest, Nvidia over AMD, AMD over Intel, Intel
over the rest. This gives us a somewhat consistent order when Optimus
is removed (renderdoc does this when it's attached).

This can break the configuration of users with an Intel GPU that
manually remove Optimus on yuzu. That said, it's a very unlikely to
happen.
2020-04-18 21:31:15 -03:00
Jan Beich
c6bd2823bb cmake: Silence -Werror=implicit-fallthrough in SDL2 headers
In file included from src/input_common/sdl/sdl_impl.cpp:16:
In file included from /usr/local/include/SDL2/SDL.h:32:
In file included from /usr/local/include/SDL2/SDL_main.h:25:
/usr/local/include/SDL2/SDL_stdinc.h:445:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
/usr/local/include/SDL2/SDL_stdinc.h:445:9: note: insert '[[fallthrough]];' to silence this warning
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/local/include/SDL2/SDL_stdinc.h:445:9: note: insert 'break;' to avoid fall-through
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
        break;
/usr/local/include/SDL2/SDL_stdinc.h:446:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
/usr/local/include/SDL2/SDL_stdinc.h:446:9: note: insert '[[fallthrough]];' to silence this warning
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/local/include/SDL2/SDL_stdinc.h:446:9: note: insert 'break;' to avoid fall-through
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
        break;
/usr/local/include/SDL2/SDL_stdinc.h:447:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
/usr/local/include/SDL2/SDL_stdinc.h:447:9: note: insert '[[fallthrough]];' to silence this warning
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/local/include/SDL2/SDL_stdinc.h:447:9: note: insert 'break;' to avoid fall-through
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
        break;
3 errors generated.
2020-04-18 23:26:22 +00:00
ReinUsesLisp
98266da47c fixed_pipeline_state: Hash and compare the whole structure
Pad FixedPipelineState's size to 384 bytes to be a multiple of 16.

Compare the whole struct with std::memcmp and hash with CityHash. Using
CityHash instead of a naive hash should reduce the number of collisions.
Improve used type traits to ensure this operation is safe.

With these changes the improvements to the hashable pipeline state are:

Optimized structure
Hash:            89 ns
Comparison:     103 ns
Construction*:  164 ns
Struct size:    384 bytes

Original structure
Hash:           148 ns
Equal:          174 ns
Construction*:  281 ns
Size:          1384 bytes

* Attribute state initialization is not measured

These measures are averages taken with std::chrono::high_accuracy_clock
on MSVC shipped on Visual Studio 16.6.0 Preview 2.1.
2020-04-18 19:57:26 -03:00
ReinUsesLisp
89c816a3cf fixed_pipeline_state: Pack blending state
Reduce FixedPipelineState's size to 364 bytes.
2020-04-18 19:23:35 -03:00
ReinUsesLisp
d74b3a5a50 fixed_pipeline_state: Pack rasterizer state
Reduce FixedPipelineState's size to 600 bytes.
2020-04-18 19:22:57 -03:00
ReinUsesLisp
cc6af27ae7 fixed_pipeline_state: Pack depth stencil state
Reduce FixedPipelineState's size to 632 bytes.
2020-04-18 19:22:11 -03:00
ReinUsesLisp
fd2f04bbdc fixed_pipeline_state: Pack attribute state
Reduce FixedPipelineState's size from 1384 to 664 bytes
2020-04-18 19:21:19 -03:00
Mat M
63fb1421a5 Merge pull request #3716 from bunnei/fix-another-impl-fallthrough
video_core: gl_shader_decompiler: Fix implicit fallthrough errors.
2020-04-18 15:17:52 -04:00
bunnei
6613cbfc35 video_core: gl_shader_decompiler: Fix implicit fallthrough errors. 2020-04-18 15:15:21 -04:00
bunnei
610f78e1eb Merge pull request #3710 from lioncash/nso
loader/nso: Resolve moves not occurring in DecompressSegment
2020-04-18 14:44:42 -04:00
Mat M
fb321bdb18 Merge pull request #3715 from bunnei/fix-impl-fallthrough
service: hid: npad: Fix implicit fallthrough errors.
2020-04-18 14:44:20 -04:00
bunnei
f220140e8a service: hid: npad: Fix implicit fallthrough errors. 2020-04-18 14:41:08 -04:00
bunnei
32fd01e339 Merge pull request #3713 from lioncash/time
service/time: Minor changes
2020-04-17 21:04:43 -04:00
bunnei
8044966cf4 Merge pull request #3711 from lioncash/cast
memory/slab_heap: Make use of static_cast over reinterpret_cast
2020-04-17 21:04:11 -04:00
Lioncash
e302cb8c36 gl_shader_decompiler: Avoid copies where applicable
Avoids unnecessary reference count increments where applicable and also
avoids reallocating a vector.

Unlikely to make a huge difference, but given how trivial of an
amendment it is, why not?
2020-04-17 20:48:52 -04:00
Lioncash
de87fe690e time/system_clock_core: Remove unnecessary initializer
This is already initialized within the class body.
2020-04-17 20:04:06 -04:00
Lioncash
8c0589239b service/time: Mark IsStandardNetworkSystemClockAccuracySufficient as const
This doesn't modify internal member state.
2020-04-17 20:02:45 -04:00
Lioncash
30af9f0d5c service/time: Add virtual destructors where applicable
Many of these implementations are used to implement a polymorphic
interface. While not directly used polymorphically, this prevents
virtual destruction from ever becoming an issue.
2020-04-17 19:59:31 -04:00
Lioncash
5f25db88b1 service: Remove unused RequestParser instances
These aren't used, so they should be removed to reduce compilation
warnings.
2020-04-17 19:47:43 -04:00
bunnei
50800a5509 Merge pull request #3704 from lioncash/fmt
externals: Update fmt to 6.2.0
2020-04-17 19:47:30 -04:00
bunnei
9611466c66 Merge pull request #3630 from benru/open-windows-network-files
common/file_util: Allow access to files on network shares
2020-04-17 19:47:11 -04:00
Lioncash
ac3ff8c9ba memory/slab_heap: Make use of static_cast over reinterpret_cast
Casting from void* with static_cast is permitted by the standard, so we
can just make use of that instead.
2020-04-17 19:38:59 -04:00
Lioncash
d0569a0865 loader/nso: Resolve moves not occurring in DecompressSegment
Given the std::vector was const, an automatic move out of the function
could not occur.

We can allow automatic return value optimizations to occur by making the
buffer non-const.
2020-04-17 19:26:50 -04:00
Lioncash
972240e94a am: Resolve ineffective moves
Previously const objects were being std::moved, which results in no move
actually occurring. This resolves that.
2020-04-17 19:22:46 -04:00
Mat M
830767716e Merge pull request #3706 from degasus/fix_fallthrough_error
video_code: Fix implicit switch fallthrough.
2020-04-17 17:48:10 -04:00
Markus Wick
d8d02fa184 video_code: Fix implicit switch fallthrough.
Since yesterday, this breaks the build on linux.
So let's fix it.
2020-04-17 23:43:35 +02:00
Lioncash
b250791362 externals: Update fmt to 6.2.0
Keeps the library up to date.
2020-04-17 17:19:13 -04:00
ReinUsesLisp
153845bba3 vk_stream_buffer: Fix out of memory on boot on recent Nvidia drivers
Nvidia recently introduced a new memory type for data streaming
(awesome!), but yuzu was assuming that all heaps had enough memory
for the assumed stream buffer size (256 MiB).

This worked fine on AMD but Nvidia's new memory heap was smaller than
256 MiB. This commit changes this assumption and allocates a bit less
than the size of the preferred heap, with a maximum of 256 MiB (to avoid
allocating all system memory on integrated devices).

- Fixes a crash on NVIDIA 450.82.0.0
2020-04-17 18:12:48 -03:00
Fernando Sahmkow
74ce229ca5 Merge pull request #3703 from yuzu-emu/revert-3656-glsl-full-decompile
Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL"
2020-04-17 17:08:41 -04:00
Fernando Sahmkow
c2bd9f729c Merge pull request #3672 from lioncash/null
file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
2020-04-17 17:02:35 -04:00
Rodrigo Locatti
aed8e57a1b Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL" 2020-04-17 17:41:48 -03:00
bunnei
66cb8ee64f Merge pull request #3666 from bunnei/new-vmm
Implement a new virtual memory manager
2020-04-17 16:33:08 -04:00
bunnei
d392c4e552 Merge pull request #3682 from lioncash/uam
gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
2020-04-17 01:24:08 -04:00
bunnei
4cdbd44f51 core: hle: Address various feedback & code cleanup.
- Should be no functional changes.
2020-04-17 00:59:36 -04:00
bunnei
2e718b26c8 core: device_memory: Remove incorrect usage of constexpr. 2020-04-17 00:59:36 -04:00
bunnei
bdf7501e7b memory: Add copyright notice for Atmosphere where applicable. 2020-04-17 00:59:35 -04:00
bunnei
0cf0195874 kernel: Remove old VMManager class. 2020-04-17 00:59:35 -04:00
bunnei
a48860f7ba loader: nso: Fix loader size and arguments. 2020-04-17 00:59:35 -04:00
bunnei
9b2526392a loader: elf/kip/nro: Updates for new VMM. 2020-04-17 00:59:35 -04:00
bunnei
0707404f34 service: ldr: Updates for new VMM.
- Includes removing some service impls. that are untested.
2020-04-17 00:59:35 -04:00
bunnei
27b5b6c36f kernel: memory: page_table: Simplify GetPhysicalAddr impl. 2020-04-17 00:59:35 -04:00
bunnei
6b40850b9a kernel: svc: Updates for new VMM.
- Includes removing some SVC impls. that are untested.
2020-04-17 00:59:34 -04:00
bunnei
8a67b3058e core: memory: Fix memory access on page boundaries.
- Fixes Super Smash Bros. Ultimate.
2020-04-17 00:59:34 -04:00
bunnei
5a461a7482 video_core: memory_manager: Updates for Common::PageTable changes. 2020-04-17 00:59:34 -04:00