aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/gpu_thread.h
AgeCommit message (Collapse)Author
2024-01-31nvnflinger/gpu: implement layer stack compositionLiam
2024-01-18SMMU: Initial adaptation to video_core.Fernando Sahmkow
2023-03-03gpu_thread: Use bounded queueBehunin
2023-02-07Remove OnCommandListEndCommandBehunin
Call rasterizer->ReleaseFences() directly
2022-11-22general: fix compile for Apple ClangLiam
2022-10-06VideoCore: Refactor syncing.Fernando Sahmkow
2022-10-06VideoCore: implement channels on gpu caches.Fernando Sahmkow
2022-07-06gpu_thread: Use the previous MPSCQueue implementationMorph
The bounded MPSCQueue implementation causes crashes in Fire Emblem Three Houses, use the previous implementation for now.
2022-06-15bounded_threadsafe_queue: Use constexpr capacity and maskMorph
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
2022-06-02gpu_thread: Move to bounded queueLevi Behunin
2022-04-23general: Convert source file copyright comments over to SPDXMorph
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.
2021-10-03gpu: Migrate implementation to the cpp fileameerj
2021-09-15gpu: Use std::jthread for async gpu threadameerj
2021-04-07video_core: Use a CV for blocking commands.Markus Wick
There is no need for a busy loop here. Let's just use a condition variable to save some power.
2021-04-07video_core/gpu_thread: Keep the write lock for allocating the fence.Markus Wick
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.
2021-04-07video_core/gpu_thread: Implement a ShutDown method.Markus Wick
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.
2021-02-28gpu_thread: Remove Async NVDEC placeholdersameerj
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.
2021-02-13gpu: Report renderer errors with exceptionsReinUsesLisp
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.
2020-12-28video_core: gpu: Implement synchronous mode using threaded GPU.bunnei
2020-12-28video_core: gpu: Refactor out synchronous/asynchronous GPU implementations.bunnei
- We must always use a GPU thread now, even with synchronous GPU.
2020-12-04video_core: Resolve more variable shadowing scenariosLioncash
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.
2020-10-26video_core: NVDEC Implementationameerj
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>
2020-04-22GPU: Implement Flush Requests for Async mode.Fernando Sahmkow
2020-04-22OpenGL: Implement Fencing backend.Fernando Sahmkow
2020-04-06GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddrFernando Sahmkow
2020-03-24Frontend/GPU: Refactor context managementJames Rowe
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
2020-02-07gpu_thread: Use MPSCQueue for GPU commands.bunnei
- Necessary for multiple service threads.
2019-10-04Core: Wait for GPU to be idle before shutting down.Fernando Sahmkow
2019-10-04GPU_Async: Correct fences, display events and more.Fernando Sahmkow
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-08-21gpu: Change optional<reference_wrapper<T>> to T* for FramebufferConfigReinUsesLisp
2019-07-05gpu_asynch: Simplify synchronization to a simpler consumer->producer scheme.Fernando Sahmkow
2019-05-19Merge pull request #2467 from lioncash/moveHexagon12
video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainer
2019-05-14yuzu: Remove explicit types from locks where applicableLioncash
With C++17's deduction guides, the type doesn't need to be explicitly specified within locking primitives anymore.
2019-05-14video_core/gpu_thread: Remove redundant copy constructor for ↵Lioncash
CommandDataContainer 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.
2019-04-11video_core/gpu: Create threads separately from initializationLioncash
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.
2019-04-01gpu_thread: Improve synchronization by using CoreTiming.bunnei
2019-04-01general: Use deducation guides for std::lock_guard and std::unique_lockLioncash
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.
2019-03-27gpu_thread: Remove unused dma_pusher class member variable from ThreadManagerLioncash
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.
2019-03-14gpu: Use host address for caching instead of guest address.bunnei
2019-03-07video_core/gpu_thread: Remove unimplemented WaitForIdle function prototypeLioncash
This function didn't have a definition, so we can remove it to prevent accidentally attempting to use it.
2019-03-07video_core/gpu_thread: Amend constructor initializer list orderLioncash
Moves the data members to satisfy the order they're declared as in the constructor initializer list. Silences a -Wreorder warning.
2019-03-06gpu_thread: Fix deadlock with threading idle state check.bunnei
2019-03-06gpu: Move command processing to another thread.bunnei