Menu Flickering in recent GZDoom versions (4.11.3)

Moderator: GZDoom Developers

User avatar
mamaluigisbagel
Posts: 526
Joined: Wed Jul 09, 2014 7:25 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Menu Flickering in recent GZDoom versions (4.11.3)

Post by mamaluigisbagel »

Recently, after having problems with OpenGL considering the problems with AMD, I had to switch to Vulkan rendering with newer versions of GZDoom. Unfortunately, I have a problem where some of the menus will flicker like crazy. The only way for me to play GZDoom without issues currently is with OpenGL ES, but considering the issues that also has, it's not ideal. I assume this is a problem with my hardware, but can anyone confirm that? I'll add details about my hardware here, but let me know if I'm missing something as I've never posted my specs somewhere before. I also posted a video demonstration of the problem.

GPU: AMD Radeon R9 380 Series (4 GB of VRAM)
CPU: Intel Core i7-6700K (8 GB of RAM)
OS: Windows 10 64-bit
GZDoom Version: 4.11.3 w/ Vulkan renderer
Mods used: None (I know the video uses some mods because I forgot to turn off autoload, but I tested it afterwards without any mods and still had this issue)

Example:
User avatar
Rachael
Posts: 13885
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by Rachael »

The issue is almost never the hardware itself - especially if one of the backends works properly (OpenGL ES in this case) - it is almost always the drivers. Try updating your drivers. If they are up to date, try downgrading to lower versions. Make sure not to install the Catalyst control panel - or if you do, that auto updates and update checking are disabled - if you need to stick with the older version.

Unfortunately this is the nature of AMD - their hardware is usually rock solid - but the drivers make for an awful representation of that.
User avatar
mamaluigisbagel
Posts: 526
Joined: Wed Jul 09, 2014 7:25 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by mamaluigisbagel »

Well after an hour of uninstalling my current up-to-date driver and installing a previous version, the issue is still there. This is my first PC with an AMD GPU and it's given me nothing but issues. Might have to stick with older versions of GZDoom and ignore mods that require newer versions.
User avatar
merlin86
Posts: 148
Joined: Tue Jan 29, 2008 4:02 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia with Vulkan support

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by merlin86 »

Not at this magnitude but happened to me too with my 4070 when I had enabled VSync + GSync on Nvidia control panel and VSync on GZDoom, disabled on GZDoom, and forced from Nvidia panel and the flicker disappeared.
User avatar
Rachael
Posts: 13885
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by Rachael »

Can you post your .ini?
User avatar
mamaluigisbagel
Posts: 526
Joined: Wed Jul 09, 2014 7:25 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by mamaluigisbagel »

Rachael wrote: Fri Dec 29, 2023 5:43 pm Can you post your .ini?
I attached it to this post, hopefully it will reveal something.
merlin86 wrote: Fri Dec 29, 2023 4:15 pm Not at this magnitude but happened to me too with my 4070 when I had enabled VSync + GSync on Nvidia control panel and VSync on GZDoom, disabled on GZDoom, and forced from Nvidia panel and the flicker disappeared.
Just tried this, replacing Nvidia control panel with AMD Radeon ofc, and still have the issue.
You do not have the required permissions to view the files attached to this post.
User avatar
Rachael
Posts: 13885
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by Rachael »

Oddly, not triggering for me even with the .ini. But thank you, that at least rules out it could be a setting, unfortunately that doesn't rule out literally everything else.
User avatar
mamaluigisbagel
Posts: 526
Joined: Wed Jul 09, 2014 7:25 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by mamaluigisbagel »

