summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvnflinger/nvnflinger.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-10-30nvnflinger: implement consumer abandonmentLiam1-0/+2
2023-10-22kernel: update KProcessLiam1-3/+0
2023-10-01service: nvnflinger: Implement shared bufferNarr the Reg1-0/+9
Co-authored-by: Liam <byteslice@airmail.cc>
2023-08-08core: remove ResultVal typeLiam1-1/+1
2023-06-22general: remove atomic signal and waitLiam1-1/+2
2023-03-01nvnflinger: fix nameLiam1-5/+5
2023-01-12nvnflinger: correct swap interval handlingLiam1-1/+1
2022-11-23general: fix compile for Apple ClangLiam1-0/+1
2022-10-27vi: implement CloseDisplayLiam1-0/+5
2022-10-23core: barrier service thread shutdownLiam1-0/+2
2022-10-13kernel: remove KWritableEventLiam1-1/+0
2022-10-06NVDRV: Fix Open/Close and make sure each device is correctly created.Fernando Sahmkow1-0/+1
2022-09-26service: vi: Retrieve vsync event once per displayMorph1-2/+4
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-08-02Rework multi-core vsyncKelebek11-1/+4
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-1/+1
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-03-25hle: nvflinger: Remove unused unordered_map include.bunnei1-1/+0
2022-03-25hle: nvflinger: Migrate android namespace -> Service::android.bunnei1-2/+2
2022-03-25hle: vi: Integrate new NVFlinger and HosBinderDriverServer service.bunnei1-10/+17
2021-10-03nvflinger: Use jthread and stop_token for VSync threadameerj1-9/+2
Avoids a destruction data race that may occur on the vsync thread
2021-09-04core: hle: service: nvflinger/vi: Improve management of KEvent.bunnei1-0/+3
2021-08-26Revert "kernel: Various improvements to scheduler"bunnei1-3/+0
2021-08-07core: hle: service: nvflinger/vi: Improve management of KEvent.bunnei1-0/+3
2021-05-16core: Make variable shadowing a compile-time errorLioncash1-1/+1
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-06nvflinger: Create layers when they are queried but not foundameerj1-1/+9
Fixes Shantae softlock on boot.
2021-05-06hle: kernel: Remove deprecated Object class.bunnei1-1/+0
2021-05-06hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.bunnei1-1/+1
2021-05-06hle: kernel: Migrate KEvent to KAutoObject.bunnei1-2/+3
2021-02-05hle: kernel: Rename WritableEvent to KWritableEvent.bunnei1-1/+1
2021-02-05hle: kernel: Rename ReadableEvent to KReadableEvent.bunnei1-2/+2
2020-12-29service: nvflinger: Improve synchronization for BufferQueue.bunnei1-1/+1
- Use proper mechanisms for blocking on DequeueBuffer. - Ensure service thread terminates on emulation Shutdown.
2020-12-29hle: service: nvflinger: Refactor locking and interfaces.bunnei1-5/+2
2020-08-13General: Tidy up clang-format warnings part 2Lioncash1-4/+6
2020-07-26nvflinger: Mark interface functions with return values as [[nodiscard]]Lioncash1-16/+14
Not using the return value of these functions are undeniably the source of a bug. This way we allow compilers to loudly make any future misuses evident.
2020-07-26nvflinger: Use return value of Lock()Lioncash1-1/+1
comex reported in #4424 that we were incorrectly discarding the return value of Lock() which is correct.
2020-06-27NvFlinger: Clang Format.Fernando Sahmkow1-1/+1
2020-06-27Services/NvFlinger: Do vSync in a sepparate thread on Multicore.Fernando Sahmkow1-0/+14
2020-06-27NVFlinger: Lock race condition between CPU, Host Timing, VSync.Fernando Sahmkow1-0/+7
2020-01-04service: vi: Implement CloseLayer.bunnei1-0/+3
- Needed for Undertale.
2019-11-27core_timing: Use better reference tracking for EventType. (#3159)bunnei1-1/+1
* core_timing: Use better reference tracking for EventType. - Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects. - Removes need for unique names - we won't be using this for save states anyways.
2019-11-25kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei1-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.
2019-10-05NVFlinger: Reverse the change that only signaled events on buffer acquire.Fernando Sahmkow1-2/+0
This has been hardware tested and it seems that NVFlinger will still signal even if there are no buffers to present.
2019-10-05GPU_Async: Correct fences, display events and more.Fernando Sahmkow1-0/+2
This commit uses guest fences on vSync event instead of an articial fake fence we had. It also corrects to keep signaling display events while loading the game as the OS is suppose to send buffers to vSync during that time.
2019-09-22RebaseDavid Marcec1-4/+1
2019-09-22Deglobalize System: NvFlingerDavid Marcec1-1/+3
2019-07-05NVServices: Styling, define constructors as explicit and correctionsFernando Sahmkow1-1/+1
2019-07-05nvflinger: Implement swap intervalsFernando Sahmkow1-0/+4
2019-02-22service/nvflinger: Store BufferQueue instances as regular data membersLioncash1-2/+5
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 classLioncash1-1/+1
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_displayLioncash1-1/+1
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 serviceLioncash1-32/+11
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-16core_timing: Convert core timing into a classLioncash1-2/+6
Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
2019-02-12core_timing: Rename CoreTiming namespace to Core::TimingLioncash1-3/+3
Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace.
2019-02-06service/nvflinger,service/vi: Handle failure cases with exposed APILioncash1-7/+16
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: Mark FindVsyncEvent() as a const member functionLioncash1-1/+1
This member function doesn't actually modify instance state, so it can be marked as a const member function.
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: Make FindBufferQueueId() a const member functionLioncash1-1/+7
This member function doesn't actually modify instance state, so it can be const-qualified.
2019-01-30service/nvflinger: Rename Get prefix on function to FindLioncash1-10/+10
This more accurately describes what the function is actually attempting to do (it's not a simple trivial getter).
2019-01-30nvflinger: Add the Null displayLioncash1-1/+2
In addition to the default, external, EDID, and internal displays, there's also a null display provided as well, which as the name suggests, does nothing but discard all commands given to it. This is provided for completeness.
2019-01-30nvflinger: Use a std::array for the available displays instead of std::vectorLioncash1-1/+7
The built-in set of displays is fixed, so we can utilize an array instead of a vector here.
2018-11-29kernel/event: Reference ReadableEvent from WritableEventZach Hilman1-1/+1
2018-11-29core: Port all current usages of Event to Readable/WritableEventZach Hilman1-3/+8
2018-09-11hle/service: Default constructors and destructors in the cpp file where applicableLioncash1-2/+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.
2018-08-08nvdrv: Get rid of global std::weak_ptrLioncash1-0/+9
Rather than use global state, we can simply pass the instance into the NVFlinger instance directly.
2018-08-07nvflinger: Get rid of indirect inclusionsLioncash1-1/+4
2018-08-07nvflinger: Use std::string_view in OpenDisplay()Lioncash1-1/+2
We don't need to use a std::string here, given all that's done is comparing the character sequence against another. This allows passing regular const char* without needing to heap allocate.
2018-04-20service: Use nested namespace specifiers where applicableLioncash1-4/+2
Tidies up namespace declarations
2018-01-22VI: Move BufferQueue and NVFlinger to their own folder/namespace.Subv1-0/+84