Commit graph

90 commits

Author SHA1 Message Date
71a87b2c55
[video_core] Fix stutters and freezes when playing FMV content in some games (#2650)
This fixes stutters and freezes when playing FMV content in some games.

Reviewed-on: #2650
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
2025-10-03 23:08:20 +02:00
f19bbda517
[common] remove ranges polyfill (#2546)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: #2546
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-09-24 19:29:48 +02:00
9d2681ecc9
[cmake] enable clang-cl and WoA builds (#348)
Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64.

Compiling on clang is *dramatically* faster so this should be useful for CI.

Co-authored-by: crueter <crueter@eden-emu.dev>
Co-authored-by: crueter <crueter@crueter.xyz>
Reviewed-on: #348
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-09-09 20:47:49 +02:00
f1e74f6855
[meta] remove MicroProfile (#185)
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: #185
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
2025-08-06 07:48:11 +02:00
Fernando Sahmkow
241c64e43b Core: Eliminate core/memory dependancies. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow
9db159da71 SMMU: Initial adaptation to video_core. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow
a81686eff8 MaxwellDMA: Don't flush the outputs of a dma copy. 2023-12-31 21:00:01 +01:00
Fernando Sahmkow
5ea12207f3 Query Cachge: Fully rework Vulkan's query cache 2023-09-23 23:05:29 +02:00
Kelebek1
ac61186061 Fix DMA engine register offsets 2023-09-21 20:21:00 +01:00
Liam
3e4076c2ac general: fix apple clang build 2023-08-09 22:38:37 -04:00
Kelebek1
42638691b5 Use spans over guest memory where possible instead of copying data. 2023-07-02 23:09:48 +01:00
Morph
10f95299eb maxwell_dma: Specify dst_operand.pitch instead of a temp var 2023-06-30 21:49:59 -04:00
Kelebek1
c80b6bfb83 Use safe reads in DMA engine 2023-06-26 11:34:02 +01:00
Kelebek1
c7430e51e3 Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
Fernando Sahmkow
5fa8c8685e Texture cache: Only force flush the dma downloads 2023-05-07 23:46:12 +02:00
Fernando Sahmkow
6bc60f78d9 GPU: Add Reactive flushing 2023-05-07 23:46:12 +02:00
Fernando Sahmkow
82f37192ec Engines: Implement Accelerate DMA Texture. 2023-03-05 12:18:00 +01: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
Fernando Sahmkow
4bf1ee5bdc DMAPusher: Improve collection of non executing methods 2023-01-01 16:43:57 -05:00
ameerj
4d5adfb3c9 scratch_buffer: Explicitly defing resize and resize_destructive functions
resize keeps previous data intact when the buffer grows
resize_destructive destroys the previous data when the buffer grows
2022-12-19 22:40:50 -05:00
ameerj
b501ee907e video_core: Add usages of ScratchBuffer 2022-12-19 18:08:04 -05:00
Lioncash
0d9c723df4 engines: Remove unnecessary casts
In a few cases we have some casts that can be trivially removed.
2022-11-29 08:38:46 -05:00
Fernando Sahmkow
e3b3fcb1fc MaxwellDMA: Implement BlockLinear to BlockLinear copies. 2022-11-24 20:35:44 +01:00
Morph
ab4c53a3e6 Merge pull request #9229 from Docteh/achy_breaky_heart
Add break for default cases
2022-11-17 19:20:18 -05:00
Kyle Kienapfel
d886438754 Add break for default cases
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.

I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw

R_THROW macro leads towards a return
2022-11-13 16:30:55 -08:00
FengChen
751f16bf66 video_core: Fix dma copy 1D random crash 2022-11-11 00:23:45 +08:00
FengChen
584a200d86 video_core: implement 1D copies based on VMM 'kind' 2022-10-17 15:35:12 +08:00
Liam
13946e7926 maxwell_dma: remove warnings from implemented functionality 2022-10-06 21:00:54 +02:00
Fernando Sahmkow
4124fa18e3 NVDRV: Further improvements. 2022-10-06 21:00:53 +02:00
bunnei
616e83dd94 DMA & InlineToMemory Engines Rework. 2022-10-06 21:00:53 +02:00
Liam
c1771c98f3 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
Liam
d20d4060e9 maxwell_dma: use fallback if remapping is enabled 2022-05-10 19:26:48 -04:00
Liam
b6ed3289df maxwell_dma: fix bytes per pixel 2022-05-06 18:18:00 -04: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
Lody
3ec2e46e15 MaxwellDMA: Implement semaphore operations 2022-03-07 13:46:18 +08:00
ameerj
1b48f8043b maxwell_dma: Minor refactoring 2021-09-19 20:36:41 -04:00
FernandoS27
72c3d368cf DMA: Restrict optimised path for BlockToLinear further. 2021-07-22 21:51:34 -04:00
Fernando Sahmkow
a358a281bf Buffer cache: Fixes, Clang and Feedback. 2021-07-15 02:02:08 +02:00
Fernando Sahmkow
c55539fa95 DMAEngine: Revert flushing from Pitch to BlpockLinear. 2021-07-14 16:44:53 +02:00
Fernando Sahmkow
a0a9ff69fa DMAEngine: Accelerate BufferClear 2021-07-13 03:49:47 +02:00
Fernando Sahmkow
45da44d16a accelerateDMA: Accelerate Buffer Copies. 2021-07-11 01:33:17 +02:00
bunnei
7a76bc30fa common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07: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
2f181b6a90 video_core: Resolve more variable shadowing scenarios
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-12-04 16:19:09 -05:00
ReinUsesLisp
ca90a52bea video_core: Enforce -Wunused-variable and -Wunused-but-set-variable 2020-10-02 21:19:35 -03:00
ReinUsesLisp
9a83f8794b textures/decoders: Fix block linear to pitch copies
There were two issues with block linear copies. First the swizzling was
wrong and this commit reimplements them.

The other issue was that these copies are generally used to download
render targets from the GPU and yuzu was not downloading them from
host GPU memory unless the extreme GPU accuracy setting was selected.
This commit enables cached memory reads for all accuracy levels.

- Fixes level thumbnails in Super Mario Maker 2.
2020-08-10 20:45:03 -03:00
ReinUsesLisp
2691f5e6b9 video_core/textures: Add and use SwizzleSliceToVoxel, and minor style changes
Change GOB sizes from free-functions to constexpr constants.

Add SwizzleSliceToVoxel, a function that swizzles a 2D array of pixels
into a 3D texture and use it for 3D copies.
2020-07-10 04:09:32 -03:00
ReinUsesLisp
ef1ba82f42 maxwell_dma: Rename registers to match official docs and reorder
Rename registers in the MaxwellDMA class to match Nvidia's official
documentation. This one can be found here:

https://github.com/NVIDIA/open-gpu-doc/blob/master/classes/dma-copy/clb0b5.h

While we are at it, reorganize the code in MaxwellDMA to be separated in
different functions.
2020-07-07 19:19:33 -03:00