Was there a really major change to the Vulkan renderer recently, like in the past year? I know it gets updated a lot, but I'm curious if there was a bigger change than usual. I'm asking because I remember I used to be able to use it flawlessly in previous GZDoom versions without that menu flickering. (I just didn't use it because it made Alt-Tabbing difficult)
User avatar
Rachael
Posts: 13885
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by Rachael »

It was changed to become a custom sub-library called "ZVulkan" but that by itself should not have caused the issues. There were of course, updates along the way. There was a good reason for updating to use ZVulkan but I am not really sure what it was, it's something you'd have to ask the author, himself, who may or may not see this thread.
dpJudas
 
 
Posts: 3159
Joined: Sat May 28, 2016 1:01 pm

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by dpJudas »

The switch to using ZVulkan was to allow me to share code between GZDoom and some other projects of mine: VulkanDrv, Surreal Engine and ZDRay. This wasn't a major change to the codebase - it was just moving some of the classes out of GZDoom itself - sort of like how GZDoom and Raze shares the Common folder.

There are two likely scenarios for the flicker: either it is due to a missing/wrong pipeline barrier, which causes the GPU to begin a task before it is safe to do so, or it is a driver bug. The NVIDIA and AMD implementation differ a lot when it comes to Vulkan. The NVIDIA driver seems to ignore a lot of the API, especially pipeline barrier info and image transitions. AMD on the other hand built their entire driver around it and seems to be using more and more of it as their driver evolve. What this means is that when you test vulkan things with NVIDIA there are things that might work just fine that actually is missing a barrier flag to be fully compliant. That missing flag then causes corruption on AMD cards.

The bad news here is that I don't own an AMD card, so there is really no way for me to debug this. What is even worse is that the async nature of these pipeline barriers mean it can be very hard to figure out exactly where it happens in the first place. This means not only is there very little chance of finding it remote, the amount of work needed to trace it down even with an AMD card can be time consuming.

If it indeed does work on older versions of GZDoom, the best that can probably be done is to use git bisect to trace down exactly which commit broke it. That will most likely lead to a ZVulkan update, but at least those updates are relative minor so it should help trace down which pipeline barriers/image transitions/renderpasses could have had their flags changed. I don't own an AMD card, so I can't do this bisect.
User avatar
Zhs2
Posts: 1294
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by Zhs2 »

I've a RX 6700 XT, running AMD driver version 23.12.1, and I do not experience any of the flickering shown while using Vulkan. The only issue I have that sounds remotely related is that if windowed GZDoom is focused then unfocused too quickly it will stop rendering any new frames, freezing on the currently displayed image until it is closed. Also, funnily enough, alt-tabbing works perfectly for me now, where before tabbing fullscreen GZDoom would not display anything other than GZDoom.
User avatar
mamaluigisbagel
Posts: 526
Joined: Wed Jul 09, 2014 7:25 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by mamaluigisbagel »

I don't know if this info will help at all, but I just noticed the flickering only happens when a menu item is highlighted. If no menu item/option is highlighted, there is no flickering.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by InsanityBringer »

I can confirm flickering on a RX 7800 XT, and I found a way to induce flickering and all sorts of glitches with not only the menu, but also the automap. It seems to be affecting anything 2D, I even had some similar issues with an old interpretation I made of the alpha hud, which used a large amount of Fills to draw the automap image (this was before canvas stuff which would optimize that)

The conditions to reproduce are rather specific, so I've saved off a copy of my config for any potential analysis. To get something reliable, I took a map with lots of monsters, nuts.wad, I loaded it up, using vulkan, with a custom screen scale of 1920x1080, the line width in the automap set to 2, am_cheat set to 2, and while zooming in and out, undefined behavior will cause tons of screen glitches, from the black fill of the automap failing, the green borders of the status bar failing, status bar elements failing, lines from the objects ending up all over the place, and so on. It definitely feels like a sync bug of some sort.

Here's one of the screenshots I took while trying to reproduce this:
Image
User avatar
Zhs2
Posts: 1294
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: Menu Flickering in recent GZDoom versions (4.11.3)

Post by Zhs2 »



Unable to reproduce with the given instructions. My computer is pretty updated to modern hardware if that's a useful detail, cpu+mobo are from last year and gfx card 2 years old at this point?

EDIT: Also the "show things as sprites" setting doesn't seem to trigger anything funny, I tested with it set to off this morning.

Return to “Vulkan Renderer Bugs”