Commit Graph

59 Commits

Author SHA1 Message Date
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
GPUCode 1bc4b6c75d video_core: Fix buffer_row_length computation for linear compressed textures 2023-12-26 16:33:03 +02:00
Fernando S 30d96be28d Merge pull request #11788 from Squall-Leonhart/IFREMOVED
[crash fix]brings back the removed if  statement in util.cpp and adds the  num_level test to it like previous discontinued PR
2023-10-17 14:36:36 +02:00
Squall Leonhart eecd48f2ee brings back the removed If statement and adds the num_level test
This resolves the out of bounds read/writes in the linear swizzler, it brings back the scaled TOTK Recall bug however, pending further work in the block size calculation.

Recall is not glitched in the Dynamic FPS resolution mod to the degree that it is in the native yuzu scaler, this can be a workaround for the time being.


The recall effect is constructed from multiple 320x180 texture slices, it breaking may have a similar origin to https://github.com/Ryujinx/Ryujinx/pull/5640

but it may also be connected to the other deficiencies identified in the Yuzu size calculations, such as no apparent implementation of slice testing for end of slce depth as opposed to full aligned size as implemented in https://github.com/Ryujinx/Ryujinx/pull/5220
2023-10-15 02:09:28 +11:00
Fernando S 0cc1d8135f Merge pull request #11743 from Squall-Leonhart/IFREMOVED
Fix mistaken usage of info.block instead of level_info.block
2023-10-11 11:56:47 +02:00
Squall-Leonhart ce3e98cf48 Fix mistaken usage of info.block instead of level_info.block
Fixed an error on my part, in the last change I had mistakenly passed unadjusted block info into FullUploadSwizzles and UnswizzleImage

Revert (my mistaken changing of) the construction of SwizzleParameters in UnswizzleImage and FullUploadSwizzles to use level_info.block instead of info.block. This ensures that the block information used in the swizzling process is correctly adjusted for each mip level.
2023-10-11 19:12:33 +11:00
liamwhite 22e805e43f Merge pull request #11534 from Squall-Leonhart/IFREMOVED
Partial revert of #10433 (Texture Cache Util: Fix block depth adjustment on slices)
2023-10-10 12:44:48 -04:00
Liam 445d504f94 ci: fix new codespell errors 2023-10-02 18:03:05 -04:00
Squall-Leonhart 55e400acd9 Reuse part of my previous idea to to use num_levels to check within AdjustMipBlockSize
The partial revert was not enough for Tsukihime, this might do the trick
2023-09-20 03:27:13 +10:00
Squall Leonhart 0ec7d7ec28 Partial revert of #10433
The If block in this change was causing some 2D textures to be treated as if their mip 0 was a 3D Slice, this could be ascertained as the same texture viewed from different distances would render fine, but then close up would look like a decoding failure.

