Commit graph

376 commits

Author SHA1 Message Date
Lioncash
856f576c05 texture_cache: Amend unintended bitwise OR in SynchronizeAliases 2022-02-02 14:20:58 -05:00
Fernando S
a95c49e7d0
Merge pull request #7658 from ameerj/sparse-fixes
video_core/memory_manager: Fixes for sparse memory management
2022-01-06 13:50:14 +01:00
ameerj
951c61aeaa texture_cache/util: Fix s32 overflow when resolving overlaps 2021-12-31 20:03:22 -05:00
ameerj
285b6dbc39 video_core/memory_manager: Fixes for sparse memory management 2021-12-31 17:04:02 -05:00
ameerj
481b210c0d vk_texture_cache: Fix invalidated pointer access
The vulkan ImageView held a reference to its source image for rescale status checking. This pointer is sometimes invalidated when the texture cache slot_images container is resized.
To avoid an invalid pointer dereference, the ImageView now holds a reference to the container itself.
2021-12-23 20:55:48 -05:00
Fernando S
04b4f3b051
Merge pull request #7399 from ameerj/art-refactor
video_core: Refactoring post A.R.T. merge
2021-12-18 07:09:58 +01:00
Feng Chen
1598426493 Fix blit image/view not compatible 2021-12-10 12:41:09 +08:00
ameerj
218d790bd6 texture_cache: Fix image convert dimensions assertion 2021-12-05 15:42:45 -05:00
ameerj
b8f3e5157b blit_image: Refactor upscale factors usage
The image view itself can be queried to see if it is being rescaled or not, removing the need to pass the upscale/down shift factors from the texture cache.
2021-12-05 15:42:44 -05:00
Fernando Sahmkow
a5c212516c Texture Cache: Fix crashes on NVIDIA. 2021-12-04 11:26:58 +01:00
Feng Chen
524a9baa7e Add missing pixel format mapping 2021-11-29 12:39:37 +08:00
Fernando Sahmkow
5a3463bc2b Texture Cache: Secure insertions against deletions. 2021-11-28 10:53:27 +01:00
Fernando Sahmkow
ecefc932e6 Texture Cache: Redesigning the blitting system (again). 2021-11-27 11:22:16 +01:00
Fernando Sahmkow
1624f307d0 Texture Cache: Further fix regressions. 2021-11-26 17:03:48 +01:00
Fernando Sahmkow
08674aee87 Texture Cache: Fix issue with blitting 3D textures. 2021-11-22 06:07:21 +01:00
Fernando Sahmkow
8532849439 TextureCache: Simplify blitting of D24S8 formats and fix bugs. 2021-11-22 00:00:01 +01:00
Fernando Sahmkow
779f4ac72d TextureCache: Eliminate format deduction as full depth conversion has been supported. 2021-11-21 05:37:01 +01:00
bunnei
ea6fa044f3
Merge pull request #7368 from FernandoS27/vulkan-conv
Fix ART Blit detection regression and add D24S8 <-> RGBA8 conv to Vulkan
2021-11-20 16:51:13 -08:00
Fernando Sahmkow
0857f82913 TextureCache: Implement buffer copies on Vulkan. 2021-11-20 06:15:29 +01:00
Fernando Sahmkow
6f896d1fae TextureCache: Further fixes on resolve algorithm. 2021-11-19 23:02:04 +01:00
bunnei
c45af76ea0
Merge pull request #7357 from Morph1984/s8_uint
video_core: Implement S8_UINT format
2021-11-19 01:16:49 -08:00
Fernando Sahmkow
0ff228405f TextureCache: force same image format when resolving an image. 2021-11-19 05:46:57 +01:00
Fernando Sahmkow
b130f648d7 TextureCache: Fix regression caused by ART and improve blit detection algorithm to be smarter. 2021-11-19 03:17:54 +01:00
Morph
2348eb41f3 video_core: Add S8_UINT stencil format 2021-11-17 15:04:38 -05:00
ameerj
20ed7ba441 texture_cache: Use pixel format conversion when supported by the runtime 2021-11-16 22:32:46 -05:00
Fernando Sahmkow
978f598ff6 TextureCache: Fix OGL cleaning 2021-11-17 00:59:46 +01:00
Fernando Sahmkow
6c97ab571a Texture Cache: revert Image changes. 2021-11-16 22:11:33 +01:00
FernandoS27
de1c8c5c2c Texture Cahe/Shader decompiler: Resize PointSize on rescaling, refactor and make reaper more agressive on 4Gb GPUs. 2021-11-16 22:11:33 +01:00
ameerj
917b2466ad texture_cache: Refactor Render Target scaling function 2021-11-16 22:11:33 +01:00
FernandoS27
099b0b3167 Texture Cache: Fix memory usage on ScaleDown. 2021-11-16 22:11:33 +01:00
Fernando Sahmkow
5c6fa88935 OpenGlTextureCache: Fix state invalidation on rescaling. 2021-11-16 22:11:32 +01:00
Fernando Sahmkow
6cdfaee7b4 Texture Cache: Fix blitting. 2021-11-16 22:11:32 +01:00
FernandoS27
bf01b7993d TextureCache: Improve Reaper. 2021-11-16 22:11:32 +01:00
FernandoS27
d37d10e7a7 TextureCache: fix rescaling in aliases and overlap joins. 2021-11-16 22:11:31 +01:00
Fernando Sahmkow
3b61de74e6 Texture Cache: fix memory managment and optimize scaled downloads, uploads. 2021-11-16 22:11:31 +01:00
Fernando Sahmkow
c2ca55c9d5 Texture Cache: ease the requirements of textures being blacklisted. 2021-11-16 22:11:31 +01:00
Fernando Sahmkow
425ab9ef4b Texture Cache: Fix downscaling and correct memory comsumption. 2021-11-16 22:11:31 +01:00
FernandoS27
d4f5193bd3 Texture Cache: Rescale conversions between depth and color 2021-11-16 22:11:31 +01:00
Fernando Sahmkow
ef1dc42635 Texture cache: Fix memory consumption and ignore rating when a depth texture is rendered. 2021-11-16 22:11:31 +01:00
Fernando Sahmkow
b7ccc58f23 Texture Cahe: Fix downscaling on SMO. 2021-11-16 22:11:31 +01:00
ameerj
0f14c9379e texture_cache_base: Remove unused function declarations 2021-11-16 22:11:31 +01:00
ameerj
4de584005f texture_cache: Fix infinitely recursive ImageCanRescale check 2021-11-16 22:11:31 +01:00
ameerj
abd07e4158 video_core: Refactor resolution scale function 2021-11-16 22:11:31 +01:00
ameerj
b14f2c7c82 texture_cache: Fix image resolves when src/dst are not both scaled 2021-11-16 22:11:30 +01:00
ameerj
f8339cd703 vk_texture_cache: Fix early returns on unsupported scales 2021-11-16 22:11:30 +01:00
ameerj
31478c6c1b video_core: Misc resolution scaling related refactoring 2021-11-16 22:11:30 +01:00
ameerj
88ef04dbaf texture_cache: Refactor scaled image size calculation 2021-11-16 22:11:30 +01:00
Fernando Sahmkow
237a43004f Texture Cache: Fix calculations when scaling. 2021-11-16 22:11:30 +01:00
Fernando Sahmkow
ea82bd4b7e Texture Cache: Fix Rescaling on Multisample 2021-11-16 22:11:30 +01:00
Fernando Sahmkow
19ca0c9ab5 TextureCache: Base fixes on rescaling. 2021-11-16 22:11:30 +01:00
ameerj
6000fe69a4 image_info: Mark MSAA textures as non-rescalable
Blitting or resolving multisampled images requires the dimensions of the src and dst to be equal for valid usage, making them difficult for resolution scaling using the current implementation.
2021-11-16 22:11:30 +01:00
ameerj
68e038404c shader, video_core: Fix GCC build errors 2021-11-16 22:11:29 +01:00
Fernando Sahmkow
d7c9792169 TextureCache: Fix Buffer Views Scaling. 2021-11-16 22:11:29 +01:00
Fernando Sahmkow
4b1393a691 Texture Cache: Correctly fix Blits Rescaling. 2021-11-16 22:11:29 +01:00
ameerj
ed675cfd8c texture_cache: Disable dst_image scaling in BlitImage
Fixes scaling in Super Mario Party
2021-11-16 22:11:29 +01:00
ReinUsesLisp
c7a1cbad44 texture_cache: Add getter to query if image view is rescaled 2021-11-16 22:11:29 +01:00
ReinUsesLisp
2182d25750 texture_cache: Fix blacklists on compute 2021-11-16 22:11:28 +01:00
ReinUsesLisp
56ccda1d99 texture_cache: Simplify image view queries and blacklisting 2021-11-16 22:11:28 +01:00
Fernando Sahmkow
07c564f38b Texture Cache: Implement Rating System. 2021-11-16 22:11:28 +01:00
Fernando Sahmkow
0e8cf38f39 Texture Cache: Implement Blacklisting. 2021-11-16 22:11:28 +01:00
ReinUsesLisp
74efa57c1b texture_cache: Add image getters 2021-11-16 22:11:28 +01:00
ameerj
d5143c83a9 texture_cache: Fix typo in aliased image rescaling 2021-11-16 22:11:28 +01:00
Fernando Sahmkow
dfc65cd0a3 Texture Cache: Implement Rescaling on Aliases and Blits. 2021-11-16 22:11:27 +01:00
Fernando Sahmkow
8704c93913 TextureCache: Fix rescaling of ImageCopies 2021-11-16 22:11:27 +01:00
Fernando Sahmkow
778700ff9d TextureCache: Modify Viewports/Scissors according to Rescale. 2021-11-16 22:11:27 +01:00
Fernando Sahmkow
84f2aea896 Texture Cache: More rescaling fixes. 2021-11-16 22:11:27 +01:00
Fernando Sahmkow
ba18047e8d Texture Cache: Implement Vulkan UpScaling & DownScaling 2021-11-16 22:11:27 +01:00
Fernando Sahmkow
22f4b290b6 VideoCore: Initial Setup for the Resolution Scaler. 2021-11-16 22:11:27 +01:00
Ameer J
494e34af6a
Merge pull request #7070 from FernandoS27/want-you-bad
Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan.
2021-10-23 18:02:23 -04:00
ameerj
427bf76e62 gpu: Migrate implementation to the cpp file 2021-10-03 00:35:57 -04:00
ameerj
73666fb262 general: Update style to clang-format-12 2021-09-24 15:52:05 -04:00
Fernando Sahmkow
60a3980561 Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan. 2021-09-23 03:49:10 +02:00
Morph
76abf55f25 slot_vector: Add missing <algorithm> include 2021-09-11 17:19:15 -04:00
Fernando Sahmkow
fe0acec539 Garbage Collection: Make it more agressive on high priority mode. 2021-08-29 18:57:17 +02:00
Fernando Sahmkow
ff48f06fb9 Garbage Collection: Adress Feedback. 2021-08-29 18:19:53 +02:00
Fernando Sahmkow
ba82bb359b Garbage Collection: enable as default, eliminate option. 2021-08-28 17:55:37 +02:00
Fernando Sahmkow
d540d284b5 VideoCore: Rework Garbage Collection. 2021-08-28 17:54:12 +02:00
yzct12345
c4eafcc861
texture_cache: Address ameerj's review 2021-08-08 11:02:51 +00:00
yzct12345
e80323b8b0
texture_cache: Address ameerj's review 2021-08-07 01:27:47 +00:00
yzct12345
02e98f6c93
texture_cache: Don't change copyright year 2021-08-05 20:52:12 +00:00
yzct12345
5566f3dbc0
texture_cache: Address ameerj's review 2021-08-05 20:46:24 +00:00
yzct12345
f9563c8f24
texture_cache: Split templates out 2021-08-05 13:52:30 +00:00
Lioncash
00e100de08 render_target: Add missing initializer for size extent
Everything else has a default constructor that does the straightforward
thing of initializing most members to a default value, except for the
size.

