Crash with vulkan when using VK_NV_framebuffer_mixed_samples + dynamic rendering

System details:
* Windows 10 Home 64 bit 10.0.19043 Build 19043
* NVIDIA GTX 1060 6GB
* Driver version: 512.95
* Geforce Experience version: 3.25.1.27
* Vulkan headers version: 1.3.211
* Not overclocked

When using Vulkan 1.3 with dynamic rendering enabled (not as an extension, but as a Vulkan 1.3 feature) the use of mixed samples (enabled via pNext chain of vk::PipelineRenderingCreateInfo linked to the vk::AttachmentSampleCountInfo[AMD/NV] struct) DOES work when using 1 color attachment and 1 depth attachment.

It also works (at least for the scenarios I tested) when all color attachments have the same sample count (only tested with the same sample count as the depth attachment, haven’t tested if having the color attachments all have the same sample count, but a lower sample count than the depth attachment works).

The crash happens (without validation layer errors) when you mix different color attachment sample counts, as in my case:

vk::SampleCountFlagBits::e8 for 1st color attachment
vk::SampleCountFlagBits::e8 for depth attachment
vk::SampleCountFlagBits::e1 for 2nd color attachment
vk::SampleCountFlagBits::e1 for 3rd color attachment
vk::SampleCountFlagBits::e1 for 4th color attachment

The crash happened with and without validation layers in the same way. It did not crash in the following configuration:

vk::SampleCountFlagBits::e8 for depth attachment
vk::SampleCountFlagBits::e1 for 1st color attachment
vk::SampleCountFlagBits::e8 for 2nd color attachment

So swapping the orders did somewhat help, but it did not render anything to the 2nd attachment (1st did render like it supposed to).

The crashes happen at vk::Queue::submit time (exception thrown by vulkan.hpp), it threw a DeviceLostError

The exact same (engine) code is tested on the latest Adrenalin drivers from AMD on a laptop (Windows 10 Home 64 bit 10.0.19044 Build 19044, Adrenalin 22.5.2), where it works without any crashes or errors. Of course, the only thing different on the laptop was using VK_AMD_mixed_attachment_samples instead of VK_NV_framebuffer_mixed_samples

Note 1: I used vkCmdDrawIndirectCount as draw call

Note 2: I’ve already submitted a bug report to the NVIDIA Developer Support Submission Form, (found that page on How to report a bug) so I do not know if this is a duplicate, or that the page (the Game Development Support Form) is not actually for bugs)

Still not fixed as of GeForce Game Ready Driver 516.59

Please provide a minimal test code with executable. We hve no enough information.

1 Like

Hello, sorry for the delay. Here is the solution:

NvidiaBugs.rar (7.7 MB)

The Release/Debug build executables are in x64/[Release/Debug]

This application crashes, but when you change shader.frag, it will not crash.
To change it to not crash you have to remove the writing to outColor1-outColor3, only writing to outColor0 will not crash.

I tested in my original application that if I change to second color attachment sample count to the same as the depth attachment and the first color attachment, writing to the second color attachment will not crash, but then again the third and fourth do.

It also crashes without any validation layers warning.

I think the driver may think that all other color attachments have the same sample count as the first color attachment or something? Since when i try to render to a depth attachment with sample count 8, and a single color attachment of sample count 1, it does not crash

Still crashes as of GeForce Game Ready Driver 526.98

Still crashes with GeForce Game Ready Driver 528.24 (Using RTX 3080 now)

Hi weteringt,
Please fix your error description:
VkDeviceWaitIdle returns VK_ERROR_DEVICE_LOST when using VK_NV_framebuffer_mixed_samples + dynamic rendering , your aplication crashes because you are using unhandled C++ exception. This corrected error descriptoin could help for nVidia driver team

1 Like

I’ll edit the description.

I cannot edit the title and/or the original post anymore, so I’ll just add a reply to the original post, hope that’s enough. Unless there is a different way to update the error description I’m not aware of…

1 Like

VkDeviceWaitIdle returns VK_ERROR_DEVICE_LOST when using VK_NV_framebuffer_mixed_samples + dynamic rendering

Aplication crashes because I’m using unhandled C++ exception, so the actual error is VK_ERROR_DEVICE_LOST, see this reply for a minimal test code with executable.

1 Like

Hi there and a belated welcome to the NVIDIA developer forums to @weteringt!

The change in description actually helped, thank you @AndreyOGL_D3D for pointing that out. I did some digging and it seems that there was a another issue here in the forums with similar error behavior.

Following that and potentially the bug report from weteringt there is a fix being deployed with one of the future driver updates. I don’t expect it as part of a 52x release anymore, but early on with 53x it should be there.

Hopefully that will address the problem in this post!