summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-04-20Allow picking a Compatibility Profile for OpenGL.Fernando Sahmkow
This option allows picking the compatibility profile since a lot of bugs are fixed in it. We devs will use this option to easierly debug current problems in our Core implementation.:wq
2019-04-19Merge pull request #2415 from lioncash/constbunnei
kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function
2019-04-19Merge pull request #2414 from lioncash/reorderbunnei
yuzu/bootmanager: Resolve constructor initializer list warnings
2019-04-19Merge pull request #2421 from lioncash/svc-callbunnei
kernel/svc: Name supervisor call 0x36
2019-04-19Merge pull request #2374 from lioncash/pagetablebunnei
core: Reorganize boot order
2019-04-19kernel/svc: Name supervisor call 0x36Lioncash
This call was added to the SVC handlers in the 8.0.0 kernel, so we can finally give it a name.
2019-04-17Merge pull request #2397 from lioncash/thread-unusedbunnei
kernel/thread: Remove unused guest_handle member variable
2019-04-17Merge pull request #2318 from ReinUsesLisp/sampler-cachebunnei
gl_sampler_cache: Port sampler cache to OpenGL
2019-04-17Merge pull request #2348 from FernandoS27/guest-bindlessbunnei
Implement Bindless Textures on Shader Decompiler and GL backend
2019-04-17kernel/wait_object: Make GetHighestPriorityReadyThread() a const member functionLioncash
This doesn't actually modify internal state of a wait object, so it can be const qualified.
2019-04-17yuzu/bootmanager: Replace unnnecessary constructor initializer list member ↵Lioncash
of GGLContext The default constructor will always run, even when not specified, so this is redundant. However, the context member can indeed be initialized in the constructor initializer list.
2019-04-16yuzu/bootmanager: Remove unnecessary includesLioncash
This include isn't used anymore so it can be removed.
2019-04-16yuzu/bootmanager: Resolve constructor initializer list warningsLioncash
Resolves -Wreorder warnings. These will automatically be initialized to nullptr anyways, so these were redundant.
2019-04-16Merge pull request #2315 from ReinUsesLisp/severity-decompilerbunnei
shader_ir/decode: Reduce the severity of common assertions
2019-04-16Merge pull request #2384 from ReinUsesLisp/gl-state-clearbunnei
gl_rasterizer: Apply just the needed state on Clear
2019-04-16Merge pull request #2405 from lioncash/qtbunnei
CMakeLists: Define QT_USE_QSTRINGBUILDER for the Qt target
2019-04-16Merge pull request #2092 from ReinUsesLisp/stgbunnei
shader/memory: Implement STG and global memory flushing
2019-04-16Merge pull request #2376 from lioncash/constbunnei
yuzu/configure_hotkey: Minor changes
2019-04-16Merge pull request #2401 from lioncash/guardbunnei
common/{lz4_compression, zstd_compression}: Add missing header guards
2019-04-15Merge pull request #2382 from lioncash/tablebunnei
service: Update service function tables
2019-04-15Merge pull request #2393 from lioncash/svcbunnei
kernel/svc: Implement svcMapProcessCodeMemory/svcUnmapProcessCodeMemory
2019-04-15Merge pull request #2398 from lioncash/boostbunnei
kernel/thread: Remove BoostPriority()
2019-04-15CMakeLists: Define QT_USE_QSTRINGBUILDER for the Qt targetLioncash
This is a compile definition introduced in Qt 4.8 for reducing the total potential number of strings created when performing string concatenation. This allows for less memory churn. This can be read about here: https://blog.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder/ For a change that isn't source-compatible, we only had one occurrence that actually need to have its type clarified, which is pretty good, as far as transitioning goes.
2019-04-15svc: Specify handle value in thread's nameLioncash
Allows the handle to be seen alongside the entry point.
2019-04-15common/{lz4_compression, zstd_compression}: Add missing header guardsLioncash
These two files were missing the #pragma once directive.
2019-04-15Correct Pitch in Fermi2DFernando Sahmkow
2019-04-15kernel/thread: Remove BoostPriority()Lioncash
This is a holdover from Citra that currently remains unused, so it can be removed from the Thread interface.
2019-04-14kernel/thread: Remove unused guest_handle member variableLioncash
This member variable is entirely unused. It was only set but never actually utilized. Given that, we can remove it to get rid of noise in the thread interface.
2019-04-14shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp
2019-04-13Merge pull request #2378 from lioncash/robunnei
ldr: Minor amendments to IPC-related parameters
2019-04-13Merge pull request #2373 from FernandoS27/z32bunnei
Set Pixel Format to Z32 if its R32F and depth compare enabled, and Implement format ZF32_X24S8
2019-04-13Merge pull request #2357 from zarroboogs/force-30fps-modebunnei
Add a toggle to force 30FPS mode
2019-04-13Merge pull request #2381 from lioncash/fsbunnei
fsp_srv: Minor cleanup related changes
2019-04-13Merge pull request #2386 from ReinUsesLisp/shader-managerbunnei
gl_shader_manager: Move code to source file and minor clean up
2019-04-13Merge pull request #2017 from jroweboy/glwidgetbunnei
Frontend: Migrate to QOpenGLWindow and support shared contexts
2019-04-13Merge pull request #2389 from FreddyFunk/rename-gamedirbunnei
ui_settings: Rename game directory variables
2019-04-12kernel/svc: Implement svcUnmapProcessCodeMemoryLioncash
Essentially performs the inverse of svcMapProcessCodeMemory. This unmaps the aliasing region first, then restores the general traits of the aliased memory. What this entails, is: - Restoring Read/Write permissions to the VMA. - Restoring its memory state to reflect it as a general heap memory region. - Clearing the memory attributes on the region.
2019-04-12kernel/svc: Implement svcMapProcessCodeMemoryLioncash
This is utilized for mapping code modules into memory. Notably, the ldr service would call this in order to map objects into memory.
2019-04-12Merge pull request #2391 from lioncash/scopebunnei
common/scope_exit: Replace std::move with std::forward in ScopeExit()
2019-04-12Merge pull request #2392 from lioncash/swapbunnei
common/swap: Minor cleanup and improvements to byte swapping functions
2019-04-12Fix Clang FormatFreddyFunk
2019-04-12common/swap: Improve codegen of the default swap fallbacksLioncash
Uses arithmetic that can be identified more trivially by compilers for optimizations. e.g. Rather than shifting the halves of the value and then swapping and combining them, we can swap them in place. e.g. for the original swap32 code on x86-64, clang 8.0 would generate: mov ecx, edi rol cx, 8 shl ecx, 16 shr edi, 16 rol di, 8 movzx eax, di or eax, ecx ret while GCC 8.3 would generate the ideal: mov eax, edi bswap eax ret now both generate the same optimal output. MSVC used to generate the following with the old code: mov eax, ecx rol cx, 8 shr eax, 16 rol ax, 8 movzx ecx, cx movzx eax, ax shl ecx, 16 or eax, ecx ret 0 Now MSVC also generates a similar, but equally optimal result as clang/GCC: bswap ecx mov eax, ecx ret 0 ==== In the swap64 case, for the original code, clang 8.0 would generate: mov eax, edi bswap eax shl rax, 32 shr rdi, 32 bswap edi or rax, rdi ret (almost there, but still missing the mark) while, again, GCC 8.3 would generate the more ideal: mov rax, rdi bswap rax ret now clang also generates the optimal sequence for this fallback as well. This is a case where MSVC unfortunately falls short, despite the new code, this one still generates a doozy of an output. mov r8, rcx mov r9, rcx mov rax, 71776119061217280 mov rdx, r8 and r9, rax and edx, 65280 mov rax, rcx shr rax, 16 or r9, rax mov rax, rcx shr r9, 16 mov rcx, 280375465082880 and rax, rcx mov rcx, 1095216660480 or r9, rax mov rax, r8 and rax, rcx shr r9, 16 or r9, rax mov rcx, r8 mov rax, r8 shr r9, 8 shl rax, 16 and ecx, 16711680 or rdx, rax mov eax, -16777216 and rax, r8 shl rdx, 16 or rdx, rcx shl rdx, 16 or rax, rdx shl rax, 8 or rax, r9 ret 0 which is pretty unfortunate.
2019-04-11core/core: Move process execution start to System's Load()Lioncash
This gives us significantly more control over where in the initialization process we start execution of the main process. Previously we were running the main process before the CPU or GPU threads were initialized (not good). This amends execution to start after all of our threads are properly set up.
2019-04-11core/process: Remove unideal page table setting from LoadFromMetadata()Lioncash
Initially required due to the split codepath with how the initial main process instance was initialized. We used to initialize the process like: Init() { main_process = Process::Create(...); kernel.MakeCurrentProcess(main_process.get()); } Load() { const auto load_result = loader.Load(*kernel.GetCurrentProcess()); if (load_result != Loader::ResultStatus::Success) { // Handle error here. } ... } which presented a problem. Setting a created process as the main process would set the page table for that process as the main page table. This is fine... until we get to the part that the page table can have its size changed in the Load() function via NPDM metadata, which can dictate either a 32-bit, 36-bit, or 39-bit usable address space. Now that we have full control over the process' creation in load, we can simply set the initial process as the main process after all the loading is done, reflecting the potential page table changes without any special-casing behavior. We can also remove the cache flushing within LoadModule(), as execution wouldn't have even begun yet during all usages of this function, now that we have the initialization order cleaned up.
2019-04-11core/core: Move main process creation into Load()Lioncash
Now that we have dependencies on the initialization order, we can move the creation of the main process to a more sensible area: where we actually load in the executable data. This allows localizing the creation and loading of the process in one location, making the initialization of the process much nicer to trace.
2019-04-11video_core/gpu: Create threads separately from initializationLioncash
Like with CPU emulation, we generally don't want to fire off the threads immediately after the relevant classes are initialized, we want to do this after all necessary data is done loading first. This splits the thread creation into its own interface member function to allow controlling when these threads in particular get created.
2019-04-11core/cpu_core_manager: Create threads separately from initialization.Lioncash
Our initialization process is a little wonky than one would expect when it comes to code flow. We initialize the CPU last, as opposed to hardware, where the CPU obviously needs to be first, otherwise nothing else would work, and we have code that adds checks to get around this. For example, in the page table setting code, we check to see if the system is turned on before we even notify the CPU instances of a page table switch. This results in dead code (at the moment), because the only time a page table switch will occur is when the system is *not* running, preventing the emulated CPU instances from being notified of a page table switch in a convenient manner (technically the code path could be taken, but we don't emulate the process creation svc handlers yet). This moves the threads creation into its own member function of the core manager and restores a little order (and predictability) to our initialization process. Previously, in the multi-threaded cases, we'd kick off several threads before even the main kernel process was created and ready to execute (gross!). Now the initialization process is like so: Initialization: 1. Timers 2. CPU 3. Kernel 4. Filesystem stuff (kind of gross, but can be amended trivially) 5. Applet stuff (ditto in terms of being kind of gross) 6. Main process (will be moved into the loading step in a following change) 7. Telemetry (this should be initialized last in the future). 8. Services (4 and 5 should ideally be alongside this). 9. GDB (gross. Uses namespace scope state. Needs to be refactored into a class or booted altogether). 10. Renderer 11. GPU (will also have its threads created in a separate step in a following change). Which... isn't *ideal* per-se, however getting rid of the wonky intertwining of CPU state initialization out of this mix gets rid of most of the footguns when it comes to our initialization process.
2019-04-11Merge pull request #2235 from ReinUsesLisp/spirv-decompilerbunnei
vk_shader_decompiler: Implement a SPIR-V decompiler
2019-04-11Merge pull request #2360 from lioncash/svc-globalbunnei
kernel/svc: Deglobalize the supervisor call handlers
2019-04-11Merge pull request #2388 from lioncash/constexprbunnei
kernel: Make handle type declarations constexpr