pcsx2
pcsx2 copied to clipboard
[BUG]: DEMENTO [SLPM-65913] Flickering with high blending on vulkan
Describe the Bug
Using the vulkan renderer and "Blending Accuracy" set to "high", there is flickering on the start menu in DEMENTO when using the vulkan renderer. It doesn't happen using OpenGL, but does happen using both AMDVLK and Mesa/RADV.
The following Vulkan Validation error is spammed repeatedly, no idea if it's related:
[0] 0xf2d26b00000001e5, type: 18, name: NULL
VUID-vkCmdPipelineBarrier-None-07889(ERROR / SPEC): msgNum: -616663606 - Validation Error: [ VUID-vkCmdPipelineBarrier-None-07889 ] Object 0: handle = 0xf2d26b00000001e5, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0xdb3e75ca | vkCmdPipelineBarrier(): Barriers cannot be set during subpass 0 of VkRenderPass 0xf2d26b00000001e5[] with no self-dependency specified. The Vulkan spec states: If vkCmdPipelineBarrier is called within a render pass instance using a VkRenderPass object, the render pass must have been created with at least one subpass dependency that expresses a dependency from the current subpass to itself, does not include VK_DEPENDENCY_BY_REGION_BIT if this command does not, does not include VK_DEPENDENCY_VIEW_LOCAL_BIT if this command does not, and has synchronization scopes and access scopes that are all supersets of the scopes defined in this command (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdPipelineBarrier-None-07889)
Objects: 1
[0] 0xf2d26b00000001e5, type: 18, name: NULL
Reproduction Steps
Use the vulkan renderer, set blending to high, launch DEMENTO (aka. Haunting Ground) and get to the start menu.
Expected Behavior
No flickering, like it is on OpenGL/Software.
PCSX2 Revision
v1.7.5552
Operating System
Linux (64bit) - Specify distro below
If Linux - Specify Distro
Arch
CPU
Ryzen 3700x
GPU
RX 6700 XT
GS Settings
All default, except "Blending Accuracy" set to high.
Emulation Settings
Default.
GS Window Screenshots
Video demonstration: Screencast_20240210_185825.webm
Logs & Dumps
No response
Post a GS dump of the main menu.
Looks fine on Nvidia on Windows.
Does the validation error trip when playing back the GS dump? I don't have access to Vulkan hardware at the moment, but if I can reproduce it with the GSDump and llvmpipe in a VM, can potentially look into it.
Does the validation error trip when playing back the GS dump? I don't have access to Vulkan hardware at the moment, but if I can reproduce it with the GSDump and llvmpipe in a VM, can potentially look into it.
Doesn't seem to happen here, Arch Linux (RX 6600 XT, Mesa/RADV).
Do you have the validation layers installed, and debug device enabled? It should be printing a few things on init, which I can't see there.
The validation errors do trigger when playing back the GS dump for me, also when replaying it with llvmpipe/lavapipe. But the rendering error itself does not happen with llvmpipe.
Great, thanks. I haven't forgot about this, just may not be able to look into it for a week or two (out of the country).
This'll probably have to wait until I have access to Vulkan hardware again. The closest I could come to reproducing it, was by disabling fbfetch with llvmpipe, which #10818 fixes. With that change, I get no validation errors reported.
But, this was also running in an aarch64 VM, with a bunch of other local patches applied, so maybe that's masking the issue. Feel free to try the PR anyway, but I doubt it'll change anything.
I tried the PR and it didn't change anything. Thanks for already looking into it anyways.
Finally got a chance to test on my AMD GPU (RX580) with radv (Ubuntu 23.10). No validation issue, nor was I able to reproduce the bug. It was also fine on my Windows system with a NVIDIA GPU.
It could be GPU specific, but I'd expect to be able to reproduce the validation layer error then, too, which I couldn't. So I have no idea.
Weird, I still get the rendering glitch and validation error on latest pcsx2 and VVL version 1.3.275 with the GS dump. However, I think the validation error is probably unrelated to the rendering glitch, because the glitch goes away if I set blending accuracy to basic, but the validation error stays.
I used the latest layers on windows and didn't get it.
The only thing I could think that might be problematic is the use of the feedback loop image layout, I'm going to replace that with the attachment local read extension, just waiting for more drivers to pick it up..