diff options
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
| -rw-r--r-- | src/video_core/rasterizer_interface.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h index b527c0e2a9..e9eaa2b3c2 100644 --- a/src/video_core/rasterizer_interface.h +++ b/src/video_core/rasterizer_interface.h @@ -6,6 +6,7 @@ #pragma once +#include <array> #include <functional> #include <optional> #include <span> @@ -93,6 +94,20 @@ public: virtual void FlushRegion(DAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; + /// Switch 2, from the GPU thread's front: where a GPU-written command list's words are. + enum class GpuWrittenList { + Unknown, ///< Neither: the caller drains, flushes the page and notes it synced + Copied, ///< `out` (within one 4 KiB page) is filled from the copy made after its writer + Synced, ///< Guest memory holds the page: no GPU work wrote it since it was flushed + }; + virtual GpuWrittenList ReadGpuWrittenCommandList([[maybe_unused]] DAddr addr, + [[maybe_unused]] std::span<u8> out) { + return GpuWrittenList::Unknown; + } + + /// Switch 2: the front flushed this command list page with the split drained. + virtual void NoteGpuWrittenCommandListSynced([[maybe_unused]] DAddr page) {} + /// Check if the the specified memory area requires flushing to CPU Memory. virtual bool MustFlushRegion(DAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0; @@ -162,6 +177,16 @@ public: return false; } + /// Stand-in for a DLSS evaluation: temporal upscale of src into dst along motion_vectors + /// (jitter in src pixels; motion_scale turns a motion vector into a UV offset to the previous + /// frame). False when unsupported; the caller then falls back to AccelerateSurfaceCopy. + [[nodiscard]] virtual bool AccelerateTemporalUpscale( + const Tegra::Engines::Fermi2D::Surface& src, const Tegra::Engines::Fermi2D::Surface& dst, + const Tegra::Engines::Fermi2D::Surface& motion_vectors, std::array<f32, 2> jitter, + std::array<f32, 2> motion_scale) { + return false; + } + [[nodiscard]] virtual Tegra::Engines::AccelerateDMAInterface& AccessAccelerateDMA() = 0; virtual void AccelerateInlineToMemory(GPUVAddr address, size_t copy_size, |
