[1.0.0] Visual Artifacting in Vulkan mode

Moderator: Raze Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
ReaperAA
Posts: 51
Joined: Fri Oct 19, 2018 8:27 am
Graphics Processor: nVidia with Vulkan support

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by ReaperAA »

I just tested this bug on my laptop with AMD Radeon 530 and I can confirm that there are visual artifacts in Vulkan renderer.

EDIT: I also tried turning off palette emulation and the bug still exists.

EDIT2: Posted my .ini file
You do not have the required permissions to view the files attached to this post.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49192
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by Graf Zahl »

So it happens with both palette emulation on and off? Can you make a few screenshots? The more images we see, the better the chance to get an idea what's up.
User avatar
ReaperAA
Posts: 51
Joined: Fri Oct 19, 2018 8:27 am
Graphics Processor: nVidia with Vulkan support

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by ReaperAA »

Graf Zahl wrote:So it happens with both palette emulation on and off? Can you make a few screenshots? The more images we see, the better the chance to get an idea what's up.
Ok wait let me get some screenshots

One thing I have noticed is that the color artifacts start appearing at a larger distance when the resolution is higher.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49192
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by Graf Zahl »

I noticed that, too, and immediately suspected some side effect of mipmap/anisotropic filtering at play here. It wouldn't be the first time AMD had problems with that.
User avatar
HydroFS02
Posts: 17
Joined: Mon Apr 05, 2021 9:19 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by HydroFS02 »

I'll just drop my .ini file here, Didn't expect this to blow up overnight quite like this. I have no post-processing enabled and I tried with both palette emulation on and off, as well as texture filtering. The issue still persists.
raze-Hydro.ini
Rachael wrote:I realize you said your drivers are up to date, but this does seem like likely a driver problem to me. Are you able to do any sort of rollbacks to see?
Earliest driver it will allow me to rollback to is March 10th 2021. Did not solve the issue, Also tried using an experimental test version.
Graf Zahl wrote:Could you also start the game with '+vk_debug 1' and post the output here? Sometimes that may reveal some problems.
I tried that but i'm not sure what to look for regarding the output. I'm not the most tech literate person in the world unless someone can point me in the right direction.
You do not have the required permissions to view the files attached to this post.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49192
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by Graf Zahl »

I wouldn't want you to interpret the output, just post it here, in the hope one of us developers can make sense of it.
User avatar
HydroFS02
Posts: 17
Joined: Mon Apr 05, 2021 9:19 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by HydroFS02 »

This probably isn't what you're meaning, but here's the log from playing a couple levels with VK_debug 1. I guess i should've specified that I didn't know if there was a specific document or file that had the output.
You do not have the required permissions to view the files attached to this post.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49192
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by Graf Zahl »

Hm, ok. I forgot that this only works when installing the Vulkan SDK, I guess that's a bit much for a non-developer.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by InsanityBringer »

I have all the Vulkan SDK stuff set up on a RX 280, I should be able to give it a try here in a bit.

The GCN 4 line of cards seems pretty finicky with Vulkan, as evidenced by the bugs I was helping chase down in PsyDoom. AMD texture alignment requirements are also pretty large all over the board, it seems.

EDIT: Had to fiddle around with the configurator some to get it to work, but I've attached the log file:


EDIT 2: I didn't actually start a level in that log, if I do so there's some extra output:

Code: Select all

[vulkan error] Validation Error: [ VUID-vkCmdBlitImage-srcImageLayout-00221 ] Object 0: handle = VulkanFrameBuffer.mDrawCommands, name = VulkanFrameBuffer.mDrawCommands, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x7727610b | vkCmdBlitImage(): Cannot use VkImage 0xe6bc0400000000a1[VkRenderBuffers.SceneColor] (layer=0 mip=0) with specific layout VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL that doesn't match the previous known layout VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. The Vulkan spec states: srcImageLayout must specify the layout of the image subresources of srcImage specified in pRegions at the time this command is executed on a VkDevice (https://vulkan.lunarg.com/doc/view/1.2.162.1/windows/1.2-extensions/vkspec.html#VUID-vkCmdBlitImage-srcImageLayout-00221)
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = VulkanFrameBuffer.mDrawCommands, name = VulkanFrameBuffer.mDrawCommands, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | Submitted command buffer expects VkImage 0xe6bc0400000000a1[VkRenderBuffers.SceneColor] (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL.
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from BaseThreadInitThunk
Called from RtlUserThreadStart


[vulkan error] Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = VulkanFrameBuffer.mDrawCommands, name = VulkanFrameBuffer.mDrawCommands, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | Submitted command buffer expects VkImage 0xe6bc0400000000a1[VkRenderBuffers.SceneColor] (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL.
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from vkNegotiateLoaderLayerInterfaceVersion
Called from BaseThreadInitThunk
Called from RtlUserThreadStart
EDIT 3: No idea how important this is (if it's just a coincidence or if it's actually meaningful), but turning on at least 4x MSAA solves all visual corruption on my end. 2x is insufficient, but anything 4 or above will do it.
Last edited by InsanityBringer on Thu Apr 08, 2021 1:11 pm, edited 1 time in total.
User avatar
HydroFS02
Posts: 17
Joined: Mon Apr 05, 2021 9:19 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by HydroFS02 »

Turning on 4x MSAA seemed to have solved the corruption on my end, too. I guess somehow I must've skipped over that option in the menu. :oops:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49192
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by Graf Zahl »

That's still not normal.

@InsanityBringer:
I need the stuff it prints in the level when it renders the corrupt textures. The output from before is for other stuff - it's bad enough that something's wrong there but it seems to be isolated occurences.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by InsanityBringer »

The output while playing the game is only limited to those 3 messages, plus one more that comes after a second or two. For posterity, I've attached a log with some gameplay that should show these messages. If I need to fiddle with the validation layer settings any to get more, let me know.
Cacodemon345
Posts: 422
Joined: Fri Dec 22, 2017 1:53 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by Cacodemon345 »

There's a couple of Combined Image Sampler validation errors in that log.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49192
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by Graf Zahl »

I have seen them, but what does this mean. This Vulkan validation layer has a tendency of giving messages that are all Greek to non-specialists. :?
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: [1.0.0] Visual Artifacting in Vulkan mode

Post by InsanityBringer »

honestly I can't add much since I'm still at the "hello triangle" phase of learning this mess, but one thing I am noticing is that a lot of the messages are related to image layout transitions, something that AMD is very smug about conformance for.

You're the last person I want to hear that from, AMD...

Return to “Closed Bugs [Raze]”