summaryrefslogtreecommitdiffstats
path: root/src/common (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-03-15common: intrusive_red_black_tree: Various updates.bunnei1-181/+210
2022-03-11cpu_detect: Add additional x86 flags and telemetryWunkolo3-27/+84
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](https://github.com/merryhime/dynarmic/blob/bcfe377aaa5138af740e90af5be7a7dff7b62a52/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-11common/telemetry: Update `AddField` name type to `string_view`Wunkolo1-3/+4
Non-owning `string_view` is flexable and avoids some of the many redundant copies made over `std::string`
2022-03-10backend: Ensure backend_thread is destructed before message_queueMerry1-1/+1
Ensures that stop_token signals that stop has been requested before destruction of conditional_variable
2022-03-10cpu_detect: Revert `__cpuid{ex}` array-type argumentWunkolo1-6/+6
Restores compatibility with MSVC's `__cpuid` intrinsic.
2022-03-09cpu_detect: Add missing `lzcnt` detectionWunkolo1-0/+1
2022-03-09cpu_detect: Refactor cpu/manufacturer identificationWunkolo2-24/+38
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-09cpu_detect: Update array-types to `span` and `array`Wunkolo1-11/+13
Update some uses of `int` into some more explicitly sized types as well
2022-03-09cpu_detect: Utilize `Bit<N>` utility functionWunkolo1-32/+20
2022-03-09cpu_detect: Compact capability fieldsWunkolo1-20/+21
As this structure gets more explicit, bools can be bitfields and small enums can use smaller types for their span of values.
2022-03-09bit_util: Add `bit` utility functionWunkolo1-0/+7
Extracts a singular bit, as a bool, from the specified compile-time index.
2022-03-03host_memory: Fix fastmem crashes in debug buildsMorph1-2/+2
It is possible for virtual_offset to not be 0 when the iterator is at the beginning, and thus, std::prev(it) may be evaluated, leading to a crash in debug mode. Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
2022-02-28logging: Convert `backend_thread` into an `std::jthread`Wunkolo1-13/+5
Was getting an unhandled `invalid_argument` [exception](https://en.cppreference.com/w/cpp/thread/thread/join) during shutdown on my linux machine. This removes the need for a `StopBackendThread` function entirely since `jthread` [automatically handles both checking if the thread is joinable and stopping the token before attempting to join](https://en.cppreference.com/w/cpp/thread/jthread/~jthread) in the case that `StartBackendThread` was never called.
2022-02-27dynarmic: Inline exclusive memory accessesmerry2-0/+4
Inlines implementation of exclusive instructions into JITted code, improving performance of applications relying heavily on these instructions. We also fastmem these instructions for additional speed, with support for appropriate recompilation on fastmem failure. An unsafe optimization to disable the intercore global_monitor is also provided, should one wish to rely solely on cmpxchg semantics for safety. See also: merryhime/dynarmic#664
2022-02-21settings: Add a new "use_extended_memory_layout" setting.bunnei2-0/+2
- This will be used to enable emulation of a larger memory arrangement.
2022-02-19fixup! core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory.bunnei2-16/+16
2022-02-19core: hle: kernel: KPageTable: Improve Un/MapPhysicalMemory.bunnei2-6/+76
- Improves the implementations of MapPhysicalMemory and UnmapPhysicalMemory to more closely reflect latest HOS.
2022-02-17common: Add NullVisitor default constructorWunkolo1-0/+3
Addresses https://github.com/yuzu-emu/yuzu/issues/7881 to fix linux builds. `YUZU_NON_COPYABLE` deletes the `T(const T&)` constructor which will cause the implicitly defined default ctor/dtor to no-longer generate.
2022-02-14common: fs_util: Add buffer to string view utility functionsMorph2-0/+26
These functions allow to construct a string view from an input buffer, avoiding the copy done by the non string view counterparts. However, callers must be cognizant of the viewed buffer's lifetime to avoid a use-after-free.
2022-02-11service/mnpp: Stub mnpp_appNarr the Reg2-0/+2
Used in Super Nintendo Entertainment System™ - Nintendo Switch Online
2022-02-10common: uuid: Use sizeof(u64) instead of 8 in Hash()Morph1-5/+5
2022-02-05common: uuid: Return an invalid UUID if conversion from string failsMorph1-14/+39
The string constructor of UUID states: Should the input string not meet the above requirements, an assert will be triggered and an invalid UUID is set instead.
2022-02-05general: Rename NewUUID to UUID, and remove the previous UUID implMorph6-434/+256
This completes the removal of the old UUID implementation.
2022-02-05common: uuid: Add AsU128()Morph2-0/+9
This copies the internal bytes of the UUID into a u128 for backwards compatibility. This should not be used.
2022-02-05input/hid: Migrate to the new UUID implementationMorph1-4/+4
2022-02-05common: Implement NewUUIDMorph3-0/+322
This is a fixed and revised implementation of UUID that uses an array of bytes as its internal representation of a UUID instead of a u128 (which was an array of 2 u64s). In addition to this, the generation of RFC 4122 Version 4 compliant UUIDs is also implemented.
2022-02-02common_types: Remove NonCopyable structLioncash1-10/+0
Now that we're moved over to the YUZU_ defines, we can get rid of this struct.
2022-02-02general: Replace NonCopyable struct with equivalentsLioncash1-9/+17
2022-02-01common/file: Remove [[nodiscard]] from Open()Lioncash1-3/+2
Since this has a void return value, there's nothing that can actually be used.
2022-01-30common: wall_clock: Check precision against the emulated CPU and CNTFRQMorph2-8/+12
In addition to requiring nanosecond precision, using the native clock requires that the hardware TSC has a precision greater than the emulated CPU and its clock counter.
2022-01-30common: wall_clock: Utilize constants for ms, us, and ns ratiosMorph3-5/+9
2022-01-30input_common: Add home and hard touch press buttons to UDP controllersgerman771-0/+2
2022-01-28wall_clock: use standard wall clock if rtsc frequency is too lowgerman771-1/+3
2022-01-26common/xbyak_api: Make BuildRegSet() constexprLioncash1-8/+8
This allows us to eliminate any static constructors that would have been emitted due to the function not being constexpr.
2022-01-24yuzu: Add setting to disable controller navigationgerman771-0/+1
2022-01-17input_common: Reintroduce motion from mouse and use button namesgerman771-0/+7
2022-01-15common: fiber: YieldTo: Avoid hard crash on nullptr previous_fiber.bunnei1-1/+4
- When the emulator crashes to desktop below, we don't even get this captured in a log, making such issues harder to debug.
2022-01-11common: bit_util: Add IsPow2 helper functionMorph1-0/+6
Makes use of std::has_single_bit() to check whether the value is a power of 2.
2022-01-10logging/log.h: move enum class formatter to a separate file ...liushuyu3-15/+25
... to common/logging/formatter.h
2022-01-09logging/log: use `underlying_type` instead of hardcoding typesliushuyu1-2/+4
2022-01-08logging: adapt to changes in fmt 8.1liushuyu1-1/+14
2022-01-04ShaderDecompiler: Add a debug option to dump the game's shaders.Fernando Sahmkow1-0/+1
2021-12-21Allow overriding SCM version infoAndrew Udvare1-0/+5
If the build is from a non-repository, these functions will return empty. This patch allows using defines to CMake to set version info such as -DGIT_BRANCH=master.
2021-12-14common/input: Avoid numerous large copies of CallbackStatusLioncash1-2/+2
CallbackStatus instances aren't the cheapest things to copy around (relative to everything else), given that they're currently 520 bytes in size and are currently copied numerous times when callbacks are invoked. Instead, we can pass the status by const reference to avoid all the copying.
2021-12-14common/cpu_detect: Remove CPU family and modelMorph1-12/+0
We currently do not make use of these fields, remove them for now.
2021-12-14common/input: Remove unnecessary returnsLioncash1-6/+2
Given these return void, these can be omitted.
2021-12-13input_engine: Pass LedStatus by const referenceLioncash1-1/+1
Avoids copies where reasonably applicable
2021-12-13input_engine: Pass VibrationStatus by const reference in SetRumble()Lioncash1-4/+2
Avoids creating copies of the struct where not necessary.
2021-12-06service/notif: Add notif:a and stub ListAlarmSettings,Initializegerman772-0/+2
Used by ring fit adventure 1.2.0
2021-12-05general: Add missing copyright noticesameerj1-0/+4
2021-12-04native_clock: Wait for less time in EstimateRDTSCFrequencyMorph1-18/+18
In my testing, waiting for 200ms provided the same level of precision as the previous implementation when estimating the RDTSC frequency. This significantly improves the yuzu executable launch times since we reduced the wait time from 3 seconds to 200 milliseconds.
2021-12-02general: Replace high_resolution_clock with steady_clockMorph1-3/+3
On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
2021-11-28settings: Add debug setting to enable all controllersgerman772-0/+6
2021-11-27config: Remove vibration configurationgerman771-2/+0
2021-11-26input_common: Fully implement UDP controllersNarr the Reg2-0/+15
2021-11-25input_common: Move button names to the frontendgerman771-0/+22
2021-11-25core/hid: Fully implement native mousegerman772-5/+11
2021-11-25input_common: Allow keyboard to be backwards compatiblegerman771-2/+0
2021-11-25core/hid: Improve accuracy of the keyboard implementationgerman771-12/+23
2021-11-25config: Cleanup and documentationgerman772-6/+31
2021-11-25core/hid: Prevent Emulated controller from flapping with multiple inputs devicesgerman771-0/+4
2021-11-25core/hid: Fully emulate motion from buttongerman771-0/+5
2021-11-25second commit lion reviewgerman771-1/+1
2021-11-25settings: Fix Debug controller type optionsgerman771-2/+2
2021-11-25kraken: Address comments from reviewgerman772-3/+2
start lion review
2021-11-25core/hid: Add TAS inputgerman771-1/+0
2021-11-25input_common: Add manual update options to input devicesgerman771-0/+10
2021-11-25core/hid: Fix rumble too strong at 1%german771-0/+7
2021-11-25core/hid: Only signal when neededgerman771-0/+1
2021-11-25core/hid: Add output devicesgerman771-0/+39
2021-11-25settings: Cleanup settingsgerman772-4/+12
2021-11-25common: Rewrite and move core/frontend/input.h to commongerman772-0/+243
2021-11-21configure_general: Allow framerate cap to be used in custom game configsKewlan2-1/+2
2021-11-20TextureCache: Refactor and fix linux compiling.Fernando Sahmkow1-0/+7
2021-11-16TextureCache: Add automatic anisotropic filtering and refactor code.Fernando Sahmkow1-1/+1
2021-11-16Yuzu UI: Add button for Anti AliasFernando Sahmkow1-0/+1
2021-11-16Settings: Add anti-aliasing method settingMarshall Mohror2-0/+7
2021-11-16QtGUI: Add buttton to toggle the filter.FernandoS271-0/+1
2021-11-16VideoCore: Add gaussian filtering.FernandoS271-2/+3
2021-11-16VideoCore: Add more rescaling option.FernandoS272-4/+20
2021-11-16Video Core: fix building for GCC.Fernando Sahmkow1-2/+2
2021-11-16Presentation: add Nearest Neighbor filter.Fernando Sahmkow1-4/+5
2021-11-16vulkan: Implement FidelityFX Super ResolutionMarshall Mohror1-0/+1
2021-11-16Texture Cahe: Fix downscaling on SMO.Fernando Sahmkow2-0/+3
2021-11-16video_core: Refactor resolution scale functionameerj1-0/+14
2021-11-16video_core: Misc resolution scaling related refactoringameerj1-1/+1
2021-11-16Renderer: Implement Bicubic and ScaleForce filters.Fernando Sahmkow2-15/+12
2021-11-16common/settings: Remove unused scaling optionsReinUsesLisp2-18/+7
2021-11-16Settings: eliminate rescaling_factor.Fernando Sahmkow2-2/+2
2021-11-16Settings: Add resolution scaling to settings.Fernando Sahmkow2-4/+60
2021-11-16VideoCore: Initial Setup for the Resolution Scaler.Fernando Sahmkow2-0/+19
2021-11-02common: Implement a subset of P0323 (std::expected)Morph2-0/+988
This implementation is based on and is a subset of the proposed implementation of std::expected https://github.com/TartanLlama/expected/blob/master/include/tl/expected.hpp
2021-11-02 Refactor Logging ImplLevi Behunin3-28/+39
Loop on stop_token and remove final_entry in Entry. Move Backend thread out of Impl Constructor to its own function. Add Start function for backend thread. Use stop token in PopWait and check if entry filename is nullptr before logging.
2021-10-20common/alignment: Fix VS2022 compilationameerj1-1/+6
VS2022 seems to introduce an optimization when moving vectors to check for equality of the element values. AlignmentAllocator needed to overload the equality operator to fix compilation of its usage in vector moving.
2021-10-17settings: Remove std::chrono usageameerj1-3/+2
Alleviates the dependency on chrono for all files that include settings.h
2021-10-14string_util: Make use of std::string_view and add bounds checkingMorph2-5/+5
Makes use of std::string_view in StringFromFixedZeroTerminatedBuffer and add bounds checking
2021-10-14string_util: Prevent out of bounds access in u16string_view bufferMorph1-2/+2
2021-10-12common/fs/path_util: Slightly refactor PathManagerImpl's constructorCreak1-12/+15
This moves all GenerateYuzuPath calls outside of the platofrm-specific #ifdefs, replacing them with assignments to paths.
2021-10-02common/logging: Reduce scope of fmt includeameerj2-1/+2
2021-10-02common/logging: Move Log::Entry declaration to a separate headerameerj6-17/+37
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-09-29Fixed invalid iterator usageAndrew Strelsky1-1/+1
2021-09-29settings: Remove BCAT settingsMorph2-4/+0
2021-09-24general: Update style to clang-format-12ameerj4-22/+28
2021-09-22common/uuid: Add validity checking functions to interfaceLioncash1-0/+7
Given we have a function to invalidate, we should also have ones to query the validity. Also makes the code more straightforward to read.
2021-09-18input_common/tas: Document the main classgerman771-7/+4
2021-09-18input_common/tas: Add swap controllergerman771-1/+1
2021-09-18input_common/tas: Fallback to simple updateMonsterDruide11-4/+3
2021-09-18config: Move TAS options to it's own menugerman773-4/+3
2021-09-18core: Hacky TAS syncing & load pausingMonsterDruide13-7/+6
To keep the TAS inputs synced to the game speed even through lag spikes and loading zones, deeper access is required. First, the `TAS::UpdateThread` has to be executed exactly once per frame. This is done by connecting it to the service method the game calls to pass parameters to the GPU: `Service::VI::QueueBuffer`. Second, the loading time of new subareas and/or kingdoms (SMO) can vary. To counteract that, the `CPU_BOOST_MODE` can be detected: In the `APM`-interface, the call to enabling/disabling the boost mode can be caught and forwarded to the TASing system, which can pause the script execution if neccessary and enabled in the settings.
2021-09-18settings: File selector & other settingsMonsterDruide13-0/+7
First of all, TASing requires a script to play back. The user can select the parent directory at `System -> Filesystem`, next to an option to pause TAS during loads: This requires a "hacky" setup deeper in the code and will be added in the last commit. Also, Hotkeys are being introduced: CTRL+F5 for playback start/stop, CTRL+F6 for re-reading the script and CTRL+F7 for recording a new script.
2021-09-18input_common/tas: Base playback & recording systemMonsterDruide11-0/+7
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called. The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate. Co-authored-by: Naii-the-Baf <sfabian200@gmail.com> Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
2021-09-16fix_accidental_deletionMoonlacer1-1/+2
2021-09-16remove-audio-stretching-settingMoonlacer2-5/+1
2021-09-16threadsafe_queue: Add std::stop_token overload to PopWaitameerj1-5/+22
Useful for jthreads which make use of the threadsafe queues.
2021-09-13common_funcs: Add enum flag bitwise shift operator overloadsMorph1-0/+16
This adds bitwise shift operator overloads (<<, >>, <<=, >>=) in the macro DECLARE_ENUM_FLAG_OPERATORS(type)
2021-09-11common_funcs: Replace <algorithm> with <iterator>Morph1-1/+1
2021-09-11common: Move error handling to error.cpp/hMorph5-16/+31
This allows us to avoid implicitly including <string> every time common_funcs.h is included.
2021-09-10input_common: Enable steam controllers and 8 player supportgerman772-3/+6
2021-09-02common/logging: Add missing includegerman771-0/+1
2021-08-29Garbage Collection: Adress Feedback.Fernando Sahmkow1-12/+11
2021-08-28Garbage Collection: enable as default, eliminate option.Fernando Sahmkow2-3/+0
2021-08-28VideoCore: Rework Garbage Collection.Fernando Sahmkow1-0/+141
2021-08-27ngct: Stub NGCT:U servicegerman772-0/+2
2021-08-27Revert "logging: Display backtrace on crash"Morph2-114/+1
2021-08-24logging: Fix log filter during initializationameerj1-4/+5
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value. This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
2021-08-21settings: Amend language_index maximum setting rangeMorph1-1/+1
The maximum is now 17 with the addition of Brazilian Portuguese
2021-08-16configure_graphics: Add GPU nvdec decoding as an optionameerj2-3/+9
Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference. Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
2021-08-15xbyak: Update include pathMerry2-2/+2
2021-08-13threadsafe_queue: Fix deadlockyzct123451-6/+4
This fixes a lost wakeup in SPSCQueue. If the reader is in just the right position, the writer's notification will be lost and this will be a problem if the writer then does something to wait on the reader. This was discovered to affect my upcoming stacktrace PR. I don't think any performance decrease will be noticeable because an uncontended mutex is smart enough to skip the syscall. This PR might also resolve some rare deadlocks but I don't know of any examples.
2021-08-13logging: Display backtrace on crashyzct123452-1/+114
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-13logging: Simplify and make thread-safeyzct123452-245/+218
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-12configuration: add option to select network interfacespholz1-1/+2
This commit renames the "Services" tab to "Network" and adds a combobox that allows the user to select the network interface that yuzu should use. This new setting is now used to get the local IP address in Network::GetHostIPv4Address. This prevents yuzu from selecting the wrong network interface and thus using the wrong IP address. The return type of Network::GetHostIPv4Adress has also been changed.
2021-08-11settings: Fix MSVC issueslat9nq1-7/+22
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-06common: uuid: Add hash function for UUIDMorph1-0/+11
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-05assert: Verify formattingyzct123451-2/+6
2021-08-05assert: Avoid empty macrosyzct123451-2/+2
2021-08-05hex_util: Fix incorrect array size in AsArrayMorph1-1/+1
Although this isn't used, this is a potential bug as HexStringToArray will perform an out-of-bounds read.
2021-08-04common: uuid: Add hex string to UUID constructorMorph2-0/+73
This allows for easily converting a hex string into a Common::UUID, which is backed by a 128 bit unsigned integer.
2021-07-31settings: Use std::clamp where possiblelat9nq1-39/+9
Addresses PR review Co-authored-by: PixelyIon <pixelyion@protonmail.com>
2021-07-31settings: Remove unnecessary std::move usageslat9nq1-12/+12
Addresses review feedback. Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-07-30settings: Fix function virtualizationlat9nq1-12/+18
Fixes a theoretical scenario where a Setting is using the BasicSetting's GetValue function. In practice this probably only happens on yuzu-cmd, where there is no need for a Setting's additional features. Need to fix regardless.
2021-07-30settings: Implement setting rangeslat9nq1-18/+152
Clamps the setting's values against the specified minimum and maximum values.
2021-07-28renderer_vulkan: Add setting to log pipeline statisticsReinUsesLisp1-0/+1
Use VK_KHR_pipeline_executable_properties when enabled and available to log statistics about the pipeline cache in a game. For example, this is on Turing GPUs when generating a pipeline cache from Super Smash Bros. Ultimate: Average pipeline statistics ========================================== Code size: 6433.167 Register count: 32.939 More advanced results could be presented, at the moment it's just an average of all 3D and compute pipelines.
2021-07-27host_memory: Add workaround for FreeBSD 12Jan Beich1-0/+5
src/common/host_memory.cpp:360:14: error: use of undeclared identifier 'memfd_create' fd = memfd_create("HostMemory", 0); ^
2021-07-27host_memory: Enable Linux implementation on FreeBSDJan Beich1-2/+2
HW.Memory <Critical> common/host_memory.cpp:HostMemory:492: Fastmem unavailable, falling back to VirtualBuffer for memory allocation
2021-07-27common: fs: fs_util: Add BufferToUTF8StringMorph2-0/+15
Allows for direct conversion to std::string without having to convert std::u8string to std::string
2021-07-27common: uuid: Return a lower-case hex string in FormatMorph1-1/+1
2021-07-24general: Rename "Frame Limit" references to "Speed Limit"ameerj2-6/+6
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate. This allows us to differentiate it from the fps unlocker setting.
2021-07-24config, nvflinger: Add FPS cap settingameerj1-0/+1
Allows finer tuning of the FPS limit.
2021-07-23general: Implement FullscreenMode enumerationlat9nq1-3/+8
Prevents us from using an unclear 0 or 1 to describe the fullscreen mode.
2021-07-23common: Publically link to pthreadslat9nq1-1/+1
Common requires pthreads but does not refer to it when linking to other modules. Fix this by linking to Threads where necessary.
2021-07-23cmake: Remove shader cache versionReinUsesLisp2-11/+1
2021-07-23general: Add setting shader_backendlat9nq2-3/+9
GLASM is getting good enough that we can move it out of advanced graphics settings. This removes the setting `use_assembly_shaders`, opting for a enum class `shader_backend`. This comes with the benefits that it is extensible for additional shader backends besides GLSL and GLASM, and this will work better with a QComboBox. Qt removes the related assembly shader setting from the Advanced Graphics section and places it as a new QComboBox in the API Settings group. This will replace the Vulkan device selector when OpenGL is selected. Additionally, mark all of the custom anisotropic filtering settings as "WILL BREAK THINGS", as that is the case with a select few games.
2021-07-23shader: Add loggingReinUsesLisp2-0/+8
2021-07-23shader: Add shader loop safety check settingslat9nq1-0/+3
Also add a setting for enable Nsight Aftermath.
2021-07-23shader_recompiler,video_core: Cleanup some GCC and Clang errorslat9nq1-0/+1
Mostly fixing unused *, implicit conversion, braced scalar init, fpermissive, and some others. Some Clang errors likely remain in video_core, and std::ranges is still a pertinent issue in shader_recompiler shader_recompiler: cmake: Force bracket depth to 1024 on Clang Increases the maximum fold expression depth thread_worker: Include condition_variable Don't use list initializers in control flow Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
2021-07-23shader: Remove old shader managementReinUsesLisp1-55/+1
2021-07-23thread_worker: Fix compile time errorameerj1-1/+1
state is unused in the branch where with_state is false
2021-07-20uuid: Directly compare UUID instead of checking per elementChloe Marcec1-3/+2
We can now update this for C++20
2021-07-17input_common: Fix mouse panning behaivourgerman771-1/+1
2021-07-10settings: Disable FPS unlimit setting between title launchesameerj1-1/+1
Some titles crash if the FPS limit is disabled when launching. This change ensures that titles launch with the limit in-place to avoid issues. In order to simplify the change, the UI toggle was removed as it will always be overridden at launch to be disabled. The setting can still be toggled during gameplay with the hotkey, and indicated by the fps label in the status bar.
2021-07-09configure_input: Use u8 for mouse sensitivityameerj1-1/+1
2021-07-09configure_graphics: Use u8 for bg_color valuesameerj1-3/+3
2021-07-09configure_audio: Use u8 for volume valueameerj2-2/+2
2021-07-09common/thread_worker: Stop workers on stop_token when waitingReinUsesLisp1-18/+20
2021-07-09common/thread_worker: Add support for stateful threadsReinUsesLisp3-78/+86
2021-07-09common/thread_worker: Simplify logicFernandoS271-8/+1
2021-07-09common/thread_worker: Fix data raceFernandoS272-1/+18
2021-07-09common/thread_worker: Use unique functionReinUsesLisp2-28/+24
2021-07-09common: Add unique functionReinUsesLisp2-0/+63
2021-07-09common/thread_worker: Add wait for requests methodReinUsesLisp2-0/+11
2021-07-08settings, arm_dynarmic, yuzu qt: Move CPU debugging optionlat9nq2-2/+2
Decouples the CPU debugging mode from the enumeration to its own boolean. After this, it moves the CPU Debugging tab over to a sub tab underneath the Debug tab in the configuration UI.
2021-07-08settings, yuzu qt: Add migration code for CPU accuracylat9nq1-0/+2
Old CPU Accuracy setting won't translate well into since we're adding one at the beginning of the list. On first boot with the new setting, just use the default setting.
2021-07-08core,common,yuzu qt: Add CPU accuracy option 'Auto'lat9nq1-4/+5
The current CPU accuracy settings in yuzu are fairly polarized and require more than common knowledge to know what the optimal settings for yuzu would be. This adds a curated option called 'Auto' that applies a few at the moment known-good unsafe optimizations to Dynarmic.
2021-07-08general: Code formatting improvementslat9nq1-2/+1
Slight improvements to readability. Dropped suggestions for string_view (settings.h:101), pass by value (settings.h:82), reverting double to a float (config.cpp:316), and other smaller ones, some out of scope. Addresses review feedback. Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-07-06common: logging: backend: Close the file after exceeding the write limitMorph1-8/+11
There's no point in keeping the file open after the write limit is exceeded. This allows the file to be committed to the disk shortly after it is closed and avoids redundantly checking whether or not the write limit is exceeded.
2021-07-06common: fs: file: Revert Flush to its previous behavior and add CommitMorph2-3/+34
It became apparent that logging can continuously spam errors that trigger file flushing. Since committing the files to disk is an expensive operation, this causes unnecessarily high disk usage. As such, we will revert Flush() to the previous behavior and add a Commit() member function in the event that this behavior is needed.
2021-07-06common: fs: file: Flush the file in GetSizeMorph1-0/+3
This ensures that GetSize always retrieves the correct file size after a write operation.
2021-07-01settings: Set resolution_factor default to 1lat9nq1-1/+1
Fixes Disgaea 6 Demo issues.
2021-06-28general: Make most settings a BasicSettinglat9nq2-127/+295
Creates a new BasicSettings class in common/settings, and forces setting a default and label for each setting that uses it in common/settings. Moves defaults and labels from both frontends into common settings. Creates a helper function in each frontend to facillitate reading the settings now with the new default and label properties. Settings::Setting is also now a subclass of Settings::BasicSetting. Also adds documentation for both Setting and BasicSetting.
2021-06-26common: Force defaults for Settings::Setting'slat9nq1-44/+57
Requires a default value when creating each per-game setting.
2021-06-24common: Replace common_sizes into user-literalsWunkolo4-49/+39
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals.
2021-06-24general: Add missing #pragma once directivesMorph1-0/+2
2021-06-23General: Resolve fmt specifiers to adhere to 8.0.0 API where applicableLioncash1-1/+2
Also removes some deprecated API usages.
2021-06-22common: fs: Add a description of a regular file in IsFileMorph1-4/+6
This provides a more concrete example of what a regular file is and isn't.
2021-06-22common: fs: Amend IsFile check in FileOpen / (Write/Append)StringToFileMorph4-9/+12
This check was preventing files with the Write or Append file access modes from being created, as per the documented behavior in FileAccessMode. This amends the check to test for the existence of a filesystem object prior to checking whether it is a regular file. Thanks to liushuyu for pointing out that removing the check altogether would not guard against attempting to open non-regular files such as directories, symlinks, FIFO (pipes), sockets, block devices, or character devices. The documentation has also been updated for these functions to clarify that a file refers to a regular file.
2021-06-22common: fs: file: Remove [[nodiscard]] attribute from FlushMorph2-3/+3
Similarly, Flush() is typically called to attempt to flush a file into the disk. In the one case where this is used, we do not care whether the flush has succeeded or not, making [[nodiscard]] unnecessary.
2021-06-22common: fs: Remove [[nodiscard]] attribute on Remove* functionsMorph2-9/+9
There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal. As such, removing the [[nodiscard]] attribute is best for these functions.
2021-06-22common/detached_tasks: Wait for tasks before shutting downRodrigo Locatti1-0/+2
If this is not waited on, the synchronization primitives are destroyed whe main exits and the detached task ends up signalling garbage and not properly finishing.
2021-06-20Update dynarmic and add new unsafe CPU option.Fernando Sahmkow2-0/+2
2021-06-19host_memory: Correct MEM_RESERVE_PLACEHOLDERlat9nq1-1/+1
Microsoft defines `MEM_RESERVE_PLACEHOLDER` as `0x00040000`, but our manually imported version of it drops the last zero.
2021-06-17nvflinger: Add toggle to disable buffer swap interval limitsameerj1-0/+1
Enabling this setting will allow some titles to present more frames to the screen as they become available in the nvflinger buffer queue.
2021-06-16Reaper: Address Feedback.Fernando Sahmkow1-0/+1
2021-06-16Reaper: Setup settings and final tuning.Fernando Sahmkow2-0/+3
2021-06-16common: fs: file: Remove redundant call to WriteStringToFileMorph2-6/+1
The Append open mode will create a new file if said file does not exist at a given path, making this call redundant.
2021-06-16fsp_srv: Fix filesystem access loggingMorph1-0/+1
This introduces a new setting Enable FS Access Log which saves the filesystem access log to sdmc:/FsAccessLog.txt If this setting is not enabled, this will indicate to FS to not call OutputAccessLogToSdCard. Fixes softlocks during loading in Xenoblade Chronicles 2 when certain DLC is enabled.
2021-06-16configure_graphics: Add Accelerate ASTC decoding settingameerj2-0/+3
2021-06-13common: logging: Restructure backend codeMorph8-278/+288
2021-06-13common: logging: backend: Wrap IOFile in a unique_ptrMorph2-6/+27
Allows us to forward declare Common::FS::IOFile.
2021-06-13common: fs: file: Flush the file to the disk when Flush() is calledMorph1-1/+5
std::fflush does not guarantee that file buffers are flushed to the disk. Use _commit on Windows and fsync on all other OSes to ensure that the file is flushed to the disk.
2021-06-12common: fs: Use the normal directory iterator in *Recursively functionsMorph1-2/+16
MSVC's implementation of recursive_directory_iterator throws an exception on an error despite a std::error_code being passed into its constructor. This is most likely a bug in MSVC's implementation since directory_iterator does not throw an exception on an error. We can replace the usage of recursive_directory_iterator for now until MSVC fixes their implementation of it.
2021-06-11common/host_memory: Implement a fallback if fastmem fails.Markus Wick2-14/+49
This falls back to the old approach of using a virtual buffer. Windows is untested, but this build should fix support for Windows < 10 v1803. However without fastmem support at all.
2021-06-11common/host_shader: Load Windows 10 functions dynamicallyReinUsesLisp1-29/+88
Workaround old headers and libraries shipped on MinGW.
2021-06-11host_memory: Support staged VirtualProtect callsReinUsesLisp1-3/+12
2021-06-11General: Add settings for fastmem and disabling adress space check.FernandoS272-0/+12
2021-06-11common/host_memory: Optimize for huge tables.Markus Wick2-11/+24
In theory, if we have 2 MB continously mapped, this should save one layer of TLB. Let's make it at least more likely by aligning the memory.
2021-06-11core: Make use of fastmemMarkus Wick1-0/+2
2021-06-11common/host_memory: Add Linux implementationMarkus Wick1-10/+120
2021-06-11common/host_memory: Add interface and Windows implementationReinUsesLisp3-0/+384
2021-06-09src/common/CMakeLists.txt: fix variable escapingliushuyu1-8/+9
2021-06-09common/fs/path_util: Remove [[nodiscard]] from function with void returnLioncash1-1/+1
We can't make use of the return value here, since we don't a return value to work with.
2021-06-02common: fs: fs_util: Move PathToUTF8String to fs_utilMorph4-15/+14
2021-06-02common: fs: fs_util: Add more string conversion functionsMorph2-0/+33
2021-05-31common_funcs: Move R_ macros to result.hLioncash1-25/+0
These macros all interact with the result code type, so they should ideally be within this file as well, so all the common_funcs machinery doesn't need to be pulled in just to use them.
2021-05-29core/memory: Check our memory fallbacks for out-of-bound behavior.Markus Wick2-0/+7
This makes it by far harder to crash yuzu. Also implement the 48bit masking of AARCH64 while touching this code.
2021-05-28common: Extract point into a common structLioncash2-0/+58
This is generic enough that it can be moved into the Common class for reuse.
2021-05-28common/fs/file: Explicitly delete copy constructorsLioncash1-1/+4
Relocates them to the same place the move equivalents are at for consistent viewing.
2021-05-28common/fs/file: Devirtualize destructorLioncash1-1/+1
IOFile is a final class, so there's no need for a virtual destructor.
2021-05-28common/fs/file: Default initialize IOFile membersLioncash1-2/+2
Prevents a potential uninitialized read vector in the move constructor.
2021-05-26common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph20-1432/+2963
* common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2021-05-24zstd_compression: Make use of std::spanLioncash2-3/+4
Allows for the incoming data stream to be non-allocating.
2021-05-24lz4_compression: Make use of std::spanLioncash2-4/+4
Allows making the incoming data stream non-allocating.
2021-05-21common: tree: Avoid a crash on nullptr dereference.bunnei1-0/+11
2021-05-17general: Demote custom_rtc to regular settinglat9nq2-2/+1
2021-05-16configuration: Add CPU tab to game propertieslat9nq1-0/+6
Allows setting CPU accuracy to Accurate or Unsafe per-game, as well as the accuracy options for Unsafe. Debug is not allowed here as a per-game CPU accuracy.
2021-05-16general: Make CPU accuracy and related a Settings::Settinglat9nq2-5/+5
Required to make CPU accuracy and unsafe settings available to use as a per-game setting.
2021-05-12common: tree: Avoid a nullptr dereference.bunnei1-1/+1
2021-05-10parent_of_member: Make sign conversion explicit in OffsetOfImpl()Lioncash1-1/+2
Previously these conversions were implicit and causing quite a few warnings on clang.
2021-05-06fixup! common: bit_util: Add BIT macro.bunnei1-2/+0
2021-05-06common: parent_of_member: Fix build for OffsetOf().bunnei1-4/+4
2021-05-06fixup! common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC.bunnei1-5/+0
2021-05-06common: Rename NON_COPYABLE/NON_MOVABLE with YUZU_ prefix.bunnei1-2/+2
2021-05-06common: common_funcs: Add Size helper function.bunnei1-0/+15
2021-05-06common: bit_util: Add BIT macro.bunnei1-0/+2
2021-05-06common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC.bunnei1-0/+4
2021-05-06common: common_funcs: Add helper macros for non-copyable and non-moveable.bunnei1-0/+8
- Useful for scenarios where we do not want to inherit from NonCopyable.
2021-04-20log/backend: Use in-class initializer for FileBackendLioncash2-6/+8
We can also avoid redundant constructions of the same string repeatedly.
2021-04-20log/backend: Make use of erase_ifLioncash1-4/+4
Same behavior, but less verbose.
2021-04-15log/backend: Correct order of const in copy constructorLioncash1-2/+5
Follows our predominant coding style. Also explicitly specifies the move constructor/assignment operator as well.
2021-04-15common/log: Move Log namespace into the Common namespaceLioncash7-33/+39
Forgot to move this over when I moved the rest of the source files with lacking namespaces over.
2021-04-15common: Move settings to common from core.bunnei7-2/+830
- Removes a dependency on core and input_common from common.
2021-04-15core: settings: Add setting for debug assertions and disable by default.bunnei1-2/+5
- This is a developer-only setting and no longer needs to be enabled by default. - Also adds "use_auto_stub" setting to SDL frontend while we are here. - Supersedes #1340.
2021-04-13nvidia_flags: Add missing header guardLioncash1-0/+2
Prevents potential inclusion compilation errors.
2021-04-09bgtc: Update to 12.x and implement OpenTaskServiceMorph2-0/+2
2021-04-07common/threadsafe_queue: Provide Wait() method.Markus Wick1-1/+9
It shall block until there is something to consume in the queue. And use it for the GPU emulation instead of the spin loop. This is only in booting the emulator, however in BOTW this is the case for about 1 second.
2021-04-04common: Move assert failure handling into a cpp file.Markus Wick3-6/+20
Advantage: Altering the handler does not need a full recompilation. Disadvantage: noreturn is droped, so the caller is a bit slower. We quite often run yuzu with a YOLO assertion handler. In fact, only very few games run at all with asserts. This patch allows developers to patch the handler without recompiling everything. The overhead of the missing "noreturn" attribute shoul be negletable.
2021-03-24common: common_sizes: Move sizes to the Common namespace.bunnei1-0/+4
2021-03-21common: common_sizes: Move Invalid to Size_* prefix and add missing values.bunnei1-1/+7
2021-03-21hle: kernel: board: k_system_control: Extend to include memory region sizes.bunnei1-0/+10
2021-03-21common: Move common sizes to their own header for code reuse.bunnei2-0/+24
2021-03-10fiber: Double default stack sizeMerryMage1-1/+1
Stack overflow occurs with some guest applications
2021-03-07common: Fiber: use a reference for YieldTo.bunnei2-8/+6
- Fixes another small leak.
2021-03-06common: fiber: Use weak_ptr when yielding.bunnei2-8/+13
- Avoids a memory leak, as taking a strong reference of the fiber here causes a circular reference. - Supersedes #6006 with a more narrow fix.
2021-03-06Revert "core: Switch to unique_ptr for usage of Common::Fiber."bunnei2-9/+9
2021-02-28[network] Error handling reformcomex2-16/+34
`network.cpp` has several error paths which either: - report "Unhandled host socket error=n" and return `SUCCESS`, or - switch on a few possible errors, log them, and translate them to Errno; the same switch statement is copied and pasted in multiple places in the code Convert these paths to use a helper function `GetAndLogLastError`, which is roughly the equivalent of one of the switch statements, but: - handling more cases (both ones that were already in `Errno`, and a few more I added), and - using OS functions to convert the error to a string when logging, so it'll describe the error even if it's not one of the ones in the switch statement. - To handle this, refactor the logic in `GetLastErrorMsg` to expose a new function `NativeErrorToString` which takes the error number explicitly as an argument. And improve the Windows version a bit. Also, add a test which exercises two random error paths.
2021-02-27core: Switch to unique_ptr for usage of Common::Fiber.bunnei2-9/+9
- With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context. - Fixes a memory leak due to circular reference of the shared pointer.
2021-02-23common: add missing header after f3805376f726Jan Beich1-0/+1
In file included from src/video_core/dma_pusher.cpp:5: src/./common/cityhash.h:69:47: error: 'size_t' has not been declared 69 | [[nodiscard]] u64 CityHash64(const char* buf, size_t len); | ^~~~~~ src/./common/cityhash.h:73:55: error: 'size_t' has not been declared 73 | [[nodiscard]] u64 CityHash64WithSeed(const char* buf, size_t len, u64 seed); | ^~~~~~ src/./common/cityhash.h:77:56: error: 'size_t' has not been declared 77 | [[nodiscard]] u64 CityHash64WithSeeds(const char* buf, size_t len, u64 seed0, u64 seed1); | ^~~~~~ src/./common/cityhash.h:80:47: error: 'size_t' has not been declared 80 | [[nodiscard]] u128 CityHash128(const char* s, size_t len); | ^~~~~~ src/./common/cityhash.h:84:55: error: 'size_t' has not been declared 84 | [[nodiscard]] u128 CityHash128WithSeed(const char* s, size_t len, u128 seed); | ^~~~~~
2021-02-20common: wall_clock: Fix integer overflow with StandardWallClock.bunnei2-7/+28
- Previous optimized impl. resulted in an integer overflow, so revert. - This is our slow/fallback path that should never be really be used, so the optimization in unimportant.
2021-02-19common: Add implementation of TinyMT (Mersenne Twister RNG).bunnei2-0/+251
2021-02-19common: alignment: Add DivideUp utility method.bunnei1-0/+5
2021-02-18common/cityhash: Use common typesReinUsesLisp2-114/+98
Allow sharing return types with the rest of the code base. For example, we use 'u128 = std::array<u64, 2>', meanwhile Google's code uses 'uint128 = std::pair<u64, u64>'. While we are at it, use size_t instead of std::size_t.
2021-02-15common: wall_clock: Optimize GetClockCycles/GetCPUCycles to use a single MUL instruction.bunnei1-8/+9
2021-02-15common: Merge uint128 to a single header file with inlines.bunnei4-135/+84
2021-02-10common: Add -fsized-deallocation as a Clang flaglat9nq1-0/+2
Prevents an operator delete error when compiling with Clang 11.
2021-02-08string_util: Remove MSVC workaround for converting between UTF8/UTF16Morph1-14/+0
This has been fixed as of Visual Studio 2019 Version 16.2
2021-02-06ring_buffer: Remove granularity template argumentMerryMage1-11/+10
Non-obvious bug in RingBuffer::Push(std::vector<T>&) when granularity != 1 Just remove it altogether because we do not have a use for granularity != 1
2021-02-05hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement.bunnei1-8/+0
2021-02-05common: scope_exit: Add a cancellable ScopeExit macro.bunnei1-0/+6
2021-02-05common: common_funcs: Add R_UNLESS_NOLOG for scenarios that should not log.bunnei1-0/+8
2021-01-29common: common_funcs: Change R_UNLESS to LOG_ERROR.bunnei1-1/+1
2021-01-29common: common_funcs: Log error on R_UNLESS.bunnei1-0/+3
2021-01-29common: common_funcs: Add useful kernel macro R_SUCCEED_IF.bunnei1-0/+3
2021-01-29common: common_funcs: Add a few more useful macros for kernel code.bunnei1-0/+11
2021-01-22common: Add missing include to bit_util.hbunnei1-0/+1
2021-01-21bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64Lioncash1-35/+13
We can use the standardized CLZ facilities to perform this. This also allows us to make utilizing functions constexpr and eliminate the inclusion of an intrinsics header.
2021-01-21renderer_opengl: Avoid precompiled cache and force NV GL cache directoryReinUsesLisp3-0/+39
Setting __GL_SHADER_DISK_CACHE_PATH we can force the cache directory to be in yuzu's user directory to stop commonly distributed malware from deleting our driver shader cache. And by setting __GL_SHADER_DISK_CACHE_SKIP_CLEANUP we can have an unbounded shader cache size. This has only been implemented on Windows, mostly because previous tests didn't seem to work on Linux. Disable the precompiled cache on Nvidia's driver. There's no need to hide information the driver already has in its own cache.
2021-01-15core: Silence Wclass-memaccess warningsReinUsesLisp1-2/+2
This requires making several types trivial and properly initialize them whenever they are called.
2021-01-15common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITReinUsesLisp1-4/+4
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
2021-01-15common/bit_util: Replace CLZ/CTZ operations with standardized onesLioncash1-76/+0
Makes for less code that we need to maintain.
2021-01-15common/alignment: Upgrade to use constraints instead of static assertsReinUsesLisp1-13/+9
2021-01-15common/alignment: Rename AlignBits to AlignUpLog2ReinUsesLisp1-5/+4
AlignUpLog2 describes what the function does better than AlignBits.
2021-01-15common/timer: RemoveLioncash3-202/+0
This is a leftover from citra and dolphin that isn't used at all, particularly given the <chrono> header exists.
2021-01-15common/color: RemoveReinUsesLisp2-272/+0
This is a leftover from Citra we no longer use.
2021-01-12common/tree: Convert defines over to templatesLioncash2-592/+666
Reworks the tree header to operate off of templates as opposed to a series of defines. This allows all tree facilities to obey namespacing rules, and also allows this code to be used within modules once compiler support is in place. This also gets rid to use a macro to define functions and structs for necessary data types. With templates, these will be generated when they're actually used, eliminating the need for the separate declaration.
2021-01-12common/tree: Remove unused splay tree definesLioncash1-249/+2
Makes for less code to take care of.
2021-01-12common/parent_of_member: Replace TYPED_STORAGE define with template aliasLioncash2-8/+10
Provides the same construct, but makes it obey namespacing.
2021-01-11common: common_funcs: Add R_UNLESS macro.bunnei1-0/+8
2021-01-11common: Introduce useful tree structures.bunnei4-0/+1641
2021-01-09common/div_ceil: Return numerator typeReinUsesLisp1-5/+5
Fixes instances where DivCeil(u32, u64) would surprisingly return u64, instead of the more natural u32.
2021-01-04Address review commentsFearlessTobi1-5/+5
2021-01-04Delete the old log file before rotating (#5675)xperia641-0/+3
2021-01-03Fix the old log file to work with the log parser.bunnei1-1/+1
2021-01-03Rotate previous log file to '.old' if it existsxperia641-4/+9
2021-01-02general: Fix various spelling errorsMorph2-3/+3
2021-01-02X86/NativeClock: Reimplement RTDSC access to be lock free.Fernando Sahmkow5-103/+107
2021-01-02X86/NativeClock: Improve performance of clock calculations on hot path.Fernando Sahmkow2-5/+71
2021-01-01memory: Remove MemoryHookMerryMage4-78/+0
2020-12-30core/memory: Read and write page table atomicallyReinUsesLisp3-23/+65
Squash attributes into the pointer's integer, making them an uintptr_t pair containing 2 bits at the bottom and then the pointer. These bits are currently unused thanks to alignment requirements. Configure Dynarmic to mask out these bits on pointer reads. While we are at it, remove some unused attributes carried over from Citra. Read/Write and other hot functions use a two step unpacking process that is less readable to stop MSVC from emitting an extra AND instruction in the hot path: mov rdi,rcx shr rdx,0Ch mov r8,qword ptr [rax+8] mov rax,qword ptr [r8+rdx*8] mov rdx,rax -and al,3 and rdx,0FFFFFFFFFFFFFFFCh je Core::Memory::Memory::Impl::Read<unsigned char> mov rax,qword ptr [vaddr] movzx eax,byte ptr [rdx+rax]
2020-12-30common: ThreadWorker: Add class to help do asynchronous work.bunnei3-0/+90
2020-12-29k_priority_queue: Fix concepts usecomex1-0/+4
- For `std::same_as`, add missing include of `<concepts>`. - For `std::convertible_to`, create a replacement in `common/concepts.h` and use that instead. This would also be found in `<concepts>`, but unlike `std::same_as`, `std::convertible_to` is not yet implemented in libc++, LLVM's STL implementation - not even in master. (In fact, `std::same_as` is the *only* concept currently implemented. For some reason.)
2020-12-13cmake: Fix generating CMake configs and linking with Boostlat9nq1-1/+1
Fixes regression by 761206cf81b271f7f4dd6a167a120325b760dbf3, causing yuzu to not build on Linux with any version of Boost except a cached 1.73 Conan version from before about a day ago. Moves the Boost requirement out of the `REQUIRED_LIBS` psuedo-2D-array for Conan to instead be manually configured, using Conan as a fallback solution if the system does not meet our requirements. Requires any update from the linux-fresh container in order to build. **DO NOT MERGE** until someone with the MSVC toolchain can verify this works there, too.
2020-12-12common: Update CMakeList to fix build issue with Boost.bunnei1-2/+1
2020-12-12Revert "Merge pull request #5173 from lioncash/common-fs"Morph2-112/+396
This reverts commit ce5fcb6bb2c358b0251a2ce87945bda52789a76d, reversing changes made to 6f41763061082d5fa2ab039c554427152243cb46.
2020-12-12Revert "Merge pull request #5174 from ReinUsesLisp/fs-fix"Morph2-36/+4
This reverts commit 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a, reversing changes made to e94dd7e2c4fc3f7ca2c15c01bdc301be2b8a4c1b.
2020-12-12Revert "Merge pull request #5179 from ReinUsesLisp/fs-path"Morph1-1/+1
This reverts commit 4e94d0d53af2cdb7b03ef9de23cc29f3565df97a, reversing changes made to 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76.
2020-12-12Revert "Merge pull request #5181 from Morph1984/5174-review"Morph1-3/+9
This reverts commit cdb36aef9ec9d30bdef1953f9ed46776ae2f12af, reversing changes made to 5e9b77129f2cf8c039a8d98033cae4ac0f93f515.
2020-12-10common/file_util: Simplify the behavior of CreateFullPathMorph1-9/+3
2020-12-09common/file_util: Let std::filesystem cast from UTF16 to std::stringReinUsesLisp1-1/+1
Fix invalid encoding paths when iterating over a directory on Windows.
2020-12-09common/file_util: Fix and deprecate CreateFullPath, add CreateDirsReinUsesLisp2-4/+31
Fix CreateFullPath to have its intended previous behavior (whatever that was), and deprecate it in favor of the new CreateDirs function. Unlike CreateDir, CreateDirs is marked as [[nodiscard]] to avoid new code ignoring its result value.
2020-12-09common/file_util: Succeed on CreateDir when the directory existsReinUsesLisp1-0/+5
2020-12-09file_util: Migrate remaining file handling functions over to std::filesystemLioncash2-340/+100
Converts creation and deletion functions over to std::filesystem, simplifying our file-handling code. Notably with this, CopyDir will now function on Windows.
2020-12-09file_util: Migrate Exists() and IsDirectory() over to std::filesystemLioncash2-57/+13
Greatly simplifies our file-handling code for these functions.
2020-12-06common: BitSet: Various style fixes based on code review feedback.bunnei1-23/+22
2020-12-06hle: kernel: Separate KScheduler from GlobalSchedulerContext class.bunnei2-346/+0
2020-12-06common: Port BitSet from Mesosphere.bunnei2-0/+101
2020-12-05video_core: Resolve more variable shadowing scenarios pt.3Lioncash2-3/+3
Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
2020-12-05xbyak_abi: Shorten std::size_t to size_tLioncash1-8/+8
Makes for less reading.
2020-12-05xbyak_abi: Avoid implicit sign conversionsLioncash1-2/+2
2020-12-03audio_core: Make shadowing and unused parameters errorsLioncash4-10/+11
Moves the audio code closer to enabling warnings as errors in general.
2020-11-29common: fiber: Use VirtualBuffer for stack memory.bunnei1-2/+5
- This will be aligned by default, and helps memory usage.
2020-11-29common: fiber: Use boost::context instead of native fibers on Windows.bunnei2-115/+8
2020-11-26common: Add Common::DivCeil and Common::DivCeilLog2ReinUsesLisp2-0/+27
Add an equivalent to 'Common::AlignUp(n, d) / d' and a log2 alternative.
2020-11-20common/bit_cast: Add function matching std::bit_cast without constexprReinUsesLisp2-0/+23
Add a std::bit_cast-like function archiving the same runtime results as the standard function, without compile time support. This allows us to use bit_cast while we wait for compiler support, it can be trivially replaced in the future.
2020-11-19hle: service: Stub OLSC Initialize and SetSaveDataBackupSettingEnabled functions.bunnei2-0/+2
- Used by Animal Cross: New Horizons v1.6.0 update, minimal stub gets this update working.
2020-11-19virtual_buffer: Do nothing on resize() calls with same sizesLioncash1-1/+6
Prevents us from churning memory by freeing and reallocating a memory block that would have already been adequate as is.
2020-11-18virtual_buffer: Add compile-time type-safety guarantees with VirtualBufferLioncash1-0/+6
VirtualBuffer makes use of VirtualAlloc (on Windows) and mmap() (on other platforms). Neither of these ensure that non-trivial objects are properly constructed in the allocated memory. To prevent potential undefined behavior occurring due to that, we can add a static assert to loudly complain about cases where that is done.
2020-11-18page_table: Allow page tables to be movedLioncash4-9/+30
Makes page tables and virtual buffers able to be moved, but not copied, making the interface more flexible. Previously, with the destructor specified, but no move assignment or constructor specified, they wouldn't be implicitly generated.
2020-11-18page_table: Add missing doxygen parameters to Resize()Lioncash1-0/+2
Resolves two -Wdocumentation warnings.
2020-11-18page_table: Remove unnecessary header inclusionsLioncash1-4/+0
Prevents indirect inclusions for these headers.
2020-11-07common/fiber: Move all member variables into impl classLioncash2-89/+86
Hides all of the implementation details for users of the class. This has the benefit of reducing includes and also making the fiber classes movable again.
2020-11-05General: Fix clang buildLioncash2-2/+10
Allows building on clang to work again
2020-11-02common: Enable warnings as errorsLioncash9-31/+49
Cleans up common so that we can enable warnings as errors.
2020-10-30General: Make ignoring a discarded return value an errorLioncash2-5/+12
Allows our CI to catch more potential bugs. This also removes the [[nodiscard]] attribute of IOFile's Open member function. There are cases where a file may want to be opened, but have the status of it checked at a later time.
2020-10-30common/stream: Be explicit with copy and move operatorsLioncash1-3/+9
2020-10-28common/fiber: Take shared_ptr<Fiber> by copy in YieldToReinUsesLisp2-3/+3
YieldTo does not intend to modify the passed shared_ptrs. Pass it by copy to keep a reference count while this function executes.
2020-10-27video_core: NVDEC Implementationameerj3-0/+99
This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library. The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data. To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library. Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header. Async GPU is not properly implemented at the moment. Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
2020-10-22core: Fix clang build pt.3Lioncash1-2/+2
Should finally resolve building with clang.
2020-10-21Revert "core: Fix clang build"bunnei7-22/+13
2020-10-18core: Fix clang buildLioncash7-13/+22
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-10-16input_common/CMakeLists: Make some warnings errorsLioncash2-11/+68
Makes the input_common code warnings consistent with the rest of the codebase.
2020-10-13core/CMakeLists: Make some warnings errorsLioncash1-5/+5
Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
2020-09-30common/wall_clock: Add virtual destructorsReinUsesLisp3-2/+4
From -fsanitize=address, this code wasn't calling the proper destructor. Adding virtual destructors for each inherited class and the base class fixes this bug. While we are at it, mark the functions as final.
2020-09-29CMakeLists: use system zstd on Linuxlat9nq1-1/+6
From what I understand, this tells CMake to use the system, not conan, version of zstd. Required to build on the coming MinGW Docker container.
2020-09-29CMakeLists: fix for finding zstd on linux-mingwlat9nq1-1/+1
2020-09-02input_common/motion_input: Make use of Common::PI constantMorph1-1/+1
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
2020-08-30externals: Update Xbyak to 5.96Lioncash1-16/+16
I made a request on the Xbyak issue tracker to allow some constructors to be constexpr in order to avoid static constructors from needing to execute for some of our register constants. This request was implemented, so this updates Xbyak so that we can make use of it.
2020-08-28Implement a basic class for motion devicesgerman1-0/+30
2020-08-26Project Mjölnir: Part 1Morph1-1/+1
Co-authored-by: James Rowe <jroweboy@gmail.com> Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-26common/thread: Fix data race in is_setReinUsesLisp1-4/+5
As report by tsan, Event::Set can write is_set while WaitFor and friends are reading from it. To address this issue, make is_set an atomic.
2020-08-25logging/settings: Increase maximum log size to 100 MB and add extended logging optionM&M1-2/+12
The extended logging option is automatically disabled on boot but can be enabled afterwards, allowing the log file to go up to 1 GB during that session. This commit also fixes a few errors that are present in the general debug menu.
2020-08-24common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORSLioncash1-4/+10
Ensures that the full set of bitwise operators are available for types that make use of this macro.
2020-08-24common/assert: Make use of C++ attribute syntaxLioncash1-3/+4
Normalizes the syntax used for attributes
2020-08-23web_service: Move web_result.h into web_serviceLioncash2-26/+0
This is the only place it's actively used. It's also more appropriate for web-related structures to be within the web service target. Especially given this one doesn't rely on anything in the common library.
2020-08-20Revert "common/time_zone: Simplify GetOsTimeZoneOffset()"bunnei1-5/+9
2020-08-18common/telemetry: Migrate namespace into the Common namespaceLioncash2-4/+4
Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
2020-08-18common/color: Migrate code over to the Common namespaceLioncash1-2/+2
No external code makes use of this header, so we can freely change the namespace.
2020-08-18common/concepts: Move <type_traits> include out of the Common namespaceLioncash1-2/+2
This is a compiler/linker error waiting to happen.
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash3-41/+49
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
2020-08-16common: Silence two discarded result warningsLioncash2-3/+3
These are intentionally discarded internally, since the rest of the public API allows querying success. We want all non-internal uses of these functions to be explicitly checked, so we can signify that we intentionally want to discard the return values here.
2020-08-16common/time_zone: Simplify GetOsTimeZoneOffset()Lioncash1-9/+5
We can simplify this function down into a single line with the use of fmt. A benefit with the fmt approach is that the fmt variant of localtime is thread-safe as well, making GetOsTimeZoneOffset() thread-safe as well.
2020-08-15common/compression: Roll back std::span changesLioncash4-37/+43
Seems like all compilers don't support std::span yet.
2020-08-15common: Make use of [[nodiscard]] where applicableLioncash34-358/+343
Now that clang-format makes [[nodiscard]] attributes format sensibly, we can apply them to several functions within the common library to allow the compiler to complain about any misuses of the functions.
2020-08-13General: Tidy up clang-format warnings part 2Lioncash3-4/+3
2020-08-09General: Tidy up clang-format warningsLioncash1-1/+1
2020-08-07common/concepts: Rename IsBaseOf to DerivedFromLioncash1-4/+6
This makes it more inline with its currently unavailable standardized analogue std::derived_from. While we're at it, we can also make the template match the requirements of the standardized variant as well.
2020-08-06partition_data_manager: Make data arrays constexprLioncash2-40/+23
Previously the constructor for all of these would run at program startup, consuming time before the application can enter main(). This is also particularly dangerous, given the logging system wouldn't have been initialized properly yet, yet the program would use the logs to signify an error. To rectify this, we can replace the literals with constexpr functions that perform the conversion at compile-time, completely eliminating the runtime cost of initializing these arrays.
2020-08-06Fix thread naming on Linux, which limits names to 15 bytes.comex1-0/+12
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and do nothing. - Also, add logging in case `pthread_set_name_np` returns an error anyway. This is Linux-specific, as the Apple and BSD versions of `pthread_set_name_np return `void`. - Change the name for CPU threads in multi-core mode from "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it fits into the Linux limit. Some other thread names are also cut off, but I didn't bother addressing them as you can guess them from the truncated versions. For a CPU thread, truncation means you can't see which core it is!
2020-08-05common/virtual_buffer: drop unused includesJan Beich1-9/+0
On DragonFly and NetBSD build fails with src/common/virtual_buffer.cpp src/common/virtual_buffer.cpp:16:10: fatal error: sys/sysinfo.h: No such file or directory #include <sys/sysinfo.h> ^~~~~~~~~~~~~~~
2020-08-03logging/backend: Make use of designated initializersLioncash2-21/+15
Same behavior, less code.
2020-08-03ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465)David2-0/+33
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer With the support of C++20, we can use concepts to deduce if a type is an STL container or not. * More agressive concept for stl containers * Add -fconcepts * Move to common namespace * Add Common::IsBaseOf
2020-07-28common/atomic_ops: Don't cast away volatile from pointersLioncash2-21/+26
Preserves the volatility of the pointers being casted.
2020-07-25common/string_util: Remove unimplemented function prototype (#4414)LC1-12/+0
This function was relocated to log.h as a constexpr function, so this can be removed.
2020-07-25lz4_compression: Make use of std::span in interfacesLioncash2-17/+14
Allows compressing the data and size parameters into one.
2020-07-25zstd_compression: Make use of std::span in interfacesLioncash2-11/+9
Allows condensing the data and size parameters into a single argument.
2020-07-25virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]Lioncash1-1/+1
This isn't used on Windows, but is used on non-Windows operating systems.
2020-07-21common: Add a screenshots directorylat9nq3-0/+3
Adds a screenshots directory as a path managed by FileUtil.
2020-07-19alignment: explicitly include <new> after 723edb4c0659Jan Beich1-0/+1
In file included from src/core/hle/kernel/memory/page_table.cpp:5: src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std' return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align})); ~~~~~^ src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std' ::operator delete (p, n * sizeof(T), std::align_val_t{Align}); ~~~~~^
2020-07-17alignment: Simplify AlignmentAllocator implementationLioncash1-43/+4
With C++20, much of the allocator interface has been simplified, so we can make the same adjustments.
2020-07-14common/swap: Make use of std::endianLioncash1-42/+4
Allows removing a bunch of defines in favor of a two liner.
2020-07-12common/alignment: Fix compilation errors (#4303)Tobias1-1/+3
2020-07-12Revert "Port citra-emu/citra#5441: "Common: remove a mod from AlignUp""bunnei1-3/+1
2020-07-11Common: remove a mod from AlignUp (#5441)Marshall Mohror1-1/+3
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions. This generates one div and a cmov which is significantly cheaper.
2020-07-10cmake: Fix libfmt linking errorsDavid Marcec1-5/+1
2020-07-09cmake: fix fmt linking when foundJohn Galt1-1/+5
This is a new attempt at #4206 that shouldn't break windows builds. If someone else could test on windows, it would be much appreciated. Previously, the build bot passed but the actual builds failed.
2020-07-03Revert "cmake: fix fmt linking"bunnei1-1/+1
2020-07-01common: switch to nullptr for sysctl's empty new valueJan Beich1-4/+4
2020-06-30common: add sysconf() fallbackJan Beich1-3/+16
src/common/memory_detect.cpp:15:10: fatal error: 'sys/sysinfo.h' file not found #include <sys/sysinfo.h> ^~~~~~~~~~~~~~~
2020-06-29cmake: fix fmt linkingJohn Galt1-1/+1
On gcc/ld, and clang/lld, fmt::v6 symbols are excluded, so linking fails. This fixes the issue. Note: This was included in the FindBoost changes I shared with BlinkHawk, however only they were merged. I'm not sure if it was missed, or if there was an issue with this part of the change.
2020-06-28Core/Common: Address Feedback.Fernando Sahmkow4-12/+13
2020-06-27Common/Kernel: Corrections and small bug fixing.Fernando Sahmkow1-6/+1
2020-06-27Common/NativeClockx86: Reduce native clock accuracy further.Fernando Sahmkow1-1/+1
2020-06-27Common/AtomicOps: Correct GCC Intrinsic argument ordering.Fernando Sahmkow1-5/+5
2020-06-27Clang Format.Fernando Sahmkow3-23/+23
2020-06-27General: Tune the priority of main emulation threads so they have higher priority than less important helper threads.Fernando Sahmkow2-0/+55
2020-06-27X64 Clock: Reduce accuracy to be less or equal to guest accuracy.Fernando Sahmkow2-1/+7
2020-06-27ARM/Memory: Correct Exclusive Monitor and Implement Exclusive Memory Writes.Fernando Sahmkow3-0/+89
2020-06-27HostTiming: Pause the hardware clock on pause.Fernando Sahmkow4-0/+15
2020-06-27General: Recover Prometheus project from harddrive failure Fernando Sahmkow1-0/+6
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system.
2020-06-26Common: Fix non-conan buildFernando Sahmkow1-1/+2
2020-06-20common/telemetry: Add AVX512 to telemetryMorph1-0/+1
2020-06-20common/cpu_detect: Add AVX512 detectionMorph2-0/+6
2020-06-18Common/Fiber: Address Feedback and Correct Memory leaks.Fernando Sahmkow2-34/+41
2020-06-18Common/Fiber: Implement Rewind on Boost Context.Fernando Sahmkow2-2/+39
2020-06-18Common/uint128: Correct MSVC Compilation in old versions.Fernando Sahmkow1-0/+4
2020-06-18Common/Fiber: Document fiber interexchange.Fernando Sahmkow1-1/+4
2020-06-18Common/Fiber: Implement Rewinding.Fernando Sahmkow2-2/+38
2020-06-18Common/Fiber: Additional corrections to f_context.Fernando Sahmkow1-4/+4
2020-06-18Common/Fiber: Correct f_context based Fibers.Fernando Sahmkow1-6/+8
2020-06-18Core/HostTiming: Allow events to be advanced manually.Fernando Sahmkow2-5/+6
2020-06-18Common/Tests: Address FeedbackFernando Sahmkow3-8/+8
2020-06-18Common: Make MinGW build use Windows Fibers instead of fcontext_tFernando Sahmkow2-4/+4
2020-06-18Common/Tests: Clang Format.Fernando Sahmkow4-18/+21
2020-06-18Common: Correct fcontext fibers.Fernando Sahmkow1-5/+4
2020-06-18Common: Refactor & Document Wall clock.Fernando Sahmkow5-49/+49
2020-06-18Common: Implement WallClock Interface and implement a native clock for x64Fernando Sahmkow7-0/+348
2020-06-18Tests: Add base tests to host timingFernando Sahmkow1-2/+2
2020-06-18Common: Polish Fiber class, add comments, asserts and more tests.Fernando Sahmkow4-24/+53
2020-06-18Tests: Add tests for fibers and refactor/fix Fiber classFernando Sahmkow2-19/+32
2020-06-18Common: Implement a basic Fiber class.Fernando Sahmkow3-0/+204
2020-06-18Common: Implement a basic SpinLock classFernando Sahmkow3-0/+68
2020-06-15xbyak_abi: Prefer returning a struct to using out parameters in ABI_CalculateFrameSizeMerryMage1-17/+19
2020-06-15xbyak_abi: Register indexes should be unsignedMerryMage1-11/+12
2020-06-15xbyak_abi: Remove *GPS variants of stack manipulation functionsMerryMage1-36/+0
2020-06-15xbyak_abi: Fix ABI_PushRegistersAndAdjustStackMerryMage1-6/+2
Pushing GPRs twice.
2020-06-12gl_arb_decompiler: Implement an assembly shader decompilerReinUsesLisp1-0/+2
Emit code compatible with NV_gpu_program5. This should emit code compatible with Fermi, but it wasn't tested on that architecture. Pascal has some issues not present on Turing GPUs.
2020-05-30Add xbyak externalDavid Marcec3-1/+316
2020-05-27Fix macOS code and change "Swapfile" to "Swap"Morph1-2/+5
2020-05-17main: Log host system memory parametersMorph3-0/+81
Logs both physical memory and swapfile sizes, this is useful for support.
2020-05-13time_zone: Use std::chrono::seconds for strong typing.bunnei2-3/+4
2020-05-11common: Add module to get the current time zone.bunnei3-0/+68
2020-05-08Replace externals with Conan (#3735)James Rowe1-2/+2
* Remove git submodules that will be loaded through conan * Move custom Find modules to their own folder * Use conan for downloading missing external dependencies * CI: Change the yuzu source folder user to the user that the containers run on * Attempt to remove dirty mingw build hack * Install conan on the msvc build * Only set release build type when using not using multi config generator * Re-add qt bundled to workaround an issue with conan qt not downloading prebuilt binaries * Add workaround for submodules that use legacy CMAKE variables * Re-add USE_BUNDLED_QT on the msvc build bot
2020-04-29acc: Return a unique value per account for GetAccountIdDavid Marcec1-0/+5
2020-04-24Fix -Werror=conversion error.Markus Wick1-1/+1
2020-04-17common: page_table: Update to use VirtualBuffer and simplify.bunnei2-53/+18
2020-04-17common: Add VirtualBuffer class, to abstract memory virtualization.bunnei3-0/+112
2020-04-17common: scope_exit: Implement mechanism for canceling a scope exit.bunnei1-1/+8
2020-04-17common: alignment: Add a helper function for generic alignment checking.bunnei1-0/+7
2020-04-17common: common_funcs: Add a macro for defining enum flag operators.bunnei1-0/+32
2020-04-15file_util: Early-exit in WriteArray and ReadArray if specified lengths are zeroLioncash2-9/+33
It's undefined behavior to pass a null pointer to std::fread and std::fwrite, even if the length passed in is zero, so we must perform the precondition checking ourselves. A common case where this can occur is when passing in the data of an empty std::vector and size, as an empty vector will typically have a null internal buffer. While we're at it, we can move the implementation out of line and add debug checks against passing in nullptr to std::fread and std::fwrite.
2020-04-09common/file_util: Allow access to files on network sharesBen Russell1-1/+8
On Windows, network shares use paths like \\server\share\file which were being broken by FileUtil::SanitizePath() removing double slashes. Changed the code in SanitizePath to permit a double-backslash if it occurs at the start of a filepath (on Windows only).
2020-04-07common/dynamic_library: Import and adapt helper from DolphinReinUsesLisp3-0/+183
2020-04-01common: Port some changes from dolphin (#5127)Vitor K2-15/+16
* IOFile: Make the move constructor and move assignment operator noexcept Certain parts of the standard library try to determine whether or not a transfer operation should either be a copy or a move. The prevalent notion of move constructors/assignment operators is that they should not throw, they simply move an already existing resource somewhere else. This is typically done with 'std::move_if_noexcept'. Like the name says, if a type's move constructor is noexcept, then the functions retrieves an r-value reference (for move semantics), or an l-value (for copy semantics) if it is not noexcept. As IOFile deletes the copy constructor and copy assignment operators, using IOFile with certain parts of the standard library can fail in unexcepted ways (especially when used with various container implementations). This prevents that. * fix various instances of -1 being assigned to unsigned types * do not assign in conditional statements * File/IOFile: Check _tfopen_s properly * common/file_util.cpp: address review comments Co-authored-by: Lioncash <mathew1800@gmail.com> Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com> Co-authored-by: Sepalani <sepalani@hotmail.fr>
2020-03-14PageTable: move backing addresses to a children class as the CPU page table does not need them.Fernando Sahmkow2-3/+24
This PR aims to reduce the memory usage in the CPU page table by moving GPU specific parameters into a child class. This saves 1Gb of Memory for most games.
2020-03-13shader/transform_feedback: Add host API friendly TFB builderReinUsesLisp1-0/+2
2020-03-09video_core: Rename "const buffer locker" to "registry"ReinUsesLisp1-2/+2
2020-03-09gl_shader_cache: Rework shader cache and remove post-specializationsReinUsesLisp1-2/+0
Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
2020-02-28common/math_util: Support float type rectanglesReinUsesLisp1-2/+14
2020-01-23common/logging: don't use regex for path trimmingBreadFish644-36/+23
2020-01-23Address second part of review commentsFearlessTobi1-1/+1
2020-01-23Input: UDP Client to provide motion and touch controlsfearlessTobi1-0/+9
An implementation of the cemuhook motion/touch protocol, this adds the ability for users to connect several different devices to citra to send direct motion and touch data to citra. Co-Authored-By: jroweboy <jroweboy@gmail.com>
2020-01-18Remove unused CPU Vendor string and telemtry fieldJames Rowe3-114/+0
The information is duplicated in the brand string and the telemetry field is unused
2020-01-16Fix git version in scm_rev.cppJames Rowe1-0/+5
2019-12-17common: SPSCQueue: Notify after incrementing queue size.bunnei1-2/+9
2019-11-23fix clang-format and lambda captureWeiyi Wang1-1/+2
2019-11-23unfold UNREACHABLE implementation for dumb compilersWeiyi Wang1-2/+2
We relies on UNREACHABLE's noreturn attribute to eliminate parent's "no return value" warning. However, this was wrapped in a `if(!false)` block, which compilers may not unfold to recognize the noreturn nature.
2019-11-16Revert "common/bit_field: Silence sign-conversion warnings"Rodrigo Locatti1-3/+2
2019-11-15common/logging: Silence no return value warningsReinUsesLisp1-2/+6
2019-11-15common/bit_field: Silence sign-conversion warningsLioncash1-2/+3
We can just use numeric_limits instead of relying on wraparound behavior here.
2019-11-14common_funcs: Remove semicolons from INSERT_PADDING_* macrosLioncash1-4/+6
Makes code that uses the macros consistent by requiring the lines to be terminated with a semicolon.
2019-11-13common/hash: Remove unused HashableStructLioncash1-35/+0
This is unused, so it can be removed. There's better ways of ensuring zeroed out padding bits, like using zero-initialization, anyhow.
2019-11-13common_funcs: silence sign-conversion warnings in MakeMagic()Lioncash1-1/+1
We can trivially resolve these by casting the characters to unsigned values and then shifting the bits.
2019-11-06ci: Populate build repository from Azure environmentZach Hilman1-11/+2
2019-11-04common_func: Use std::array for INSERT_PADDING_* macros.bunnei2-12/+17
- Zero initialization here is useful for determinism.
2019-11-03Revert "common_func: Use std::array for INSERT_PADDING_* macros."bunnei1-3/+2
2019-11-03common_func: Use std::array for INSERT_PADDING_* macros.bunnei1-2/+3
- Zero initialization here is useful for determinism.
2019-11-03common/bit_field: Remove FORCE_INLINE calls Tobias1-2/+2
See bunneis comment here https://github.com/citra-emu/citra/pull/4629#discussion_r258533167. They were supposed to be removed by him, but he missed them.
2019-10-26Shader_IR: Address Feedback.Fernando Sahmkow1-1/+1
2019-10-25VideoCore: Unify const buffer accessing along engines and provide ConstBufferLocker class to shaders.Fernando Sahmkow2-2/+15
2019-10-15common/algorithm: Add description comment indicating intended algorithmsLioncash1-0/+5
Makes it explicit that the header is intended for iterator-based algorithms that can ideally operate on any type.
2019-10-15common: Rename binary_find.h to algorithm.hLioncash2-1/+2
Makes the header more general for other potential algorithms in the future. While we're at it, include a missing <functional> include to satisfy the use of std::less.
2019-10-15Kernel Scheduler: Make sure the global scheduler shutdowns correctly.Fernando Sahmkow1-0/+7
2019-10-07alignment: Resolve allocator construction issues on debugLioncash1-0/+5
This was related to the source allocator being passed into the constructor potentially having a different type than allocator being constructed. We simply need to provide a constructor to handle this case. This resolves issues related to the allocator causing debug builds on MSVC to fail.
2019-10-07alignment: Specify trait definitions within the allocatorLioncash1-0/+5
Allows containers and other data structures to consider optimizations based off of them. We satisfy all of these requirements anyways.
2019-10-05common: Add additional SCM revision fieldsZach Hilman3-0/+21
2019-10-05common/file_util: Silence -WswitchReinUsesLisp1-1/+2
2019-10-05Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes.Fernando Sahmkow1-0/+2
2019-10-05shader_ir: Corrections to outward movements and misc stuffsFernando Sahmkow1-0/+4
2019-09-22cmake: Add SCM detection for AzureZach Hilman1-0/+3
2019-09-22log: Add logging class for Cheat EngineZach Hilman2-0/+2
This is better than just using something like Common.Filesystem or Common.Memory
2019-08-21shader_ir: Implement VOTEReinUsesLisp1-0/+1
Implement VOTE using Nvidia's intrinsics. Documentation about these can be found here https://developer.nvidia.com/reading-between-threads-shader-intrinsics Instead of using portable ARB instructions I opted to use Nvidia intrinsics because these are the closest we have to how Tegra X1 hardware renders. To stub VOTE on non-Nvidia drivers (including nouveau) this commit simulates a GPU with a warp size of one, returning what is meaningful for the instruction being emulated: * anyThreadNV(value) -> value * allThreadsNV(value) -> value * allThreadsEqualNV(value) -> true ballotARB, also known as "uint64_t(activeThreadsNV())", emits VOTE.ANY Rd, PT, PT; on nouveau's compiler. This doesn't match exactly to Nvidia's code VOTE.ALL Rd, PT, PT; Which is emulated with activeThreadsNV() by this commit. In theory this shouldn't really matter since .ANY, .ALL and .EQ affect the predicates (set to PT on those cases) and not the registers.
2019-07-20Common/Alignment: Add noexcept where required.Fernando Sahmkow1-5/+5
2019-07-19Kernel: Address FeedbackFernando Sahmkow1-3/+2
2019-07-19Common: Correct alignment allocator to work on C++14 or higher.Fernando Sahmkow1-37/+19
2019-07-19VM_Manager: Align allocated memory to 256bytesFernando Sahmkow1-0/+79
This commit ensures that all backing memory allocated for the Guest CPU is aligned to 256 bytes. This due to how gpu memory works and the heavy constraints it has in the alignment of physical memory.
2019-07-09shader_ir: Implement a new shader scannerFernando Sahmkow1-0/+2
2019-07-05texture_cache: Address FeedbackFernando Sahmkow3-10/+22
2019-06-24common/alignment: Address feedbackReinUsesLisp1-2/+3
2019-06-21shader: Decode SUST and implement backing image functionalityReinUsesLisp1-0/+1
2019-06-21texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepthFernando Sahmkow1-0/+44
2019-06-21video_core: Use un-shifted block sizes to avoid integer divisionsReinUsesLisp1-0/+5
Instead of storing all block width, height and depths in their shifted form: block_width = 1U << block_shift; Store them like they are provided by the emulated hardware (their block_shift form). This way we can avoid doing the costly Common::AlignUp operation to align texture sizes and drop CPU integer divisions with bitwise logic (defined in Common::AlignBits).
2019-06-21Reduce amount of size calculations.Fernando Sahmkow1-0/+11
2019-06-12common/hex_util: Reserve std::string memory ahead of timeLioncash1-0/+5
Avoids potentially performing multiple reallocations (depending on the size of the input data) by reserving the necessary amount of memory ahead of time. This is trivially doable, so there's no harm in it.
2019-06-12common/hex_util: Combine HexVectorToString() and HexArrayToString()Lioncash2-11/+7
These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays.
2019-06-07cmake: Add missing shader hash file entriesReinUsesLisp1-0/+3
2019-05-31common/math_util: Provide a template deduction guide for Common::RectangleLioncash1-0/+3
Allows for things such as: auto rect = Common::Rectangle{0, 0, 0, 0}; as opposed to being required to explicitly write out the underlying type, such as: auto rect = Common::Rectangle<int>{0, 0, 0, 0}; The only requirement for the deduction is that all constructor arguments be the same type.
2019-05-23common/file_util: Remove unnecessary return at end of void StripTailDirSlashes()Lioncash1-6/+8
While we're at it, also invert the conditional into a guard clause.
2019-05-23common/file_util: Make GetCurrentDir() return a std::optionalLioncash2-3/+4
nullptr was being returned in the error case, which, at a glance may seem perfectly OK... until you realize that std::string has the invariant that it may not be constructed from a null pointer. This means that if this error case was ever hit, then the application would most likely crash from a thrown exception in std::string's constructor. Instead, we can change the function to return an optional value, indicating if a failure occurred.
2019-05-23common/file_util: Remove duplicated documentation commentsLioncash1-25/+0
These are already present within the header, so they don't need to be repeated in the cpp file.
2019-05-23common/file_util: Make ReadFileToString and WriteStringToFile consistentLioncash2-5/+5
Makes the parameter ordering consistent, and also makes the filename parameter a std::string. A std::string would be constructed anyways with the previous code, as IOFile's only constructor with a filepath is one taking a std::string. We can also make WriteStringToFile's string parameter utilize a std::string_view for the string, making use of our previous changes to IOFile.
2019-05-23common/file_util: Remove unnecessary c_str() callsLioncash1-2/+2
The file stream open functions have supported std::string overloads since C++11, so we don't need to use c_str() here. Same behavior, less code.
2019-05-23common/file_util: Make IOFile's WriteString take a std::string_viewLioncash1-2/+2
We don't need to force the usage of a std::string here, and can instead use a std::string_view, which allows writing out other forms of strings (e.g. C-style strings) without any unnecessary heap allocations.
2019-05-04common/zstd_compression: Remove #pragma once directive from source fileLioncash1-2/+0
Introduced in 72477731ed20c56a4d6f18a22f43224fab667cef. This is only necessary within header files.
2019-04-25mii: Implement Delete and Destroy fileZach Hilman1-5/+6
2019-04-25mii_manager: Cleanup and optimizationZach Hilman2-3/+5
2019-04-25common: Extract UUID to its own classZach Hilman3-0/+80
Since the Mii database uses UUIDs very similar to the Accounts database, it makes no sense to not share code between them.
2019-04-15common/{lz4_compression, zstd_compression}: Add missing header guardsLioncash2-0/+4
These two files were missing the #pragma once directive.
2019-04-12common/swap: Improve codegen of the default swap fallbacksLioncash1-3/+7
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-12common/swap: Mark byte swapping free functions with [[nodiscard]] and noexceptLioncash1-11/+11
Allows the compiler to inform when the result of a swap function is being ignored (which is 100% a bug in all usage scenarios). We also mark them noexcept to allow other functions using them to be able to be marked as noexcept and play nicely with things that potentially inspect "nothrowability".
2019-04-12common/swap: Simplify swap function ifdefsLioncash1-48/+15
Including every OS' own built-in byte swapping functions is kind of undesirable, since it adds yet another build path to ensure compilation succeeds on. Given we only support clang, GCC, and MSVC for the time being, we can utilize their built-in functions directly instead of going through the OS's API functions. This shrinks the overall code down to just if (msvc) use msvc's functions else if (clang or gcc) use clang/gcc's builtins else use the slow path
2019-04-12common/swap: Remove 32-bit ARM pathLioncash1-13/+0
We don't plan to support host 32-bit ARM execution environments, so this is essentially dead code.
2019-04-12common/scope_exit: Replace std::move with std::forward in ScopeExit()Lioncash1-1/+1
The template type here is actually a forwarding reference, not an rvalue reference in this case, so it's more appropriate to use std::forward to preserve the value category of the type being moved.
2019-04-07Permit a Null Shader in case of a bad host_ptr.Fernando Sahmkow1-0/+18
2019-04-05common/multi_level_queue: Silence truncation warning in iterator operator++Lioncash1-1/+1
2019-04-05common/bit_util: Make CountLeading/CountTrailing functions have the same return typesLioncash1-8/+8
Makes the return type consistently uniform (like the intrinsics we're wrapping). This also conveniently silences a truncation warning within the kernel multi_level_queue.
2019-04-04common/lz4_compression: Remove #pragma once directive from the cpp fileLioncash1-2/+0
Introduced within 798d76f4c7018174e58702fb06a042dc8c84f0be, this only really has an effect within header files. Silences a -Wpragma-once-outside-header warning with clang.
2019-04-01general: Use deducation guides for std::lock_guard and std::unique_lockLioncash4-14/+14
Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.
2019-03-29common/thread: Remove unused functionsLioncash2-41/+0
Many of these functions are carried over from Dolphin (where they aren't used anymore). Given these have no use (and we really shouldn't be screwing around with OS-specific thread scheduler handling from the emulator, these can be removed. The function for setting the thread name is left, however, since it can have debugging utility usages.
2019-03-29common/zstd_compression: simplify decompression interfaceunknown2-10/+9
2019-03-29common/zstd_compression: Add Zstandard wrapperunknown3-0/+98
2019-03-29common: Link libzstd_staticunknown1-1/+1
2019-03-29Addressed feedbackunknown5-81/+135
2019-03-29gl_shader_disk_cache: Use better compression for transferable and precompiled shader disk chache filesunknown2-8/+24
2019-03-29data_compression: Move LZ4 compression from video_core/gl_shader_disk_cache to common/data_compressionunknown3-0/+66
2019-03-27Fixes and corrections on formatting.Fernando Sahmkow2-5/+10
2019-03-27Fixes to multilevelqueue's iterator.Fernando Sahmkow1-1/+5
2019-03-27Use MultiLevelQueue instead of old ThreadQueueListFernando Sahmkow1-12/+10
2019-03-27Implement intrinsics CountTrailingZeroes and test it.Fernando Sahmkow1-12/+33
2019-03-27Implement a MultiLevelQueueFernando Sahmkow3-0/+349
2019-03-21common/bit_util: Fix bad merge duplicating the copy constructorLioncash1-2/+0
Introduced as a result of #2090, we already define the copy constructor further down below, so this isn't needed.
2019-03-21common/uint128: Add missing header guardLioncash1-0/+2
2019-03-21common/uint128: Add missing top-file source textLioncash2-0/+7
2019-03-21gpu: Rewrite virtual memory manager using PageTable.bunnei2-1/+7
2019-03-21gpu: Move GPUVAddr definition to common_types.bunnei1-4/+3
2019-03-21common/CMakeLists: Amend boost dependencyLioncash1-1/+1
When #2247 was created, thread_queue_list.h was the only user of boost-related code, however #2252 moved the page table struct into common, which makes use of Boost.ICL, so we need to add the dependency to the common library's link interface again.
2019-03-17core: Move PageTable struct into Common.bunnei5-0/+171
2019-03-16common/thread_queue_list: Remove unnecessary dependency on boostLioncash2-4/+4
We really don't need to pull in several headers of boost related machinery just to perform the erase-remove idiom (particularly with C++20 around the corner, which adds universal container std::erase and std::erase_if, which we can just use instead). With this, we don't need to link in anything boost-related into common.
2019-03-07common/bit_field: Make BitField trivially copyableLioncash1-9/+7
This makes the class much more flexible and doesn't make performing copies with classes that contain a bitfield member a pain. Given BitField instances are only intended to be used within unions, the fact the full storage value would be copied isn't a big concern (only sizeof(union_type) would be copied anyways). While we're at it, provide defaulted move constructors for consistency.
2019-03-02logging/backend: Make time_origin a class variable instead of a local staticLioncash1-2/+1
Moves local global state into the Impl class itself and initializes it at the creation of the instance instead of in the function. This makes it nicer for weakly-ordered architectures, given the CreateEntry() class won't need to have atomic loads executed for each individual call to the CreateEntry class.
2019-03-02logging/backend: Move CreateEntry into the Impl classLioncash2-29/+26
This function is only ever used within this source file and makes it easier to remove static state in the following change.
2019-02-27common/math_util: Move contents into the Common namespaceLioncash1-2/+2
These types are within the common library, so they should be within the Common namespace.
2019-02-27common/vector_math: Move Vec[x] types into the Common namespaceLioncash3-25/+25
These types are within the common library, so they should be using the Common namespace.
2019-02-27common/quaternion: Move Quaternion into the Common namespaceLioncash1-2/+2
Quaternion is within the common library, so it should be using the Common namespace.
2019-02-26shader/decode: Split memory and texture instructions decodingReinUsesLisp1-0/+1
2019-02-24Remove GCC version checkstgsm1-3/+3
Citra can't be compiled using GCC <7 because of required C++17 support, so these version checks don't need to exist anymore.
2019-02-16Corrections, documenting and fixes.Fernando Sahmkow2-9/+11
2019-02-16Use u128 on Clock Cycles calculation.Fernando Sahmkow2-21/+26
2019-02-16Implement 128 bits Unsigned Integer Multiplication and Division.Fernando Sahmkow3-0/+50
2019-02-15Adressed review commentsB3n302-7/+9
2019-02-15threadsafe_queue: Add WaitIfEmpty and use it in loggingB3n303-14/+26
2019-02-13Make bitfield assignment operator publicfearlessTobi1-6/+2
This change needs to be made to get the code compiling again. It was suggested after a conversation with Lioncash. The conversation can be seen here: https://user-images.githubusercontent.com/20753089/45064197-b6107800-b0b2-11e8-9db8-f696299fb86a.PNG
2019-02-13threadsafe_queue: Use std::size_t for representing sizeLioncash1-7/+6
Makes it consistent with the regular standard containers in terms of size representation. This also gets rid of dependence on our own type aliases, removing the need for an include.
2019-02-13threadsafe_queue: Remove NeedSize template parameterLioncash1-13/+11
The necessity of this parameter is dubious at best, and in 2019 probably offers completely negligible savings as opposed to just leaving this enabled. This removes it and simplifies the overall interface.
2019-02-12logging: Add Vulkan backend logging class typeReinUsesLisp2-0/+2
2019-02-07cmake: Fix title bar issueReinUsesLisp1-1/+14
2019-02-07cmake: Use CMAKE_COMMAND instead of "cmake"Frederic L1-1/+1
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-02-07gl_shader_disk_cache: Invalidate shader cache changes with CMake hashReinUsesLisp3-39/+56
2019-02-07file_util: Add shader directoryReinUsesLisp3-0/+3
2019-02-06common/bitfield: make it endianness-awareWeiyi Wang1-3/+9
2019-02-06common/swap: remove default value for swap type internal storageWeiyi Wang1-1/+1
This is compromise for swap type being used in union. A union has deleted default constructor if it has at least one variant member with non-trivial default constructor, and no variant member of T has a default member initializer. In the use case of Bitfield, all variant members will be the swap type on endianness mismatch, which would all have non-trivial default constructor if default value is specified, and non of them can have member initializer
2019-02-06common/swap: use template and tag for LE/BE specificationWeiyi Wang1-39/+91
The tag can be useful for other type-generic templates like BitFields to forward the endianness specification
2019-02-06common/swap: add swap template for enumWeiyi Wang1-0/+52
2018-12-21common/quaternion: Ensure that w is always initializedLioncash1-1/+1
Previously xyz was always being zero initialized due to its constructor, but w wasn't. Ensures that we always have a deterministic initial state.
2018-12-21common: Add basic bit manipulation utility function to CommonLioncash2-0/+62
2018-12-07Backport review comment from citra-emu/citra#4418Tobias1-2/+2
Original reason: As Windows multi-byte character codec is unspecified while we always assume std::string uses UTF-8 in our code base, this can output gibberish when the string contains non-ASCII characters. ::OutputDebugStringW combined with Common::UTF8ToUTF16W is preferred here.
2018-11-22common/thread: Drop Hungarian notation on SetCurrentThreadName's parameterLioncash1-7/+7
This is inconsistent with our coding style.
2018-11-22scheduler: Add explanations for YieldWith and WithoutLoadBalancingZach Hilman1-2/+2
2018-11-22common/thread: Make Barrier's 'count' member non-constLioncash1-1/+1
While admirable as a means to ensure immutability, this has the unfortunate downside of making the class non-movable. std::move cannot actually perform a move operation if the provided operand has const data members (std::move acts as an operation to "slide" resources out of an object instance). Given Barrier contains move-only types such as std::mutex, this can lead to confusing error messages if an object ever contained a Barrier instance and said object was attempted to be moved.
2018-11-22common/thread: Initialize class member variables where applicableLioncash1-6/+4
Simplifies the constructor interfaces for Barrier and Event classes.
2018-11-22common/thread: Group non-member functions togetherLioncash1-3/+2
Keeps the non-member interface in one spot instead of split into two places, making it nicer to locate functions.
2018-11-22common/thread: Remove SleepCurrentThread()Lioncash2-12/+0
This is also unused and superceded by standard functionality. The standard library provides std::this_thread::sleep_for(), which provides a much more flexible interface, as different time units can be used with it.
2018-11-22common/thread: Remove unused CurrentThreadId()Lioncash2-12/+0
This is an old function that's no longer necessary. C++11 introduced proper threading support to the language and a thread ID can be retrieved via std::this_thread::get_id() if it's ever needed.
2018-11-22common: Remove bit_set.hLioncash2-245/+0
This is an analog of BitSet from Dolphin that was introduced to allow iterating over a set of bits. Given it's currently unused, and given that std::bitset exists, we can remove this. If it's ever needed in the future it can be brought back.
2018-11-21common: Remove dependency on xbyakLioncash3-274/+0
Xbyak is currently entirely unused. Rather than carting it along, remove it and get rid of a dependency. If it's ever needed in the future, then it can be re-added (and likely be more up to date at that point in time).
2018-11-21common/math_util: Simplify std::make_signed usages to std::make_signed_tLioncash1-2/+2
Gets rid of the need to use typename to access the ::type alias.
2018-11-21common/math_util: Make Rectangle's constructors constexprLioncash1-2/+2
Allows objects that contain rectangle instances to be constexpr constructible as well.
2018-11-21common/math_util: Remove unnecessary static from PILioncash1-1/+1
const/constexpr variables have internal linkage by default.
2018-11-21common/math_util: Remove unused IntervalsIntersect() functionLioncash1-6/+0
This hasn't been used since the project started, so we may as well get rid of it to keep it from bit rotting.
2018-11-21common/assert: Add UNIMPLEMENTED_IF and UNIMPLEMENTED_IF_MSG for conditional assertionsLioncash1-0/+3
Currently, there's no way to specify if an assertion should conditionally occur due to unimplemented behavior. This is useful when something is only partially implemented (e.g. due to ongoing RE work). In particular, this would be useful within the graphics code. The rationale behind this is it allows a dev to disable unimplemented feature assertions (which can occur in an unrelated work area), while still enabling regular assertions, which act as behavior guards for conditions or states which must not occur. Previously, the only way a dev could temporarily disable asserts, was to disable the regular assertion macros, which has the downside of also disabling, well, the regular assertions which hold more sanitizing value, as opposed to unimplemented feature assertions.
2018-11-20common/assert: Make the UNIMPLEMENTED macro properly assertLioncash1-1/+1
Currently, this was only performing a logging call, which doesn't actually invoke any assertion behavior. This is unlike UNIMPLEMENTED_MSG, which *does* assert. This makes the expected behavior uniform across both macros.
2018-11-19svc: Implement yield types 0 and -1Zach Hilman1-0/+16
2018-11-18am: Deglobalize software keyboard appletZach Hilman2-4/+4
2018-11-18string_util: Implement buffer to UTF-16 string helper functionZach Hilman2-0/+17
Needed as most all software keyboard functions use fixed-length UTF16 string buffers.
2018-11-16Common/Bitfield: store value as unsigned typeWeiyi Wang1-9/+10
Storing signed type causes the following behaviour: extractValue can do overflow/negative left shift. Now it only relies on two implementation-defined behaviours (which are almost always defined as we want): unsigned->signed conversion and signed right shift
2018-11-14string_util: Remove ArrayToString()Lioncash2-21/+0
An old function from Dolphin. This is also unused, and pretty inflexible when it comes to printing out different data types (for example, one might not want to print out an array of u8s but a different type instead. Given we use fmt, there's no need to keep this implementation of the function around.
2018-11-14string_util: Remove TryParse()Lioncash2-54/+3
This is an unused hold-over from Dolphin that was primarily used to parse values out of the .ini files. Given we already have libraries that do this for us, we don't need to keep this around.
2018-11-13string_util: Remove ThousandSeparate()Lioncash1-14/+0
This is currently unused and doesn't really provide much value to keep around either.
2018-10-28compatdb: Use a seperate endpoint for testcase submissionfearlessTobi1-0/+4
2018-10-24logging/backend: Add missing services to the log filtersLioncash2-0/+5
Just a few overlooked services.
2018-10-23common: Remove memory_util.cpp/.hLioncash3-200/+0
Everything from here is completely unused and also written with the notion of supporting 32-bit architecture variants in mind. Given the Switch itself is on a 64-bit architecture, we won't be supporting 32-bit architectures. If we need specific allocation functions in the future, it's likely more worthwhile to new functions for that purpose.
2018-10-23only redefine 64 bit file operation for MSVCWeiyi Wang1-5/+8
MinGW provides POSIX functions
2018-10-21service: Add skeleton for psm serviceZach Hilman1-0/+1
Seems to be the power controller. Listed in switchbrew under the category PTM services.
2018-10-18common: Add function for checking word alignment to alignment.hLioncash1-0/+6
This will be used in a following change to svcArbitrateLock() and svcArbitrateUnlock()
2018-10-18common: Move Is4KBAligned() to alignment.hLioncash1-0/+6
Aligning on 4KB pages isn't a Switch-specific thing, so this can be moved to common so it can be used with other things as well.
2018-10-11web_backend: Make Client use the PImpl idiomLioncash1-0/+1
Like with TelemetryJson, we can make the implementation details private and avoid the need to expose httplib to external libraries that need to use the Client class.
2018-10-07logging: Add DebuggerBackend for logging to Visual StudioCarl Kenner2-2/+23
2018-10-06Remove "#" in the version numberfearlessTobi1-1/+1
So that people can stop using it in issue/pr comments and randomly link some other issue/pr unintentionally.
2018-10-06citra_qt/configuration: misc input tab improvementszhupengfei2-1/+19
* Added a context menu on the buttons including Clear & Restore Default * Allow clearing (unsetting) inputs. Added a Clear All button * Allow restoring a single input to default (instead of all)
2018-10-05text_formatter: Avoid unnecessary string temporary creation in PrintMessage()Lioncash1-1/+1
operator+ for std::string creates an entirely new string, which is kind of unnecessary here if we just want to append a null terminator to the existing one. Reduces the total amount of potential allocations that need to be done in the logging path.
2018-10-04ips_layer: Deduplicate resource usageZach Hilman2-2/+2
2018-10-04hex_util: Add HexVectorToString and HexStringToVectorZach Hilman2-0/+24
Converts between bytes and strings when the size is not known at compile time.
2018-10-02string_util: unify UTF8<->UTF16 conversion to codecvtWeiyi Wang1-109/+6
2018-10-02string_util: remove TString conversion for windowsWeiyi Wang2-19/+1
First of all they are foundamentally broken. As our convention is that std::string is always UTF-8, these functions assume that the multi-byte character version of TString (std::string) from windows is also in UTF-8, which is almost always wrong. We are not going to build multi-byte character build, and even if we do, this dirty work should be handled by frontend framework early.
2018-10-02string_util: remove ShiftJIS/CP1252 conversion functionWeiyi Wang2-22/+0
We always use unicode internally. Any dirty work of conversion with other codec should be handled by frontend framework (Qt). Further more, ShiftJIS/CP1252 are not special (they are not code set used by 3ds, or any guest/host dependencies we have), so there is no reason to specifically include them
2018-10-02Review comments - part 5fearlessTobi1-0/+1
2018-10-02Address a bunch of review commentsfearlessTobi1-1/+1
2018-10-02Port web_service from CitrafearlessTobi4-0/+107
2018-09-24Stubbed IRS (#1349)David2-0/+2
* Stubbed IRS Currently we have no ideal way of implementing IRS. For the time being we should have the functions stubbed until we come up with a way to emulate IRS properly. * Added IRS to logging backend * Forward declared shared memory for irs
2018-09-22common/thread: remove YieldCPU()Weiyi Wang1-8/+0
simply use the standard library yield()
2018-09-22common_paths: Add Load and Dump dirsZach Hilman3-0/+6
2018-09-19ring_buffer: Use std::atomic_size_t in a static assertLioncash1-1/+1
Avoids the need to repeat "std::" twice
2018-09-19ring_buffer: Use std::hardware_destructive_interference_size to determine alignment size for avoiding false sharingLioncash1-2/+10
MSVC 19.11 (A.K.A. VS 15.3)'s C++ standard library implements P0154R1 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html) which defines two new constants within the <new> header, std::hardware_destructive_interference_size and std::hardware_constructive_interference_size. std::hardware_destructive_interference_size defines the minimum recommended offset between two concurrently-accessed objects to avoid performance degradation due to contention introduced by the implementation (with the lower-bound being at least alignof(max_align_t)). In other words, the minimum offset between objects necessary to avoid false-sharing. std::hardware_constructive_interference_size on the other hand defines the maximum recommended size of contiguous memory occupied by two objects accessed wth temporal locality by concurrent threads (also defined to be at least alignof(max_align_t)). In other words the maximum size to promote true-sharing. So we can simply use this facility to determine the ideal alignment size. Unfortunately, only MSVC supports this right now, so we need to enclose it within an ifdef for the time being.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi23-135/+140
2018-09-08common: Implement a ring bufferMerryMage2-0/+112
2018-09-07Better Title Bar DisplayCaptV0rt3x3-5/+25
2018-09-04common/logging: Amend documentation commentsLioncash2-6/+6
Multi-line doc comments still need the '<' after the ///, otherwise it's treated as a regular comment and makes the original doc comment broken in viewers, IDEs, etc. While we're at it, also fix some typos in the comments.
2018-09-04common/logging/filter: Replace C-style case with C++ static_castLioncash1-1/+1
2018-09-04common/logging/filter: Make constructor explicitLioncash1-1/+1
Implicit conversions aren't desirable here.
2018-08-24file_util: Correct return value in early exit of ReadFileToString()Lioncash1-1/+1
While still essentially being zero, we should be returning a numeric value here, not a boolean typed value.
2018-08-23hex_util: Replace logic_errors with LOG_CRITICALZach Hilman1-5/+17
Makes it so malformed hex strings do not crash the entire program.
2018-08-21logging/text_formatter: Use empty braces for initializing CONSOLE_SCREEN_BUFFER_INFO instanceLioncash1-1/+1
The previous form of initializing done here is a C-ism, an empty set of braces is sufficient for initializing (and doesn't potentially cause missing brace warnings, given the first member of the struct is a COORD struct).
2018-08-21bit_field: Convert ToBool() into explicit operator boolLioncash1-2/+1
Gets rid of a TODO that is long overdue.
2018-08-16common: Namespace hex_util.h/.cppLioncash2-0/+8
It's in the common code, so it should be under the Common namespace like everything else.
2018-08-15common/telemetry: Migrate core-independent info gathering to commonLioncash2-0/+77
Previously core itself was the library containing the code to gather common information (build info, CPU info, and OS info), however all of this isn't core-dependent and can be moved to the common code and use the common interfaces. We can then just call those functions from the core instead. This will allow replacing our CPU detection with Xbyak's which has better detection facilities than ours. It also keeps more architecture-dependent code in common instead of core.
2018-08-15common/xbyak_abi: Mark defined functions in header as inlineLioncash1-7/+7
Avoids potential One Definition Rule violations when these are used in the future.
2018-08-15common/xbyak: Use nested namespace specifiers where applicableLioncash2-8/+4
2018-08-15common: Remove unused old breakpoint source filesLioncash3-141/+0
These currently aren't used and contain commented out source code that corresponds to Dolphin's JIT. Given our CPU code is organized quite differently, we shouldn't be keeping this around (at the moment it just adds to compile times marginally).
2018-08-14logging/backend: Use const reference to refer to log filterLioncash1-2/+3
The filter is returned via const reference, so this was making a pointless copy of the entire filter every time a message was being pushed into the logger instance.
2018-08-13common/misc: use windows.hZhu PengFei1-1/+1
linux-mingw does not really like this.
2018-08-12thread_queue_list: Make contains() and get_first() const member functionsLioncash1-4/+4
These don't directly modify the contained data.
2018-08-12thread_queue_list: Convert typedef to a type aliasLioncash1-1/+1
2018-08-12file_sys: Comply to style guidelinesZach Hilman1-0/+2
2018-08-12file_util: Add getter for NAND registration directoryZach Hilman2-0/+8
2018-08-12common: Move hex string processing to separate fileZach Hilman3-0/+64
2018-08-09file_util: Use enum instead of bool for specifing path behaviorZach Hilman2-6/+9
2018-08-09file_util: Add platform-specific slash option to SanitizePathZach Hilman2-5/+16
2018-08-08common/logging: Add missing service log categoriesLioncash2-0/+16
These weren't added when the services were introduced.
2018-08-08common/color: Remove unnecessary const qualifiers on return typesLioncash1-7/+7
These are just superfluous and not necessesary
2018-08-08common/color: Get rid of undefined behaviorLioncash1-12/+24
Gets rid of type punning via reinterpret_cast within functions. Instead, we use memcpy to transfer the contents across types.
2018-08-08vector_math: Use variable template version of is_signed in Vec classesLioncash1-3/+3
Same behavior, less code
2018-08-08vector_math: Remove unimplemented function prototypesLioncash1-23/+0
2018-08-08vector_math: Make functions constexpr where applicableLioncash1-154/+179
2018-08-08vector_math: Convert typedefs to type aliasesLioncash1-3/+3
2018-08-08common: Convert type traits templates over to variable template versions where applicableLioncash5-11/+11
Uses the C++17 inline variable variants
2018-08-07file_util: Avoid sign-conversions in WriteArray() and ReadArray()Lioncash1-4/+8
Prevents compiler warnings.
2018-08-07service: Add usb servicesLioncash2-0/+2
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
2018-08-05service: Add arp servicesLioncash2-0/+2
Adds the basic skeleton of the arp services based off the information provided by Switch Brew.
2018-08-02math_util: Always initialize members of RectangleLioncash1-5/+5
Prevents potentially using the members uninitialized.
2018-08-02service: Add migration servicesLioncash2-0/+2
Adds the basic skeleton for the mig:usr service based off information provided by Switch Brew.
2018-08-02logging/log: Remove incorrect description in PCV doc commentLioncash1-1/+1
PCV isn't the parental control service.
2018-08-02service: Add psc servicesLioncash2-0/+2
Adds the basic skeleton for the psc services based off the information provided by Switch Brew.
2018-08-01service: Add capture servicesLioncash2-0/+2
Adds the basic skeleton for the capture services based off information provided by Switch Brew.
2018-08-01service: Add bpc and pcv servicesLioncash2-0/+4
Adds the basic skeleton for the remaining pcv-related services based off information on Switch Brew.
2018-08-01Allow key loading from %YUZU_DIR%/keys in addition to ~/.switchZach Hilman3-0/+3
2018-08-01Use SHGetKnownFolderPath instead of SHGetFolderPathAZach Hilman1-3/+4
2018-08-01Extract mbedtls to cpp fileZach Hilman1-1/+1
2018-08-01Remove files that are not usedZach Hilman4-0/+16
2018-07-31service: Add fgm servicesLioncash2-0/+2
Adds the basic skeleton for the fgm services based off the information provided by Switch Brew.
2018-07-31service: Add the pcie serviceLioncash2-0/+2
Adds the basic skeleton of the pcie service based off information on Switch Brew.
2018-07-31Port #3758 from Citra (#852): Add missing std::string import in text_formatterTobias1-0/+1
2018-07-29Port #3732 from Citra: "common: Fix compilation on ARM"Cameron Cawley2-4/+2
2018-07-29remove polymorphism issueB3n301-2/+30
2018-07-29common/string_utils: replace boost::transform with std counterpartzhupengfei1-3/+5
Note: according to cppreference it is necessary to convert char to unsigned char when using std::tolower and std::toupper, otherwise the behaviour would be undefined.
2018-07-29Port #3972 from Citra: "common/timer: use std::chrono, avoid platform-dependent code"zhupengfei2-81/+31
2018-07-29service: Add wlan servicesLioncash2-0/+2
Adds the basic skeleton for the wlan services based off the information on Switch Brew.
2018-07-29service: Add btm servicesLioncash2-0/+2
Adds the skeleton for the btm services based off the information on Switch Brew.
2018-07-27service: Add ncm servicesLioncash2-0/+2
Adds the basic skeleton for the ncm services based off information on Switch Brew.
2018-07-27service: Add mii servicesLioncash2-0/+2
Adds the skeleton for the mii services based off information provided by Switch Brew
2018-07-27service: Add nfc servicesLioncash2-0/+2
Adds the skeleton of the nfc service based off the information provided on Switch Brew.
2018-07-27service/lbl: Implement EnableVrMode, DisableVrMode and GetVrModeLioncash2-0/+2
Implements these functions according to the information available on Switch Brew.
2018-07-26service: Add ldn servicesLioncash2-0/+2
Adds ldn services based off information provided by Switch Brew.
2018-07-24VFS Regression and Accuracy Fixes (#776)Zach Hilman2-1/+13
* Regression and Mode Fixes * Review Fixes * string_view correction * Add operator& for FileSys::Mode * Return std::string from SanitizePath * Farming Simulator Fix * Use != With mode operator&
2018-07-22string_util: Get rid of separate resize() in CPToUTF16(), UTF16ToUTF8(), CodeToUTF8() and UTF8ToUTF16()Lioncash1-20/+22
There's no need to perform the resize separately here, since the constructor allows presizing the buffer. Also move the empty string check before the construction of the string to make the early out more straightforward.
2018-07-22string_util: Use emplace_back() in SplitString() instead of push_back()Lioncash1-2/+3
This is equivalent to doing: push_back(std::string("")); which is likely not to cause issues, assuming a decent std::string implementation with small-string optimizations implemented in its design, however it's still a little unnecessary to copy that buffer regardless. Instead, we can use emplace_back() to directly construct the empty string within the std::vector instance, eliminating any possible overhead from the copy.
2018-07-22string_util: Remove unnecessary std::string instance in TabsToSpaces()Lioncash2-8/+7
We can just use the variant of std::string's replace() function that can replace an occurrence with N copies of the same character, eliminating the need to allocate a std::string containing a buffer of spaces.
2018-07-22file_util, vfs: Use std::string_view where applicableLioncash2-40/+55
Avoids unnecessary construction of std::string instances where applicable.
2018-07-22file_util: Remove goto usages from Copy()Lioncash1-24/+14
We can just leverage std::unique_ptr to automatically close these for us in error cases instead of jumping to the end of the function to call fclose on them.
2018-07-22file_util: Use a u64 to represent number of entriesLioncash2-13/+13
This avoids a truncating cast on size. I doubt we'd ever traverse a directory this large, however we also shouldn't truncate sizes away.
2018-07-22file_util: std::move FST entries in ScanDirectoryTree()Lioncash1-1/+1
Avoids unnecessary copies when building up the FST entries.
2018-07-21file_util: Use an enum class for GetUserPath()Lioncash3-50/+51
Instead of using an unsigned int as a parameter and expecting a user to always pass in the correct values, we can just convert the enum into an enum class and use that type as the parameter type instead, which makes the interface more type safe. We also get rid of the bookkeeping "NUM_" element in the enum by just using an unordered map. This function is generally low-frequency in terms of calls (and I'd hope so, considering otherwise would mean we're slamming the disk with IO all the time) so I'd consider this acceptable in this case.
2018-07-21file_util: Remove explicit type from std::min() in GetPathWithoutTop()Lioncash1-1/+1
Given both operands are the same type, there won't be an issue with overload selection that requires making this explicit.
2018-07-21file_util: Remove redundant duplicate return in GetPathWithoutTop()Lioncash1-1/+0
2018-07-21common: Remove synchronized_wrapper.hLioncash2-86/+0
This is entirely unused in the codebase.
2018-07-20param_package: Take std::string by value in string-based Set() functionLioncash2-4/+6
Allows avoiding string copies by letting the strings be moved into the function calls.
2018-07-20param_package: Use std::unordered_map's insert_or_assign instead of map indexingLioncash1-3/+3
This avoids a redundant std::string construction if a key doesn't exist in the map already. e.g. data[key] requires constructing a new default instance of the value in the map (but this is wasteful, since we're already setting something into the map over top of it).
2018-07-20param_package: Get rid of file-static std::string constructionLioncash1-3/+4
Avoids potential dynamic allocation occuring during program launch
2018-07-20logging/filter: Use std::string_view in ParseFilterString()Lioncash2-41/+40
Allows avoiding constructing std::string instances, since this only reads an arbitrary sequence of characters. We can also make ParseFilterRule() internal, since it doesn't depend on any private instance state of Filter
2018-07-20logging/backend: Add missing standard includesLioncash2-4/+3
A few inclusions were being satisfied indirectly. To prevent breakages in the future, include these directly.
2018-07-20logging/backend: Use std::string_view in RemoveBackend() and GetBackend()Lioncash2-12/+13
These can just use a view to a string since its only comparing against two names in both cases for matches. This avoids constructing std::string instances where they aren't necessary.
2018-07-19common/swap: Remove unnecessary const on return value of swap()Lioncash1-1/+1
2018-07-19common/swap: Use static_cast where applicableLioncash1-16/+16
2018-07-19common/swap: Use using aliases where applicableLioncash1-33/+33
2018-07-19common/common_funcs: Remove unused rotation functionsLioncash1-38/+0
These are unused and essentially don't provide much benefit either. If we ever need rotation functions, these can be introduced in a way that they don't sit in a common_* header and require a bunch of ifdefing to simply be available
2018-07-19common/misc: Deduplicate code in GetLastErrorMsg()Lioncash2-12/+8
Android and macOS have supported thread_local for quite a while, but most importantly is that we don't even really need it. Instead of using a thread-local buffer, we can just return a non-static buffer as a std::string, avoiding the need for that quality entirely.
2018-07-19file_util: return string by const reference for GetExeDirectory()Lioncash2-2/+2
This disallows modifying the internal string buffer (which shouldn't be modified anyhow).
2018-07-19string_util: Remove AsciiToHex()Lioncash2-15/+0
Easy TODO
2018-07-19Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman2-57/+116
* Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
2018-07-18externals: update fmt to version 5.1.0Lioncash1-1/+1
Previously, we were on 4.1.0, which was a major version behind.
2018-07-18telemetry: Remove unnecessary Field constructorLioncash1-4/+1
We can just take the value parameter by value which allows both moving into it, and copies at the same time, depending on the calling code.
2018-07-18telemetry: Make operator== and operator!= const member functions of FieldLioncash1-2/+2
These operators don't modify internal class state, so they can be made const member functions. While we're at it, drop the unnecessary inline keywords. Member functions that are defined in the class declaration are already inline by default.
2018-07-18telemetry: Default copy/move constructors and assignment operatorsLioncash1-14/+4
This provides the equivalent behavior, but without as much boilerplate. While we're at it, explicitly default the move constructor, since we have a move-assignment operator defined.
2018-07-15Logging: Dump all logs in the queue on close in debug modeJames Rowe3-1/+12
2018-07-14Logging: Don't lock the queue for the duration of the writeJames Rowe1-3/+5
2018-07-13More improvements to GDBStub (#653)Hedges1-1/+1
* More improvements to GDBStub - Debugging of threads should work correctly with source and assembly level stepping and modifying registers and memory, meaning threads and callstacks are fully clickable in VS. - List of modules is available to the client, with assumption that .nro and .nso are backed up by an .elf with symbols, while deconstructed ROMs keep N names. - Initial support for floating point registers. * Tidy up as requested in PR feedback * Tidy up as requested in PR feedback
2018-07-08Revert "Virtual Filesystem (#597)"bunnei2-99/+57
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
2018-07-07Port #3474 from CitrafearlessTobi1-1/+1
2018-07-07Port #3579 from CitrafearlessTobi3-7/+7
2018-07-06Virtual Filesystem (#597)Zach Hilman2-57/+99
* Add VfsFile and VfsDirectory classes * Finish abstract Vfs classes * Implement RealVfsFile (computer fs backend) * Finish RealVfsFile and RealVfsDirectory * Finished OffsetVfsFile * More changes * Fix import paths * Major refactor * Remove double const * Use experimental/filesystem or filesystem depending on compiler * Port partition_filesystem * More changes * More Overhaul * FSP_SRV fixes * Fixes and testing * Try to get filesystem to compile * Filesystem on linux * Remove std::filesystem and document/test * Compile fixes * Missing include * Bug fixes * Fixes * Rename v_file and v_dir * clang-format fix * Rename NGLOG_* to LOG_* * Most review changes * Fix TODO * Guess 'main' to be Directory by filename
2018-07-06Remove some references to CitrafearlessTobi2-2/+2
2018-07-03Fix build and address review feedbackbunnei1-4/+4
2018-07-03Add configurable logging backendsJames Rowe5-18/+257
2018-07-03Update clang formatJames Rowe3-14/+11
2018-07-03Rename logging macro back to LOG_*James Rowe7-70/+70
2018-06-07Common/string_util: add StringFromBuffer functionmailwl2-0/+6
convert input buffer (std::vector<u8>) to string, stripping zero chars
2018-06-05Service/MM: add service and stub some functionsmailwl2-0/+2
2018-05-28Service/BCAT: add module and servicesmailwl2-0/+2
2018-05-02vector_math: Ensure members are always initializedLioncash1-9/+9
Ensures that values are always in a well-defined state.
2018-04-30string_util: Remove StringFromFormat() and related functionsLioncash4-91/+9
Given we utilize fmt, we don't need to provide our own functions for formatting anymore
2018-04-30file_util: Make move constructor/assignment operator and related functions noexceptLioncash2-6/+6
Without this, it's possible to get compilation failures in the (rare) scenario where a container is used to store a bunch of live IOFile instances, as they may be using std::move_if_noexcept under the hood. Given these definitely don't throw exceptions this is also not incorrect to add either.
2018-04-30file_util: Add static assertions to ReadBytes() and WriteBytes()Lioncash1-2/+6
Ensure that the actual types being passed in are trivially copyable. The internal call to ReadArray() and WriteArray() will always succeed, since they're passed a pointer to char* which is always trivially copyable.
2018-04-28file_util: Remove compiler version checks around is_trivially_copyable()Lioncash1-8/+0
The minimum clang/GCC versions we support already support this. We can also remove is_standard_layout(), as fread and fwrite only require the type to be trivially copyable.
2018-04-27log: Remove old logging macros and functionsLioncash2-54/+1
Now that the old macros are no longer used, we can remove all functionality related to them.
2018-04-27general: Convert assertion macros over to be fmt-compatibleLioncash2-5/+6
2018-04-27Switched to NGLOG_WARNINGDavid Marcec1-1/+1
2018-04-27common: Move logging macros over to new fmt-capable macros where applicableLioncash4-67/+67
2018-04-26Added PREPO to logging backend, Removed comments from SaveReportWithUserDavid Marcec1-0/+1
2018-04-26common: Remove chunk_file.h and linear_disk_cache.hLioncash3-792/+0
These are unused (and given chunk_file references Dolphin's >SVN< I doubt they were going to be used).
2018-04-23GetIUserInterface->CreateUserInterface, Added todos and stub logs. Playreport->PlayReport.David Marcec1-0/+1
2018-04-20math_util: Remove the Clamp() functionLioncash1-5/+0
C++17 adds clamp() to the standard library, so we can remove ours in favor of it.
2018-04-20vector_math: Remove AsArray() and Write() functions from Vec[2,3,4]Lioncash1-30/+0
These are all unused and the Write() ones should arguably not even be in the interface. There are better ways to provide this if we ever need it (like iterators).
2018-04-20common: Remove code_block.hLioncash2-86/+0
We use dynarmic, so this is unued. Anything else we need will likely use Xbyak, so this header isn't necessary any more.
2018-04-20common/thread: Remove unnecessary feature checking for thread_localLioncash1-19/+0
Every compiler we require already supports it.
2018-04-20common_funcs: Remove ARRAY_SIZE macroLioncash1-2/+0
C++17 has non-member size() which we can just call where necessary.
2018-04-20common_funcs: Remove check for VS versions that we don't even supportLioncash1-5/+0
We don't support any VS versions that don't already have snprintf in the standard library implementation.
2018-04-20common_types: Convert typedefs to using aliasesLioncash1-12/+12
May as well while we're making changes to this file.
2018-04-20common_types: Remove unnecessary check for whether or not__func__ is definedLioncash1-6/+0
VS has supported this for quite a while.
2018-04-18bit_field: Remove is_pod check, add is_trivially_copyable_v.bunnei1-6/+1
2018-04-14common: Port cityhash code from Citra.bunnei5-147/+502
2018-04-14bit_field: Make all methods constexpr.bunnei1-5/+5
2018-04-06Update fmtlib to fix msvc warningsJames Rowe2-5/+8
Additionally, when updating fmtlib, there was a change in fmtlib broke how the old logging macro was overloaded, so this works around that by just naming the fmtlib macro impl something different
2018-04-03logging: Change FmtLogMessage to use variadic template instead of FMT_VARIADICDaniel Lim Wee Soong2-5/+11
Due to premature merging of #262 I think the build may be failing right now. Should merge this ASAP to fix it.
2018-04-02common: fix swap functions on Bitrig and OpenBSDDaniel Lim Wee Soong1-1/+13
swap{16,32,64} are defined as macros on the two, but client code tries to invoke them as Common::swap{16,32,64}, which naturally doesn't work. This hack redefines the macros as inline functions in the Common namespace: the bodies of the functions are the same as the original macros, but relying on OS-specific implementation details like this is of course brittle.
2018-03-30service: Add NFP module interface.bunnei2-0/+2
service: Initialize NFP service. Log: Add NFP service as a log subtype.
2018-03-27telemetry.h: Reword comment from citra to yuzuN00byKing1-1/+1
2018-03-26log.h: Change comment from citra to yuzuN00byKing1-1/+1
2018-03-26file_util.h: Update Comment from citra to yuzuN00byKing1-1/+1
2018-03-26cpu_detect.cpp: Change comment from citra to yuzuN00byKing1-1/+1
2018-03-23Service/SSL: add ssl servicemailwl2-0/+2
2018-03-22Remove dependency chronoDaniel Lim Wee Soong1-1/+0
Earlier chrono was included but after some code changed it was no longer needed Forgot to remove it so I'm removing it now
2018-03-22Logging: Create logging macros based on fmtlibDaniel Lim Wee Soong10-67/+112
Add a new set of logging macros based on fmtlib Similar but not exactly the same as https://github.com/citra-emu/citra/pull/3533 Citra currently uses a different version of fmt, which does not support FMT_VARIADIC so make_args is used instead. On the other hand, yuzu uses fmt 4.1.0 which doesn't have make_args yet so FMT_VARIADIC is used.
2018-03-22Service/spl: add module and servicesmailwl2-0/+2
2018-03-21CMake: Set EMU_ARCH_BITS in CMakeLists.txtN00byKing2-35/+0
2018-03-20Service: add fatal:u, fatal:p servicesmailwl2-0/+2
2018-02-20Service/AOC: stub ListAddOnContent functionmailwl2-0/+2
2018-02-19logging: Add category for Friend service.bunnei2-0/+2
2018-02-15log: Add logging category for NS services.bunnei2-0/+2
2018-02-05logger: Add Time service logging category.bunnei2-0/+2
2018-02-05logger: Add SET service logging category.bunnei2-15/+11
2018-02-05logger: Add PCTL service logging category.bunnei2-0/+2
2018-02-05logger: Add LM service logging category.bunnei2-0/+2
2018-02-05logger: Add APM service logging category.bunnei2-0/+2
2018-02-05logger: Add NIFM service logging category.bunnei2-0/+2
2018-02-05logger: Add VI service logging category.bunnei2-0/+2
2018-02-04logger: Add AM service logging category.bunnei2-0/+2
2018-02-04logger: Add "account" service logging category.bunnei2-0/+2
2018-01-25audout:u OpenAudioOut and IAudioOut (#138)st4rk2-0/+2
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation * Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation * audout:u OpenAudioOut implementation and IAudioOut cmd 1,2,3,4,5 implementation * using an enum for audio_out_state as well as changing its initialize to member initializer list * Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass * Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass * added missing Audio loggin subclass, minor fixes, clang comment breakline * Solving backend logging conflict * minor fix * Fixed duplicated Service NVDRV in backend.cpp, my bad
2018-01-24logging: add missing NVDRV subclass to macro listRozlette1-0/+1
2018-01-21Added nvmemp, Added /dev/nvhost-ctrl, SetClientPID now stores pid (#114)David1-0/+1
* Added nvmemp, Added /dev/nvhost-ctrl, SetClientPID now stores pid * used clang-format-3.9 instead * lowercase pid * Moved nvmemp handlers to cpp * Removed unnecessary logging for NvOsGetConfigU32. Cleaned up log and changed to LOG_DEBUG * using std::arrays instead of c arrays * nvhost get config now uses std::array completely * added pid logging back * updated cmakelist * missing includes * added array, removed memcpy * clang-format6.0
2018-01-21Fix spelling error in CMakeListsMatthew Brener1-1/+1
Minor spelling error of its --> it's
2018-01-21Format: Run the new clang format on everythingJames Rowe19-43/+87
2018-01-18CMakeLists: Derive the source directory grouping from targets themselvesLioncash1-63/+57
Removes the need to store to separate SRC and HEADER variables, and then construct the target in most cases.
2018-01-18telemetry: Silence initialization order warningsLioncash1-2/+2
2018-01-17loggin: Add IPC logging category.bunnei2-1/+3
2018-01-14Minor cleanupMerryMage1-1/+1
2018-01-13Removing unused settings and yuzu rebrandingJames Rowe1-5/+1
2018-01-09fix macos buildMerryMage1-1/+1
2018-01-09CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)B3n302-0/+123
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2017-10-23logging: Rename category "Core_ARM11" to "Core_ARM".bunnei2-2/+2
2017-10-15core: Refactor MakeMagic usage and remove dead code.bunnei1-0/+8
2017-10-15hle: Initial implementation of NX service framework and IPC.bunnei2-2/+2
2017-10-10hle: Remove a large amount of 3ds-specific service code.bunnei2-42/+0
2017-09-30arm: Use 64-bit addressing in a bunch of places.bunnei1-2/+2
2017-09-30Fixed type conversion ambiguityHuw Pascoe3-11/+5
2017-09-27Disable unary operator- on Math::Vec2/Vec3/Vec4 for unsigned types.Subv1-4/+8
It is unlikely we will ever use this without first doing a Cast to a signed type. Fixes 9 "unary minus operator applied to unsigned type, result still unsigned" warnings on MSVC2017.3
2017-08-04common: Add build timestamp to scm_rev.bunnei2-0/+3
2017-07-11vector_math: remove dead template parameterwwylele1-1/+1
2017-07-11vector_math: remove broken SFINAE stuffwwylele1-3/+2
this was originally added to eliminate warnings on MSVC, but it doesn't work for custom types.
2017-07-11SwRasterizer: Flip the vertex quaternions before clipping (if necessary).Subv1-1/+1
2017-07-11SwRasterizer: Corrected the light LUT lookups.Subv1-0/+5
2017-07-10logging: Add WebService as a log cateogry.bunnei2-1/+3
2017-07-07Implement basic virtual Room support based on enet (#2803)B3n302-0/+2
* Added support for network with ENet lib, connecting is possible, but data can't be sent, yet. * fixup! Added support for network with ENet lib, * fixup! CLang * fixup! Added support for network with ENet lib, * fixup! Added support for network with ENet lib, * fixup! Clang format * More fixups! * Moved ENetHost* and ENetPeer* into pimpl classes * fixup! Moved ENetHost* and ENetPeer* into pimpl classes * fixup! Clang again * fixup! Moved ENetHost* and ENetPeer* into pimpl classes * fixup! Moved ENetHost* and ENetPeer* into pimpl classes * fixup! Moved ENetHost* and ENetPeer* into pimpl classes
2017-06-30Remove unnecessary WIN32_LEAN_AND_MEAN macro definitionKloen1-1/+0
2017-06-09Remove unused import in break_points.cpp (#2763)Kloen Lansfiel1-1/+0
2017-05-28CMake: Create INTERFACE targets for microprofile and nihstroYuri Kunde Schlesner1-1/+1
2017-05-28CMake: Use IMPORTED target for BoostYuri Kunde Schlesner1-0/+1
2017-05-28CMake: Correct inter-module dependencies and library visibilityYuri Kunde Schlesner1-1/+1
Modules didn't correctly define their dependencies before, which relied on the frontends implicitly including every module for linking to succeed. Also changed every target_link_libraries call to specify visibility of dependencies to avoid leaking definitions to dependents when not necessary.
2017-05-28Common: Fix some out-of-style includesYuri Kunde Schlesner3-5/+5
2017-05-28Move framebuffer_layout from Common to CoreYuri Kunde Schlesner3-214/+0
This removes a dependency inversion between core and common. It's also the proper place for the file since it makes screen layout decisions specific to the 3DS.
2017-05-25Common: Clean up meta-template logic in BitFieldYuri Kunde Schlesner1-3/+3
2017-05-25Make BitField and ResultCode constexpr-initializableYuri Kunde Schlesner1-23/+42
2017-05-25common: Add a generic interface for logging telemetry fields.bunnei3-0/+238
2017-05-20pica/swrasterizer: implement procedural texturewwylele1-0/+10
2017-05-08Remove unused symbols codeYuri Kunde Schlesner3-78/+0
2017-03-13common/cpu_detect: Add missing include and fix namespace scopeYuri Kunde Schlesner1-5/+7
2017-03-11file_util: Log when using local user directorywwylele1-0/+2
2017-03-08file_util: lower logging level for harmless caseswwylele1-9/+7
2017-03-01Input: add device and factory templatewwylele2-0/+2
2017-03-01Common: add ParamPackagewwylele3-0/+162
2017-02-27Remove built-in (non-Microprofile) profilerYuri Kunde Schlesner3-186/+0
2017-02-27SynchronizedWrapper: Add Lock convenience methodYuri Kunde Schlesner1-18/+25
2017-02-23Add custom layout settings.SonofUgly2-0/+27
2017-02-23Gui: Change title bar to include build nameJames Rowe3-0/+26
Nightly builds now have "Citra Nightly" in the titlebar Bleeding edge builds now have "Citra Bleeding Edge" in the titlebar
2017-02-21HW: add AES engine & implement AES-CCMwwylele3-0/+3
2017-02-14applied the change suggested by @wwylelenoah the goodra1-0/+1
2017-02-14added http service enum to the log.h filenoah the goodra1-0/+1
2017-01-31Common/x64: remove legacy emitter and abi (#2504)Weiyi Wang5-4201/+1
These are not used any more since we moved shader JIT to xbyak.
2017-01-31file_util: Fixed implicit type conversion warning (#2503)noah the goodra1-2/+2
2017-01-30Common: Optimize BitSet iteratorYuri Kunde Schlesner1-14/+19
2017-01-28common: add <cstddef> to hash.hKloen1-0/+1
2017-01-28common: switch ComputeHash64 len param to size_t instead of int, fix warning on MSVC on dsp_dsp.cppKloen2-6/+6
2016-12-30Service/NFC: stub GetTagInRangeEventmailwl2-0/+2
Fix Fatal Error in Mini-Mario & Friends - amiibo Challenge
2016-12-26Common: add Quaternionwwylele2-0/+45
2016-12-26vector math: add implementation of Length and Normalizewwylele1-0/+19
2016-12-26MathUtil: add PI constantwwylele1-0/+2
2016-12-26Common::Event: add WaitUntilwwylele1-0/+10
2016-12-23file_util: fix missing sysdata pathwwylele1-3/+1
2016-12-23core: Move emu_window and key_map into coreMerryMage5-646/+0
* Removes circular dependences (common should not depend on core)
2016-12-22file_util: Remove unused paths.bunnei3-87/+3
2016-12-18Fixed GPLv2 license text in the start.Vamsi Krishna1-1/+1
2016-12-15VideoCore: Convert x64 shader JIT to use Xbyak for assemblyYuri Kunde Schlesner3-1/+234
2016-12-13Common: Fix gcc build on macOSJeffrey Pfau1-0/+11
2016-12-12csnd:SND reformat source codemailwl2-0/+2
2016-12-05Support mingw cross-compileJannik Vogel5-5/+6
2016-11-30WINVER definition moved to CMake and cleanupfreiro1-3/+0
2016-11-30Set client SDK version to Service APIsmailwl1-3/+2
2016-11-29Build: Fixed a few warnings.Subv1-4/+4
2016-11-26Move to AppData/Roaming/Citra/freiro1-1/+1
2016-11-26Removed /user/ from pathfreiro1-2/+1
2016-11-25MIC_U: Stub service funcionsmailwl2-0/+2
2016-11-24Switch to AppData/Roamingfreiro2-4/+4
2016-11-19Return by value and other fixesfreiro2-14/+8
2016-11-19Win32 move default user folder location to AppDatafreiro2-0/+24
2016-11-14Add mingw compile supportJames Rowe1-2/+3
2016-11-12Round the rectangle size to prevent float to int casting issuesJames Rowe3-8/+9
And other minor style changes
2016-11-05Add default hotkey to swap primary screens.James Rowe4-7/+10
Also minor style changes
2016-11-05Rework frame layouts to use a max rectangle instead of hardcoded calculationsJames Rowe2-250/+100
2016-11-05LargeFrameLayout + SwappedSonofUgly1-50/+36
Make small screen stay at 1x, and large screen maintain its aspect ratio.
2016-11-05Support additional screen layouts.James Rowe5-73/+382
Allows users to choose a single screen layout or a large screen layout. Adds a configuration option to change the prominent screen.
2016-10-28common: use system bswap* functions on more BSDsJan Beich1-2/+5
2016-10-28common: use system CPUID routine on DragonFly as wellJan Beich1-2/+2
2016-10-28common: some FreeBSD headers are incomplete to avoid namespace pollutionJan Beich1-1/+3
In file included from src/common/x64/cpu_detect.cpp:16: /usr/include/machine/cpufunc.h:66:17: error: unknown type name 'u_int' static __inline u_int ^ /usr/include/machine/cpufunc.h:67:6: error: unknown type name 'u_int' bsfl(u_int mask) ^ /usr/include/machine/cpufunc.h:69:2: error: unknown type name 'u_int' u_int result; ^ /usr/include/machine/cpufunc.h:75:17: error: unknown type name 'u_long'; did you mean 'long'? static __inline u_long ^ /usr/include/machine/cpufunc.h:76:6: error: unknown type name 'u_long'; did you mean 'long'? bsfq(u_long mask) ^ /usr/include/machine/cpufunc.h:78:2: error: use of undeclared identifier 'u_long'; did you mean 'long'? u_long result; ^ [...]
2016-10-28common: convert to standard stat()/fstat() interfacesAnthony J. Bentley1-15/+10
Most modern Unix environments use 64-bit off_t by default: OpenBSD, FreeBSD, OS X, and Linux libc implementations such as Musl. glibc is the lone exception; it can default to 32 bits but this is configurable by setting _FILE_OFFSET_BITS. Avoiding the stat64()/fstat64() interfaces is desirable because they are nonstandard and not implemented on many systems (including OpenBSD and FreeBSD), and using 64 bits for stat()/fstat() is either the default or trivial to set up.
2016-10-28common: stat64 is non-standard, hide on a random UnixJan Beich1-1/+1
src/common/file_util.cpp:79:19: error: variable has incomplete type 'struct stat64' struct stat64 file_info; ^ src/common/file_util.cpp:79:12: note: forward declaration of 'stat64' struct stat64 file_info; ^ src/common/file_util.cpp:99:19: error: variable has incomplete type 'struct stat64' struct stat64 file_info; ^ src/common/file_util.cpp:99:12: note: forward declaration of 'stat64' struct stat64 file_info; ^ src/common/file_util.cpp:342:19: error: variable has incomplete type 'struct stat64' struct stat64 buf; ^ src/common/file_util.cpp:342:12: note: forward declaration of 'stat64' struct stat64 buf; ^ src/common/file_util.cpp:359:19: error: variable has incomplete type 'struct stat64' struct stat64 buf; ^ src/common/file_util.cpp:359:12: note: forward declaration of 'stat64' struct stat64 buf; ^ 4 errors generated.
2016-10-28common: only FreeBSD has thread affinity compatible with LinuxJan Beich1-1/+5
src/common/thread.cpp:90:5: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'? cpu_set_t cpu_set; ^~~~~~~~~ cpuset_t /usr/include/sys/_cpuset.h:48:24: note: 'cpuset_t' declared here typedef struct _cpuset cpuset_t; ^ 1 error generated.
2016-10-28common: define routines to set thread name on more BSDsJan Beich1-2/+4
src/common/thread.cpp:123:5: error: use of undeclared identifier 'pthread_setname_np' pthread_setname_np(pthread_self(), szThreadName); ^ 1 error generated.
2016-10-20Fix typosRicardo de Almeida Gonzaga2-2/+2
2016-10-02Update the stub code of BOSSJamePeng2-0/+2
2016-09-30Common: Remove dangerous Vec[234] array constructorsYuri Kunde Schlesner1-3/+0
They're not currently used, and it's easy to accidentally pass a single pointer argument to them, causing an out-of-bounds read.
2016-09-21Remove special rules for Windows.h and library includesYuri Kunde Schlesner3-1/+3
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner10-11/+11
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot32-54/+13
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner15-61/+32
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot51-3389/+4172
2016-09-15microprofile: Double buffer size to 16MB.bunnei1-1/+1
2016-09-13Common: readdir_r() is deprecated, switch to readdir().Emmanuel Gil Peyrot1-6/+2
2016-07-23Protection against a resize of size 0Alexandre LittleWhite Laurent1-4/+3
2016-06-25Remove superfluous std::move in return std::move(local_var)scurest1-1/+1
2016-06-19Fix recursive scanning of directoriesYuri Kunde Schlesner2-17/+12
ForeachDirectoryEntry didn't actually do anything with the `recursive` parameter, and the corresponding callback parameter was shadowing the actual recursion counters in the user functions.
2016-05-27common_funcs: Provide rotr and rotl for MSVCMerryMage1-12/+18
2016-05-21Common: Make recursive FileUtil functions take a maximum recursionEmmanuel Gil Peyrot2-24/+36
Fixes #1115. Also improves the performances of DiskArchive’s directory implementation a lot, simply by not going through the entire tree instead of just listing the first level files. Thanks to JayRoxFox for rebasing this on current master!
2016-05-15fixup! fixup! Refactor input systemwwylele2-7/+7
2016-05-15fixup! Refactor input systemwwylele2-20/+24
2016-05-15implement circle pad modifierwwylele2-4/+22
2016-05-15Refactor input subsystemwwylele4-23/+210
2016-05-09swap: Get rid of pointer casting for swapping structsLioncash1-5/+5
These shouldn't haphazardly convert types
2016-05-09swap: Get rid of undefined behavior in swapf and swapdLioncash1-14/+18
This isn't well-defined in C++.
2016-05-09swap: Remove unused methodsLioncash1-28/+0
Also gets rid of pointer data variants as this prevents the use of the regular swapping routines as unary predicates in std lib functions. They also cast to stricter alignment types, which is undefined behavior.
2016-05-07AudioCore: SDL2 SinkMerryMage2-1/+3
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot6-5/+14
2016-04-29Common: Remove section measurement from profiler (#1731)Yuri Kunde Schlesner5-259/+6
This has been entirely superseded by MicroProfile. The rest of the code can go when a simpler frametime/FPS meter is added to the GUI.
2016-04-29Make Citra build with MICROPROFILE_ENABLED set to 0 (#1709)Henrik Rydgård1-0/+4
* Make Citra build with MICROPROFILE_ENABLED set to 0 * Buildfix with microprofile kept on * moc did not like a dialog to conditionally exist. * Cleanup * Fix end of line
2016-04-24assert: Allow UNREACHABLE_MSG to have just one argumentSam Spilsbury1-1/+1
2016-04-23Protect use of std::is_trivially_copyable to compile with GCC 4.9LittleWhite1-0/+4
2016-04-23assert: Add _MSG variations for UNREACHABLE and UNIMPLEMENTEDSam Spilsbury1-0/+2
2016-04-15fix driver root identification on Windowswwylele1-3/+12
2016-04-14Thread: Make Barrier reusableMerryMage1-5/+5
2016-04-14common/thread: Correct code styleMerryMage1-21/+19
2016-04-14emitter: Add CALL that can be fixed up.bunnei2-0/+13
2016-04-14emitter: Support arbitrary FixupBranch targets.bunnei2-0/+17
2016-04-14file_util: In-class initialize data membersLioncash2-6/+4
2016-04-14file_util: const qualify IOFile's Tell and GetSize functionsLioncash2-8/+8
2016-04-14file_util: Don't expose IOFile internals through the APILioncash2-30/+4
2016-04-14file_util: Check for is_trivially_copyableLioncash1-3/+5
Also applies the template checks to ReadArray as well.
2016-04-14file_util: Make IOFile data members privateLioncash1-0/+1
2016-04-12FileUtil: Missing #include, Add const to IOFile methodsMerryMage1-6/+7
2016-04-08cecd:u: stub GetCecStateAbbreviated (#1648)mailwl1-1/+1
2016-04-05Common: Remove Common::make_unique, use std::make_uniqueMerryMage2-18/+0
2016-04-02Dummy implementation dlp:SRVR Service.exhalatio2-0/+2
2016-03-31remove debug codeLFsWang1-1/+1
2016-03-31cecd:u: stub GetCecInfoEventHandle, GetChangeStateEventHandlemailwl2-0/+2
2016-03-31fix unicode url problem on windowsLFsWang1-6/+18
2016-03-31Fix encode problem On WindowsLFsWang3-21/+26
2016-03-27frd:u: Initial stub some functionsmailwl2-0/+2
2016-03-26remove unnecessary constwwylele1-2/+2
2016-03-22implement accel and gyro backendwwylele1-0/+48
2016-03-18vector_math: Add missing member in Vec4's SetZero functionLioncash1-1/+4
2016-03-14Reorganize the ndm service path for dummy implement functionJamePeng2-0/+2
SuspendDaemons , ResumeDaemons , OverrideDefaultDaemons The NDM file move to /core/hle/service/ndm/ now!
2016-03-13PICA: Align vertex attributesJannik Vogel2-0/+23
2016-03-13common_types: Make NonCopyable constructor constexprLioncash1-1/+1
2016-03-13common_types: Specify const in deleted copy constructor/assignment operatorLioncash1-2/+2
2016-03-09emitter: templatize ImmPtrLioncash1-2/+6
2016-03-09emitter: constexpr-ify helper functionsLioncash1-19/+17
2016-03-09emitter: Get rid of CanDoOpWithLioncash1-7/+0
This was removed in Dolphin as there were no particular uses for it. I'm sure the same will apply to citra.
2016-03-09emitter: constexpr-ify OpArgLioncash1-30/+30
2016-03-09emitter: friend class OpArg with XEmitterLioncash1-3/+4
2016-03-09emitter: Remove unimplemented prototypeLioncash1-1/+0
2016-03-09Common: Get rid of alignment macrosLioncash1-9/+1
The gl rasterizer already uses alignas, so we may as well move everything over.
2016-02-27x64 Emitter: Fix L bit in VEX prefixMerryMage1-2/+2
2016-02-26Initial implementation ir:usermailwl2-0/+2
2016-02-21AudioCore: Skeleton ImplementationMerryMage3-1/+5
This commit: * Adds a new subproject, audio_core. * Defines structures that exist in DSP shared memory. * Hooks up various other parts of the emulator into audio core. This sets the foundation for a later HLE DSP implementation.
2016-02-12BitField: Make trivially copyable and remove assignment operatorMerryMage2-26/+22
2016-02-05backend: defaulted move constructor/assignmentLioncash1-18/+2
2016-01-28color: Make trivial helpers constexprLioncash1-8/+8
2016-01-25key_map: Use std::tie for comparisonsLioncash1-7/+7
2016-01-16DiskDirectory: Initialize the directory member with valid info.Subv1-1/+1
2015-12-23Add missing return values in ForeachDirectoryEntryLFsWang1-4/+14
ForeachDirectoryEntry is changed by #1256 ,but return value at last line was missing.
2015-11-27Refactor ScanDirectoryTreeAndCallback to separate errors and retvalsarchshift2-50/+53
ScanDirectoryTreeAndCallback, before this change, coupled error/return codes and actual return values (number of entries found). This caused confusion and difficulty interpreting the precise way the function worked. Supersedes, and closes #1255.
2015-11-23Services/Cam: Added new log type and camera enums from 3dbrew.Subv2-0/+2
Followup to #1102 Original author @mailwl
2015-11-12fix failure on gcc and clangwwylele1-3/+3
2015-11-12disable unary minus when the type is not signedwwylele1-0/+4
silent warning C4146 on msvc
2015-10-22gl_rasterizer: Use MMH3 hash for shader cache hey.bunnei1-18/+0
- Includes a check to confirm no hash collisions.
2015-10-22renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups.bunnei1-0/+18
2015-10-04Implement gdbstubpolaris-2-0/+2
2015-10-01bit_field: Re-enable code on MSVCLioncash1-11/+0
2015-10-01Split up FileUtil::ScanDirectoryTree to be able to use callbacks for custom behaviorarchshift2-103/+83
Converted FileUtil::ScanDirectoryTree and FileUtil::DeleteDirRecursively to use the new ScanDirectoryTreeAndCallback function internally.
2015-09-30symbols: Replace an insert call with emplaceLioncash1-1/+1
2015-09-30symbols: Get rid of initial underscores in variable namesLioncash2-20/+20
2015-09-30symbols: Directly initialize TSymbol membersLioncash1-8/+3
2015-09-30symbols: Simplify GetSymbolLioncash1-8/+5
2015-09-20Implement gdbstubpolaris-2-0/+2
2015-09-16hash: Get rid of unused functionsLioncash1-16/+0
2015-09-16general: Silence some warnings when using clangLioncash1-2/+2
2015-09-12memory_util: Remove unnecessary assignment in FreeMemoryPagesLioncash1-3/+0
2015-09-12memory_util: Remove commented out printf statementsLioncash1-10/+0
2015-09-12general: Replace 0 literals with nullptr where applicableLioncash2-6/+6
2015-09-12synchronized_wrapper: Add missing return in SynchronizedRef move assignment operatorLioncash1-0/+1
2015-09-11common: Get rid of a cast in swap.hLioncash1-2/+2
2015-09-11common: Get rid of debug_interface.hLioncash4-176/+0
This is technically unused. Also removes TMemChecks because it relies on this. Whenever memory breakpoints are implemented for real, it should be designed to match the codebase debugging mechanisms.
2015-09-01x64: Proper stack alignment in shader JIT function callsaroulin3-424/+90
Import Dolphin stack handling and register saving routines Also removes the x86 parts from abi files
2015-09-01Common: Import BitSet from Dolphinaroulin2-0/+190
2015-08-28Common: Fix MicroProfile compilation in MSVC2015Yuri Kunde Schlesner1-0/+5
2015-08-25Integrate the MicroProfile profiling libraryYuri Kunde Schlesner4-0/+51
This brings goodies such as a configurable user interface and multi-threaded timeline view.
2015-08-23x64-emitter: add RCPSS SSE instructionaroulin2-0/+2
2015-08-21emitter: Remove pointer castsLioncash2-4/+27
This should also technically silence quite a few ubsan warnings.
2015-08-20emitter: Remove unnecessary definesLioncash1-5/+1
2015-08-20emitter: Remove unnecessary else keywordsLioncash1-7/+7
2015-08-20emitter: Remove unused codeLioncash2-44/+0
2015-08-20emitter: Remove unimplemented JMP prototypeLioncash1-1/+0
2015-08-20emitter: Pass OpArg by reference where possibleLioncash2-763/+763
2015-08-20emitter: Remove unnecessary inline specifiersLioncash1-33/+33
Functions implemented in a class definition are already implicitly inline.
2015-08-18Fix building under MinGWdarkf2-4/+10
2015-08-16videocore: Added RG8 texture supportPatrick Martin1-0/+18
2015-08-16VMManager: Make LogLayout log level configurable as a parameterYuri Kunde Schlesner1-8/+7
2015-08-16Rename ARCHITECTURE_X64 definition to ARCHITECTURE_x86_64.bunnei8-14/+14
2015-08-16Common: Cleanup CPU capability detection code.bunnei4-198/+141
2015-08-16Common: Move cpu_detect to x64 directory.bunnei4-5/+5
2015-08-16x64: Refactor to remove fake interfaces and general cleanups.bunnei10-516/+26
2015-08-15Common: Added MurmurHash3 hash function for general-purpose use.bunnei5-2/+158
2015-08-15Common: Ported over boilerplate x86 JIT code from Dolphin/PPSSPP.bunnei9-4/+4380
2015-08-15Common: Ported over Dolphin's code for x86 CPU capability detection.bunnei4-17/+273
2015-08-15Handle invalid `Log::Class`Benjamin Barenblat1-1/+2
Add a case of `Log::Class::Count` to the switch statement that dispatches on `Log::Class`. The case simply calls the `UNREACHABLE` macro.
2015-08-12Stop defining GCC always_inline attributes as __forceinlinearchshift2-7/+8
__forceinline is a MSVC extension, which may confuse some people working on the codebase. Furthermore, the C++ standard dictates that all names which contain adjacent underscores are reserved.
2015-08-03Use UNREACHABLE macro for impossible cases in previous commitBenjamin Barenblat2-4/+3
Use the UNREACHABLE macro instead of `ASSERT(false, ...);`.
2015-08-03Common: Work around bug in MSVC2015 standard libraryYuri Kunde Schlesner1-0/+14
The char16_t/char32_t implementations aren't present in the library and cause linker errors. This is a known issue that wasn't fixed in VS2015 RTM.
2015-08-02Handle invalid `Log::Level::Count`Benjamin Barenblat2-1/+9
Add a case of `Log::Level::Count` to all switch statements that dispatch on `Log::Level`. The case simply asserts `false` and notes the invalid log level.
2015-07-19Common : Fix Conversion Warningszawata1-1/+1
2015-07-18Common: Remove the unused and commented GetThemeDir prototype from FileUtil.Emmanuel Gil Peyrot1-3/+0
2015-07-13Pica: Implement stencil testing.Tony Wasserka1-1/+26
2015-07-13FileUtil: Add a WriteObject method for writing a single, POD-type object.Tony Wasserka1-0/+10
2015-07-12don´t define snprintf on Visual Studio 2015Apology111-2/+4
Visual Studio 2015 defines this in stdio now
2015-07-11Common: Remove thunk.hLioncash2-43/+0
This isn't used, and there's no implementations of the member functions.
2015-07-10Common: Remove redundant masking in BitFieldYuri Kunde Schlesner1-1/+1
For the signed case, the shifts already remove the rest of the value, so ANDing by the mask is redundant.
2015-07-10Common: Fix mask generation in BitFieldYuri Kunde Schlesner1-1/+1
Fixes #913
2015-06-28Common: Remove unused type unions breaking aliasing rules in horrible ways.Emmanuel Gil Peyrot1-26/+0
2015-06-28Core: Cleanup file_sys includes.Emmanuel Gil Peyrot1-0/+1
2015-06-28Core: Cleanup core includes.Emmanuel Gil Peyrot1-1/+2
2015-06-28CitraQt: Cleanup includes.Emmanuel Gil Peyrot2-1/+1
2015-06-28Common: Cleanup emu_window includes.Emmanuel Gil Peyrot2-3/+15
2015-06-28Common: Remove unused ROUND_UP_POW2 macro.Emmanuel Gil Peyrot1-7/+0
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot1-0/+1
2015-06-28Common: Cleanup memory and misc includes.Emmanuel Gil Peyrot7-22/+18
2015-06-28Common: Cleanup profiler includes.Emmanuel Gil Peyrot4-7/+10
2015-06-28Common: Cleanup thread includes.Emmanuel Gil Peyrot2-18/+15
2015-06-28Common: Fix string_util includes.Emmanuel Gil Peyrot2-3/+9
2015-06-28Common: Fix FileUtil includes, and everything relying on those.Emmanuel Gil Peyrot3-7/+14
2015-06-27Common: Remove now-unused EMU_PLATFORM define, fixes issue #373.Emmanuel Gil Peyrot1-30/+0
2015-06-27Common: Remove unused SSE version checking and a GCC macro.Emmanuel Gil Peyrot1-25/+0
2015-06-27Common: Remove unused fifo_queue.h.Emmanuel Gil Peyrot2-112/+0
2015-06-12Services: Continue separation of services into their own folderspurpasmart962-2/+4
2015-06-09Render-to-texture flush, interval math fixtfarley1-1/+1
2015-05-30Move video_core/color.h to common/color.harchshift2-0/+215
2015-05-30Move video_core/math.h to common/vector_math.harchshift2-0/+641
The file only contained vector manipulation code, and such widely-useable code doesn't belong in video_core.
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot3-3/+3
2015-05-23OpenGL renderertfarley1-0/+4
2015-05-22Service::Y2R: Support for grayscale decoding of specific formatsYuri Kunde Schlesner2-0/+2
Implements unrotated planar YUV 4:2:0 -> RGB24 conversions in Y2R. Currently only the Y (luma) channel is used, so the results don't contain color. This will be added in a later PR at some point. This is enough to get all currently know Moflex videos to decode. (Some don't display on-screen due to seemingly unrelated reasons.) Thanks to @archshift for doing the initial implementation which I cleaned up and then fixed the 8x8 block mode.
2015-05-16Remove unused concurrent_ring_buffer.hYuri Kunde Schlesner2-164/+0
2015-05-14Common: Remove unused cruft from math_util, and remove a duplicated Rect class in common_types.Emmanuel Gil Peyrot4-409/+3
2015-05-12Common: Use the log system to print assert messagesYuri Kunde Schlesner1-7/+3
2015-05-12Common: Remove async loggingYuri Kunde Schlesner7-210/+32
It provided a large increase in complexity of the logging system while having a negligible performance impact: the usage patterns of the ring buffer meant that each log contended with the logging thread, causing it to effectively act as a synchronous extra buffering. Also removed some broken code related to filtering of subclasses which was broken since it was introduced. (Which means no one ever used that feature anyway, since, 8 months later, no one ever complained.)
2015-05-09Common: Remove the BIT macroYuri Kunde Schlesner1-2/+0
When the macro was introduced in 326ec51261299e48de97592631c02523da9c8118 it wasn't noticed that it conflicted in name with a heavily used macro inside of dyncom. This causes some compiler warnings. Since it's only lightly used, it was opted to simply remove the new macro.
2015-05-09Common: Add BIT macroYuri Kunde Schlesner1-0/+2
2015-05-08Common: Add StringFromFixedZeroTerminatedBufferYuri Kunde Schlesner2-0/+14
2015-05-08Profiler: Fix off-by-one error when computing average.Yuri Kunde Schlesner1-2/+1
2015-05-08Common: Remove mem_arena.cpp/hYuri Kunde Schlesner3-466/+0
It is superfluous for Citra. (It's only really necessary if you're doing JIT. We were using it but not taking any advantage from it.) This should make 32-bit builds work again.
2015-05-07Common: Remove hash.cpp/hYuri Kunde Schlesner3-543/+0
Currently unused and the code quality is pretty questionable.
2015-05-07Common: Add proper macros to test for architecture pointer sizeYuri Kunde Schlesner5-17/+11
The old system of just defining macros available in some other platform was susceptible to silently using the wrong code if you forgot to include a particular header. This fixes a crash on non-Windows platforms introduced by e1fbac3ca13d37d2625c11d30cfdece4327b446b.
2015-05-07string_util: Get rid of UriDecode/UriEncodeLioncash2-127/+0
2015-05-07Common: Remove common.hYuri Kunde Schlesner29-56/+43
2015-05-07Common: Move alignment macros to common_funcs.hYuri Kunde Schlesner2-21/+21
2015-05-07Common: Move SSE detection ifdefs to platform.hYuri Kunde Schlesner3-16/+21
2015-05-07Common: Remove more unused compatibility definesYuri Kunde Schlesner1-45/+0
2015-05-07Common: Move IO-specific compatibility macros to file_util.cppYuri Kunde Schlesner2-26/+26
2015-05-07Common: Remove many unnecessary cross-platform compatibility macrosYuri Kunde Schlesner5-88/+10
2015-05-07Clean-up includesYuri Kunde Schlesner1-0/+1
2015-05-07Move typedefs from kernel.h to more appropriate placesYuri Kunde Schlesner1-0/+5
2015-05-07Common: Move NonCopyable to common_types.hYuri Kunde Schlesner2-10/+10
2015-05-07Common: Use C++11 deleted functions for NonCopyableYuri Kunde Schlesner1-8/+6
2015-05-07Common: Remove unused enumsYuri Kunde Schlesner1-17/+0
2015-05-02EmuWindow: Clip mouse input coordinates to emulated screen dimensions.Zaneo2-6/+21
If the mouse position for a mouse move/drag would take it outside the emulated screen dimensions, clip the coordinates to the emulated screen dimensions. Qt and GLFW will report negative coordinates for mouse positions to the left, or above citra window. Added restriction to mouse coordinates passed to touchmoved by Qt/GLFW to be greater or equal to zero.
2015-04-16Common: thread.h cleanupsYuri Kunde Schlesner1-65/+16
The helper classes are rendered obsolete by C++11 lambdas. Also made formatting conform to our code style.
2015-04-10Thread: Implement priority boost for starved threads.bunnei1-0/+18
SVC: Return correct error code on invalid CreateThread processor ID. SVC: Assert when creating a thread with an invalid userland priority.
2015-04-03Services: Stubs and minor changespurpasmart962-0/+4
2015-03-30disassembler: Get rid of a const_castLioncash2-4/+4
2015-03-16Common: Fix logic for setting EMU_DATA_DIR.Emmanuel Gil Peyrot1-6/+5
2015-03-16Common: Make a #else more apparent.Emmanuel Gil Peyrot1-5/+1
2015-03-14EmuWindow: Fixed a reference to a temporary variableSubv1-1/+1
in GetTouchState()
2015-03-11HID: Complete refactor of pad/touch input to fix threading issues.bunnei2-68/+63
2015-03-10EmuWindow: Made pad/touch functions non-static.bunnei2-11/+6
2015-03-10EmuWindow: Added infrastructure code to enable touchpad support.bunnei2-1/+93
2015-03-09Added LCD registers, and implementation for color filling in OGL code.archshift2-0/+2
2015-03-08Fixed EmuWindow typo (fixes OSX build)bunnei2-2/+2
2015-03-07Set framebuffer layout from EmuWindow.bunnei2-7/+75
2015-03-06Logging: check for filter before sending to the queue, to skip all heavy formatting on the other thread.Emmanuel Gil Peyrot5-7/+17
2015-03-06Removed swap code redundancy and moved common swap code to swap.harchshift3-127/+97
2015-03-02Profiler: Implement QPCClock to get better precision on Win32Yuri Kunde Schlesner2-1/+42
MSVC 2013 (at least) doesn't use QueryPerformanceCounter to implement std::chrono::high_resolution_clock, so it has bad precision. Manually implementing our own clock type using it works around this for now.
2015-03-02Add profiling infrastructure and widgetYuri Kunde Schlesner6-0/+493
2015-02-25Common: Switch to the XDG Base Directory Specification for directory selection.Emmanuel Gil Peyrot2-10/+69
This allows for easily movable and independent configuration and data directories, using standardized paths.
2015-02-22Added information reporting from ThrowFatalErrorarchshift3-2/+2
This was RE'd from the errdisp applet.
2015-02-20Common: Change names containing “Dolphin” or “PPSSPP” to something more generic.Emmanuel Gil Peyrot2-8/+8
2015-02-20Misc cleanup of common and related functionsarchshift3-79/+28
2015-02-20Remove duplication of INSERT_PADDING_WORDS between pica.h and gpu.harchshift2-3/+3
2015-02-19Remove "super lame/broken" file_search compilation unit that was leftover from Dolphinarchshift3-128/+0
2015-02-19Remove redundant utf8 compilation unit that was leftover from Dolphinarchshift3-528/+0
2015-02-19Remove useless extended_trace compilation unit that was leftover from Dolphinarchshift3-480/+0
2015-02-19Remove the useless msg_handler compilation unit that was left over from Dolphinarchshift7-178/+11
2015-02-18Asserts: Use lambdas to keep assertion code away from the main code pathYuri Kunde Schlesner1-6/+25
2015-02-17ConfigMem: Clean up the Config memory to be more like the shared page and movedpurpasmart961-0/+7
the helper macro for padding to common_funcs.h
2015-02-13backend: Add logging subentry for ldrLioncash1-0/+1
Fixes an assertion upon executing citra in debug mode.
2015-02-12Build: Fixed some warningsSubv1-3/+3
2015-02-11Asserts: break/crash program, fit to style guide; log.h->assert.harchshift15-105/+73
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
2015-02-08Services: Stub some functionspurpasmart961-0/+1
2015-02-07Fix a wrong file name in a commentchinhodado1-1/+1
2015-01-30Common: Fix SCOPE_EXIT to actually create unique identifiers.Yuri Kunde Schlesner2-1/+7
2015-01-21Added HID_SPVR service and split HID_U implementation into service/hid/hid.xxxarchshift3-10/+10
2015-01-10Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance.archshift3-24/+8
2015-01-07Common: Clean up ThreadQueueListYuri Kunde Schlesner1-144/+74
Replace all the C-style complicated buffer management with a std::deque. In addition to making the code easier to understand it also adds support for non-POD IdTypes. Also clean the rest of the code to follow our code style.
2015-01-07CoreTiming: Ported the CoreTiming namespace from PPSSPPSubv2-0/+2
Implemented the required calls to make it work. CoreTiming: Added a new logging class Core_Timing.
2015-01-06Common: Remove dead platform #ifdefs to make the code more readable.Emmanuel Gil Peyrot5-101/+2
Symbian, Xbox, Blackberry and iOS got removed. FreeBSD and Android kept due to them potentially being able to run Citra in the future. The iOS specific part also got removed from PPSSPP in order to fix a bug there.
2015-01-05Common: Use std::abs instead of abs, using abs with cmath fails on some systems.Emmanuel Gil Peyrot1-2/+3
2015-01-05Common: Remove the unused x86-specific 128-bit float type.Emmanuel Gil Peyrot1-11/+0
2015-01-04Archives: Changed the way paths are built for the archives.Subv3-20/+4
Each archive now takes a mount point of either NAND or SDMC, and builds its own directory structure there, trying to simulate an HLE-friendly hardware layout
2015-01-04SaveDataCheck: Move the files to nand/titleSubv1-1/+1
under /nand/title/high/low/content/00000000.app.romfs
2015-01-03Archives: Change the folder layout of some archives.Subv3-20/+24
This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW
2015-01-03Archives: Reduced duplicate code in RomFS and SaveCheck.Subv3-0/+4
Fixed a few warnings and cleaned up the code
2014-12-31SOC_U: Preliminary implementation of sockets.Subv2-0/+2
Stubbed CreateMemoryBlock Using Berkeley sockets, and Winsock2.2 on Windows. So far ftpony creates the socket and accepts incoming connections SOC_U: Renamed functions to maintain consistency Also prevents possible scope errors / conflicts with the actual Berkeley socket functions SOCU: Close all the opened sockets when cleaning up SOCU
2014-12-30Fix MSVC-related #defines and add CMakeLists commentdarkf5-10/+10
2014-12-30Archives: Implemented ExtSaveData and SharedExtSaveDataSubv3-0/+4
They will be stored in /extsavedata/SDMC and /extsavedata/NAND respectively. Also redirect some APT_A functions to their APT_U equivalents. Implemented the gamecoin.dat file in SharedExtSaveData in the PTM module. Implemented formatting the savegame. Retake a previous savegame if it exists instead of reporting them as not formatted every time a game is loaded.
2014-12-21More warning cleanupsChin1-0/+6
2014-12-21License changepurpasmart9646-74/+74
2014-12-20BitField: Add an explicit Assign method.Tony Wasserka1-1/+5
This is useful when doing crazy stuff like inheriting from BitField.
2014-12-20Common: Add a clone of std::make_uniqueYuri Kunde Schlesner2-0/+17
2014-12-18SaveData: Implemented the SystemSaveData archive.Subv3-0/+4
It will be stored in the /syssavedata folder. This archive is user by various Services and possibly games via the FS:U service.
2014-12-18Filesystem/Archives: Implemented the SaveData archiveSubv3-0/+4
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information Got rid of the code duplication in File and Directory Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive. FS_U: Use the correct error code when a file wasn't found
2014-12-14Restore the original console color after logging a message.Yuri Kunde Schlesner2-13/+25
Fixes #277
2014-12-13Remove old logging systemYuri Kunde Schlesner6-850/+2
2014-12-13Add configurable per-class log filteringYuri Kunde Schlesner5-3/+205
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner8-71/+94
2014-12-13Implement text path trimming for shorter paths.Yuri Kunde Schlesner3-1/+53
2014-12-13Re-add coloring to the console logging output.Yuri Kunde Schlesner1-0/+50
2014-12-13New logging systemYuri Kunde Schlesner11-66/+716
2014-12-13Add SCOPE_EXIT macro to conveniently execute cleanup actionsYuri Kunde Schlesner2-0/+38
2014-12-13Added missing include in common_funcs.hYuri Kunde Schlesner1-0/+1
2014-12-13Remove redundant include from common_funcs.hYuri Kunde Schlesner1-2/+0
2014-12-13APT_U: Added GetSharedFont service function.bunnei1-0/+3
2014-12-12Common: Add "sysdata" to GetUserPath and cleanup.bunnei3-26/+3
2014-12-10Explicitly specify LE strings to iconv, fixes paths in Steel Diverarchshift1-2/+2
2014-12-09Remove unused NDMA moduleYuri Kunde Schlesner2-2/+0
2014-12-09Some code cleanup.Tony Wasserka1-0/+2
2014-12-09Fix some headers to include their dependencies properly.Tony Wasserka2-0/+7
2014-12-07StringUtil: Perform some minimal cleanup.Tony Wasserka1-3/+3
2014-12-03Change NULLs to nullptrs.Rohit Nirmal17-92/+92
2014-11-29Fix MinGW builddarkf7-21/+34
2014-11-25Remove unused includes to common/thread.hEmmanuel Gil Peyrot1-1/+0
2014-11-19Remove tabs in all files except in skyeye imports and in generated GL codeEmmanuel Gil Peyrot3-100/+100
2014-11-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot23-160/+160
2014-11-18Remove extraneous semicolonsLioncash2-2/+2
2014-11-18EmuWindow: Add some explicit documentation and set proper minimal client area size.Tony Wasserka1-2/+4
2014-11-18EmuWindow: Add a TODO.Tony Wasserka1-0/+1
Implementing this function currently is not critical, as we don't perform any configuration changes, yet. However, the interface is a good starting point for adding this functionality.
2014-11-18MathUtil: Make Rectangle work with unsigned types.Tony Wasserka1-4/+5
2014-11-18EmuWindow: Better document the purpose of OnMinimalClientAreaChangeRequest.Tony Wasserka1-0/+7
2014-11-18EmuWindow: Remove window title getters/setters.Tony Wasserka1-16/+1
The window title is none of the emulation core's business. The GUI code is free to put whatever it wants there. Providing properly thread-safe window title getters and setters is a mess anyway.
2014-11-18EmuWindow: Add documentation.Tony Wasserka1-18/+57
2014-11-18EmuWindow: Add support for specifying minimal client area sizes.Tony Wasserka1-8/+26
2014-11-18Fixup EmuWindow interface and implementations thereof.Tony Wasserka1-28/+33
2014-11-18Viewport scaling and display density independenceKevin Hartman1-2/+5
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window. On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.
2014-11-18Add a GUI logging channel.Tony Wasserka2-0/+2
Replace asserts with _dbg_assert_.
2014-11-17emu_window: Fix initializer list order.Lioncash1-2/+2
Gets rid of a warning on OSX.
2014-11-13Use std::u16string for conversion between UTF-8 and UTF-16, FS:USER functionsarchshift2-51/+115
2014-10-29Renamed souce files of services to match port namesGareth Poole1-1/+1
2014-10-26Add `override` keyword through the code.Yuri Kunde Schlesner2-3/+3
This was automated using `clang-modernize`.
2014-10-26Fix compile errors in ClangYuri Kunde Schlesner1-1/+0
2014-10-25bit_field: Fix a typo in the sample usage.Lioncash1-1/+1
2014-10-24Removed uses of raw c-string manipulation functions.archshift4-21/+10
2014-10-23Use std sized types instead of platform specific typedefsYuri Kunde Schlesner2-32/+12
2014-10-23Common: Return from CreateFullPath early if the directory creation failsarchshift1-2/+4
2014-10-08Added configuration file system.archshift6-69/+73
Uses QSettings on citra-qt, and inih on citra-cli.
2014-10-06Common: Add a helper function to generate a 8.3 filename from a long one.Emmanuel Gil Peyrot2-0/+53
Core: Fix the SDMC Directory implementation to make blargSnes work.
2014-09-28Fix warnings in core and commonLioncash3-15/+5
2014-09-22chunk_file: General cleanupLioncash1-244/+0
- Remove unnecessary ifdefs - Remove commented out code. Can be retrieved later if needed.
2014-09-21Use the citra user path for the sdmc directoryarchshift3-0/+4
2014-09-17Common: Rename the File namespace to FileUtil, to match the filename and prevent collisions.Emmanuel Gil Peyrot4-25/+25
2014-09-17Common: Return the number of items read/written in IOFile’s methods instead of a boolean.Emmanuel Gil Peyrot1-8/+20
2014-09-12Added support for multiple input device types for KeyMap and connected Qt.Kevin Hartman5-40/+61
2014-09-12Initial HID PAD work, with GLFW only.Kevin Hartman4-0/+77
2014-09-09Removed fixed_size_queue.harchshift2-71/+0
It's unused and doesn't look like it compiles anyway :/
2014-09-09common: Prune all redundant includesarchshift10-34/+3
2014-09-09Moved common_types::Rect from common to Common namespacearchshift1-1/+1
2014-09-09Added string_util to common, small changes in loader.cpparchshift11-32/+39
2014-09-09loader.cpp: improved file extension checking, made Upper/LowerStr usefularchshift2-12/+9
Instead of forcibly taking the last 4 characters, it now finds the last extension separator (the period) and takes a substr of its location.
2014-09-08Common: Remove HAVE_CXX11_SYNTAX define from Common.hLioncash1-6/+0
2014-09-08Common: Fix a potential infinite loop in StringUtil's ReplaceAllLioncash1-3/+8
2014-09-07Removed common/std_xyz, instead using the std headerarchshift7-856/+6
2014-09-03Removed common/atomic, instead using std::atomicarchshift4-198/+0
2014-09-01Remove hand-crafted Visual Studio solution.Yuri Kunde Schlesner4-453/+0
2014-09-01Avoid LOGGING redefinition warnings.Yuri Kunde Schlesner1-0/+2
2014-09-01CMake cleanupYuri Kunde Schlesner1-7/+16
Several cleanups to the buildsystem: - Do better factoring of common libs between platforms. - Add support to building on Windows. - Remove Qt4 support. - Re-sort file lists and add missing headers.
2014-08-19Common: Add a clamp function to math_utils.hLioncash1-0/+7
2014-08-18Common: Get rid of an unnecessary forward declaration in symbols.hLioncash1-2/+0
2014-08-18Common: Don't return a reference to a string when calling GetName in symbols.cppLioncash2-2/+2
Returning a copy of the string is what was likely meant to be done.
2014-08-17Common: Correctly set ptr to null if mmap fails in memory_utilLioncash1-5/+8
On POSIX systems mmap will return MAP_FAILED ((void*)-1) instead of a null pointer.
2014-08-17Common: Move remaining C header includes over to their C++ equivalentLioncash8-21/+20
2014-08-17Common: Move header guards over to pragma onceLioncash33-146/+41
Also replaced C headers with the C++ equivalent ones
2014-08-16mem_arena: Replace insecure temporary file creation with devshm, importing Dolphin’s code.Emmanuel Gil Peyrot1-24/+23
2014-08-12Simplified if-tree in extended_trace.cpparchshift1-13/+9
2014-08-12break_points.cpp: return directly from conditionalsarchshift1-6/+2
2014-08-12break_points: cleaned up, added `find_if`sarchshift2-59/+51
2014-08-12Changed iterators to use auto, some of which using range-based loopsarchshift1-27/+28
2014-08-12Remove the fancy RegisterSet class introduced in 4c2bff61e.Tony Wasserka3-165/+0
While it was some nice and fancy template usage, it ultimately had many practical issues regarding length of involved expressions under regular usage as well as common code completion tools not being able to handle the structures. Instead, we now use a more conventional approach which is a lot more clean to use.
2014-08-08Use pthread_set_name_np() on OpenBSD.Anthony J. Bentley1-1/+3
2014-07-23RegisterSet: Simplify code by using structs for register definition instead of unions.Tony Wasserka1-6/+8
2014-07-19[build] Search for the git binary in the default msysgit install dirYuri Kunde Schlesner1-1/+8
The Git for Windows installer doesn't add the Git binaries to the path by default. (Due to risk of conflicts with built-in windows commands.) Unless you have configured your system specially this causes the scm_rev_gen.js script to fail to find Git. Added more paths to the script so that it searches in the default msysgit installation directory, eliminating the need to set the PATH for most environments.
2014-07-16BitField: Cast enum values to proper integer type.Tony Wasserka1-1/+1
2014-07-16BitField: Add a static_assert.Tony Wasserka1-0/+1
Being able to store BitField within unions requires BitField to be of standard layout, which in turn is only given if the underlying type is also has standard layout.
2014-07-16BitField: Delete copy assignment to prevent obscure bugs.Tony Wasserka1-0/+16
Cf. https://github.com/dolphin-emu/dolphin/pull/483
2014-07-16BitField: Add an explicit evaluation method.Tony Wasserka1-0/+5
Sometimes it can be beneficial to use this in places where an explicit cast needs to happen otherwise. By using the evaluation method, it's not necessary anymore to explicitly write the underlying type in this case.
2014-06-12Removed definition of MAX_PATH, this is already defined in common_paths.h.bunnei1-2/+0
2014-06-12Preprocessor: #if's out OSX-specific GL changes on other platformsarchshift1-1/+1
2014-06-12Common: Removed duplicate "LONG" and "MAX_PATH" definitions.bunnei1-2/+0
2014-06-12Pica: Use some template magic to define register structures efficiently.Tony Wasserka3-3/+166
2014-06-12Rename LCD to GPU.Tony Wasserka2-2/+2
2014-06-01log: updated MAX_LOGLEVEL to use correct log level enum typebunnei3-5/+5
2014-06-01log: updated GenericLog __attribute__ for newly added parameterbunnei1-1/+1
2014-05-30log: fixed to not print twice, enabled coloring, added OS print logging as its own typebunnei4-37/+42
2014-05-20common_types: Changed BasicRect back to Rect, in the common namespacearchshift1-4/+6
Only Rect is in the namespace for now; the rest of common should be added in the future
2014-05-20Improved clarity and whitespacearchshift1-0/+1
Changed QGL version to 3,2 in order to be less restrictive, yet it should still change up to 4,1 on OSX on Qt5.
2014-05-20CMakeLists: rename HEADS, improved commentsarchshift1-2/+2
Changes for clarity of comments, removed redundant compiler flags.
2014-05-17Updated cmakelistsarchshift1-0/+1
2014-05-17added MIN, MAX, and CLAMP macros to common_funcsbunnei1-0/+5
2014-05-16added ThreadQueueList class to common (taken from PPSSPP)bunnei3-0/+218
2014-05-10added kernel logger to commonbunnei2-3/+5
2014-05-08removed incorrect dolphin copyright linebunnei1-1/+0
2014-05-08fixed include of common in bit_field.hbunnei1-1/+1
2014-05-08logger fix for linuxbunnei2-3/+3
2014-05-08added GSP to loggersbunnei2-2/+2
2014-05-08added BitField to commonbunnei3-0/+175
2014-05-06- added better SVC loggingbunnei2-5/+5
- added stubs for GetResourceLimit and GetResourceLimitCurrentValues SVCs
2014-05-01Support for C++11 on OSXarchshift1-2/+2
2014-05-01Fixed indentsarchshift1-1/+1
2014-04-30Some more experimentationarchshift1-3/+3
2014-04-29IT'S ALIVE!archshift1-1/+39
2014-04-28Fix complaints about functions that could not be foundarchshift1-1/+1
2014-04-28Problematic class with no current implementationarchshift1-2/+2
2014-04-28Rect to BasicRectarchshift1-4/+4
Somewhere along the line an OSX header had already taken the name Rect.
2014-04-28add missing bswap functionsbunnei1-0/+44
2014-04-28fix for issue Linux build #9, not sure why this is broken but its unused code I'm just getting rid of itbunnei1-13/+0
2014-04-28removed DISALLOW_COPY_AND_ASSIGN in favor of NonCopyable classbunnei1-5/+0
2014-04-25Resolved undefined Common::g_scm_branch error.Thomas Edvalson1-1/+1
2014-04-24made qt window title consistentbunnei1-1/+1
2014-04-24fixes to scm_rev generation to make it conistent with windows buildbunnei2-5/+5
2014-04-24updated windows scm_rev code to use new styleShizZy5-66/+53
2014-04-24added scm rev generation on Linux/cmakebunnei6-51/+37
2014-04-23fixes to build on linuxbunnei2-14/+14
2014-04-23removed duplicate rotl/rotr functionsShizZy1-26/+0
2014-04-23updated CMakeLists for missing filesShizZy1-0/+1
2014-04-18added NDMA hardware interfacebunnei2-2/+2
2014-04-15added helper functions for upper/lowercase stringsbunnei2-0/+22
2014-04-13Add symbols mapMathieu Vaillancourt4-0/+100
2014-04-11added logger for generic HLEbunnei2-3/+3
2014-04-11removed scm_rev.h from version controlbunnei1-4/+0
2014-04-11added missing const to GetWindowTitlebunnei1-1/+1
2014-04-10updated CMakeListsbunnei1-16/+17
2014-04-09- removed deprecated version.hbunnei4-72/+52
- cleaned up window title - cleaned up emu_window_glfw/emu_window
2014-04-09fixed scm_rev_genbunnei2-5/+5
2014-04-09fixed project includes to use new directory structurebunnei44-211/+201
2014-04-09got rid of 'src' folders in each sub-projectbunnei54-0/+0
2014-04-07added "citra" instead of "emu" to title barbunnei1-1/+1
2014-04-06added logger option specifically for the rendererbunnei2-2/+2
2014-04-05added missing includes to common_types.hbunnei1-0/+3
2014-04-05Updated common_types.h to use Gekko's version w/ Rect and some useful unionsbunnei1-30/+102
2014-04-05added DISALLOW_COPY_AND_ASSIGN macrobunnei1-0/+5
2014-04-05added LCD loggerbunnei2-2/+2
2014-04-05added a HW option to loggingbunnei2-48/+48
2014-04-02convert tabs to spacesbunnei47-5298/+5298
2014-04-01grabbed ppsspp's MemArenabunnei2-221/+428
2013-10-02added TIME logger for core timingShizZy2-2/+2
2013-10-02renamed GC_ALIGNED* macros to MEMORY_ALIGNED*ShizZy1-12/+12
2013-09-27upgraded proj files to vs 2013ShizZy2-2/+16
2013-09-26renamed from citrus to citraShizZy4-5/+5
2013-09-26moved file_sys back to coreShizZy5-973/+0
2013-09-24removed <windows.h> include from common.h and added it only where neededShizZy2-5/+1
2013-09-24moved file_sys to commonShizZy5-0/+973
2013-09-24added localtime_r for use on windowsShizZy1-0/+8
2013-09-24added utf8 to common module, utils for dealing with utf8ShizZy4-0/+534
2013-09-20updated to chunk_file module from ppssppShizZy1-133/+623
2013-09-20added a module for loading bootable binariesShizZy2-4/+4
2013-09-19added swap types to commonShizZy4-0/+549
2013-09-19removed CORE and LOADER from LogTypesShizZy1-2/+0
2013-09-19added CORE and LOADER to LogTypesShizZy1-0/+2
2013-09-18changed log CPU from PPC to ARM11ShizZy2-2/+3
2013-09-18added default windows includeShizZy1-0/+4
2013-09-16added file platform.hShizZy4-0/+137
2013-09-14renamed project to 'citrus'ShizZy3-3/+3
2013-09-13added scm_rev_gen project to automatically create a header with the git revision on buildShizZy4-3/+162
2013-09-09cleaned up VS project filesShizZy1-11/+9
2013-09-09fixed some code warningsShizZy1-1/+1
2013-09-09 removed unneeded dolphin paths code, fixed linker problems with common.libShizZy3-132/+118
2013-09-09re-enabled GetLastErrorMsgShizZy1-19/+23
2013-09-08updated common pathsShizZy2-4/+7
2013-09-06start of 3DS memory mapShizZy3-12/+3
2013-09-05various fixes to be able to build projectShizZy1-17/+13
2013-09-05added emu_window.h to define interface to drawing to a windowShizZy3-0/+108
2013-09-05updated CMakeLists.txt file for new common filesShizZy1-9/+16
2013-09-05replaced common code with dolphin commonShizZy51-107/+8640
2013-09-04deleted gekko's common filesShizZy28-4543/+0
2013-08-30adding initial project layoutShizZy31-0/+4777