0

I am using vulkan (ash) to render a scene.

The rendering algorithm first does a raytracing pass (using the traditional pipeline not the NV extensions) then it renders a few frames normally.

On Nvidia it renders fine, on AMD I am experiencing a flicker.

The draw structure is:

  • Raytrace
  • Render 6 meshes with 6 draw calls

If I render that in immediate mode, I get flickering, if I do so in FIFO mode I don't. In immediate mode, if I put the thread to sleep in between the raytracing call and the mesh calls I get flickering no matter how slow the sleep is even at a 1 second sleep the flcikering occurs. The pattern of the flicker is 4 calls rendered normally, 2 calls the RT image is the only thing rendered, as if it had been called after the 6 regular mesh calls, even though it;s issued before them.

All f this suggests a synchronization bug. The issue is I have no idea what I forgot to do.

Each draw call is drawing to a swapchain image, each draw call has this structure:

  • Set up uniforms, desciptor sets, pipelines...

  • Create a fence

  • Submit draw command to queue signaling fence

  • Wait for fence

  • Wait for device

  • Delete fence

I am currently doing that at the end of every single one of the 7 calls. What did I forget to sync? What barrier am I missing?

I am using the passless rendering extension, so I don;t have any render passes. I might need an image barrier on the swapchain as a consequence but I don;t know if, and what it would need to be.

Makogan
  • 8,208
  • 7
  • 44
  • 112
  • No such thing as passless extension. There is a way to do inline passes. The synchronization is the same as regular renderpasses, except through `vkCmdPipelineBarrier` instead of external `VkSubpassDependency`. Rest of your question sorely requires a MCVE, or it is unanswerable. If you have no idea what the problem is, and are intimate with your codebase, then we who do not know your whole codebase have even less idea. – krOoze Oct 02 '22 at 00:35

0 Answers0