The other day I was investigating Vulkan bufferDeviceAddress feature and “vertex pulling” technique (basically followed Vulkan Guide).
The results were as expected and application rendered fine on screen.
However when I tried to capture frames using Renderdoc, it missed all the geometry.
Further investigation showed, that Renderdoc captures buffers only during the frame they are uploaded. Subsequent frames have buffers filled with zeros.
Note: code lacks proper checks, has a lot of hardcoded values.
The essential part in pseudo-code:
uploadBuffers();
while (true) {
pushConstants(vertexBufferDeviceAddress);
bindIndexBuffer();
drawIndexed();
}
Steps to reproduce
Compile the project
cmake -S . -B build
cmake --build build
Launch executable from Renderdoc
set working directory to project root
tick "Queue capture", start from frame 0, # of frames 2
The capture for frame 0 has "Copy/Clear Pass" and "Color Pass" properly shows the geometry and buffer contents.
Frame 1 has only "Color pass" as expected, but vertex buffer is filled with zeros.
Also added my capture files to the root of the repository.
Thank you for the reproduction. If it helps this problem is specific to v1.33. RenderDoc v1.32 is capturing the storage buffers correctly in your reproduction
Description
The other day I was investigating Vulkan
bufferDeviceAddress
feature and “vertex pulling” technique (basically followed Vulkan Guide). The results were as expected and application rendered fine on screen. However when I tried to capture frames using Renderdoc, it missed all the geometry.Further investigation showed, that Renderdoc captures buffers only during the frame they are uploaded. Subsequent frames have buffers filled with zeros.
I have put together minimalistic repo that demonstrates the case: https://github.com/Vitaljok/buffer-device-address-bug
The essential part in pseudo-code:
Steps to reproduce
0
, # of frames2
The capture for
frame 0
has "Copy/Clear Pass" and "Color Pass" properly shows the geometry and buffer contents.Frame 1
has only "Color pass" as expected, but vertex buffer is filled with zeros. Also added my capture files to the root of the repository.Environment