Commit Graph

5734 Commits

Author SHA1 Message Date
Marshall Mohror 37cb0377ae vulkan: Implement FidelityFX Super Resolution 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
ameerj 618de4e787 vulkan: Fix rescaling push constant usage 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 ebf36f23dd vk_texture_cache: Use 3D to scale images when blit is unsupported 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 b1ae935f11 vk_texture_cache: Fix BlitScale of non-2D images 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
lat9nq 1c93476a80 video_core,yuzu: Move UpdateRescalingInfo call to video_core
This only needs to happen once per game boot, so we can just call it
during CreateGPU and be done with it, avoiding the need to call it in
the frontends.
2021-11-16 22:11:30 +01:00
ameerj 3233fa5dc8 gl_texture_cache: Disable scissor test when scaling textures
Fixes a bug on BOTW where some objects were no longer being rendered after blitting
2021-11-16 22:11:30 +01:00
ameerj 89a7e566c7 vk_texture_cache: Fix unsupported blit format error checking 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
ameerj e0a3830855 gl_texture_cache: Fix BGR pbo size for scaled textures 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 36f261edef vk_texture_cache: Simplify scaled image management 2021-11-16 22:11:30 +01:00
ameerj 8183142cd4 gl_texture_cache: Fix scaling backup logic 2021-11-16 22:11:30 +01:00
ameerj 122ddeb7ff vk_rasterizer: Fix scaling on Y_NEGATE 2021-11-16 22:11:30 +01:00
ameerj 16017ac450 vk_texture_cache: Use nearest neighbor scaling when available 2021-11-16 22:11:30 +01:00
ameerj 27af298e78 gl_texture_cache: Fix depth and integer format scaling blits 2021-11-16 22:11:30 +01:00
ameerj b027fac794 gl_texture_cache/rescaling_pass: minor cleanup 2021-11-16 22:11:30 +01:00
ameerj c8a971be91 vk_texture_cache: Minor cleanup 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 fcf2b2c78a gl_texture_cache: Simplify scaling
We don't need to reconstruct new textures every time we ScaleUp/ScaleDown. We can scale up once, and revert to the original texture whenever scaling down.
Fixes memory leaks due to glDeleteTextures being deferred for later handling on some drivers
2021-11-16 22:11:29 +01:00
ameerj ae8d19d17e Renderers: Unify post processing filter shaders 2021-11-16 22:11:29 +01:00
ameerj 29710f3250 gl_texture_cache: fix scaling on upload 2021-11-16 22:11:29 +01:00
Fernando Sahmkow a6b88e85bf Renderer: Implement Bicubic and ScaleForce filters. 2021-11-16 22:11:29 +01:00
Fernando Sahmkow c5bbbf3902 Texture Cache: fix scaling on upload and stop scaling on base resolution. 2021-11-16 22:11:29 +01:00
ameerj 68e038404c shader, video_core: Fix GCC build errors 2021-11-16 22:11:29 +01:00
ameerj 65781f88f8 emit_spirv: Fix RescalingLayout alignment 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
ameerj dc28284437 emit_spirv: Fix RescalingLayout alignment 2021-11-16 22:11:29 +01:00
ReinUsesLisp e66d5b88a6 shader: Properly scale image reads and add GL SPIR-V support
Thanks for everything!
2021-11-16 22:11:29 +01:00
ReinUsesLisp fc9bb3c3fe shader: Properly blacklist and scale image loads 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 526e47f148 vk_rasterizer: Minor style change 2021-11-16 22:11:29 +01:00
ReinUsesLisp c9238555f7 gl_texture_cache: Fix scaling blits 2021-11-16 22:11:29 +01:00
ReinUsesLisp cfeb161c7e glsl/glasm: Pass and use scaling parameters in shaders 2021-11-16 22:11:29 +01:00
ReinUsesLisp 4a512d6827 gl_rasterizer: Properly scale viewports and scissors 2021-11-16 22:11:29 +01:00
ameerj 05d98d9bbf gl_texture_cache: Fix multi layered texture Scale 2021-11-16 22:11:29 +01:00
ameerj b6060873ce gl_compute_pipeline: Add downscale factor to shader uniforms 2021-11-16 22:11:29 +01:00
ameerj 9bc7b04ca5 gl_rasterizer: Fix rescale dirty state checking 2021-11-16 22:11:29 +01:00
ameerj f086c82e1f gl_graphics_pipeline: Add downscale factor to shader uniforms 2021-11-16 22:11:28 +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 48d81506a3 Vulkan: Fix downscaling Blit. 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 cee7eba64e OpenGL: set linear mag filter when blitting a downscaled image. 2021-11-16 22:11:28 +01:00
Fernando Sahmkow 117f8ee7a4 Vulkan: Fix AA when rescaling. 2021-11-16 22:11:28 +01:00
Fernando Sahmkow 0e8cf38f39 Texture Cache: Implement Blacklisting. 2021-11-16 22:11:28 +01:00
ReinUsesLisp d2388dd0d0 vulkan: Implement rescaling shader patching 2021-11-16 22:11:28 +01:00
ReinUsesLisp dc72d4d4f5 vk_texture_cache: Properly scale blit source images 2021-11-16 22:11:28 +01:00
ReinUsesLisp baf0993d5c vk_graphics_pipeline: Use Shader::NumDescriptors when possible 2021-11-16 22:11:28 +01:00
ReinUsesLisp 6f3a41abe2 opengl: Use Shader::NumDescriptors when possible 2021-11-16 22:11:28 +01:00
ReinUsesLisp 74efa57c1b texture_cache: Add image getters 2021-11-16 22:11:28 +01:00
ameerj fad2c92a39 gl_texture_cache: Simplify rescaling 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
ReinUsesLisp 0fb4b84383 vk_texture_cache: Simplify and optimize scaling blits 2021-11-16 22:11:28 +01:00
ReinUsesLisp 520c4a44f6 vk_texture_cache: Fix scaling blit validation errors 2021-11-16 22:11:28 +01:00
ameerj fddf372c68 gl_texture_cache: Implement ScaleDown 2021-11-16 22:11:27 +01:00
ameerj 0a6c895af7 gl_texture_cache: Rescale fixes for multi-layered textures 2021-11-16 22:11:27 +01:00
Fernando Sahmkow dfc65cd0a3 Texture Cache: Implement Rescaling on Aliases and Blits. 2021-11-16 22:11:27 +01:00
ReinUsesLisp d464b122d5 Fix blits with mips 2021-11-16 22:11:27 +01:00
ReinUsesLisp 973f8f1d08 Fix blits 2021-11-16 22:11:27 +01:00
ameerj de66a69ed4 renderer_gl: Resolution scaling fixes 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 71ca84d829 Settings: eliminate rescaling_factor. 2021-11-16 22:11:27 +01:00
Fernando Sahmkow 84f2aea896 Texture Cache: More rescaling fixes. 2021-11-16 22:11:27 +01:00
ameerj 10e5065a5c gl_texture_cache: WIP texture rescale 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
ameerj c50f170597 codes: Rename ComposeFrameHeader to ComposeFrame
These functions were composing the entire frame, not just the headers. Rename to more accurately describe them.
2021-11-12 23:52:19 -05:00
ameerj d35391b9f4 vp8: Implement header composition
Enables frame decoding with FFmpeg
2021-11-12 23:52:18 -05:00
ameerj b39b33b1fe codecs: Add VP8 codec class 2021-11-12 19:49:45 -05:00
Feng Chen 70d51f72ec
vulkan_device: Add missing vulkan image format R5G6B5 in GetFormatProperties
- Used by Dragon Quest Builders
2021-11-05 10:31:40 -04:00
Morph d607ceacf4 gl_rasterizer: Remove unused includes
This removes unused includes, especially the core includes which were causing this file to be recompiled every time files included by those headers are modified.
2021-10-31 23:57:51 -04:00
lat9nq 61121d1b22 gl_device: Force GLASM on NVIDIA drivers 495-496
GLSL shaders currently do not render correctly on the recent NVIDIA
drivers. This adds a check that forces assembly shaders for these
drivers since they seem unaffected and adds a warning informing of the
decision.

