summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/nvdrv.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* hle: service: nvdrv: Revert #4981 to remove usage of SleepClientThread.bunnei2020-12-291-3/+3
| | | | - Note, this always processes the ioctl right away, which fixes BotW 1.0.0 issues.
* service: Eliminate usages of the global system instanceLioncash2020-11-271-1/+1
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* nvservices: Reintroducee IoctlCtrlChloe Marcec2020-11-241-3/+3
| | | | Fixes regression caused by #4907 which caused games like Breath of the Wild 1.0.0 not to boot.
* Addressed issuesChloe Marcec2020-11-101-1/+1
|
* core: Make nvservices more standardizedChloe Marcec2020-11-101-7/+16
|
* hle service: nvdrv: Update to instantiate SyncpointManager.bunnei2020-11-011-1/+13
|
* General: Make use of std::nullopt where applicableLioncash2020-09-221-1/+1
| | | | | | | | Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals.
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei2019-11-251-2/+2
| | | | | | * 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.
* Initial implementation of Ioctl2 & Ioctl3David Marcec2019-09-191-2/+3
| | | | Purpose of Ioctl2 and Ioctl3 is to prevent the passing of raw pointers through ioctls
* NVServices: Address FeedbackFernando Sahmkow2019-07-051-7/+16
|
* NVServices: Styling, define constructors as explicit and correctionsFernando Sahmkow2019-07-051-7/+9
|
* NVServices: Correct CtrlEventWaitSync to block the ipc until timeout.Fernando Sahmkow2019-07-051-1/+4
|
* GPU: Correct Interrupts to interrupt on syncpt/value instead of event, mirroring hardwareFernando Sahmkow2019-07-051-1/+3
|
* nv_services: Fixes to event liberation.Fernando Sahmkow2019-07-051-6/+14
|
* nv_services: Deglobalize NvServicesFernando Sahmkow2019-07-051-2/+7
|
* Gpu: Implement Hardware Interrupt Manager and manage GPU interruptsFernando Sahmkow2019-07-051-4/+1
|
* nv_services: Implement NvQueryEvent, NvCtrlEventWait, NvEventRegister, NvEventUnregisterFernando Sahmkow2019-07-051-0/+52
|
* nv_services: Correct buffer queue fencing and GPFifo fencingFernando Sahmkow2019-07-051-7/+1
|
* hle/service: Default constructors and destructors in the cpp file where applicableLioncash2018-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* nvdrv: Get rid of global std::weak_ptrLioncash2018-08-081-3/+5
| | | | | Rather than use global state, we can simply pass the instance into the NVFlinger instance directly.
* service/nvdrv: Take std::string in Open() by const referenceLioncash2018-07-251-1/+1
| | | | | | | | | Avoids copies from being made, since the string is only ever used for lookup, the data is never transfered anywhere. Ideally, we'd use a std::string_view here, but devices is a std::unordered_map, not a std::map, so we can't use heterogenous lookup here.
* nvdrv: Take std::string by const reference in GetDevice()Lioncash2018-07-191-1/+1
| | | | | This is only ever used as a lookup into the device map, so we don't need to take the std::string instance by value here.
* service: Use nested namespace specifiers where applicableLioncash2018-04-201-4/+2
| | | | Tidies up namespace declarations
* Vi: Properly write the BufferProducerFence object in the DequeueBuffer response parcel.Subv2018-02-151-0/+7
|
* nvdrv: stubbed Close(cmd 2)Frederic Meyer2018-01-171-0/+2
|
* NV: Move the nvdrv classes into the Nvidia namespace, and move the functionality to a s single module that services call.Subv2018-01-171-94/+30
|
* clang-formatMerryMage2018-01-161-0/+1
|
* yuzu: Update license text to be consistent across project.bunnei2018-01-131-1/+1
|
* NV: Expose the nvdisp_disp0 device and a weak reference to the nvdrv:a service.Subv2018-01-111-0/+94
| | | | | | 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: Implemented the nvdrv:a service and the /dev/nvmap device.Subv2018-01-111-0/+25