aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer_interface.h
Commit message (Collapse)AuthorAgeFilesLines
* video_core: replace Fortune's Weave's DLSS with AMD FSR 3.1Duck91231 hours1-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fire Emblem: Fortune's Weave's DLSS network can't run here, and the temporal stand-in is only an approximation of it. FSR 3.1 takes the same inputs DLSS does: the jittered colour, motion vectors, the jitter and the depth, which the game's first DLSS pass reads through cbuf0+0x298 (Z32, reversed, the colour's size). Kepler compute keeps it next to the motion vectors. Fsr3Upscaler ports the host side of the SDK's ffx_fsr3upscaler.cpp: the eight passes (prepare inputs, luma and shading-change pyramids, shading change, reactivity, luma instability, accumulate, RCAS), the internal images and the constants, recorded through the scheduler with the shaders from externals/FidelityFX-SDK. It takes HDR colour, render-size motion vectors and reversed depth, computes its own exposure, and uses the no-wave SPD variants on devices without compute quad operations. The SDK's GLSL uses separate textures and samplers, so DescriptorBankInfo gains sampled image and sampler counts (default 0). FSR's RCAS follows the RCAS Sharpness slider. The result goes to FSR's own RGBA16F image and is drawn into the game's output, which keeps its format. TextureCacheRuntime::TemporalUpscale runs FSR 3.1 first. Without the depth, at mismatched scales, on a device lacking FSR's formats or features, or if its pipelines fail to build, the stand-in runs instead, and the bilinear blit stays last. EDEN_NX2_DLSS_REPLACEMENT=standin forces the stand-in. A gap of more than 250 ms between evaluations restarts the history. The BlitColor overload that takes a raw image view transitions its source to SHADER_READ_ONLY_OPTIMAL but described it as GENERAL in the descriptor (a validation error); it now describes the layout it uses. Assisted-by: Claude Opus 5.5 (debugging, implementation and drafting) Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
* nx2: read GPU-written command lists from copies instead of drainingTakoroka36 hours1-0/+14
| | | | | | | | | | | | | | | | | | | | | | The trees fix (#52) drains the split and flushes for every command list on a GPU-written page: in a Mario Kart World race ~13,500 lists and ~400 GPU round trips a second, during which the back has nothing to do. The replay ran at ~40 fps instead of ~45. The front now marks the pages those lists are on. The buffer cache notes writes to them; after a compute dispatch or DMA copy that writes one it copies the page into host memory and submits. The front waits for the back only up to the last compute or copy work it sent (not everything queued), then reads the copy once the GPU is done with it. Pages the GPU wrote once, long before, and the CPU now writes lists to have no copy: their first list drains and flushes the whole page, which is then read from guest memory until GPU work writes it again. CPU writes and inline uploads reach guest memory, so they keep such a page synced but make a copy stale. A page a draw writes always drains. Mario Kart World time-trial replay, Radeon 780M: ~40 -> ~45 fps, trees drawn, no list drains left.
* video_core: temporal upscale stand-in for Fortune's Weave's DLSSDuck9122 days1-0/+11
| | | | | | | | | | | | | | | | | The one-frame blit left 3D edges aliased and shaking: the game jitters its camera every frame for DLSS to accumulate. Fire Emblem: Fortune's Weave's first DLSS pass (also rejected) has the motion vectors (cbuf0+0x290, R16G16) and the frame's jitter (+0x1b0/+0x1b4, in input pixels). Kepler compute keeps them, and the stand-in for the last network pass now draws temporal_upscale.frag: input samples placed where the jitter put them and weighted by distance, blended with the previous result reprojected along the motion vectors (Catmull-Rom) and clipped to the 3x3 neighbourhood in YCoCg. The history is copied from the result right after drawing it, so post-processing the game later applies to its output does not feed back. EDEN_NX2_TEMPORAL_UPSCALE=0 restores the blit. Assisted-by: Claude Opus 5.5 (debugging, implementation and drafting) Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
* [video_core, settings] readback for nce invalidations (#4490) optimization ↵xbzk8 days1-0/+9
| | | | | | | | | | | | | | | | | | and nuke toggles (#4502) (#4531) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md). - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Follow up for #4490: Originally i was racing locks between dirty and clean invalidations, but +94% were clean so it was causing useless locks. Solutioin was to share locks between both. P.S.: THIS IS INTENDED TO FIX RANDOM CRASHES IN UE, OBJECTIVELY REPRODUCIBLE IN ENDER MAGNOLIA IN ANDROID. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4531 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
* [Rasterizer]: Implement "Skip CPU Inner Invalidation" hackGamer642025-07-091-2/+5
|
* video_core: simplify accelerated surface fetch and crop handling between APIsLiam2024-01-311-6/+0
|
* SMMU: Initial adaptation to video_core.Fernando Sahmkow2024-01-181-13/+10
|
* gl_rasterizer: Implement DrawTransformFeedback macroAmeer J2023-12-191-0/+8
|
* Revert "video_core: use interval map for page count tracking"liamwhite2023-12-171-1/+1
|
* video_core: use interval map for page count trackingLiam2023-12-141-1/+1
|
* Query Cache: address issuesFernando Sahmkow2023-09-231-2/+3
|
* Query Cachge: Fully rework Vulkan's query cacheFernando Sahmkow2023-09-231-8/+4
|
* Memory Tracking: Optimize tracking to only use atomic writes when contested ↵Fernando Sahmkow2023-06-281-1/+3
| | | | with the host GPU
* GPU: Add Reactive flushingFernando Sahmkow2023-05-071-0/+3
|
* Merge pull request #9556 from vonchenplus/draw_textureliamwhite2023-01-191-0/+3
|\ | | | | video_core: Implement maxwell3d draw texture method
| * video_core: Implement opengl/vulkan draw_textureFeng Chen2023-01-051-0/+3
| |
* | BufferBase: Don't ignore GPU pages.Fernando Sahmkow2023-01-051-1/+1
| |
* | video_core: Cache GPU internal writes.Fernando Sahmkow2023-01-051-0/+7
|/
* Rasterizer: Setup skeleton for Host Conditional renderingFernando Sahmkow2023-01-011-0/+4
|
* RasterizerMemory: Add filtering for flushing/invalidation operations.Fernando Sahmkow2023-01-011-4/+9
|
* MacroHLE: Implement DrawIndexedIndirect & DrawArraysIndirect.Fernando Sahmkow2023-01-011-1/+1
|
* MacroHLE: Add MultidrawIndirect HLE Macro.Fernando Sahmkow2023-01-011-0/+3
|
* general: fix compile for Apple ClangLiam2022-11-221-1/+1
|
* maxwell3d: full HLE for multi-layer clearsLiam2022-11-171-1/+1
|
* video_coare: Reimplementing the maxwell drawing trigger mechanismFengChen2022-10-211-1/+1
|
* DMA & InlineToMemory Engines Rework.bunnei2022-10-061-1/+1
|
* VideoCore: Refactor fencing system.Fernando Sahmkow2022-10-061-2/+5
|
* Texture cache: Fix the remaining issues with memory mnagement and unmapping.Fernando Sahmkow2022-10-061-1/+1
|
* VideoCore: implement channels on gpu caches.Fernando Sahmkow2022-10-061-0/+9
|
* 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.
* Rasterizer: Refactor inlineToMemory.Fernando Sahmkow2022-02-011-2/+2
|
* Rasterizer: Implement Inline2Memory Acceleration.Fernando Sahmkow2022-01-291-0/+3
|
* shader: Remove old shader managementReinUsesLisp2021-07-221-15/+1
|
* accelerateDMA: Fixes and feedback.Fernando Sahmkow2021-07-121-1/+3
|
* accelerateDMA: Accelerate Buffer Copies.Fernando Sahmkow2021-07-111-0/+3
|
* Fence Manager: Add fences on Reference Count.Fernando Sahmkow2021-07-091-0/+3
|
* Texture Cache: Address feedback.Fernando Sahmkow2021-07-041-1/+1
|
* Texture Cache: Initial Implementation of Sparse Textures.Fernando Sahmkow2021-07-041-0/+3
|
* bootmanager: Use std::stop_source for stopping emulationReinUsesLisp2021-06-221-2/+2
| | | | | | | Use its std::stop_token to abort shader cache loading. Using std::stop_token instead of std::atomic_bool allows the usage of other utilities like std::stop_callback.
* buffer_cache: Simplify uniform disabling logicameerj2021-06-011-0/+3
|
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits.
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-2/+10
| | | | | | | | | | | | | | The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
* rasterizer_interface: Make use of [[nodiscard]] where applicableLioncash2020-11-171-8/+9
|
* video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-061-5/+2
| | | | | | | | | 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.
* {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp2020-04-281-0/+3
| | | | | | | | | | | | | Drop MemoryBarrier from the buffer cache and use Maxwell3D's register WaitForIdle. To implement this on OpenGL we just call glMemoryBarrier with the necessary bits. Vulkan lacks this synchronization primitive, so we set an event and immediately wait for it. This is not a pretty solution, but it's what Vulkan can do without submitting the current command buffer to the queue (which ends up being more expensive on the CPU).
* Address Feedback.Fernando Sahmkow2020-04-221-0/+1
|
* FenceManager: Manage syncpoints and rename fences to semaphores.Fernando Sahmkow2020-04-221-2/+5
|
* Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan.Fernando Sahmkow2020-04-221-2/+4
|
* ThreadManager: Sync async reads on accurate gpu.Fernando Sahmkow2020-04-221-6/+4
|
* OpenGL: Implement Fencing backend.Fernando Sahmkow2020-04-221-0/+8
|