Search code examples
c++game-enginevulkanrenderdoc

RenderDoc does not show buffer contents while debugging Vulkan


I'm building a game engine which for now is made to render a basic triangle on the screen. It uses a color attachment, depth attachment and the swap chain image view when creating the frame buffer and the render pass is created supporting for those attachments. Vulkan does not show any validation error messages while creating any of its objects but it does not render anything except for the clear screen color. When I used RenderDoc to debug this issue, it does not show the vertex buffer or the index buffer content. It has the columns and rows right but the values are always set to 0.

Is there any reason for this behavior and what could be the reason for not rendering the basic triangle on the screen? The full repository is at: https://github.com/DhirajWishal/DynamikEngine/tree/renderer-build

Snapshot of the RenderDoc window

Thank You!


Solution

  • I found what the error was. I completely forgot that the maximum and minimum bounds are 1.0f and -1.0f. I unintentionally make the z index -1 which renders it on the boundary. Changing it to 0.0f fixed the issue.

    Thanks everyone!