doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
12.82k stars 827 forks source link

Apex Legends - Validation failure VUID-vkCmdDraw-None-04584 (Image subresources overlap) #2629

Open baryluk opened 2 years ago

baryluk commented 2 years ago

No rendering issues, but when running with Vulkan Validation layers enabled, got this:

Right in the main menu continuously (every frame?):

VUID-vkCmdDraw-None-04584(ERROR / SPEC): msgNum: 931225409 - Validation Error: [ VUID-vkCmdDraw-None-04584 ] Object 0: handle = 0x201bf00000201bf, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x5790000000579, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0x201bd00000201bd, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x57d000000057d, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x37815f41 | Descriptor set VkDescriptorSet 0x201bf00000201bf[] encountered the following validation error at vkCmdDraw time: Image subresources of VkImageView 0x5790000000579[] in Descriptor in binding #4 index 0 and VkImageView 0x57d000000057d[] in VkFramebuffer 0x201bd00000201bd[] attachment # 0 overlap. The Vulkan spec states: Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-None-04584)

    Objects: 4
        [0] 0x201bf00000201bf, type: 23, name: NULL
        [1] 0x5790000000579, type: 14, name: NULL
        [2] 0x201bd00000201bd, type: 24, name: NULL
        [3] 0x57d000000057d, type: 14, name: NULL

...

VUID-vkCmdDrawIndexed-None-04584(ERROR / SPEC): msgNum: -1006175049 - Validation Error: [ VUID-vkCmdDrawIndexed-None-04584 ] Object 0: handle = 0x201e000000201e0, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x5790000000579, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0x201de00000201de, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x57d000000057d, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0xc406fcb7 | Descriptor set VkDescriptorSet 0x201e000000201e0[] encountered the following validation error at vkCmdDrawIndexed time: Image subresources of VkImageView 0x5790000000579[] in Descriptor in binding #11 index 0 and VkImageView 0x57d000000057d[] in VkFramebuffer 0x201de00000201de[] attachment # 2 overlap. The Vulkan spec states: Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-04584)

    Objects: 4
        [0] 0x201e000000201e0, type: 23, name: NULL
        [1] 0x5790000000579, type: 14, name: NULL
        [2] 0x201de00000201de, type: 24, name: NULL
        [3] 0x57d000000057d, type: 14, name: NULL

...

VUID-vkCmdDraw-None-04584(ERROR / SPEC): msgNum: 931225409 - Validation Error: [ VUID-vkCmdDraw-None-04584 ] Object 0: handle = 0x203120000020312, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x5790000000579, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0x201bd00000201bd, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x57d000000057d, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x37815f41 | Descriptor set VkDescriptorSet 0x203120000020312[] encountered the following validation error at vkCmdDraw time: Image subresources of VkImageView 0x5790000000579[] in Descriptor in binding #4 index 0 and VkImageView 0x57d000000057d[] in VkFramebuffer 0x201bd00000201bd[] attachment # 0 overlap. The Vulkan spec states: Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-None-04584)
    Objects: 4
        [0] 0x203120000020312, type: 23, name: NULL
        [1] 0x5790000000579, type: 14, name: NULL
        [2] 0x201bd00000201bd, type: 24, name: NULL
        [3] 0x57d000000057d, type: 14, name: NULL
VUID-vkCmdDrawIndexed-None-04584(ERROR / SPEC): msgNum: -1006175049 - Validation Error: [ VUID-vkCmdDrawIndexed-None-04584 ] Object 0: handle = 0x2032c000002032c, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 1: handle = 0x5790000000579, type = VK_OBJECT_TYPE_IMAGE_VIEW; Object 2: handle = 0x203280000020328, type = VK_OBJECT_TYPE_FRAMEBUFFER; Object 3: handle = 0x57d000000057d, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0xc406fcb7 | Descriptor set VkDescriptorSet 0x2032c000002032c[] encountered the following validation error at vkCmdDrawIndexed time: Image subresources of VkImageView 0x5790000000579[] in Descriptor in binding #14 index 0 and VkImageView 0x57d000000057d[] in VkFramebuffer 0x203280000020328[] attachment # 5 overlap. The Vulkan spec states: Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-04584)
    Objects: 4
        [0] 0x2032c000002032c, type: 23, name: NULL
        [1] 0x5790000000579, type: 14, name: NULL
        [2] 0x203280000020328, type: 24, name: NULL
        [3] 0x57d000000057d, type: 14, name: NULL

...

Software information

Name of the game, settings used etc.

System information

Apitrace file(s)

Log files

baryluk commented 2 years ago

apitrace with PROTON_USE_WINED3D=1: r5apex.trace.gz (I hope so)

baryluk commented 2 years ago

I also tried modifying proton Python script to inject apitrace.exe -d dxgi , but the EAC launcher window briefly appears and closes, and game does not start, and no apitraces. And no useful message in the console either.

doitsujin commented 2 years ago

The trace is more or less empty (10 calls). It's unlikely that apitrace will work with the game at all, anti-cheat and stuff.

Anyway, is there any D3D9 component involved in running the game at all (launcher, etc)? It's somewhat normal to happen there, but it should be impossible for this to occur in pure D3D11 code since we already unbind any overlapping textures when the game changes render targets, and this is known to work fine in games relying on that behaviour.

doitsujin commented 2 years ago

Also please note that it is legal to have the current depth-stencil buffer bound as a texture as long as the aspect bound as a texture is not being rendered to and in a read-only layout. Not sure if validation layers recognize that case correctly.

Since there don't seem to be any issues I'm not overly interested in chasing ghosts here unless someone pinpoints this to an actual bug on the DXVK side.

baryluk commented 2 years ago

I think this is from the game itself, as I constantly receive these every frame while in menu in the game itself.

As you said, it can be probably ignored, but wanted to make sure you know.

There is one more about pointSize not set, and that might be from the launcher, as I only receive a single message for it. I will open a separate issue for this tho.

doitsujin commented 2 years ago

We're already aware of the point size thing, no need to report that. There's some debate on whether or not we're actually doing the wrong thing there anyway since we don't use the point size feature, so technically we're not even allowed to set it.