Developers can disable the check by enabling graphics debugging.
2021-10-28 19:38:49 -04:00
Fernando S 5299554bb0
Merge pull request #7206 from vonchenplus/fix_vulkan_viewport_issue
Vulkan Rasterizer: Fix viewport issue
2021-10-24 01:53:04 +02: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
Fernando Sahmkow ad8afaf1ef Vulran Rasterizer: address feedback. 2021-10-23 23:46:29 +02:00
Feng Chen b769bea61b Fix vulkan viewport issue 2021-10-22 22:56:31 +08:00
bunnei c871320760
Merge pull request #7198 from ameerj/settings-chrono
settings: Remove std::chrono usage
2021-10-19 09:55:50 -07:00
ameerj ef811c6425 settings: Remove std::chrono usage
Alleviates the dependency on chrono for all files that include settings.h
2021-10-17 00:37:49 -04:00
Ameer J 3791c7ca82
Merge pull request #7077 from FernandoS27/face-down
A series of fixes to queries and indexed samplers.
2021-10-16 21:41:54 -04:00
Ameer J 5b735a4c9d
Merge pull request #7127 from FernandoS27/i-saw-a-wabbit
A few fixes on Vulkan and Rasterizer Caching
2021-10-16 21:37:43 -04:00
Morph 894b483a0d
Merge pull request #7157 from ameerj/vic-surface-size
vic: Use the minimum of surface/frame dimensions when writing the final frame to the GPU
2021-10-13 20:41:17 -04:00
Ameer J 018cf3853e
Merge pull request #7109 from vonchenplus/fix_h264_max__reference_num_error
h264: Use max allowed max_num_ref_frames when using CPU decoding
2021-10-12 14:08:37 -04:00
ameerj f346b04d12 vic: Use the minimum of surface/frame dimensions when writing the final frame to the GPU
Addresses possible buffer overflow behavior.
2021-10-10 18:44:16 -04:00
Feng Chen ba8be75037 h264: Use max allowed max_num_ref_frames when using CPU decoding 2021-10-10 20:07:19 +08:00
Valeri 0394e4bb8e
vic: Allow surface to be higher than frame
Touhou Genso Wanderer Lotus Labyrinth R decodes 1920x1080 videos into 1920x1088 surface.
Only allow mismatch for height, since larger width would result in increasingly offset rows and somewhat defeat entire purpose of this check.
2021-10-09 20:22:09 +03:00
ameerj 403fc86c11 vic: Avoid memory corruption when multiple streams with different dimensions are decoded
This is a work around to avoid buffer overflow errors until multi channel/multi stream decoding is supported.
2021-10-08 01:22:38 -04:00