summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-02-14vi: rewrite IHOSBinderDriverLiam2-44/+41
2024-02-14vi: rewrite IApplicationRootService, IManagerRootService, ISystemRootServiceLiam11-90/+143
2024-02-14vi: split into implementation filesLiam17-917/+1043
2024-02-14vi: extract typesLiam6-69/+77
2024-02-09nvnflinger/gpu: implement blendingLiam2-2/+17
2024-01-31nvnflinger/gpu: implement layer stack compositionLiam3-6/+18
2024-01-30core: support offline web appletLiam3-3/+12
2024-01-30am: migrate global state to per-applet state structureLiam1-0/+8
2024-01-23service: properly convert buffers to stringsNarr the Reg1-3/+2
2024-01-18vi: check layer state before opening or closingLiam2-6/+17
2024-01-18nvnflinger: ensure display abandonment considers all layers and future layersLiam2-0/+14
2024-01-08vi: connect vsync event handle lifetime to application display service interfaceLiam3-23/+9
2024-01-08vi: fix name of nvnflingerLiam2-27/+27
2023-12-12vi: fix confusion between closing and destroying layersLiam5-16/+44
2023-10-30nvnflinger: use graphic buffer lifetime for map handleLiam1-1/+1
2023-10-01service: nvnflinger: Implement shared bufferNarr the Reg1-9/+120
Co-authored-by: Liam <byteslice@airmail.cc>
2023-08-23general: Use console mode helper across projectlat9nq1-1/+1
2023-08-22general: Convert use_docked_mode to an enumerationlat9nq1-1/+1
Allows some special interactions with it in the Qt frontend.
2023-08-08general: fix incorrect conversionsLiam1-1/+1
2023-08-08core: remove ResultVal typeLiam3-16/+24
2023-05-11nvnflinger: fix Parcel serializationLiam1-4/+8
2023-03-01nvnflinger: fix nameLiam10-61/+61
2023-03-01service: move hle_ipc from kernelLiam8-52/+40
2023-02-25core: Update service function tables to 16.0.0+Narr the Reg2-0/+9
2023-02-21service: refactor server architectureLiam2-19/+15
Converts services to have their own processes
2023-02-14remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistencyarades791-4/+4
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14add static lifetime to constexpr values to force compile time evaluation where possiblearades791-4/+4
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-03Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"ameerj1-2/+2
This reverts commit 25fc5c0e1158cb8e81cbc769b24ad84032a1fbfd, reversing changes made to af20e25081f97d55b451606c87922e2b49f0d363.
2023-02-02Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"liamwhite1-2/+2
2022-12-25nvflinger: Split Parcel class into InputParcel and OutputParcelameerj1-2/+2
The usages of the Parcel class were already unique to either Read or Write operations. Avoids needing a vector of the input payload for the InputParcel use-case, instead it can remain as a span.
2022-10-27vi: implement CloseDisplayLiam2-4/+10
2022-10-17general: Add missing pragma onceMorph1-0/+2
2022-10-13kernel: remove KWritableEventLiam1-2/+1
2022-10-06Core: Fix get nvmap object random crashVonChenPlus2-7/+16
2022-10-06General: Fix compilation for GCCLiam White1-0/+1
2022-09-26service: vi: Retrieve vsync event once per displayMorph3-9/+34
The display vsync event can only be retrieved once per display. Returns VI::ResultPermissionDenied if we attempt to retrieve the vsync event for the same display. Prevents games such as .hack//G.U. Last Recode from consuming all the handles in the handle table by spamming vsync event retrievals and allows it to go in game.
2022-09-26service: vi: Move VI results into its own fileMorph2-16/+25
2022-06-27core: Replace all instances of ResultCode with Resultgerman771-4/+4
2022-04-23general: Convert source file copyright comments over to SPDXMorph12-36/+24
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-02hle: service: vi: Create a service thread where appropriate.bunnei1-1/+2
2022-03-25hle: vi: NativeWindow: Fix trivially copyable issues.bunnei1-4/+4
2022-03-25hle: nvflinger: Migrate android namespace -> Service::android.bunnei2-3/+3
2022-03-25hle: vi: Integrate new NVFlinger and HosBinderDriverServer service.bunnei12-668/+222
2022-02-02general: Move deleted copy/move constructor/assignment operators to public interfaceLioncash1-1/+1
This allows for better compiler errors, where the compiler will state a copy or move couldn't occur due to the relevant function being deleted. Previously a compiler would warn about the relevant function not being accessible (which, while true, isn't as informative as it could be).
2021-11-16Settings: eliminate rescaling_factor.Fernando Sahmkow1-19/+8
2021-11-04core: Remove unused includesameerj1-2/+0
2021-11-02general: Remove MakeResult helpersMorph1-5/+5
This is made obsolete by the presence of implicit constructors.
2021-10-16service/vi: Stub IHOSBinderDriver::TransactParcel GetBufferHistory (#7184)Feng Chen1-1/+11
2021-10-07service: Reduce header include overheadMorph1-1/+0
2021-09-27service/vi: Update to 13.0.0german771-0/+1
2021-09-18input_common/tas: Fallback to simple updateMonsterDruide11-3/+0
2021-09-18core: Hacky TAS syncing & load pausingMonsterDruide11-0/+3
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-04core: hle: service: nvflinger/vi: Improve management of KEvent.bunnei2-10/+20
2021-08-26Revert "kernel: Various improvements to scheduler"bunnei2-20/+10
2021-08-19Fix crash in logging in CreateStrayLayerValeri1-1/+1
It was trying to log value of layer_id which is specifically known not to exist, potentially leading to segfault. Log display_id instead.
2021-08-07core: hle: service: nvflinger/vi: Improve management of KEvent.bunnei2-10/+20
2021-06-02general: Replace RESULT_SUCCESS with ResultSuccessMorph1-29/+29
Transition to PascalCase for result names.
2021-05-16core: Make variable shadowing a compile-time errorLioncash5-21/+21
Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
2021-05-06common: Rename NON_COPYABLE/NON_MOVABLE with YUZU_ prefix.bunnei1-2/+2
2021-05-06hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.bunnei3-7/+5
2021-05-06hle: kernel: Ensure all kernel objects with KAutoObject are properly created.bunnei1-0/+1
2021-05-06hle: kernel: Migrate KEvent to KAutoObject.bunnei2-13/+10
2021-05-06hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.bunnei2-3/+3
2021-04-26service: Eliminate cases of member shadowingLioncash2-21/+20
Resolves a few localized instances of member variable shadowing. Brings us a little closer to turning shadowing warnings into errors.
2021-04-19general: Write buffers before pushing raw argumentsMorph1-2/+6
For consistency with the rest of the service implementations
2021-04-15common: Move settings to common from core.bunnei1-1/+1
- Removes a dependency on core and input_common from common.
2021-04-09vi: Update to 12.xMorph1-0/+8
2021-03-17IApplicationDisplayService: Stub GetIndirectLayerImageMapMorph1-1/+27
Used by games invoking the inline software keyboard such as GNOSIA
2021-02-05hle: kernel: Reimplement KReadableEvent and KWritableEvent.bunnei2-6/+11
2021-02-05hle: kernel: Rename WritableEvent to KWritableEvent.bunnei3-3/+3
2021-02-05hle: kernel: Rename ReadableEvent to KReadableEvent.bunnei3-4/+4
2021-01-29core: hle: kernel: Rename Thread to KThread.bunnei1-1/+1
2020-12-29hle: service: vi: Refactor to grab buffer only once.bunnei1-15/+4
2020-12-29service: nvflinger: Improve synchronization for BufferQueue.bunnei1-8/+11
- Use proper mechanisms for blocking on DequeueBuffer. - Ensure service thread terminates on emulation Shutdown.
2020-12-29hle: service: nvflinger: Refactor locking and interfaces.bunnei1-30/+16
2020-12-29hle: service: vi: Remove usage of SleepClientThread.bunnei1-34/+43
2020-12-17Overwrite slots instead of queuing them, add disconnect signalameerj1-5/+11
Fix for Katana Zero and Yoshi's Crafted World
2020-12-08core: Remove unnecessary enum casts in log callsLioncash1-5/+5
Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
2020-12-07hle: Type check ResponseBuilder::Push arguments, and fix use in vi.cppcomex1-2/+2
- Add a type check so that calling Push with an invalid type produces a compile error rather than a linker error. - vi.cpp was calling Push with a variable of type `std::size_t`. There's no explicit overload for `size_t`, but there is one for `u64`, which on most platforms is the same type as `size_t`. On macOS, however, it isn't: both types are 64 bits, but `size_t` is `unsigned long` and `u64` is `unsigned long long`. Regardless, it makes more sense to explicitly use `u64` here instead of `size_t`.
2020-11-27service: Eliminate usages of the global system instanceLioncash8-31/+54
Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
2020-11-24hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)bunnei8-46/+39
* hle: services: Fix a crash with improper NVFlinger lifetime management. - This crash would happen when attempting to shutdown yuzu early on in boot.
2020-11-16settings: Preparation for per-game input settingsMorph1-1/+1
2020-10-14hle: service: vi: Implement BufferQueue::CancelBuffer.bunnei1-14/+38
- This is used by Super Mario 3D All-Stars.
2020-10-13core/CMakeLists: Make some warnings errorsLioncash1-1/+1
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-08-03yuzu: Resolve C++20 deprecation warnings related to lambda capturesLioncash1-2/+2
C++20 deprecates capturing the this pointer via the '=' capture. Instead, we replace it or extend the capture specification.
2020-07-26nvflinger: Use return value of Lock()Lioncash1-2/+2
comex reported in #4424 that we were incorrectly discarding the return value of Lock() which is correct.
2020-07-21vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfoDavid Marcec1-1/+19
Needed for dark souls and monster hunter
2020-07-10configuration: implement per-game configurations (#4098)lat9nq1-10/+10
* Switch game settings to use a pointer In order to add full per-game settings, we need to be able to tell yuzu to switch to using either the global or game configuration. Using a pointer makes it easier to switch. * configuration: add new UI without changing existing funcitonality The new UI also adds General, System, Graphics, Advanced Graphics, and Audio tabs, but as yet they do nothing. This commit keeps yuzu to the same functionality as originally branched. * configuration: Rename files These weren't included in the last commit. Now they are. * configuration: setup global configuration checkbox Global config checkbox now enables/disables the appropriate tabs in the game properties dialog. The use global configuration setting is now saved to the config, defaulting to true. This also addresses some changes requested in the PR. * configuration: swap to per-game config memory for properties dialog Does not set memory going in-game. Swaps to game values when opening the properties dialog, then swaps back when closing it. Uses a `memcpy` to swap. Also implements saving config files, limited to certain groups of configurations so as to not risk setting unsafe configurations. * configuration: change config interfaces to use config-specific pointers When a game is booted, we need to be able to open the configuration dialogs without changing the settings pointer in the game's emualtion. A new pointer specific to just the configuration dialogs can be used to separate changes to just those config dialogs without affecting the emulation. * configuration: boot a game using per-game settings Swaps values where needed to boot a game. * configuration: user correct config during emulation Creates a new pointer specifically for modifying the configuration while emulation is in progress. Both the regular configuration dialog and the game properties dialog now use the pointer Settings::config_values to focus edits to the correct struct. * settings: split Settings::values into two different structs By splitting the settings into two mutually exclusive structs, it becomes easier, as a developer, to determine how to use the Settings structs after per-game configurations is merged. Other benefits include only duplicating the required settings in memory. * settings: move use_docked_mode to Controls group `use_docked_mode` is set in the input settings and cannot be accessed from the system settings. Grouping it with system settings causes it to be saved with per-game settings, which may make transferring configs more difficult later on, especially since docked mode cannot be set from within the game properties dialog. * configuration: Fix the other yuzu executables and a regression In main.cpp, we have to get the title ID before the ROM is loaded, else the renderer will reflect only the global settings and now the user's game specific settings. * settings: use a template to duplicate memory for each setting Replaces the type of each variable in the Settings::Values struct with a new class that allows basic data reading and writing. The new struct Settings::Setting duplicates the data in memory and can manage global overrides per each setting. * configuration: correct add-ons config and swap settings when apropriate Any add-ons interaction happens directly through the global values struct. Swapping bewteen structs now also includes copying the necessary global configs that cannot be changed nor saved in per-game settings. General and System config menus now update based on whether it is viewing the global or per-game settings. * settings: restore old values struct No longer needed with the Settings::Setting class template. * configuration: implement hierarchical game properties dialog This sets the apropriate global or local data in each setting. * clang format * clang format take 2 can the docker container save this? * address comments and style issues * config: read and write settings with global awareness Adds new functions to read and write settings while keeping the global state in focus. Files now generated per-game are much smaller since often they only need address the global state. * settings: restore global state when necessary Upon closing a game or the game properties dialog, we need to restore all global settings to the original global state so that we can properly open the configuration dialog or boot a different game. * configuration: guard setting values incorrectly This disables setting values while a game is running if the setting is overwritten by a per game setting. * config: don't write local settings in the global config Simple guards to prevent writing the wrong settings in the wrong files. * configuration: add comments, assume less, and clang format No longer assumes that a disabled UI element means the global state is turned off, instead opting to directly answer that question. Still however assumes a game is running if it is in that state. * configuration: fix a logic error Should not be negated * restore settings' global state regardless of accept/cancel Fixes loading a properties dialog and causing the global config dialog to show local settings. * fix more logic errors Fixed the frame limit would set the global setting from the game properties dialog. Also strengthened the Settings::Setting member variables and simplified the logic in config reading (ReadSettingGlobal). * fix another logic error In my efforts to guard RestoreGlobalState, I accidentally negated the IsPowered condition. * configure_audio: set toggle_stretched_audio to tristate * fixed custom rtc and rng seed overwriting the global value * clang format * rebased * clang format take 4 * address my own review Basically revert unintended changes * settings: literal instead of casting "No need to cast, use 1U instead" Thanks, Morph! Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> * Revert "settings: literal instead of casting " This reverts commit 95e992a87c898f3e882ffdb415bb0ef9f80f613f. * main: fix status buttons reporting wrong settings after stop emulation * settings: Log UseDockedMode in the Controls group This should have happened when use_docked_mode was moved over to the controls group internally. This just reflects this in the log. * main: load settings if the file has a title id In other words, don't exit if the loader has trouble getting a title id. * use a zero * settings: initalize resolution factor with constructor instead of casting * Revert "settings: initalize resolution factor with constructor instead of casting" This reverts commit 54c35ecb46a29953842614620f9b7de1aa9d5dc8. * configure_graphics: guard device selector when Vulkan is global Prevents the user from editing the device selector if Vulkan is the global renderer backend. Also resets the vulkan_device variable when the users switches back-and-forth between global and Vulkan. * address reviewer concerns Changes function variables to const wherever they don't need to be changed. Sets Settings::Setting to final as it should not be inherited from. Sets ConfigurationShared::use_global_text to static. Co-Authored-By: VolcaEM <volcaem@users.noreply.github.com> * main: load per-game settings after LoadROM This prevents `Restart Emulation` from restoring the global settings *after* the per-game settings were applied. Thanks to BSoDGamingYT for finding this bug. * Revert "main: load per-game settings after LoadROM" This reverts commit 9d0d48c52d2dcf3bfb1806cc8fa7d5a271a8a804. * main: only restore global settings when necessary Loading the per-game settings cannot happen after the ROM is loaded, so we have to specify when to restore the global state. Again thanks to BSoD for finding the bug. * configuration_shared: address reviewer concerns except operator overrides Dropping operator override usage in next commit. Co-Authored-By: LC <lioncash@users.noreply.github.com> * settings: Drop operator overrides from Setting template Requires using GetValue and SetValue explicitly. Also reverts a change that broke title ID formatting in the game properties dialog. * complete rebase * configuration_shared: translate "Use global configuration" Uses ConfigurePerGame to do so, since its usage, at least as of now, corresponds with ConfigurationShared. * configure_per_game: address reviewer concern As far as I understand, it prevents the program from unnecessarily copying strings. Co-Authored-By: LC <lioncash@users.noreply.github.com> Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> Co-authored-by: VolcaEM <volcaem@users.noreply.github.com> Co-authored-by: LC <lioncash@users.noreply.github.com>
2020-06-29service: Update function tablesVolcaEM2-0/+3
2020-06-27NVFlinger: Lock race condition between CPU, Host Timing, VSync.Fernando Sahmkow1-0/+2
2020-04-29Don't fail silently for vi, sm, set and ns servicesDavid Marcec1-0/+9
2020-04-24vi: Don't let uninitialized data pass as a response for SetBufferCountDavid Marcec1-1/+9
Currently SetBufferCount doesn't write to the out buffer which then contains uninitialized data. This leads to non-zero data which leads to responding with different error codes
2020-04-16CMakeLists: Specify -Wextra on linux buildsLioncash1-2/+2
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
2020-04-10service/vi: Partially implement BufferQueue disconnectReinUsesLisp1-10/+36
2020-01-04service: vi: Implement CloseLayer.bunnei3-11/+39
- Needed for Undertale.
2019-11-25kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei3-3/+3
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details.
2019-11-12service: Update function tablesLioncash1-0/+6
Keeps the function tables up to date. Updated based off information from Switchbrew.
2019-11-12service: Resolve sign conversion errorsLioncash1-1/+1
These are fairly trivial to resolve and most of the changes entail using RESULT_UNKNOWN over ResultCode(-1).
2019-11-04common_func: Use std::array for INSERT_PADDING_* macros.bunnei1-1/+1
- Zero initialization here is useful for determinism.
2019-11-03kernel: events: Remove ResetType::Automatic.bunnei1-2/+2
- This does not actually seem to exist in the real kernel - games reset these automatically. # Conflicts: # src/core/hle/service/am/applets/applets.cpp # src/core/hle/service/filesystem/fsp_srv.cpp
2019-09-22Deglobalize System: ViDavid Marcec2-3/+3
2019-07-05NVServices: Address FeedbackFernando Sahmkow1-3/+2
2019-07-05nv_services: Correct buffer queue fencing and GPFifo fencingFernando Sahmkow1-30/+16
2019-07-05nvflinger: Implement swap intervalsFernando Sahmkow1-2/+3
2019-05-18core/kernel/object: Rename ResetType enum membersLioncash1-1/+1
Renames the members to more accurately indicate what they signify. "OneShot" and "Sticky" are kind of ambiguous identifiers for the reset types, and can be kind of misleading. Automatic and Manual communicate the kind of reset type in a clearer manner. Either the event is automatically reset, or it isn't and must be manually cleared. The "OneShot" and "Sticky" terminology is just a hold-over from Citra where the kernel had a third type of event reset type known as "Pulse". Given the Switch kernel only has two forms of event reset types, we don't need to keep the old terminology around anymore.
2019-05-18HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThreadWeiyi Wang1-1/+1
This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads)
2019-04-04hle/service: Resolve unused variable warningsLioncash1-1/+0
In several places, we have request parsers where there's nothing to really parse, simply because the HLE function in question operates on buffers. In these cases we can just remove these instances altogether. In the other cases, we can retrieve the relevant members from the parser and at least log them out, giving them some use.
2019-04-04core: Add missing override specifiers where applicableLioncash1-4/+0
Applies the override specifier where applicable. In the case of destructors that are defaulted in their definition, they can simply be removed. This also removes the unnecessary inclusions being done in audin_u and audrec_u, given their close proximity.
2019-02-27common/math_util: Move contents into the Common namespaceLioncash1-1/+1
These types are within the common library, so they should be within the Common namespace.
2019-02-27service/vi: Unstub GetDisplayServiceLioncash5-11/+49
This function is also supposed to check its given policy type with the permission of the service itself. This implements the necessary machinery to unstub these functions. Policy::User seems to just be basic access (which is probably why vi:u is restricted to that policy), while the other policy seems to be for extended abilities regarding which displays can be managed and queried, so this is assumed to be for a background compositor (which I've named, appropriately, Policy::Compositor).
2019-02-26service/vi: Remove use of a module classLioncash8-46/+99
This didn't really provide much benefit here, especially since the subsequent change requires that the behavior for each service's GetDisplayService differs in a minor detail. This also arguably makes the services nicer to read, since it gets rid of an indirection in the class hierarchy.
2019-02-25service/vi: Update IManagerDisplayService's function tableLioncash1-0/+1
Amends it to add the 7.0.0+ CreateStrayLayer function.
2019-02-22service/nvflinger: Store BufferQueue instances as regular data membersLioncash5-29/+22
The NVFlinger service is already passed into services that need to guarantee its lifetime, so the BufferQueue instances will already live as long as they're needed. Making them std::shared_ptr instances in this case is unnecessary.
2019-02-21service/vi/vi_layer: Convert Layer struct into a classLioncash4-5/+38
Like the previous changes made to the Display struct, this prepares the Layer struct for changes to its interface. Given Layer will be given more invariants in the future, we convert it into a class to better signify that.
2019-02-21service/nvflinger: Move display specifics over to vi_displayLioncash2-1/+120
With the display and layer structures relocated to the vi service, we can begin giving these a proper interface before beginning to properly support the display types. This converts the display struct into a class and provides it with the necessary functions to preserve behavior within the NVFlinger class.
2019-02-20service/nvflinger: Relocate definitions of Layer and Display to the vi serviceLioncash4-0/+89
These are more closely related to the vi service as opposed to the intermediary nvflinger. This also places them in their relevant subfolder, as future changes to these will likely result in subclassing to represent various displays and services, as they're done within the service itself on hardware. The reasoning for prefixing the display and layer source files is to avoid potential clashing if two files with the same name are compiled (e.g. if 'display.cpp/.h' or 'layer.cpp/.h' is added to another service at any point), which MSVC will actually warn against. This prevents that case from occurring. This also presently coverts the std::array introduced within f45c25aabacc70861723a7ca1096a677bd987487 back to a std::vector to allow the forward declaration of the Display type. Forward declaring a type within a std::vector is allowed since the introduction of N4510 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4510.html) by Zhihao Yuan.
2019-02-06service/nvflinger,service/vi: Handle failure cases with exposed APILioncash1-10/+50
Converts many of the Find* functions to return a std::optional<T> as opposed to returning the raw return values directly. This allows removing a few assertions and handles error cases like the service itself does.
2019-02-05service/nvflinger: Rename GetVsyncEvent() to FindVsyncEvent()Lioncash1-1/+1
This was missed within #2075. Renames the member function to make it consistent with the rest of the Find* functions.
2019-01-30service/nvflinger: Rename Get prefix on function to FindLioncash1-5/+5
This more accurately describes what the function is actually attempting to do (it's not a simple trivial getter).
2019-01-28service/vi: Remove stubbed notifier from SetLayerVisibilityLioncash1-2/+3
This appears to be a vestigial API function that's only kept around for compatibility's sake, given the function only returns a success error code and exits. Since that's the case, we can remove the stubbed notification from the log, since doing nothing is technically the correct behavior in this case.
2019-01-05service/vi: Correct scaling mode conversionsLioncash1-15/+13
These values are not equivalent, based off RE. The internal value is put into a lookup table with the following values: [3, 0, 1, 2, 4] So the values absolutely do not map 1:1 like the comment was indicating.
2019-01-05service/vi: Factor out scaling mode conversions from the IPC function itselfLioncash1-17/+21
Avoids entangling the IPC buffer appending with the actual operation of converting the scaling values over. This also inserts the proper error handling for invalid scaling values.
2019-01-05service/vi: Unstub IApplicationDisplayService' SetLayerScalingMode()Lioncash1-21/+38
This appears to only check if the scaling mode can actually be handled, rather than actually setting the scaling mode for the layer. This implements the same error handling performed on the passed in values.
2019-01-05service/vi: Correct reported dimensions from IApplicationDisplayService's GetDisplayResolution()Lioncash1-12/+8
Within the actual service, it makes no distinguishing between docked and undocked modes. This will always return the constants values reporting 1280x720 as the dimensions.
2019-01-03service/vi: Implement SetDisplayEnabled()Lioncash1-1/+10
This IPC command is simply a stub inside the actual service itself, and just returns a successful error code regardless of input. This is likely only retained in the service interface to not break older code that relied upon it succeeding in some way.
2019-01-03service/vi: Log more information where applicableLioncash1-63/+74
In many cases, we didn't bother to log out any of the popped data members. This logs them out to the console within the logging call to provide more contextual information.
2019-01-03service/vi: Implement OpenDefaultDisplay in terms of OpenDisplayLioncash1-4/+17
Internally within the vi services, this is essentially all that OpenDefaultDisplay does, so it's trivial to just do the same, and forward the default display string into the function.
2019-01-02service/vi: Correct initial width and height valuesLioncash1-2/+2
Based off RE, it appears that almost all display types seem to use 1920x1080 except for a few (null display, edid display).
2019-01-02service/vi: Document unknown DisplayInfo struct membersLioncash1-2/+13
It appears that the two members indicate whether a display has a bounded number of layers (and if set, the second member indicates the total number of layers).
2019-01-01core/kernel: Remove unnecessary inclusionsLioncash1-0/+1
Gets rid of a few unnecessary header dependencies in some source files.
2018-11-30Services/VI: Dereferencing an uninitialized std::optional is undefined behavior.Subv1-0/+2
Assert that it is not empty before using it in the DequeueBuffer wait callback.
2018-11-29hle_ipc: Refactor SleepClientThread to avoid ReadableEventZach Hilman1-1/+1
2018-11-29core: Port all current usages of Event to Readable/WritableEventZach Hilman1-2/+3
2018-11-26Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec1-13/+25
2018-11-19Removed hard coded values for width and heightDavid Marcec1-2/+4
2018-11-17vi: Implement TransactParcel for Disconnect and DetachBufferZach Hilman1-0/+22
Used by homebrew on exit. According to switchbrew, returns an empty response parcel with one zero in it.
2018-11-16Report resolution scaling support for vi and amDavid Marcec1-9/+21
Specifying an internal resolution in yuzu now will report the scaled changes to vi and am.
2018-10-30global: Use std::optional instead of boost::optional (#1578)Frederic L1-4/+5
* get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
2018-10-16Implement VI ConvertScalingMode (#1475)David1-1/+49
* Implement VI ConvertScalingMode * Fixed push enum * Scale mode now uses Nintendo scale mode as an enum as well
2018-09-30Implement ISystemDisplayService::GetDisplayModeraven021-1/+19
2018-09-19Removed the use of rp.MakeBuilderDavid Marcec1-15/+15
Due to keeping the code style consistent in the yuzu codebase. `rb = rp.MakeBuilder(...)` was replaced with `rb{ctx, ...}`
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-4/+4
2018-09-13service/vi: Replace includes with forward declarations where applicableLioncash2-6/+8
2018-09-13kernel/thread: Include thread-related enums within the kernel namespaceLioncash1-1/+1
Previously, these were sitting outside of the Kernel namespace, which doesn't really make sense, given they're related to the Thread class which is within the Kernel namespace.
2018-09-11hle/service: Default constructors and destructors in the cpp file where applicableLioncash8-0/+12
When a destructor isn't defaulted into a cpp file, it can cause the use of forward declarations to seemingly fail to compile for non-obvious reasons. It also allows inlining of the construction/destruction logic all over the place where a constructor or destructor is invoked, which can lead to code bloat. This isn't so much a worry here, given the services won't be created and destroyed frequently. The cause of the above mentioned non-obvious errors can be demonstrated as follows: ------- Demonstrative example, if you know how the described error happens, skip forwards ------- Assume we have the following in the header, which we'll call "thing.h": \#include <memory> // Forward declaration. For example purposes, assume the definition // of Object is in some header named "object.h" class Object; class Thing { public: // assume no constructors or destructors are specified here, // or the constructors/destructors are defined as: // // Thing() = default; // ~Thing() = default; // // ... Some interface member functions would be defined here private: std::shared_ptr<Object> obj; }; If this header is included in a cpp file, (which we'll call "main.cpp"), this will result in a compilation error, because even though no destructor is specified, the destructor will still need to be generated by the compiler because std::shared_ptr's destructor is *not* trivial (in other words, it does something other than nothing), as std::shared_ptr's destructor needs to do two things: 1. Decrement the shared reference count of the object being pointed to, and if the reference count decrements to zero, 2. Free the Object instance's memory (aka deallocate the memory it's pointing to). And so the compiler generates the code for the destructor doing this inside main.cpp. Now, keep in mind, the Object forward declaration is not a complete type. All it does is tell the compiler "a type named Object exists" and allows us to use the name in certain situations to avoid a header dependency. So the compiler needs to generate destruction code for Object, but the compiler doesn't know *how* to destruct it. A forward declaration doesn't tell the compiler anything about Object's constructor or destructor. So, the compiler will issue an error in this case because it's undefined behavior to try and deallocate (or construct) an incomplete type and std::shared_ptr and std::unique_ptr make sure this isn't the case internally. Now, if we had defaulted the destructor in "thing.cpp", where we also include "object.h", this would never be an issue, as the destructor would only have its code generated in one place, and it would be in a place where the full class definition of Object would be visible to the compiler. ---------------------- End example ---------------------------- Given these service classes are more than certainly going to change in the future, this defaults the constructors and destructors into the relevant cpp files to make the construction and destruction of all of the services consistent and unlikely to run into cases where forward declarations are indirectly causing compilation errors. It also has the plus of avoiding the need to rebuild several services if destruction logic changes, since it would only be necessary to recompile the single cpp file.
2018-07-23vi: Add std::is_trivially_copyable checks to Read and Write functionsLioncash1-2/+13
It's undefined behavior to memcpy an object that isn't considered trivially copyable, so put a compile-time check in to make sure this doesn't occur.
2018-07-23vi: std::move std::vector in constructors where applicableLioncash1-9/+9
Allows avoiding unnecessary copies of the vector depending on the calling code. While we're at it, remove a redundant no-parameter base constructor call
2018-07-19hle/service: Make constructors explicit where applicableLioncash2-4/+4
Prevents implicit construction and makes these lingering non-explicit constructors consistent with the rest of the other classes in services.
2018-07-18vi: Change TransactionId::CancelBuffer to LOG_CRITICAL.bunnei1-1/+1
2018-07-18vi: Fix size for ListDisplays default display.bunnei1-2/+2
2018-07-18vi: Partially implement buffer crop parameters.bunnei1-4/+10
2018-07-17nvflinger: Fix for BufferQueue event handling.bunnei1-4/+4
2018-07-03Update clang formatJames Rowe1-3/+3
2018-07-03Rename logging macro back to LOG_*James Rowe1-24/+24
2018-05-02general: Make formatting of logged hex values more straightforwardLioncash1-2/+2
This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
2018-04-24vi: Move logging macros over to new fmt-compatible onesLioncash1-26/+27
2018-04-20service: Use nested namespace specifiers where applicableLioncash8-32/+16
Tidies up namespace declarations
2018-04-20vi: Remove redundant initializers in the constructorsLioncash1-9/+5
2018-04-17Service/VI: stub SetLayerVisibility, fix GetDisplayResolution outputmailwl1-7/+27
both SetLayerVisibility() functions used in Lego games, GetDisplayResolution() fixed according switchbrew.org
2018-04-17Various service name fixes - part 2 (rebased) (#322)Hexagon122-2/+112
* Updated ACC with more service names * Updated SVC with more service names * Updated set with more service names * Updated sockets with more service names * Updated SPL with more service names * Updated time with more service names * Updated vi with more service names
2018-04-13Fixed normal params in GetDisplayResolutionHexagon121-1/+1
2018-04-03vi: Implement GetDisplayResolution.bunnei2-0/+26
2018-03-21Service/vi: convert services to modulemailwl8-212/+160
2018-03-19Clean Warnings (?)N00byKing1-1/+1
2018-03-19vi: Remove DequeueBuffer and wait until next available buffer.bunnei1-6/+24
2018-02-17Parcel: Ensure we don't read past the end of the parcels in Vi.Subv1-0/+5
2018-02-17Vi: Mark all fences as NO_FENCE in the DequeueBuffer response parcel.Subv1-2/+2
2018-02-17Vi: Always write the IGBPBuffer in the RequestBuffer response parcel.Subv1-1/+2
This may break libnx homebrew due to a bug in libnx but is required by official games since they always assume that the buffer will be there.
2018-02-15Vi: Mark the fences as valid in the DequeueBuffer response parcel.Subv1-0/+3
2018-02-15Vi: Added a missing u32 in the DequeueBuffer response parcel.Subv1-0/+1
2018-02-15Vi: Don't write the IGBPBuffer in the IGBPRequestBufferResponseParcel.Subv1-4/+2
2018-02-15Vi: Properly write the BufferProducerFence object in the DequeueBuffer response parcel.Subv1-18/+21
2018-02-14vi: Eliminate direct usage of BufferDescriptorB.bunnei1-14/+3
2018-02-14vi: Use ReadBuffer/WriteBuffer functions for TransactParcel.bunnei1-44/+19
2018-02-14vi: Fix TransactParcelAuto to support both buffer formats.bunnei1-25/+16
2018-02-13vi: Add FENCE_HACK, which is useful for booting BOTW.bunnei1-7/+21
2018-02-13vi: Stub TransactParcel CancelBuffer.bunnei1-0/+2
2018-02-13TransactParcel: Move WriteBlock to narrowest scope.bunnei1-10/+13
2018-02-12vi: Parse IGBPQueueBufferRequestParcel params and expose buffer flip vertical.bunnei1-5/+21
2018-02-11vi: Fix OpenLayer and CreateStrayLayer.bunnei1-6/+8
2018-02-10vi: Implement TransactParcelAuto.bunnei1-32/+46
2018-02-10IGBPQueueBufferRequestParcel: Don't enforce buffer length.bunnei1-1/+0
- Another fix for libnx.
2018-02-10IGBPRequestBufferResponseParcel: Fix response for libnx.bunnei1-7/+4
2018-02-09IApplicationDisplayService::CloseDisplay: Fix response params size.bunnei1-1/+1
2018-02-07Service: stub some functions in am, audio, time, vi servicesmailwl2-1/+22
2018-02-05logger: Add VI service logging category.bunnei4-21/+20
2018-02-02Services/vi: add vi:s and vi:u servicesmailwl5-0/+124
2018-02-02vi::CreateStrayLayer : add padding to requestmailwl1-0/+1
2018-01-25hle: Rename RequestBuilder to ResponseBuilder.bunnei2-19/+19
2018-01-25service: Fix all incorrect IPC response headers.bunnei2-5/+6
2018-01-22Services: Vi shouldn't be responsible for creating nvflinger.Subv4-6/+8
It is now created during Service initialization and passed to all the services that need it.
2018-01-22VI: Move BufferQueue and NVFlinger to their own folder/namespace.Subv4-363/+25
2018-01-21VI: Implement the Query transaction of IHOSBinderDriver, and stubbed some results.Subv2-0/+58
2018-01-20Fixes some cast warnings, partial port of citra #3064 (#106)River City Ransomware1-1/+1
* Fixes some cast warnings, partially fixes citra #3064 * Converted casts to uint32_t to u32 * Ran clang-format
2018-01-19Fix dispdrv typogdkchan1-1/+1
2018-01-18vi: Make constructors explicit where applicableLioncash1-13/+14
Prevents implicit conversions.
2018-01-18vi: Add missing override specifiersLioncash1-7/+7
2018-01-18vi: Copy data directly into the std::vector within Parcel's ReadBlock functionLioncash1-2/+3
Previously this would unnecessarily zero-initialize the vector before copying the actual data into the vector instance.
2018-01-17NV: Move the nvdrv classes into the Nvidia namespace, and move the functionality to a s single module that services call.Subv1-3/+3
2018-01-17VI: Stubbed GetNativeHandle, Create/DestroyStrayLayer and CloseDisplaySubv2-3/+85
2018-01-15vi: Add IManagerDisplayService::CloseDisplay functionbsaleil1-0/+10
2018-01-15renderer: Render previous frame when no new one is available.bunnei1-1/+4
2018-01-13yuzu: Update license text to be consistent across project.bunnei4-4/+4
2018-01-12core: Include <algorithm> where used.bunnei1-0/+2
2018-01-11NV: Move the nv device nodes to their own directory and namespace.Subv1-1/+2
2018-01-11VI: Use a Pulse event instead of OneShot for the vblank events.Subv1-1/+1
This prevents missing frames if the vblank fires between the DequeueBuffer and Wait(vsync) calls
2018-01-11vi: Use new CoreTiming::EventTypebunnei1-1/+5
2018-01-11NV: Expose the nvdisp_disp0 device and a weak reference to the nvdrv:a service.Subv2-2/+16
NVFlinger will call into the nvdisp_disp0 device to perform screen flips, bypassing the ioctl interface. We now have the address of the framebuffer to draw, we just need to actually put it on the screen.
2018-01-11NV: Determine what buffer to draw for each layer of each display.Subv2-13/+58
Don't try to draw buffers that the guest application is using, only queued buffers are eligible for drawing. Drawing actual pixels is still not implemented.
2018-01-11NV: Signal all display's vsync event 60 times per second.Subv2-1/+32
2018-01-11NV: Give each display its own vsync event.Subv2-12/+29
2018-01-11NV: Keep track of Displays, Layers and BufferQueues in nvflinger.Subv4-41/+261
2018-01-11NV: Implemented (with stubs) the vi:m service and some of its subservices.Subv4-0/+714
The homebrew display test application now properly writes graphics data to the graphics buffer but we still don't have a way to compose the display layers.