diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-10-29 19:25:57 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-10-29 19:25:57 -0500 |
commit | 6d09a20c8263f02e1685a24ca01298544fdfecac (patch) | |
tree | 240d81b3c9feaddf02c2caeadebbb056c5d4718d /servers/rendering/rendering_device_graph.h | |
parent | 9169ace8f2ee5cfbc0dd51e833d88930524b11f1 (diff) | |
parent | d36a8724324b5c8f1e4679717d009ae3210afd20 (diff) | |
download | redot-engine-6d09a20c8263f02e1685a24ca01298544fdfecac.tar.gz |
Merge pull request #97247 from thimenesup/draw_indirect_rd
Add draw indirect to Rendering Device
Diffstat (limited to 'servers/rendering/rendering_device_graph.h')
-rw-r--r-- | servers/rendering/rendering_device_graph.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/servers/rendering/rendering_device_graph.h b/servers/rendering/rendering_device_graph.h index 89eb44494b..e52ab0c2f5 100644 --- a/servers/rendering/rendering_device_graph.h +++ b/servers/rendering/rendering_device_graph.h @@ -69,6 +69,8 @@ public: TYPE_CLEAR_ATTACHMENTS, TYPE_DRAW, TYPE_DRAW_INDEXED, + TYPE_DRAW_INDIRECT, + TYPE_DRAW_INDEXED_INDIRECT, TYPE_EXECUTE_COMMANDS, TYPE_NEXT_SUBPASS, TYPE_SET_BLEND_CONSTANTS, @@ -472,6 +474,20 @@ private: uint32_t first_index = 0; }; + struct DrawListDrawIndirectInstruction : DrawListInstruction { + RDD::BufferID buffer; + uint32_t offset = 0; + uint32_t draw_count = 0; + uint32_t stride = 0; + }; + + struct DrawListDrawIndexedIndirectInstruction : DrawListInstruction { + RDD::BufferID buffer; + uint32_t offset = 0; + uint32_t draw_count = 0; + uint32_t stride = 0; + }; + struct DrawListEndRenderPassInstruction : DrawListInstruction { // No contents. }; @@ -684,6 +700,8 @@ public: void add_draw_list_clear_attachments(VectorView<RDD::AttachmentClear> p_attachments_clear, VectorView<Rect2i> p_attachments_clear_rect); void add_draw_list_draw(uint32_t p_vertex_count, uint32_t p_instance_count); void add_draw_list_draw_indexed(uint32_t p_index_count, uint32_t p_instance_count, uint32_t p_first_index); + void add_draw_list_draw_indirect(RDD::BufferID p_buffer, uint32_t p_offset, uint32_t p_draw_count, uint32_t p_stride); + void add_draw_list_draw_indexed_indirect(RDD::BufferID p_buffer, uint32_t p_offset, uint32_t p_draw_count, uint32_t p_stride); void add_draw_list_execute_commands(RDD::CommandBufferID p_command_buffer); void add_draw_list_next_subpass(RDD::CommandBufferType p_command_buffer_type); void add_draw_list_set_blend_constants(const Color &p_color); |