It also resulted in some 3D ASTC textures not being scaled appropriate leading to broken graphical effects such as the jagged TOTK recall animation being a circle, as the If block was only accepting the image based on its original info without any adjustments applied.
2023-09-18 23:28:53 +10:00
Kelebek1 42638691b5 Use spans over guest memory where possible instead of copying data. 2023-07-02 23:09:48 +01:00
GPUCode b7e726669e renderer_vulkan: Add support for VK_KHR_image_format_list 2023-07-01 16:03:29 +03:00
GPUCode 5196f05cec video_core: Add BCn decoding support 2023-06-27 18:00:09 -07:00
Kelebek1 c7430e51e3 Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
Fernando Sahmkow 769b1f0264 Texture Cache Util: Fix block depth adjustment on slices. 2023-05-24 10:06:58 +02:00
Liam 011dfe1db7 textures: add BC1 and BC3 compressors and recompression setting 2023-05-23 12:54:40 -04:00
Fernando Sahmkow a1317c3a6e Texture Cache: Fix ASTC textures 2023-05-09 02:42:10 +02:00
Fernando Sahmkow 82f37192ec Engines: Implement Accelerate DMA Texture. 2023-03-05 12:18:00 +01:00
ameerj b60e0b5360 texture_cache: OpenGL: Implement MSAA uploads and copies 2023-02-11 15:43:07 -05:00
ameerj d45c01bd13 texture_cache: Use Common::ScratchBuffer for swizzle buffers 2022-12-25 15:47:41 -05:00
ameerj 51eb1f4aab texture_cache: Use pre-allocated buffer for texture downloads 2022-12-25 15:38:36 -05:00
ameerj 204e35087f texture_cache: Use pre-allocated buffer for texture uploads 2022-12-25 15:38:36 -05:00
Feng Chen bcf6a7c0dd video_core: Fix SNORM texture buffer emulating error (#9001) 2022-11-04 02:39:42 -04:00
bunnei 616e83dd94 DMA & InlineToMemory Engines Rework. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow a933bd94d6 VideoCore: Extra Fixes. 2022-10-06 21:00:52 +02:00
Andrea Pappacoda b2eb103829 chore: add missing SPDX tags
Follow-up to 2b87305d31
2022-04-28 18:24:11 +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
bunnei dcb17246d9 Revert "texture_cache/util: Remove unneeded ReadBlockUnsafe" 2022-04-04 16:26:53 -07:00
ameerj ef60f353a8 texture_cache/util: Remove unneeded ReadBlockUnsafe
This call was reading GPU memory into the dst buffer, which is then overwritten by the SwizzleTexture call.
2022-04-04 15:57:54 -04:00
ameerj 5a7940c1f1 texture_cache/util: Fix s32 overflow when resolving overlaps 2021-12-31 20:03:22 -05:00
Fernando Sahmkow fc91c0f51d Texture Cache: Redesigning the blitting system (again). 2021-11-27 11:22:16 +01:00
Fernando Sahmkow 81f52ea8fc Texture Cache: Fix issue with blitting 3D textures. 2021-11-22 06:07:21 +01:00
Fernando Sahmkow df62d93979 TextureCache: Eliminate format deduction as full depth conversion has been supported. 2021-11-21 05:37:01 +01:00
Fernando Sahmkow efe634608e TextureCache: Further fixes on resolve algorithm. 2021-11-19 23:02:04 +01:00
Fernando Sahmkow 37459e821b TextureCache: Fix regression caused by ART and improve blit detection algorithm to be smarter. 2021-11-19 03:17:54 +01:00
Fernando Sahmkow ceace57320 Texture Cache: Fix blitting. 2021-11-16 22:11:32 +01:00
FernandoS27 564caa296b TextureCache: fix rescaling in aliases and overlap joins. 2021-11-16 22:11:31 +01:00
ReinUsesLisp 21932acf5f texture_cache/util: Fix size calculations of multisampled images
On the texture cache we handle multisampled images by keeping their real
size in samples (e.g. 1920x1080 with 4 samples is 3840x2160).

This works nicely with size matches and other comparisons, but the
calculation for guest sizes was not having this in mind, and the size
was being multiplied (again) by the number of samples per dimension.
For example a 3840x2160 texture cache image had its width and height
multiplied by 2, resulting in a much larger texture.

Fix this issue.

- Fixes performance regression on cooking related titles when an
  unrelated bug was fixed.
2021-07-18 01:15:48 -03:00
bunnei 661a0f6569 Merge pull request #6497 from FernandoS27/scotty-doesnt-know
GPU Memory Manager - Correct handling of non continuous backing memory.
2021-07-06 17:26:21 -07:00
Fernando Sahmkow 083e0527fd Texture Cache: Improve accuracy of sparse texture detection. 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
Morph 2986e26179 video_core: Silence signed/unsigned mismatch warnings 2021-06-28 09:21:42 -04:00
Mai M 7503ca436b Merge pull request #6465 from FernandoS27/sex-on-the-beach
GPU: Implement a garbage collector for GPU Caches (project Reaper+)
2021-06-23 08:03:01 -04:00
Ameer J 3b8508bf64 Merge pull request #6469 from ReinUsesLisp/blit-view-compat
texture_cache/util: Avoid relaxed image views on different bytes per block
2021-06-16 21:08:07 -04:00
Fernando Sahmkow 978aabb1d0 Reaper: Tune it up to be an smart GC. 2021-06-16 21:35:02 +02:00
ameerj e5da434498 textures: Reintroduce CPU ASTC decoder
Users may want to fall back to the CPU ASTC texture decoder due to hangs
and crashes that may be caused by keeping the GPU under compute heavy
loads for extended periods of time. This is especially the case in games
such as Astral Chain which make extensive use of ASTC textures.
2021-06-15 20:19:00 -04:00
ReinUsesLisp b458f73a61 texture_cache/util: Avoid relaxed image views on different bytes per pixel
Avoids API usage errors on UE4 titles leading to crashes.
2021-06-14 21:03:57 -03:00
Markus Wick e7c2b054c1 Fix GCC undefined behavior sanitizer.
* Wrong alignment in u64 LOG_DEBUG -> memcpy.
* Huge shift exponent in stride calculation for linear buffer, unused result -> skipped.
* Large shift in buffer cache if word = 0, skip checking for set bits.

Non of those were critical, so this should not change any behavior.
At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
2021-06-10 21:07:27 +02:00
Lioncash c81f95a54b texture_cache/util: Fix src being used instead of dst within DeduceBlitImages
This line can only ever be reached if src is null, so dereferencing it
here is a logic bug that slipped through.

Instead, we dereference dst instead which is guaranteed to be valid.
2021-04-19 13:01:50 -04:00