aboutsummaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2019-11-26"Merge Tagged PR 1340"yuzubot
2019-11-23fix clang-format and lambda captureWeiyi Wang
2019-11-23unfold UNREACHABLE implementation for dumb compilersWeiyi Wang
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-15common/logging: Silence no return value warningsReinUsesLisp
2019-11-14common_funcs: Remove semicolons from INSERT_PADDING_* macrosLioncash
Makes code that uses the macros consistent by requiring the lines to be terminated with a semicolon.
2019-11-13common/hash: Remove unused HashableStructLioncash
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()Lioncash
We can trivially resolve these by casting the characters to unsigned values and then shifting the bits.
2019-11-05ci: Populate build repository from Azure environmentZach Hilman
2019-11-03common_func: Use std::array for INSERT_PADDING_* macros.bunnei
- Zero initialization here is useful for determinism.
2019-11-03common/bit_field: Remove FORCE_INLINE calls Tobias
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-28Merge pull request #2971 from FernandoS27/new-scheduler-v2David
Kernel: Implement a New Thread Scheduler V2
2019-10-26Shader_IR: Address Feedback.Fernando Sahmkow
2019-10-25VideoCore: Unify const buffer accessing along engines and provide ↵Fernando Sahmkow
ConstBufferLocker class to shaders.
2019-10-15common/algorithm: Add description comment indicating intended algorithmsLioncash
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.hLioncash
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 Sahmkow
2019-10-06alignment: Resolve allocator construction issues on debugLioncash
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-06alignment: Specify trait definitions within the allocatorLioncash
Allows containers and other data structures to consider optimizations based off of them. We satisfy all of these requirements anyways.
2019-10-05Merge pull request #2942 from ReinUsesLisp/clang-warningsbunnei
Silence miscellaneous warnings
2019-10-05Merge pull request #2943 from DarkLordZach/azure-titlebars-v2bunnei
ci: Add custom titlebars for mainline and patreon
2019-10-05common: Add additional SCM revision fieldsZach Hilman
2019-10-04common/file_util: Silence -WswitchReinUsesLisp
2019-10-04Shader_Ir: Refactor Decompilation process and allow multiple decompilation ↵Fernando Sahmkow
modes.
2019-10-04shader_ir: Corrections to outward movements and misc stuffsFernando Sahmkow
2019-09-22cmake: Add SCM detection for AzureZach Hilman
2019-09-21log: Add logging class for Cheat EngineZach Hilman
This is better than just using something like Common.Filesystem or Common.Memory
2019-08-21shader_ir: Implement VOTEReinUsesLisp
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-19Common/Alignment: Add noexcept where required.Fernando Sahmkow
2019-07-19Kernel: Address FeedbackFernando Sahmkow
2019-07-19Common: Correct alignment allocator to work on C++14 or higher.Fernando Sahmkow
2019-07-19VM_Manager: Align allocated memory to 256bytesFernando Sahmkow
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 Sahmkow
2019-07-05texture_cache: Address FeedbackFernando Sahmkow
2019-06-24common/alignment: Address feedbackReinUsesLisp
2019-06-20shader: Decode SUST and implement backing image functionalityReinUsesLisp
2019-06-20texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepthFernando Sahmkow
2019-06-20video_core: Use un-shifted block sizes to avoid integer divisionsReinUsesLisp
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-20Reduce amount of size calculations.Fernando Sahmkow
2019-06-12common/hex_util: Reserve std::string memory ahead of timeLioncash
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()Lioncash
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-06cmake: Add missing shader hash file entriesReinUsesLisp
2019-05-31common/math_util: Provide a template deduction guide for Common::RectangleLioncash
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-30Merge pull request #1931 from DarkLordZach/mii-database-1bunnei
mii: Implement MiiManager backend and several mii service commands
2019-05-23common/file_util: Remove unnecessary return at end of void StripTailDirSlashes()Lioncash
While we're at it, also invert the conditional into a guard clause.
2019-05-23common/file_util: Make GetCurrentDir() return a std::optionalLioncash
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 commentsLioncash
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 consistentLioncash
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() callsLioncash
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_viewLioncash
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 fileLioncash
Introduced in 72477731ed20c56a4d6f18a22f43224fab667cef. This is only necessary within header files.