eden/src/video_core/renderer_vulkan
xbzk 32db6c1877
[renderer] NG ragebound workaround via LoadOverrides + vk_rasterizer UpdateBlending TouchBlendequations Rework (#2934)
this pull should impact ninja gaiden ragebound only! it makes it playable past stage 4-1.
it contains a workaround for missing maxwell_3d's iterated_blend functionality, which fixes several graphics all over the game.
the issue causes transparency enabled blends (mostly lighting fx) to be wrongly blended into destination, turning textures into black frames.
in stage 4-1 there are lighthing layers in the foreground, causing sprites layer to become overlapped by these opaque black frames, including entire screen in a mid boss fight, making it unplayable* (players maneuvered by turning immortal option on and swinging sword all around until defeating it).
also only in stage 4-1 the fix has a short drawback: when you buff up next attack these problematique blends will be drawn back as black frames, but only for a split second, so no big deal.
this workaround was already discovered and available in PR 302,  but in an unconventional way for a game specific override, so we did forbidden it. now it uses classic game specific override solution exampled in core.cpp's System::Impl::LoadOverrides method, so now i guess it's worth to merge it and deliver this to players until we harness iterated_blend control.

additionally I've slightly reworked vk_rasterizer.cpp's RasterizerVulkan::UpdateBlending, if (state_tracker.TouchBlendEquations()) {...} session.
it was made in a way that for a single blend, it exhaustly calls 48 (6 x 8) MaxwellToVK redundant functions, and declared a lambda function inside a 8 laps loop.
reworked it so that instead of 48 calls it makes only the necessary 6 calls, and then merely safely copy the result for the other 7 times.

Co-authored-by: Allison Cunha <allisonbzk@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2934
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: xbzk <xbzk@eden-emu.dev>
Co-committed-by: xbzk <xbzk@eden-emu.dev>
2025-11-13 14:01:32 +01:00
..
present Revert "[vk] Fix Vulkan Upload & Present Barriers for Spec Compliance (#2681)" (#2748) 2025-10-16 03:33:24 +02:00
blit_image.cpp [vk] Implement Shader Read Barrier (#2671) 2025-10-04 23:58:08 +02:00
blit_image.h [vk] Implement Shader Read Barrier (#2671) 2025-10-04 23:58:08 +02:00
fixed_pipeline_state.cpp [renderer] NG ragebound workaround via LoadOverrides + vk_rasterizer UpdateBlending TouchBlendequations Rework (#2934) 2025-11-13 14:01:32 +01:00
fixed_pipeline_state.h [vk] Enable line stipple and depth bound reg transfer (#59) 2025-07-22 21:34:38 +02:00
line_loop_utils.h [vk] Correct polygon draw topology mapping for line and point modes (#2834) 2025-10-26 01:38:08 +02:00
maxwell_to_vk.cpp [vk] Correct polygon draw topology mapping for line and point modes (#2834) 2025-10-26 01:38:08 +02:00
maxwell_to_vk.h [vk] Correct polygon draw topology mapping for line and point modes (#2834) 2025-10-26 01:38:08 +02:00
pipeline_helper.h Vulkan 1.4 and New Extensions (#93) 2025-05-09 14:19:51 +00:00
pipeline_statistics.cpp Update fmt to allow for v11 2025-04-10 01:11:22 +02:00
pipeline_statistics.h
renderer_vulkan.cpp [vk] Unify RAII in Vulkan (#2679) 2025-10-08 04:01:24 +02:00
renderer_vulkan.h [vk] Unify RAII in Vulkan (#2679) 2025-10-08 04:01:24 +02:00
vk_blit_screen.cpp [vk, ogl] Add VK_QCOM ZTC, Bspline, Mitchell filter weights, add MMPX filter (#2577) 2025-10-07 06:35:57 +02:00
vk_blit_screen.h gpu: dependency-inject scaling/antialiasing filter state for capture layers 2024-02-09 09:20:53 -05:00
vk_buffer_cache.cpp [compat] Debian stable gcc12/clang14 compilation fixes (#2763) 2025-10-18 01:54:43 +02:00
vk_buffer_cache.h [vk] fix accidental functor param swap (#2743) 2025-10-15 04:27:40 +02:00
vk_buffer_cache_base.cpp Buffer Cache: Fully rework the buffer cache. 2023-04-29 00:46:31 +02:00
vk_command_pool.cpp general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
vk_command_pool.h
vk_compute_pass.cpp [VK] change bind point from Graphics to Compute since its a compute pipeline (#293) 2025-08-24 01:16:06 +02:00
vk_compute_pass.h renderer_vulkan: Implement MSAA copies 2023-09-25 09:20:32 -04:00
vk_compute_pipeline.cpp [vk] only enable statistics bit if graphics debugging is enabled (#243) 2025-08-13 19:25:52 +02:00
vk_compute_pipeline.h renderer_vulkan: separate guest and host compute descriptor queues 2023-05-10 13:46:48 -04:00
vk_descriptor_pool.cpp [Vulkan] Descriptor Pool bug fix (#2564) 2025-09-26 04:58:09 +02:00
vk_descriptor_pool.h Rework time service to fix time passing offline. 2024-01-24 04:26:55 +00:00
vk_fence_manager.cpp Clang format and ddress feedback 2023-04-24 12:38:47 +02:00
vk_fence_manager.h Query Cache: address issues 2023-09-23 23:05:30 +02:00
vk_graphics_pipeline.cpp [vk] Correct polygon draw topology mapping for line and point modes (#2834) 2025-10-26 01:38:08 +02:00
vk_graphics_pipeline.h [vk] Fix dynamic vertex input state handling (#295) 2025-08-23 20:34:05 +02:00
vk_master_semaphore.cpp Revert "[vk] Tighten queue wait stages (#2734)" (#2751) 2025-10-16 06:48:17 +02:00
vk_master_semaphore.h renderer_vulkan: Introduce separate cmd buffer for uploads 2023-11-12 20:27:39 +01:00
vk_pipeline_cache.cpp [video_core] Clean up the code and fix some inconsistences (#3015) 2025-11-13 03:04:00 +01:00
vk_pipeline_cache.h Optimize SpiriV output 2025-04-12 22:54:32 -03:00
vk_present_manager.cpp Revert "[vk] Fix Vulkan Upload & Present Barriers for Spec Compliance (#2681)" (#2748) 2025-10-16 03:33:24 +02:00
vk_present_manager.h fix a large variety of issues (#101) 2025-05-11 23:58:25 +00:00
vk_query_cache.cpp [cmake] enable clang-cl and WoA builds (#348) 2025-09-09 20:47:49 +02:00
vk_query_cache.h [vk] Bring Vulkan closer to Spec (#180) 2025-08-13 18:02:05 +02:00
vk_rasterizer.cpp [renderer] NG ragebound workaround via LoadOverrides + vk_rasterizer UpdateBlending TouchBlendequations Rework (#2934) 2025-11-13 14:01:32 +01:00
vk_rasterizer.h [vk] Bring Vulkan closer to Spec (#180) 2025-08-13 18:02:05 +02:00
vk_render_pass_cache.cpp [Vk] Improve Stencil Handling and Fix Read-After-Write Hazard (#235) 2025-08-23 20:04:48 +02:00
vk_render_pass_cache.h general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
vk_resource_pool.cpp general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
vk_resource_pool.h
vk_scheduler.cpp [common] use libc++ provided jthread instead of in-house one (which deadlocks on FBSD 14) (#351) 2025-10-01 06:59:35 +02:00
vk_scheduler.h [vk] Enable line stipple and depth bound reg transfer (#59) 2025-07-22 21:34:38 +02:00
vk_shader_util.cpp Revert some wip changes 2025-04-28 16:14:42 -03:00
vk_shader_util.h Revert some wip changes 2025-04-28 16:14:42 -03:00
vk_staging_buffer_pool.cpp revert [vk] StreamBuffer Changes (#2684) (#2707) 2025-10-10 01:55:43 +02:00
vk_staging_buffer_pool.h revert [vk] Fast UBO: fix tracking, resize heuristics, add debug guard (#2695) (#2706) 2025-10-09 21:37:27 +02:00
vk_state_tracker.cpp [vk] Enable line stipple and depth bound reg transfer (#59) 2025-07-22 21:34:38 +02:00
vk_state_tracker.h [cmake] enable clang-cl and WoA builds (#348) 2025-09-09 20:47:49 +02:00
vk_swapchain.cpp [vk] Unify RAII in Vulkan (#2679) 2025-10-08 04:01:24 +02:00
vk_swapchain.h fix a large variety of issues (#101) 2025-05-11 23:58:25 +00:00
vk_texture_cache.cpp [texture_cache] Fix WIN32 #ifdef for texture_cache (#2823) 2025-10-23 08:12:24 +02:00
vk_texture_cache.h Initial MSAA fix (Download and Upload) (#145) 2025-06-05 19:06:55 +00:00
vk_texture_cache_base.cpp
vk_texture_manager.cpp Some fixes before Release (#92) 2025-05-08 23:03:52 +00:00
vk_turbo_mode.cpp [common] use libc++ provided jthread instead of in-house one (which deadlocks on FBSD 14) (#351) 2025-10-01 06:59:35 +02:00
vk_turbo_mode.h android: vk_turbo_mode: Remove unnecessary device recreation. 2023-06-03 00:06:08 -07:00
vk_update_descriptor.cpp renderer_vulkan: Fix crashing when updating descriptors 2023-05-01 23:13:24 +03:00
vk_update_descriptor.h renderer_vulkan: allow up to 7 swapchain images 2023-12-16 18:59:44 -05:00