summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.h
AgeCommit message (Collapse)Author
2025-01-27android: Fix compilation by adding missing log.h includeZephyron
Adds missing include for common/logging/log.h in gpu.h which was causing compilation failures on Android. This header is needed for logging functionality used in GPU-related operations. The include was previously indirectly available through other headers, but making it explicit improves code clarity and prevents potential future compilation issues.
2025-01-21service/nvdrv: Relax GPU validation and improve error handlingZephyron
Relaxes validation checks in the NVDRV GPU service and improves error notifier handling to prevent potential hangs. Key changes: - Remove strict size validation in SetErrorNotifier - Relax GPFIFO entry count validation to only check for non-zero values - Add proper error notifier state tracking in GPU class - Improve debug logging messages The previous strict validation was causing issues with some games like ACNH. These changes maintain necessary checks while being more permissive with edge cases that don't impact functionality. Technical changes: - Store error notifier state in GPU class for future implementation - Remove upper bound check on GPFIFO entries - Simplify error notifier setup flow This should resolve hanging issues while maintaining core functionality.
2025-01-20service/nvdrv: Implement stubbed GPU functionsZephyron
Implements several previously stubbed functions in the NVDRV service: - Initialize proper transfer memory handling - Add error notifier configuration - Implement channel timeout and timeslice management - Add object context allocation and tracking - Add GPU interface stubs for new functionality The changes improve the accuracy of GPU-related operations while maintaining compatibility with the existing codebase. All functions now properly validate parameters and handle endianness correctly using _le types.
2025-01-14Revert incorrect copyright attribution for non-contributed filesZephyron
- In commit b3facaa6bb30cdc39f2b7d632fef1e3bfeee7785, the copyright header was updated to include "Citron Homebrew Project" across multiple files, regardless of whether any contributions were made. - This commit removes the incorrect attribution and reverts the copyright header to its previous state. - Copyright attribution should only be added when meaningful contributions have been made to the file. - This commit ensures proper compliance with copyright standards and maintains correct attribution to the respective contributors. - Special thanks to Tachi for pointing out the need for these corrections and ensuring that proper attribution practices are followed.
2024-12-31chore: update project references and add Citron copyrightZephyron
- Replaced all references to the old project name with Citron. - Added Citron copyright information alongside existing notices in all files.
2024-02-26video_core: make gpu context aware of rendering programLiam
2024-02-09nvnflinger/gpu: implement applet captureLiam
2024-01-31nvnflinger/gpu: implement layer stack compositionLiam
2024-01-18SMMU: Initial adaptation to video_core.Fernando Sahmkow
2023-06-28Memory Tracking: Optimize tracking to only use atomic writes when contested ↵Fernando Sahmkow
with the host GPU
2023-05-07GPU: Add Reactive flushingFernando Sahmkow
2022-11-24GPU: Implement additional render target formats.Fernando Sahmkow
2022-11-24Fermi2D: Implement Bilinear software filtering and address feedback.Fernando Sahmkow
2022-10-07Update 3D regsKelebek1
2022-10-06VideoCore: Refactor fencing system.Fernando Sahmkow
2022-10-06NVDRV: Further refactors and eliminate old code.Fernando Sahmkow
2022-10-06NVDRV: Refactor Host1xFernando Sahmkow
2022-10-06VideoCore: Refactor syncing.Fernando Sahmkow
2022-10-06Texture cache: Fix the remaining issues with memory mnagement and unmapping.Fernando Sahmkow
2022-10-06VideoCore: implement channels on gpu caches.Fernando Sahmkow
2022-10-06NvHost: Remake Ctrl Implementation.Fernando Sahmkow
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.
2022-03-24hle: vi: Integrate new NVFlinger and HosBinderDriverServer service.bunnei
2022-01-25gpu: Tidy up forward declarationsLioncash
Over time a few forward declarations became unnecessary, so we can remove these to tidy up the header a little bit.
2022-01-25gpu: Remove obsoleted CDMAPusher() accessorsLioncash
These were obsoleted in 2c47f8aa1886522898b5b3a73185b5662be3e9f3 but were accidentally overlooked.
2022-01-03gpu: Add shut down method to synchronize threads before destructionameerj
2022-01-03Revert "Merge pull request #7668 from ameerj/fence-stop-token"ameerj
This reverts commit e7733544779f2706d108682dd027d44e7fa5ff4b, reversing changes made to abbbdc2bc027ed7af236625ae8427a46df63f7e7.
2022-01-03gpu: Use std::stop_token in WaitFence for VSync threadameerj
Fixes a hang that may occur when stopping emulation and the VSync thread is blocked on the syncpoint condition variable.
2021-12-02Support multiple videos playingFeng Chen
2021-11-17video_core: Add S8_UINT stencil formatMorph
2021-10-03nvhost_ctrl: Refactor usage of gpu.LockSync()ameerj
This seems to only be used to protect a later gpu function call. So we can move the lock into that call instead.
2021-10-03gpu: Migrate implementation to the cpp fileameerj
2021-09-15gpu: Use std::jthread for async gpu threadameerj
2021-05-29video_core: gpu: WaitFence: Do not block threads during shutdown.bunnei
- Fixes a hang on shutdown when NVFlinger thread is waiting on a syncpoint that will never occur. - Commonly observed when stopping emulation in Super Mario Odyssey.
2021-05-15perf_stats: Rework FPS counter to be more accurateameerj
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case. This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics. The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values. The status bar update frequency was also changed from 2 seconds to 500ms.
2021-04-24nvhost_vic: Fix device closureameerj
Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation. Also cleans up some of the surrounding code.
2021-04-16Merge pull request #6125 from ogniK5377/nvdec-close-devbunnei
nvdrv: Cleanup CDMA Processor on device closure
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-03-30nvdrv: Cleanup CDMA Processor on device closureChloe Marcec
Brings us a step closer to unifying all channels to share a common interface.
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.
2021-01-15common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITReinUsesLisp
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
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-11-17gpu: Make use of [[nodiscard]] where applicableLioncash
2020-11-05General: Fix clang buildLioncash
Allows building on clang to work again
2020-11-01video_core: gpu: Implement WaitFence and IncrementSyncPoint.bunnei
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-09-06video_core: Remove all Core::System references in rendererReinUsesLisp
Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
2020-08-22video_core: Initialize renderer with a GPUReinUsesLisp
Add an extra step in GPU initialization to be able to initialize render backends with a valid GPU instance.