No rendering with VK_KHR_Multiview on GTX 1080 for >1 view (multiple drivers versions)

On the GTX 1080, with multiple views (>1 view) using the VK_KHR_Multiview extension, the render target images appear corrupted as I cannot view them in RenderDoc (both swapchain and offscreen VkImages) or through the standard GLFW window.

Tested on different hardware (all Windows 10, i7-6850K, driver version in parantheses):

  • GTX 1080 (419.67, 430.64, 430.86) - work for 1 view, but fails for 2 views (cannot view render target)
  • RTX 2070 (430.64) - works for both 1 view and 2 views
  • RTX 2080 Ti (418.81) - works for both 1 view and 2 views

Oddly enough, the GTX 1080 does work on Sascha Willem’s multiview example.

Affected project here:

thanks for reporting the issue. We have filed an internal bug to track this issue.

There are several applications/examples available in the iMSTK project. Can you point to the application, along with the steps to reproduce the issue you are seeing?

Sorry for the late response. On compilation select the CMake options (iMSTK_USE_Vulkan and iMSTK_Enable_VR). Probably the best example to test is the Example-Rendering example. All examples exhibit this behavior, but there are two ways to reproduce it:

  1. Turn on VR mode by replacing in any of the examples "auto sdk = std::make_shared();" with "auto sdk = std::make_shared(false, true);"
  2. Change the line in "imstkVulkanRenderer.h" line 363 from "uint32_t m_numViews = 1;" to "uint32_t m_numViews = 2;".

Option 2 is probably easiest since you don’t need VR headset to test. If the rendering works (as is my experience on the RTX cards), it will display two renderings side-by-side in the render window.

Also, I tested on GTX 1080 Ti, and it had the same problem as the GTX 1080. If you are testing, let me know if you have any problems.

Root caused the issue to an application bug. The following patch fixes it:

— a/Source/Rendering/VulkanRenderer/imstkVulkanRenderer.cpp
+++ b/Source/Rendering/VulkanRenderer/imstkVulkanRenderer.cpp
@@ -1440,7 +1440,7 @@ VulkanRenderer::initializePostProcesses()

 m_HDRTonemaps.resize(m_numViews);
 for (uint32_t i = 0; i < m_numViews; i++)
 {
  •    m_HDRTonemaps[i] = std::make_shared<VulkanPostProcess>(this, <b>m_numViews</b>, m_width, m_height);
    
  •    m_HDRTonemaps[i] = std::make_shared<VulkanPostProcess>(this, <b>1</b>, m_width, m_height);
       m_HDRTonemaps[i]->addInputImage(&m_HDRImageSampler, &m_HDRImageView[m_postProcessingChain->m_lastOutput][0]);
       m_HDRTonemaps[i]->m_framebuffer->setColor(m_LDRImage[i], &m_LDRImageView[i], VulkanFormats::FINAL_FORMAT);
       m_HDRTonemaps[i]->initialize(this, VulkanShaderPath::PostProcessing + "HDR_tonemap_frag.spv");
    

You are just getting lucky on RTX cards and not seeing the issue.