You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
2D: Switch to VBOs for instance data
- Add support for vertex bindings and UMA vertex buffers in D3D12. - Simplify 2D instance params and move more into per-batch data to save bandwidth Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Co-authored-by: Clay John <claynjohn@gmail.com> Co-authored-by: A Thousand Ships <96648715+athousandships@users.noreply.github.com>
This commit is contained in:
@@ -194,6 +194,7 @@ public:
|
||||
virtual uint8_t *buffer_map(BufferID p_buffer) = 0;
|
||||
virtual void buffer_unmap(BufferID p_buffer) = 0;
|
||||
virtual uint8_t *buffer_persistent_map_advance(BufferID p_buffer, uint64_t p_frames_drawn) = 0;
|
||||
virtual uint64_t buffer_get_dynamic_offsets(Span<BufferID> p_buffers) = 0;
|
||||
virtual void buffer_flush(BufferID p_buffer) {}
|
||||
// Only for a buffer with BUFFER_USAGE_DEVICE_ADDRESS_BIT.
|
||||
virtual uint64_t buffer_get_device_address(BufferID p_buffer) = 0;
|
||||
@@ -301,7 +302,7 @@ public:
|
||||
/**** VERTEX ARRAY ****/
|
||||
/**********************/
|
||||
|
||||
virtual VertexFormatID vertex_format_create(VectorView<VertexAttribute> p_vertex_attribs) = 0;
|
||||
virtual VertexFormatID vertex_format_create(Span<VertexAttribute> p_vertex_attribs, const VertexAttributeBindingsMap &p_vertex_bindings) = 0;
|
||||
virtual void vertex_format_free(VertexFormatID p_vertex_format) = 0;
|
||||
|
||||
/******************/
|
||||
@@ -673,7 +674,7 @@ public:
|
||||
virtual void command_render_draw_indirect_count(CommandBufferID p_cmd_buffer, BufferID p_indirect_buffer, uint64_t p_offset, BufferID p_count_buffer, uint64_t p_count_buffer_offset, uint32_t p_max_draw_count, uint32_t p_stride) = 0;
|
||||
|
||||
// Buffer binding.
|
||||
virtual void command_render_bind_vertex_buffers(CommandBufferID p_cmd_buffer, uint32_t p_binding_count, const BufferID *p_buffers, const uint64_t *p_offsets) = 0;
|
||||
virtual void command_render_bind_vertex_buffers(CommandBufferID p_cmd_buffer, uint32_t p_binding_count, const BufferID *p_buffers, const uint64_t *p_offsets, uint64_t p_dynamic_offsets) = 0;
|
||||
virtual void command_render_bind_index_buffer(CommandBufferID p_cmd_buffer, BufferID p_buffer, IndexBufferFormat p_format, uint64_t p_offset) = 0;
|
||||
|
||||
// Dynamic state.
|
||||
|
||||
Reference in New Issue
Block a user