summaryrefslogtreecommitdiff
path: root/src/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core/core: Replace includes with forward declarations where applicableGravatar Lioncash2018-08-3118-43/+85
| | | | | | | | | | | The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
* gl_renderer: Cache textures, framebuffers, and shaders based on CPU address.Gravatar bunnei2018-08-313-38/+17
|
* core: Make the main System class use the PImpl idiomGravatar Lioncash2018-08-314-276/+383
| | | | | | | | | | | | | core.h is kind of a massive header in terms what it includes within itself. It includes VFS utilities, kernel headers, file_sys header, ARM-related headers, etc. This means that changing anything in the headers included by core.h essentially requires you to rebuild almost all of core. Instead, we can modify the System class to use the PImpl idiom, which allows us to move all of those headers to the cpp file and forward declare the bulk of the types that would otherwise be included, reducing compile times. This change specifically only performs the PImpl portion.
* kernel: Eliminate kernel global stateGravatar Lioncash2018-08-2851-440/+665
| | | | | | | | | | | | | | | | | | | | | | As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
* Merge pull request #1193 from lioncash/privGravatar bunnei2018-08-282-8/+8
|\ | | | | gpu: Make memory_manager private
| * gpu: Make memory_manager privateGravatar Lioncash2018-08-282-8/+8
| | | | | | | | | | | | | | | | | | | | Makes the class interface consistent and provides accessors for obtaining a reference to the memory manager instance. Given we also return references, this makes our more flimsy uses of const apparent, given const doesn't propagate through pointers in the way one would typically expect. This makes our mutable state more apparent in some places.
* | hle/result: Make ResultVal's move constructor as noexceptGravatar Lioncash2018-08-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | Many containers within the standard library provide different behaviors based on whether or not a move constructor/assignment operator can be guaranteed not to throw or not. Notably, implementations will generally use std::move_if_noexcept (or an internal implementation of it) to provide strong exception guarantees. If a move constructor potentially throws (in other words, is not noexcept), then certain behaviors will create copies, rather than moving the values. For example, consider std::vector. When a std::vector calls resize(), there are two ways the elements can be relocated to the new block of memory (if a reallocation happens), by copy, or by moving the existing elements into the new block of memory. If a type does not have a guarantee that it will not throw in the move constructor, a copy will happen. However, if it can be guaranteed that the move constructor won't throw, then the elements will be moved. This just allows ResultVal to be moved instead of copied all the time if ever used in conjunction with containers for whatever reason.
* Merge pull request #1177 from lioncash/errGravatar bunnei2018-08-274-12/+15
|\ | | | | kernel/error: Amend several error codes
| * kernel/error: Amend error code for ERR_MAX_CONNECTIONS_REACHEDGravatar Lioncash2018-08-251-2/+4
| | | | | | | | | | | | We can make this error code an alias of the resource limit exceeded error code, allowing us to get rid of the lingering 3DS error code of the same type.
| * kernel/error: Amend error code for ERR_PORT_NAME_TOO_LONGGravatar Lioncash2018-08-251-2/+1
| | | | | | | | | | We can treat this as an alias of TooLarge for documentation purposes. This also lets us get rid of another lingering 3DS-related error code.
| * kernel/error: Add error code for the handle table being fullGravatar Lioncash2018-08-253-4/+4
| | | | | | | | | | This replaces the lingering 3DS constant with the proper one, and utilizes it within HandleTable's Create() member function.
| * kernel/error: Add error code for invalid memory permissionsGravatar Lioncash2018-08-252-3/+4
| |
| * kernel/error: Correct kernel error code for invalid combinationGravatar Lioncash2018-08-251-1/+2
| |
* | Merge pull request #1188 from lioncash/unusedGravatar bunnei2018-08-271-1/+0
|\ \ | | | | | | vfs_real: Remove unused variable in CreateDirectoryRelative()
| * | vfs_real: Remove unused variable in CreateDirectoryRelative()Gravatar Lioncash2018-08-271-1/+0
| |/
* | Merge pull request #1175 from lioncash/nsGravatar bunnei2018-08-2713-12/+42
|\ \ | | | | | | core: Namespace all code in the arm subdirectory under the Core namespace
| * | core: Namespace all code in the arm subdirectory under the Core namespaceGravatar Lioncash2018-08-2413-12/+42
| | | | | | | | | | | | Gets all of these types and interfaces out of the global namespace.
* | | Merge pull request #1187 from lioncash/shadowGravatar bunnei2018-08-271-3/+3
|\ \ \ | | | | | | | | registered_cache: Get rid of variable shadowing in ProcessFiles()
| * | | registered_cache: Get rid of variable shadowing in ProcessFiles()Gravatar Lioncash2018-08-271-3/+3
| | |/ | |/| | | | | | | Prevents compiler warnings.
* | | Merge pull request #1176 from lioncash/infoGravatar bunnei2018-08-271-2/+1
|\ \ \ | | | | | | | | svc: Return process title ID if queried in GetInfo()
| * | | svc: Return process title ID if queried in GetInfo()Gravatar Lioncash2018-08-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | We already have the variable itself set up to perform this task, so we can just return its value from the currently executing process instead of always stubbing it to zero.
* | | | Merge pull request #1174 from lioncash/debugGravatar bunnei2018-08-271-0/+1
|\ \ \ \ | | | | | | | | | | debug_utils: Minor individual interface changes
| * | | | debug_utils: Remove unused includesGravatar Lioncash2018-08-241-0/+1
| | |_|/ | |/| | | | | | | | | | | | | | Quite a bit of these aren't necessary directly within the debug_utils header and can be removed or included where actually necessary.
* | | | Merge pull request #1162 from ogniK5377/ttf-pluGravatar bunnei2018-08-271-5/+51
|\ \ \ \ | | | | | | | | | | PL:U Added SharedFonts loading via TTF
| * | | | Addressed plu TTF changesGravatar David Marcec2018-08-241-6/+7
| | | | |
| * | | | Added SharedFonts loading via TTFGravatar David Marcec2018-08-231-5/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By having the following TTF files in your yuzu sysdata directory. You can load sharedfonts via TTF files. FontStandard.ttf FontChineseSimplified.ttf FontExtendedChineseSimplified.ttf FontChineseTraditional.ttf FontKorean.ttf FontNintendoExtended.ttf FontNintendoExtended2.ttf
* | | | | Merge pull request #1168 from lioncash/headerGravatar bunnei2018-08-272-1/+4
|\ \ \ \ \ | | | | | | | | | | | | hid: Move core include to cpp file
| * | | | | hid: Move core include to cpp fileGravatar Lioncash2018-08-232-1/+4
| | |/ / / | |/| | | | | | | | | | | | | | | | | | This isn't required to be in the header. Instead, directly include what this header needs and move it to the cpp file where it belongs.
* | | | | Merge pull request #1171 from lioncash/trueGravatar bunnei2018-08-271-7/+4
|\ \ \ \ \ | | | | | | | | | | | | core: Remove always true conditionals in Load()
| * | | | | core: Remove always true conditionals in Load()Gravatar Lioncash2018-08-241-7/+4
| |/ / / / | | | | | | | | | | | | | | | | | | | | These conditions are always true, since the outer conditional already checks for these conditions.
* | | | / set: Fixed GetAvailableLanguageCodes() to follow the max_entriesGravatar tech4me2018-08-262-8/+45
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rightnow, in games use GetAvailableLanguageCodes(), there is a WriteBuffer() with size larger than the buffer_size. (Core Critical core\hle\kernel\hle_ipc.cpp:WriteBuffer:296: size (0000000000000088) is greater than buffer_size (0000000000000078)) 0x88 = 17(languages) * 8 0x78 = 15(languages) * 8 GetAvailableLanguageCodes() can only support 15 languages. After firmware 4.0.0 there are 17 supported language instead of 15, to enable this GetAvailableLanguageCodes2() need to be used. So GetAvailableLanguageCodes() will be caped at 15 languages. Reference: http://switchbrew.org/index.php/Settings_services
* | | | Merge pull request #1166 from lioncash/typoGravatar Sebastian Valle2018-08-251-1/+1
|\ \ \ \ | |_|_|/ |/| | | filesystem: Fix typo in log message
| * | | filesystem: Fix typo in log messageGravatar Lioncash2018-08-231-1/+1
| |/ /
* | | Merge pull request #1094 from DarkLordZach/nax0Gravatar Mat M2018-08-2427-81/+806
|\ \ \ | | | | | | | | file_sys: Add support for NAX archives
| * | | file_sys/crypto: Fix missing/unnecessary includesGravatar Zach Hilman2018-08-249-5/+10
| | | |
| * | | xci: Ignore NCA files with updates in secureGravatar Zach Hilman2018-08-231-0/+3
| | | |
| * | | content_archive: Add update title detectionGravatar Zach Hilman2018-08-232-0/+11
| | | | | | | | | | | | | | | | This is needed because the title IDs of update NCAs will not use the update title ID. The only sure way to tell is to look for a partition with BKTR crypto.
| * | | key_manager: Eliminate indexed for loopGravatar Zach Hilman2018-08-231-6/+13
| | | |
| * | | key_manager: Create keys dir if it dosen't existGravatar Zach Hilman2018-08-232-0/+2
| | | | | | | | | | | | | | | | On call to WriteKeyToFile, so that the autogenerated file can be written.
| * | | file_sys: Cut down on includes and copiesGravatar Zach Hilman2018-08-237-19/+30
| | | |
| * | | crypto: Eliminate magic constantsGravatar Zach Hilman2018-08-234-32/+38
| | | |
| * | | key_manager: Add support for autogenerated keysGravatar Zach Hilman2018-08-232-3/+45
| | | | | | | | | | | | | | | | Stored in a separate file than manual keys.
| * | | key_manager: Add support for KEK and SD seed derivationGravatar Zach Hilman2018-08-232-5/+135
| | | |
| * | | key_manager: Switch to boost flat_map for keysGravatar Zach Hilman2018-08-232-32/+14
| | | | | | | | | | | | | | | | Should make key gets marginally faster.
| * | | file_sys: Implement NAX containersGravatar Zach Hilman2018-08-233-0/+238
| | | |
| * | | registration: Add GetEntryUnparsed methodsGravatar Zach Hilman2018-08-232-0/+15
| | | | | | | | | | | | | | | | Returns the file before calling parser on it.
| * | | sdmc_factory: Add SDMC RegisteredCache getterGravatar Zach Hilman2018-08-232-1/+14
| | | |
| * | | vfs: Add GetOrCreateDirectoryRelative methodGravatar Zach Hilman2018-08-233-9/+13
| | | |
| * | | filesystem: Add CreateFactories methods to fsGravatar Zach Hilman2018-08-232-8/+11
| | | | | | | | | | | | | | | | Allows frontend to create registration caches for use before a game has booted.
| * | | filesystem: Add logging to registration gettersGravatar Zach Hilman2018-08-231-4/+25
| | | |