summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu_thread.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* general: fix compile for Apple ClangLiam2022-11-231-0/+1
|
* VideoCore: Refactor syncing.Fernando Sahmkow2022-10-061-0/+2
|
* VideoCore: implement channels on gpu caches.Fernando Sahmkow2022-10-061-4/+8
|
* gpu_thread: Use the previous MPSCQueue implementationMorph2022-07-061-2/+2
| | | | The bounded MPSCQueue implementation causes crashes in Fire Emblem Three Houses, use the previous implementation for now.
* bounded_threadsafe_queue: Use constexpr capacity and maskMorph2022-06-151-1/+1
| | | | | | | | While this is the primary change, we also: - Remove the mpsc namespace and rename Queue to MPSCQueue - Make Slot a private struct within MPSCQueue - Remove the AlignedAllocator template argument, as we use std::allocator - Replace instances of mask + 1 with capacity, and mask + 2 with capacity + 1
* gpu_thread: Move to bounded queueLevi Behunin2022-06-031-3/+3
|
* 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.
* gpu: Migrate implementation to the cpp fileameerj2021-10-031-3/+0
|
* gpu: Use std::jthread for async gpu threadameerj2021-09-161-9/+4
|
* video_core: Use a CV for blocking commands.Markus Wick2021-04-071-6/+5
| | | | There is no need for a busy loop here. Let's just use a condition variable to save some power.
* video_core/gpu_thread: Keep the write lock for allocating the fence.Markus Wick2021-04-071-1/+2
| | | | | Else the fence might get submited out-of-order into the queue, which makes testing them pointless. Overhead should be tiny as the mutex is just moved from the queue to the writing code.
* video_core/gpu_thread: Implement a ShutDown method.Markus Wick2021-04-071-2/+5
| | | | | | This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone. This should fix a race condition while removing the other subsystems while the GPU is still active.
* gpu_thread: Remove Async NVDEC placeholdersameerj2021-03-011-15/+4
| | | | This commit removes early placeholders for an implementation of async nvdec. With recent changes to the source code, the placeholders are no longer accurate, and can cause a nullptr dereference due to the nature of the cdma_pusher lifetime.
* gpu: Report renderer errors with exceptionsReinUsesLisp2021-02-131-3/+5
| | | | | | Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
* video_core: gpu: Implement synchronous mode using threaded GPU.bunnei2020-12-291-2/+3
|
* video_core: gpu: Refactor out synchronous/asynchronous GPU implementations.bunnei2020-12-291-1/+6
| | | | - We must always use a GPU thread now, even with synchronous GPU.
* video_core: Resolve more variable shadowing scenariosLioncash2020-12-041-13/+12
| | | | | | Resolves variable shadowing scenarios up to the end of the OpenGL code to make it nicer to review. The rest will be resolved in a following commit.
* video_core: NVDEC Implementationameerj2020-10-271-4/+15
| | | | | | | | | | | | | | This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library. The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data. To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library. Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header. Async GPU is not properly implemented at the moment. Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
* GPU: Implement Flush Requests for Async mode.Fernando Sahmkow2020-04-221-2/+6
|
* OpenGL: Implement Fencing backend.Fernando Sahmkow2020-04-221-1/+6
|
* GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddrFernando Sahmkow2020-04-061-9/+9
|
* Frontend/GPU: Refactor context managementJames Rowe2020-03-251-2/+5
| | | | | | | | | | | | | | | | | | | | Changes the GraphicsContext to be managed by the GPU core. This eliminates the need for the frontends to fool around with tricky MakeCurrent/DoneCurrent calls that are dependent on the settings (such as async gpu option). This also refactors out the need to use QWidget::fromWindowContainer as that caused issues with focus and input handling. Now we use a regular QWidget and just access the native windowHandle() directly. Another change is removing the debug tool setting in FrameMailbox. Instead of trying to block the frontend until a new frame is ready, the core will now take over presentation and draw directly to the window if the renderer detects that its hooked by NSight or RenderDoc Lastly, since it was in the way, I removed ScopeAcquireWindowContext and replaced it with a simple subclass in GraphicsContext that achieves the same result
* gpu_thread: Use MPSCQueue for GPU commands.bunnei2020-02-081-1/+1
| | | | - Necessary for multiple service threads.
* Core: Wait for GPU to be idle before shutting down.Fernando Sahmkow2019-10-051-0/+3
|
* GPU_Async: Correct fences, display events and more.Fernando Sahmkow2019-10-051-6/+0
| | | | | | | 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.
* gpu: Change optional<reference_wrapper<T>> to T* for FramebufferConfigReinUsesLisp2019-08-211-2/+1
|
* gpu_asynch: Simplify synchronization to a simpler consumer->producer scheme.Fernando Sahmkow2019-07-051-32/+0
|
* Merge pull request #2467 from lioncash/moveHexagon122019-05-191-6/+0
|\ | | | | video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainer
| * video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainerLioncash2019-05-141-6/+0
| | | | | | | | | | | | | | std::move within a copy constructor (on a data member that isn't mutable) will always result in a copy. Because of that, the behavior of this copy constructor is identical to the one that would be generated automatically by the compiler, so we can remove it.
* | yuzu: Remove explicit types from locks where applicableLioncash2019-05-141-1/+1
|/ | | | | With C++17's deduction guides, the type doesn't need to be explicitly specified within locking primitives anymore.
* video_core/gpu: Create threads separately from initializationLioncash2019-04-121-2/+4
| | | | | | | | | Like with CPU emulation, we generally don't want to fire off the threads immediately after the relevant classes are initialized, we want to do this after all necessary data is done loading first. This splits the thread creation into its own interface member function to allow controlling when these threads in particular get created.
* gpu_thread: Improve synchronization by using CoreTiming.bunnei2019-04-021-40/+31
|
* general: Use deducation guides for std::lock_guard and std::unique_lockLioncash2019-04-011-6/+6
| | | | | | | Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.
* gpu_thread: Remove unused dma_pusher class member variable from ThreadManagerLioncash2019-03-271-3/+0
| | | | | | The pusher instance is only ever used in the constructor of the ThreadManager for creating the thread that the ThreadManager instance contains. Aside from that, the member is unused, so it can be removed.
* gpu: Use host address for caching instead of guest address.bunnei2019-03-151-40/+92
|
* video_core/gpu_thread: Remove unimplemented WaitForIdle function prototypeLioncash2019-03-071-3/+0
| | | | | This function didn't have a definition, so we can remove it to prevent accidentally attempting to use it.
* video_core/gpu_thread: Amend constructor initializer list orderLioncash2019-03-071-2/+2
| | | | | | | Moves the data members to satisfy the order they're declared as in the constructor initializer list. Silences a -Wreorder warning.
* gpu_thread: Fix deadlock with threading idle state check.bunnei2019-03-071-3/+4
|
* gpu: Move command processing to another thread.bunnei2019-03-071-0/+135