We explicitly initialize the size (and others, for consistency), to
prevent potential uninitialized reads from occurring. Particularly given
the largeish surface area that this struct is used in.
2021-07-27 07:41:21 -04:00
ReinUsesLisp
56d4a9ebde texture_cache: Reduce invalid image/sampler error severity 2021-07-22 21:51:34 -04:00
ReinUsesLisp
d621e96d0d shader: Initial OpenGL implementation 2021-07-22 21:51:30 -04:00
ReinUsesLisp
7cb2ab3585 shader: Implement SULD and SUST 2021-07-22 21:51:26 -04:00
ReinUsesLisp
e9a91bc5cc shader: Interact texture buffers with buffer cache 2021-07-22 21:51:26 -04:00
Fernando S
053860d9cb
Merge pull request #6670 from ReinUsesLisp/prepare-rt
texture_cache: Always prepare image views on render targets
2021-07-19 03:21:25 +02:00
ReinUsesLisp
6d9f347e22 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
ReinUsesLisp
cb08e5bdd2 texture_cache: Always prepare image views on render targets
Images used as render targets were not being "prepared", causing
desynchronizations on the texture cache. Needs #6669 to avoid
performance regressions on certain cooking titles.

- Fixes black shadows on Age of Calamity.
2021-07-18 00:49:32 -03:00
Fernando Sahmkow
0e4d4b4beb Buffer Cache: Fix High Downloads and don't predownload on Extreme. 2021-07-09 22:20:36 +02:00
Feng Chen
c7ad195fd3
Out of bound blit (#6531)
* Fix out of bound blit error

* Fix code read

* Fix ci error

Co-authored-by: Feng Chen <chen.feng@gloritysolutions.com>
2021-07-08 11:06:09 -07:00
bunnei
eb3cb3af35
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
bunnei
bf50345d4c
Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
2021-07-05 17:09:23 -07:00
Fernando Sahmkow
c6a9e91784 Texture Cache: Fix collision with multiple overlaps of the same sparse texture. 2021-07-04 22:32:36 +02:00
Fernando Sahmkow
a8a0927d42 Texture Cache: Fix GCC & Clang. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow
8f9f142956 Texture Cache: Address feedback. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow
fd98fcf7f0 Texture Cache: Improve accuracy of sparse texture detection. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow
38165fb7e3 Texture Cache: Initial Implementation of Sparse Textures. 2021-07-04 22:32:03 +02:00
Fernando Sahmkow
ebaa7e391c TextureCache: Fix 1D to 2D overlapps. 2021-07-03 14:01:54 +02:00