summaryrefslogtreecommitdiff
path: root/src/common/alignment.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fssystem: rework for yuzu styleGravatar Liam2023-08-151-2/+6
|
* vfs: expand support for NCA readingGravatar Liam2023-08-151-2/+27
|
* Move to Clang Format 15Gravatar Levi Behunin2023-01-291-9/+9
| | | | | | Depends on https://github.com/yuzu-emu/build-environments/pull/69 clang-15 primary run
* chore: make yuzu REUSE compliantGravatar Andrea Pappacoda2022-07-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
* common/alignment: Fix VS2022 compilationGravatar ameerj2021-10-201-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.
* general: Update style to clang-format-12Gravatar ameerj2021-09-241-7/+14
|
* common: alignment: Add DivideUp utility method.Gravatar bunnei2021-02-181-0/+5
|
* common/alignment: Upgrade to use constraints instead of static assertsGravatar ReinUsesLisp2021-01-151-13/+9
|
* common/alignment: Rename AlignBits to AlignUpLog2Gravatar ReinUsesLisp2021-01-151-5/+4
| | | | AlignUpLog2 describes what the function does better than AlignBits.
* common: Make use of [[nodiscard]] where applicableGravatar Lioncash2020-08-151-7/+7
| | | | | | 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.
* alignment: explicitly include <new> after 723edb4c0659Gravatar Jan Beich2020-07-181-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}); ~~~~~^
* alignment: Simplify AlignmentAllocator implementationGravatar Lioncash2020-07-171-43/+4
| | | | | With C++20, much of the allocator interface has been simplified, so we can make the same adjustments.
* common/alignment: Fix compilation errors (#4303)Gravatar Tobias2020-07-121-1/+3
|
* Revert "Port citra-emu/citra#5441: "Common: remove a mod from AlignUp""Gravatar bunnei2020-07-111-3/+1
|
* Common: remove a mod from AlignUp (#5441)Gravatar Marshall Mohror2020-07-111-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.
* common: alignment: Add a helper function for generic alignment checking.Gravatar bunnei2020-04-171-0/+7
|
* alignment: Resolve allocator construction issues on debugGravatar Lioncash2019-10-061-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.
* alignment: Specify trait definitions within the allocatorGravatar Lioncash2019-10-061-0/+5
| | | | | Allows containers and other data structures to consider optimizations based off of them. We satisfy all of these requirements anyways.
* Common/Alignment: Add noexcept where required.Gravatar Fernando Sahmkow2019-07-191-5/+5
|
* Kernel: Address FeedbackGravatar Fernando Sahmkow2019-07-191-3/+2
|
* Common: Correct alignment allocator to work on C++14 or higher.Gravatar Fernando Sahmkow2019-07-191-37/+19
|
* VM_Manager: Align allocated memory to 256bytesGravatar Fernando Sahmkow2019-07-191-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.
* common/alignment: Address feedbackGravatar ReinUsesLisp2019-06-241-2/+3
|
* video_core: Use un-shifted block sizes to avoid integer divisionsGravatar ReinUsesLisp2019-06-201-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).
* common: Add function for checking word alignment to alignment.hGravatar Lioncash2018-10-181-0/+6
| | | | | This will be used in a following change to svcArbitrateLock() and svcArbitrateUnlock()
* common: Move Is4KBAligned() to alignment.hGravatar Lioncash2018-10-181-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.
* Port #4182 from Citra: "Prefix all size_t with std::"Gravatar fearlessTobi2018-09-151-2/+2
|
* common: Convert type traits templates over to variable template versions ↵Gravatar Lioncash2018-08-071-2/+2
| | | | | | where applicable Uses the C++17 inline variable variants
* PICA: Align vertex attributesGravatar Jannik Vogel2016-03-131-0/+22