[vk] Implement Shader Read Barrier #2671

Merged
MaranBr merged 4 commits from Ribbit/ribbitvulkanadditions:shaderreadbarrier into master 2025-10-04 23:58:08 +02:00
Contributor

Adding the shader read barrier keeps every render/compute/transfer write visible before the image is sampled, so it prevents the “read-before-writes-finish” hazards. Without it you can get random stale frames, flickering post process passes, partially updated HUD textures, and corrupted depth-to-color conversions especially in scenes that render into an offscreen image and immediately feed that image to a shader (reflections, bloom, dynamic resolution, depth visualizers, etc.). This fix makes those R2T chains deterministic again across all Vulkan drivers.

Adding the shader read barrier keeps every render/compute/transfer write visible before the image is sampled, so it prevents the “read-before-writes-finish” hazards. Without it you can get random stale frames, flickering post process passes, partially updated HUD textures, and corrupted depth-to-color conversions especially in scenes that render into an offscreen image and immediately feed that image to a shader (reflections, bloom, dynamic resolution, depth visualizers, etc.). This fix makes those R2T chains deterministic again across all Vulkan drivers.
Ribbit added 3 commits 2025-10-04 07:07:01 +02:00
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>
revert [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>
[vk] Implement Shader Read Barrier
Some checks failed
eden-license / license-header (pull_request) Failing after 25s
b41f131670
requested reviews from MaranBr, Lizzie, CamilleLaVey, Maufeat, crueter, MrPurple666 2025-10-04 07:07:01 +02:00
Ribbit force-pushed shaderreadbarrier from b41f131670 to 8b210fd7a4 2025-10-04 07:07:11 +02:00 Compare
requested reviews from wildcard and removed review requests for MrPurple666, Maufeat 2025-10-04 09:22:33 +02:00
Ribbit force-pushed shaderreadbarrier from 8b210fd7a4 to ab90bc74e0 2025-10-04 09:27:40 +02:00 Compare
crueter requested changes 2025-10-04 09:50:24 +02:00
Dismissed
@ -64,6 +64,7 @@ void MaxwellDMA::Launch() {
// TODO(Subv): Perform more research and implement all features of this engine.
const LaunchDMA& launch = regs.launch_dma;
ASSERT(launch.interrupt_type == LaunchDMA::InterruptType::NONE);
ASSERT(launch.data_transfer_type == LaunchDMA::DataTransferType::NON_PIPELINED);
Owner

rebase fail

rebase fail
Ribbit marked this conversation as resolved
@ -156,6 +157,8 @@ void MaxwellDMA::Launch() {
}
void MaxwellDMA::CopyBlockLinearToPitch() {
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
Owner

rebase fail

rebase fail
Ribbit marked this conversation as resolved
Ribbit force-pushed shaderreadbarrier from ab90bc74e0 to cc28b585e3 2025-10-04 09:59:32 +02:00 Compare
requested review from crueter 2025-10-04 10:03:53 +02:00
Author
Contributor

Git commands are denying me access to edit this for some reason so idk how to resolve it so I just updated my branch instead

Git commands are denying me access to edit this for some reason so idk how to resolve it so I just updated my branch instead
Ribbit force-pushed shaderreadbarrier from cc28b585e3 to efda6ed9a6 2025-10-04 22:41:33 +02:00 Compare
Author
Contributor

Fixed my mistake earlier so it wont conflict now

Fixed my mistake earlier so it wont conflict now
Ribbit added 1 commit 2025-10-04 22:44:54 +02:00
Add missing header
All checks were successful
eden-license / license-header (pull_request) Successful in 20s
7ebabb1745
MaranBr approved these changes 2025-10-04 22:52:06 +02:00
crueter approved these changes 2025-10-04 23:55:59 +02:00
MaranBr merged commit 268918aece into master 2025-10-04 23:58:08 +02:00
Sign in to join this conversation.
No description provided.