summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi/vi.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* vi: manage resources independently of nvnflinger and refactorLiam2024-02-181-20/+11
|
* vi: move shared buffer management from nvnflingerLiam2024-02-181-3/+13
|
* nvnflinger: convert to processLiam2024-02-181-7/+11
|
* vi: rewrite IApplicationRootService, IManagerRootService, ISystemRootServiceLiam2024-02-141-34/+0
|
* vi: split into implementation filesLiam2024-02-141-882/+9
|
* vi: extract typesLiam2024-02-141-43/+1
|
* nvnflinger/gpu: implement layer stack compositionLiam2024-01-311-2/+3
|
* am: migrate global state to per-applet state structureLiam2024-01-301-0/+8
|
* service: properly convert buffers to stringsNarr the Reg2024-01-231-3/+2
|
* vi: check layer state before opening or closingLiam2024-01-181-2/+12
|
* vi: connect vsync event handle lifetime to application display service interfaceLiam2024-01-081-0/+7
|
* vi: fix name of nvnflingerLiam2024-01-081-26/+26
|
* vi: fix confusion between closing and destroying layersLiam2023-12-121-0/+3
|
* service: nvnflinger: Implement shared bufferNarr the Reg2023-10-011-9/+120
| | | | Co-authored-by: Liam <byteslice@airmail.cc>
* general: Use console mode helper across projectlat9nq2023-08-231-1/+1
|
* general: Convert use_docked_mode to an enumerationlat9nq2023-08-221-1/+1
| | | | Allows some special interactions with it in the Qt frontend.
* general: fix incorrect conversionsLiam2023-08-081-1/+1
|
* core: remove ResultVal typeLiam2023-08-081-13/+20
|
* nvnflinger: fix Parcel serializationLiam2023-05-111-4/+8
|
* nvnflinger: fix nameLiam2023-03-011-17/+17
|
* service: move hle_ipc from kernelLiam2023-03-011-32/+32
|
* Merge pull request #9832 from liamwhite/hle-mpliamwhite2023-03-011-11/+13
|\ | | | | service: HLE multiprocess
| * service: refactor server architectureLiam2023-02-211-11/+13
| | | | | | | | Converts services to have their own processes
* | core: Update service function tables to 16.0.0+Narr the Reg2023-02-251-0/+5
|/
* Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"ameerj2023-02-031-2/+2
| | | | | This reverts commit 25fc5c0e1158cb8e81cbc769b24ad84032a1fbfd, reversing changes made to af20e25081f97d55b451606c87922e2b49f0d363.
* Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"liamwhite2023-02-021-2/+2
|
* nvflinger: Split Parcel class into InputParcel and OutputParcelameerj2022-12-251-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.
* vi: implement CloseDisplayLiam2022-10-271-4/+4
|
* General: Fix compilation for GCCLiam White2022-10-061-0/+1
|
* service: vi: Retrieve vsync event once per displayMorph2022-09-261-5/+9
| | | | | | 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.
* service: vi: Move VI results into its own fileMorph2022-09-261-16/+12
|
* core: Replace all instances of ResultCode with Resultgerman772022-06-271-4/+4
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | 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.
* hle: service: vi: Create a service thread where appropriate.bunnei2022-04-021-1/+2
|
* hle: vi: NativeWindow: Fix trivially copyable issues.bunnei2022-03-251-4/+4
|
* hle: vi: Integrate new NVFlinger and HosBinderDriverServer service.bunnei2022-03-251-616/+74
|
* Settings: eliminate rescaling_factor.Fernando Sahmkow2021-11-161-19/+8
|
* core: Remove unused includesameerj2021-11-041-2/+0
|
* general: Remove MakeResult helpersMorph2021-11-021-5/+5
| | | | This is made obsolete by the presence of implicit constructors.
* service/vi: Stub IHOSBinderDriver::TransactParcel GetBufferHistory (#7184)Feng Chen2021-10-161-1/+11
|
* service/vi: Update to 13.0.0german772021-09-271-0/+1
|
* Fix crash in logging in CreateStrayLayerValeri2021-08-191-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.
* general: Replace RESULT_SUCCESS with ResultSuccessMorph2021-06-021-29/+29
| | | | Transition to PascalCase for result names.
* core: Make variable shadowing a compile-time errorLioncash2021-05-161-12/+12
| | | | | | 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.
* hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.bunnei2021-05-061-4/+2
|
* hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.bunnei2021-05-061-2/+2
|
* general: Write buffers before pushing raw argumentsMorph2021-04-191-2/+6
| | | | For consistency with the rest of the service implementations
* common: Move settings to common from core.bunnei2021-04-151-1/+1
| | | | - Removes a dependency on core and input_common from common.
* vi: Update to 12.xMorph2021-04-091-0/+8
|
* IApplicationDisplayService: Stub GetIndirectLayerImageMapMorph2021-03-171-1/+27
| | | | Used by games invoking the inline software keyboard such as GNOSIA
* hle: kernel: Rename WritableEvent to KWritableEvent.bunnei2021-02-051-1/+1
|
* hle: kernel: Rename ReadableEvent to KReadableEvent.bunnei2021-02-051-1/+1
|
* core: hle: kernel: Rename Thread to KThread.bunnei2021-01-291-1/+1
|
* hle: service: vi: Refactor to grab buffer only once.bunnei2020-12-291-15/+4
|
* service: nvflinger: Improve synchronization for BufferQueue.bunnei2020-12-291-8/+11
| | | | | - Use proper mechanisms for blocking on DequeueBuffer. - Ensure service thread terminates on emulation Shutdown.
* hle: service: nvflinger: Refactor locking and interfaces.bunnei2020-12-291-30/+16
|
* hle: service: vi: Remove usage of SleepClientThread.bunnei2020-12-291-34/+43
|
* Overwrite slots instead of queuing them, add disconnect signalameerj2020-12-171-5/+11
| | | | Fix for Katana Zero and Yoshi's Crafted World
* core: Remove unnecessary enum casts in log callsLioncash2020-12-081-5/+5
| | | | | Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
* hle: Type check ResponseBuilder::Push arguments, and fix use in vi.cppcomex2020-12-071-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`.
* service: Eliminate usages of the global system instanceLioncash2020-11-271-19/+22
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)bunnei2020-11-241-30/+27
| | | | | | * hle: services: Fix a crash with improper NVFlinger lifetime management. - This crash would happen when attempting to shutdown yuzu early on in boot.
* settings: Preparation for per-game input settingsMorph2020-11-161-1/+1
|
* hle: service: vi: Implement BufferQueue::CancelBuffer.bunnei2020-10-141-14/+38
| | | | - This is used by Super Mario 3D All-Stars.
* core/CMakeLists: Make some warnings errorsLioncash2020-10-131-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.
* Merge pull request #4401 from ogniK5377/GetIndirectLayerImageRequiredMemoryInfobunnei2020-08-051-1/+19
|\ | | | | vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfo
| * vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfoDavid Marcec2020-07-211-1/+19
| | | | | | | | Needed for dark souls and monster hunter
* | yuzu: Resolve C++20 deprecation warnings related to lambda capturesLioncash2020-08-031-2/+2
| | | | | | | | | | C++20 deprecates capturing the this pointer via the '=' capture. Instead, we replace it or extend the capture specification.
* | nvflinger: Use return value of Lock()Lioncash2020-07-261-2/+2
|/ | | | | comex reported in #4424 that we were incorrectly discarding the return value of Lock() which is correct.
* Merge pull request #4203 from VolcaEM/servicesbunnei2020-07-111-0/+2
|\ | | | | service: Update function tables
| * service: Update function tablesVolcaEM2020-06-291-0/+2
| |
* | configuration: implement per-game configurations (#4098)lat9nq2020-07-101-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>
* | NVFlinger: Lock race condition between CPU, Host Timing, VSync.Fernando Sahmkow2020-06-271-0/+2
|/
* Don't fail silently for vi, sm, set and ns servicesDavid Marcec2020-04-291-0/+9
|
* vi: Don't let uninitialized data pass as a response for SetBufferCountDavid Marcec2020-04-241-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
* CMakeLists: Specify -Wextra on linux buildsLioncash2020-04-161-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.
* service/vi: Partially implement BufferQueue disconnectReinUsesLisp2020-04-101-10/+36
|
* service: vi: Implement CloseLayer.bunnei2020-01-041-1/+13
| | | | - Needed for Undertale.
* Merge pull request #3094 from lioncash/tablesbunnei2019-11-251-0/+6
|\ | | | | service: Update function tables
| * service: Update function tablesLioncash2019-11-121-0/+6
| | | | | | | | | | | | Keeps the function tables up to date. Updated based off information from Switchbrew.
* | kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei2019-11-251-1/+1
| | | | | | | | | | | | * 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.
* | service: Resolve sign conversion errorsLioncash2019-11-121-1/+1
|/ | | | | These are fairly trivial to resolve and most of the changes entail using RESULT_UNKNOWN over ResultCode(-1).
* common_func: Use std::array for INSERT_PADDING_* macros.bunnei2019-11-041-1/+1
| | | | - Zero initialization here is useful for determinism.
* NVServices: Address FeedbackFernando Sahmkow2019-07-051-3/+2
|
* nv_services: Correct buffer queue fencing and GPFifo fencingFernando Sahmkow2019-07-051-30/+16
|
* nvflinger: Implement swap intervalsFernando Sahmkow2019-07-051-2/+3
|
* HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThreadWeiyi Wang2019-05-181-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)
* Merge pull request #2334 from lioncash/overridebunnei2019-04-061-4/+0
|\ | | | | core: Add missing override specifiers where applicable
| * core: Add missing override specifiers where applicableLioncash2019-04-041-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.
* | hle/service: Resolve unused variable warningsLioncash2019-04-041-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.
* Merge pull request #2166 from lioncash/vi-init-servicebunnei2019-03-131-11/+27
|\ | | | | service/vi: Unstub GetDisplayService
| * service/vi: Unstub GetDisplayServiceLioncash2019-02-271-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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).
| * service/vi: Remove use of a module classLioncash2019-02-261-14/+7
| | | | | | | | | | | | | | | | | | 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.
* | common/math_util: Move contents into the Common namespaceLioncash2019-02-271-1/+1
| | | | | | | | | | These types are within the common library, so they should be within the Common namespace.
* | service/vi: Update IManagerDisplayService's function tableLioncash2019-02-251-0/+1
|/ | | | Amends it to add the 7.0.0+ CreateStrayLayer function.
* service/nvflinger: Store BufferQueue instances as regular data membersLioncash2019-02-221-13/+13
| | | | | | | 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.
* service/nvflinger,service/vi: Handle failure cases with exposed APILioncash2019-02-061-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.
* service/nvflinger: Rename GetVsyncEvent() to FindVsyncEvent()Lioncash2019-02-051-1/+1
| | | | | This was missed within #2075. Renames the member function to make it consistent with the rest of the Find* functions.
* service/nvflinger: Rename Get prefix on function to FindLioncash2019-01-301-5/+5
| | | | | This more accurately describes what the function is actually attempting to do (it's not a simple trivial getter).
* service/vi: Remove stubbed notifier from SetLayerVisibilityLioncash2019-01-281-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.
* Merge pull request #1989 from lioncash/setbunnei2019-01-071-39/+58
|\ | | | | service/vi: Unstub IApplicationDisplayService's SetLayerScalingMode
| * service/vi: Correct scaling mode conversionsLioncash2019-01-051-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.
| * service/vi: Factor out scaling mode conversions from the IPC function itselfLioncash2019-01-051-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.
| * service/vi: Unstub IApplicationDisplayService' SetLayerScalingMode()Lioncash2019-01-051-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.
* | service/vi: Correct reported dimensions from IApplicationDisplayService's GetDisplayResolution()Lioncash2019-01-051-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.
* Merge pull request #1975 from lioncash/vibunnei2019-01-041-4/+15
|\ | | | | service/vi: Minor updates and corrections to the DisplayInfo struct
| * service/vi: Correct initial width and height valuesLioncash2019-01-021-2/+2
| | | | | | | | | | Based off RE, it appears that almost all display types seem to use 1920x1080 except for a few (null display, edid display).
| * service/vi: Document unknown DisplayInfo struct membersLioncash2019-01-021-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).
* | Merge pull request #1976 from lioncash/displaybunnei2019-01-031-4/+17
|\ \ | | | | | | service/vi: Implement OpenDefaultDisplay in terms of OpenDisplay
| * | service/vi: Implement OpenDefaultDisplay in terms of OpenDisplayLioncash2019-01-031-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.
* | service/vi: Implement SetDisplayEnabled()Lioncash2019-01-031-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.
* | Merge pull request #1977 from lioncash/vi-logbunnei2019-01-031-63/+74
|\ \ | | | | | | service/vi: Log more information where applicable
| * | service/vi: Log more information where applicableLioncash2019-01-031-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.
* / core/kernel: Remove unnecessary inclusionsLioncash2019-01-011-0/+1
|/ | | | Gets rid of a few unnecessary header dependencies in some source files.
* Merge pull request #1803 from DarkLordZach/k-able-eventbunnei2018-12-031-2/+3
|\ | | | | kernel: Divide Event into ReadableEvent and WritableEvent
| * hle_ipc: Refactor SleepClientThread to avoid ReadableEventZach Hilman2018-11-291-1/+1
| |
| * core: Port all current usages of Event to Readable/WritableEventZach Hilman2018-11-291-2/+3
| |
* | Services/VI: Dereferencing an uninitialized std::optional is undefined behavior.Subv2018-11-301-0/+2
|/ | | | Assert that it is not empty before using it in the DequeueBuffer wait callback.
* Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec2018-11-261-13/+25
|
* Merge pull request #1708 from ogniK5377/res-scalebunnei2018-11-241-9/+23
|\ | | | | Report resolution scaling support for vi and am
| * Removed hard coded values for width and heightDavid Marcec2018-11-191-2/+4
| |
| * Report resolution scaling support for vi and amDavid Marcec2018-11-161-9/+21
| | | | | | | | Specifying an internal resolution in yuzu now will report the scaled changes to vi and am.
* | vi: Implement TransactParcel for Disconnect and DetachBufferZach Hilman2018-11-171-0/+22
|/ | | | Used by homebrew on exit. According to switchbrew, returns an empty response parcel with one zero in it.
* global: Use std::optional instead of boost::optional (#1578)Frederic L2018-10-301-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
* Implement VI ConvertScalingMode (#1475)David2018-10-161-1/+49
| | | | | | | | * Implement VI ConvertScalingMode * Fixed push enum * Scale mode now uses Nintendo scale mode as an enum as well
* Merge pull request #1338 from raven02/service_vibunnei2018-09-301-1/+19
|\ | | | | Implement ISystemDisplayService::GetDisplayMode
| * Implement ISystemDisplayService::GetDisplayModeraven022018-09-301-1/+19
| |
* | Removed the use of rp.MakeBuilderDavid Marcec2018-09-191-15/+15
| | | | | | | | Due to keeping the code style consistent in the yuzu codebase. `rb = rp.MakeBuilder(...)` was replaced with `rb{ctx, ...}`
* | Merge pull request #1312 from lioncash/fwdbunnei2018-09-171-3/+6
|\ \ | | | | | | service/vi: Replace includes with forward declarations where applicable
| * | service/vi: Replace includes with forward declarations where applicableLioncash2018-09-131-3/+6
| | |
* | | Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-4/+4
| |/ |/|
* | kernel/thread: Include thread-related enums within the kernel namespaceLioncash2018-09-131-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.
* hle/service: Default constructors and destructors in the cpp file where applicableLioncash2018-09-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* vi: Add std::is_trivially_copyable checks to Read and Write functionsLioncash2018-07-231-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.
* vi: std::move std::vector in constructors where applicableLioncash2018-07-231-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
* hle/service: Make constructors explicit where applicableLioncash2018-07-191-2/+2
| | | | | Prevents implicit construction and makes these lingering non-explicit constructors consistent with the rest of the other classes in services.
* vi: Change TransactionId::CancelBuffer to LOG_CRITICAL.bunnei2018-07-181-1/+1
|
* vi: Fix size for ListDisplays default display.bunnei2018-07-181-2/+2
|
* vi: Partially implement buffer crop parameters.bunnei2018-07-181-4/+10
|
* nvflinger: Fix for BufferQueue event handling.bunnei2018-07-171-4/+4
|
* Update clang formatJames Rowe2018-07-031-3/+3
|
* Rename logging macro back to LOG_*James Rowe2018-07-031-24/+24
|
* general: Make formatting of logged hex values more straightforwardLioncash2018-05-021-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).
* vi: Move logging macros over to new fmt-compatible onesLioncash2018-04-241-26/+27
|
* Merge pull request #340 from mailwl/vi-updatebunnei2018-04-201-7/+27
|\ | | | | Service/VI: stub SetLayerVisibility, fix GetDisplayResolution output
| * Service/VI: stub SetLayerVisibility, fix GetDisplayResolution outputmailwl2018-04-171-7/+27
| | | | | | | | | | both SetLayerVisibility() functions used in Lego games, GetDisplayResolution() fixed according switchbrew.org
* | Merge pull request #360 from lioncash/namespacesbunnei2018-04-201-4/+2
|\ \ | | | | | | service: Use nested namespace specifiers where applicable
| * | service: Use nested namespace specifiers where applicableLioncash2018-04-201-4/+2
| |/ | | | | | | Tidies up namespace declarations
* / vi: Remove redundant initializers in the constructorsLioncash2018-04-201-9/+5
|/
* Various service name fixes - part 2 (rebased) (#322)Hexagon122018-04-171-1/+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
* Fixed normal params in GetDisplayResolutionHexagon122018-04-131-1/+1
|
* vi: Implement GetDisplayResolution.bunnei2018-04-031-0/+19
|
* Service/vi: convert services to modulemailwl2018-03-211-109/+133
|
* Clean Warnings (?)N00byKing2018-03-191-1/+1
|
* vi: Remove DequeueBuffer and wait until next available buffer.bunnei2018-03-191-6/+24
|
* Parcel: Ensure we don't read past the end of the parcels in Vi.Subv2018-02-171-0/+5
|
* Vi: Mark all fences as NO_FENCE in the DequeueBuffer response parcel.Subv2018-02-171-2/+2
|
* Vi: Always write the IGBPBuffer in the RequestBuffer response parcel.Subv2018-02-171-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.
* Vi: Mark the fences as valid in the DequeueBuffer response parcel.Subv2018-02-151-0/+3
|
* Vi: Added a missing u32 in the DequeueBuffer response parcel.Subv2018-02-151-0/+1
|
* Vi: Don't write the IGBPBuffer in the IGBPRequestBufferResponseParcel.Subv2018-02-151-4/+2
|
* Vi: Properly write the BufferProducerFence object in the DequeueBuffer response parcel.Subv2018-02-151-18/+21
|
* vi: Eliminate direct usage of BufferDescriptorB.bunnei2018-02-141-14/+3
|
* vi: Use ReadBuffer/WriteBuffer functions for TransactParcel.bunnei2018-02-141-44/+19
|
* vi: Fix TransactParcelAuto to support both buffer formats.bunnei2018-02-141-25/+16
|
* vi: Add FENCE_HACK, which is useful for booting BOTW.bunnei2018-02-131-7/+21
|
* vi: Stub TransactParcel CancelBuffer.bunnei2018-02-131-0/+2
|
* TransactParcel: Move WriteBlock to narrowest scope.bunnei2018-02-131-10/+13
|
* vi: Parse IGBPQueueBufferRequestParcel params and expose buffer flip vertical.bunnei2018-02-121-5/+21
|
* vi: Fix OpenLayer and CreateStrayLayer.bunnei2018-02-111-6/+8
|
* vi: Implement TransactParcelAuto.bunnei2018-02-101-32/+46
|
* IGBPQueueBufferRequestParcel: Don't enforce buffer length.bunnei2018-02-101-1/+0
| | | | - Another fix for libnx.
* IGBPRequestBufferResponseParcel: Fix response for libnx.bunnei2018-02-101-7/+4
|
* IApplicationDisplayService::CloseDisplay: Fix response params size.bunnei2018-02-091-1/+1
|
* Service: stub some functions in am, audio, time, vi servicesmailwl2018-02-071-1/+21
|
* logger: Add VI service logging category.bunnei2018-02-051-18/+17
|
* Merge pull request #154 from mailwl/vi_create_stray_arraybunnei2018-02-021-0/+1
|\ | | | | vi::CreateStrayLayer : add padding to request
| * vi::CreateStrayLayer : add padding to requestmailwl2018-02-021-0/+1
| |
* | Services/vi: add vi:s and vi:u servicesmailwl2018-02-021-0/+4
|/
* hle: Rename RequestBuilder to ResponseBuilder.bunnei2018-01-251-18/+18
|
* service: Fix all incorrect IPC response headers.bunnei2018-01-251-4/+4
|
* Services: Vi shouldn't be responsible for creating nvflinger.Subv2018-01-221-2/+3
| | | | It is now created during Service initialization and passed to all the services that need it.
* VI: Move BufferQueue and NVFlinger to their own folder/namespace.Subv2018-01-221-234/+16
|
* VI: Implement the Query transaction of IHOSBinderDriver, and stubbed some results.Subv2018-01-211-0/+51
|
* Fixes some cast warnings, partial port of citra #3064 (#106)River City Ransomware2018-01-201-1/+1
| | | | | | | | * Fixes some cast warnings, partially fixes citra #3064 * Converted casts to uint32_t to u32 * Ran clang-format
* Fix dispdrv typogdkchan2018-01-191-1/+1
|
* Merge pull request #90 from lioncash/vi-overridebunnei2018-01-181-20/+21
|\ | | | | vi: Minor clean up/correctness changes
| * vi: Make constructors explicit where applicableLioncash2018-01-181-13/+14
| | | | | | | | Prevents implicit conversions.
| * vi: Add missing override specifiersLioncash2018-01-181-7/+7
| |
* | vi: Copy data directly into the std::vector within Parcel's ReadBlock functionLioncash2018-01-181-2/+3
|/ | | | | Previously this would unnecessarily zero-initialize the vector before copying the actual data into the vector instance.
* NV: Move the nvdrv classes into the Nvidia namespace, and move the functionality to a s single module that services call.Subv2018-01-171-3/+3
|
* VI: Stubbed GetNativeHandle, Create/DestroyStrayLayer and CloseDisplaySubv2018-01-171-3/+76
|
* vi: Add IManagerDisplayService::CloseDisplay functionbsaleil2018-01-151-0/+10
|
* renderer: Render previous frame when no new one is available.bunnei2018-01-151-1/+4
|
* yuzu: Update license text to be consistent across project.bunnei2018-01-131-1/+1
|
* core: Include <algorithm> where used.bunnei2018-01-121-0/+2
|
* NV: Move the nv device nodes to their own directory and namespace.Subv2018-01-111-1/+2
|
* VI: Use a Pulse event instead of OneShot for the vblank events.Subv2018-01-111-1/+1
| | | | This prevents missing frames if the vblank fires between the DequeueBuffer and Wait(vsync) calls
* NV: Expose the nvdisp_disp0 device and a weak reference to the nvdrv:a service.Subv2018-01-111-1/+14
| | | | | | 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.
* NV: Determine what buffer to draw for each layer of each display.Subv2018-01-111-5/+47
| | | | | | 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.
* NV: Signal all display's vsync event 60 times per second.Subv2018-01-111-0/+24
|
* NV: Give each display its own vsync event.Subv2018-01-111-8/+17
|
* NV: Keep track of Displays, Layers and BufferQueues in nvflinger.Subv2018-01-111-39/+160
|
* NV: Implemented (with stubs) the vi:m service and some of its subservices.Subv2018-01-111-0/+628
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.