graphics: draw single indexed indirect draws from GPU-read arguments

This commit is contained in:
nmzik committed 2026-10-22 16:12:20 +02:00
1 parent b54057942d
commit c513a4a13a
7 files changed
+185 -98

No files matched your search

+4 -1
View File
@@ -57,6 +57,8 @@ struct DrawIndexArgs {
uint32_t first_instance = 0;
DrawOffsetSource offset_source = DrawOffsetSource::DrawState;
uint32_t render_target_slice_offset = 0;
// Nonzero: the GPU reads this VkDrawIndexedIndirectCommand; index_count is INDEX_BUFFER_SIZE.
uint64_t indirect_args = 0;
};
struct DrawAutoArgs {
@@ -163,7 +165,8 @@ public:
std::span<PreparedBindings* const> bindings);
private:
void DrawIndex(uint64_t submit_id, CommandBuffer& buffer, const DrawIndexArgs& args);
// False, with nothing drawn, when the shaders cannot take indirect_args from the GPU.
bool DrawIndex(uint64_t submit_id, CommandBuffer& buffer, const DrawIndexArgs& args);
void DrawAuto(uint64_t submit_id, CommandBuffer& buffer, const DrawAutoArgs& args);
struct GraphicsBindings {