Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support indirect draw count buffers #53

Open
lawfuyang opened this issue Apr 2, 2024 · 0 comments
Open

Support indirect draw count buffers #53

lawfuyang opened this issue Apr 2, 2024 · 0 comments

Comments

@lawfuyang
Copy link

ExecuteIndirect & vkCmdDrawIndirectCount both support taking in a buffer as an argument for draw counts. However, this is not implemented, and as a result, the user will be forced to always provide conservative values for the 'drawCount' argument for indirect draw commands.

In addition, it seems like both RenderDoc & PIX doesn't really like to replay empty indirect draw calls, as they will release the graphic driver & unload the reply when attempted to reply indirect commands, at least on my machine. Without a buffer for draw counts, empty indirect draw calls are common when any sort of GPU culling is implemented.

I have modified nvrhi files in my own private repo to support draw count buffer for d3d12 and it has resolved the issue with RenderDoc. I'm not exactly sure what's the underlying low level API issue regarding RenderDoc & empty indirect draw calls, but the issue went away. Admittedly, compacting my indirect buffers to discard empty draw arguments would also likely solve this issue.

Nonetheless, officially supporting draw count buffers for indirect commands in this library would be beneficial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant