aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-16CMakeLists: Ensure we specify Unicode as the codepage on WindowsLioncash
Previously we were building with MBCS, which is pretty undesirable. We want the application to be Unicode-aware in general. Currently, we make the command line variant of yuzu use ANSI variants of the non-standard getopt functions that we link in for Windows, given we only have an ANSI option-set. We should really replace getopt with a library that we make all build types of yuzu link in, but this will have to do for the time being.
2019-04-16kernel/vm_manager: Remove usages of global system accessorsLioncash
Makes the dependency on the system instance explicit within VMManager's interface.
2019-04-16Implement IsBlockContinousFernando Sahmkow
This detects when a GPU Memory Block is not continous within host cpu memory.
2019-04-16Apply Const correctness to SwizzleKepler and replace u32 for size_t on ↵Fernando Sahmkow
iterators.
2019-04-16Use ReadBlockUnsafe for fetyching DMA CommandListsFernando Sahmkow
2019-04-16Document unsafe versions and add BlockCopyUnsafeFernando Sahmkow
2019-04-15Use ReadBlockUnsafe for Shader CacheFernando Sahmkow
2019-04-15Use ReadBlockUnsafe on TIC and TSC readingFernando Sahmkow
Use ReadBlockUnsafe on TIC and TSC reading as memory is never flushed from host GPU there.
2019-04-15GPU MemoryManager: Implement ReadBlockUnsafe and WriteBlockUnsafeFernando Sahmkow
2019-04-15Use WriteBlock and ReadBlock.Fernando Sahmkow
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-15Implement Block Linear copies in Kepler Memory.Fernando Sahmkow
2019-04-15vk_shader_decompiler: Add missing operationsReinUsesLisp
2019-04-15shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmeticReinUsesLisp
Operations done before the main half float operation (like HAdd) were managing a packed value instead of the unpacked one. Adding an unpacked operation allows us to drop the per-operand MetaHalfArithmetic entry, simplifying the code overall.
2019-04-15gl_shader_decompiler: Fix MrgH0 decompilationReinUsesLisp
GLSL decompilation for HMergeH0 was wrong. This addresses that issue.
2019-04-15shader_ir/decode: Implement half float saturationReinUsesLisp
2019-04-15shader_ir/decode: Reduce severity of unimplemented half-float FTZReinUsesLisp
2019-04-15renderer_opengl: Implement half float NaN comparisonsReinUsesLisp
2019-04-15shader_ir: Avoid using static on heap-allocated objectsReinUsesLisp
Using static here might be faster at runtime, but it adds a heap allocation called before main.
2019-04-15Do some corrections in conversion shader instructions.Fernando Sahmkow
Corrects encodings for I2F, F2F, I2I and F2I Implements Immediate variants of all four conversion types. Add assertions to unimplemented stuffs.
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-15Correct Kepler Memory on Linear Pushes.Fernando Sahmkow
2019-04-15Support compressed formats on linear textures.Fernando Sahmkow
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-14gl_shader_decompiler: Use variable AOFFI on supported hardwareReinUsesLisp
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.