Alright, with the new beta driver 382.58, the BasicDeviceGeneratedCommandsVk sample is working as intended. Thanks for the fix!
Getting my stuff to work is 50/50. Using just Draw, DrawIndexed and BindPipeline, it works fine. But i cannot get the 4 other (DescriptorSet, PushConstant, IndexBuffer, VertexBuffer) to work. Since the 2 buffer ones work in the sample, this looks like my fault. DescriptorSet works on the first few submits, and i can see the correct output in my window, but as soon as i recycle the cmd buffer, the next submit after i submit the recycled cmd buffer fails with device lost. IndexBuffer/VertexBuffer do not come this far, i get a device lost before i get a correct output.
There seems to be quite some WIP in the spec and the sample:
- For PushConstant, it is unclear if the dynamicCount parameter in the layout represents the size in bytes or sizeof(uint32_t). It is used as both in the pseudo-code.
- The sample fails the validation layers quite heavily: The secondary cmd buffers do not contain any info on the renderpass and do not set the viewport or scissor. Instead the main cmd buffer does this, which is not allowed if it calls vkCmdExecuteCommands.
- vkCmdProcessCommandsNVX is specified to only execute inside a render scope, but this makes only sense for graphics and only in immediate mode without a secondary cmd buffer. If recording to a secondary cmd buffer, that buffer “should” contains the render-pass info. As in 2, calling vkCmdProcessCommandsNVX while inside a renderpass that executes secondary cmd buffers is prohibited. This would mean that one would need to create a pseudo render-pass to process commands into a secondary cmd buffer, which makes no sense.
- I expect that the limits/feature query is WIP and will use VK_KHR_get_physical_device_properties2 in the future.
I have uploaded 2 API dumps of my program, at least the DescriptorSet seems interesting since it creates a correct output before the device is lost.
DescriptSet test: https://pastebin.com/N2TJPzjk
IndexVertexBuffer test: https://pastebin.com/WwRGnJ3B
If you could take a look at these, esp. the DescriptSet one, i would appreciate it.
PS: I have not tested this yet, but i will just throw in that i really hope that DGC is fully compatible with sparse residency since it might be an obscure case.