Commit graph

93 commits

Author SHA1 Message Date
Fernando Sahmkow
6bc60f78d9 GPU: Add Reactive flushing 2023-05-07 23:46:12 +02:00
liamwhite
1bd93d9f3b Merge pull request #9556 from vonchenplus/draw_texture
video_core: Implement maxwell3d draw texture method
2023-01-19 14:58:53 -05:00
Fernando Sahmkow
d777ec15f8 BufferBase: Don't ignore GPU pages. 2023-01-05 14:00:10 -05:00
Fernando Sahmkow
8eafb91af0 video_core: Cache GPU internal writes. 2023-01-05 05:23:39 -05:00
Feng Chen
3b5e1a24bc video_core: Implement opengl/vulkan draw_texture 2023-01-05 12:41:33 +08:00
Fernando Sahmkow
ea140a70fa Rasterizer: Setup skeleton for Host Conditional rendering 2023-01-01 16:43:58 -05:00
Fernando Sahmkow
3ea10762d2 RasterizerMemory: Add filtering for flushing/invalidation operations. 2023-01-01 16:43:58 -05:00
Fernando Sahmkow
b5b0ec9429 MacroHLE: Implement DrawIndexedIndirect & DrawArraysIndirect. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow
f2f2784817 MacroHLE: Add MultidrawIndirect HLE Macro. 2023-01-01 16:43:57 -05:00
Liam
5a712bb51a general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
Liam
e219606128 maxwell3d: full HLE for multi-layer clears 2022-11-17 08:31:43 -05:00
FengChen
8eed4e7ee5 video_coare: Reimplementing the maxwell drawing trigger mechanism 2022-10-21 17:09:22 +08:00
bunnei
616e83dd94 DMA & InlineToMemory Engines Rework. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
42ef10060a VideoCore: Refactor fencing system. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
bc66debfdc Texture cache: Fix the remaining issues with memory mnagement and unmapping. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
8847b6645c VideoCore: implement channels on gpu caches. 2022-10-06 21:00:51 +02:00
Morph
2b87305d31 general: Convert source file copyright comments over to SPDX
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-04-23 05:55:32 -04:00
Fernando Sahmkow
9ebf1c00bd Rasterizer: Refactor inlineToMemory. 2022-02-01 01:47:28 +01:00
Fernando Sahmkow
19270ae4e6 Rasterizer: Implement Inline2Memory Acceleration. 2022-01-29 22:53:27 +01:00
ReinUsesLisp
65069df8aa shader: Remove old shader management 2021-07-22 21:51:22 -04:00
Fernando Sahmkow
2f222a20df accelerateDMA: Fixes and feedback. 2021-07-12 10:33:35 +02:00
Fernando Sahmkow
45da44d16a accelerateDMA: Accelerate Buffer Copies. 2021-07-11 01:33:17 +02:00
Fernando Sahmkow
48d5b8bf3e Fence Manager: Add fences on Reference Count. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow
73d501ed4b Texture Cache: Address feedback. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow
5854ca4ff0 Texture Cache: Initial Implementation of Sparse Textures. 2021-07-04 22:32:03 +02:00
ReinUsesLisp
2b175430fd bootmanager: Use std::stop_source for stopping emulation
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.
2021-06-22 00:04:57 -03:00
ameerj
2a0dbf9b79 buffer_cache: Simplify uniform disabling logic 2021-06-01 13:26:58 -04:00
ReinUsesLisp
2dfce2fca6 video_core: Reimplement the buffer cache
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.
2021-02-13 02:17:22 -03:00
ReinUsesLisp
d25b097e84 video_core: Rewrite the texture cache
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.
2020-12-30 03:38:50 -03:00
Lioncash
e71d8eef5e rasterizer_interface: Make use of [[nodiscard]] where applicable 2020-11-17 07:19:13 -05:00
ReinUsesLisp
8efb2c5537 video_core: Remove all Core::System references in renderer
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-09-06 05:28:48 -03:00
ReinUsesLisp
8835d40024 {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
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).
2020-04-28 02:18:12 -03:00
Fernando Sahmkow
ea522da8b5 Address Feedback. 2020-04-22 11:36:24 -04:00
Fernando Sahmkow
af9f901764 FenceManager: Manage syncpoints and rename fences to semaphores. 2020-04-22 11:36:16 -04:00
Fernando Sahmkow
6092308fe4 Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan. 2020-04-22 11:36:14 -04:00
Fernando Sahmkow
e7195b5f87 ThreadManager: Sync async reads on accurate gpu. 2020-04-22 11:36:12 -04:00
Fernando Sahmkow
802fabe3ab OpenGL: Implement Fencing backend. 2020-04-22 11:36:10 -04:00
Fernando Sahmkow
c689dc6804 GPU: Refactor synchronization on Async GPU 2020-04-22 11:36:06 -04:00
Fernando Sahmkow
5cc292ac3c GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
ReinUsesLisp
1f4e8db223 yuzu/loading_screen: Remove unused shader progress mode 2020-03-09 18:40:53 -03:00
ReinUsesLisp
005f5ca883 video_core: Reintroduce dirty flags infrastructure 2020-02-28 17:56:41 -03:00
bunnei
5c5b6cf721 Merge pull request #3414 from ReinUsesLisp/maxwell-3d-draw
maxwell_3d: Unify draw methods
2020-02-19 16:13:50 -05:00
ReinUsesLisp
518a6182f9 maxwell_3d: Unify draw methods
Pass instanced state of a draw invocation as an argument instead of
having two separate virtual methods.
2020-02-14 18:09:40 -03:00
ReinUsesLisp
d8a42816d7 gl_query_cache: Optimize query cache
Use a custom cache instead of relying on a ranged cache.
2020-02-14 17:38:27 -03:00
ReinUsesLisp
339a227a5e gl_query_cache: Implement host queries using a deferred cache
Instead of waiting immediately for executed commands, defer the query
until the guest CPU reads it. This way we get closer to what the guest
program is doing.

To archive this we have to build a dependency queue, because host APIs
(like OpenGL and Vulkan) use ranged queries instead of counters like
NVN.

Waiting for queries implicitly uses fences and this requires a command
being queued, otherwise the driver will lock waiting until a timeout. To
fix this when there are no commands queued, we explicitly call glFlush.
2020-02-14 17:33:13 -03:00
ReinUsesLisp
11206f8a28 maxwell_3d: Slow implementation of passed samples (query 21)
Implements GL_SAMPLES_PASSED by waiting immediately for queries.
2020-02-14 17:27:17 -03:00
Fernando Sahmkow
c0c5fa078b Shader_IR: Address Feedback 2020-01-24 16:43:30 -04:00
Fernando Sahmkow
5fb7881077 Shader_IR: Allow constant access of guest driver. 2020-01-24 16:43:30 -04:00
Fernando Sahmkow
e9f3264c8d GPU: Implement guest driver profile and deduce texture handler sizes. 2020-01-24 16:43:29 -04:00
Fernando Sahmkow
d53d764965 Maxwell3D: Corrections and refactors to MME instance refactor 2019-09-22 07:23:13 -04:00