You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +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:
@@ -785,6 +785,7 @@ private:
|
||||
|
||||
struct VertexDescriptionCache {
|
||||
Vector<VertexAttribute> vertex_formats;
|
||||
VertexAttributeBindingsMap bindings;
|
||||
RDD::VertexFormatID driver_id;
|
||||
};
|
||||
|
||||
@@ -1366,6 +1367,7 @@ public:
|
||||
void draw_list_bind_render_pipeline(DrawListID p_list, RID p_render_pipeline);
|
||||
void draw_list_bind_uniform_set(DrawListID p_list, RID p_uniform_set, uint32_t p_index);
|
||||
void draw_list_bind_vertex_array(DrawListID p_list, RID p_vertex_array);
|
||||
void draw_list_bind_vertex_buffers_format(DrawListID p_list, VertexFormatID p_vertex_format, uint32_t p_vertex_count, const Span<RID> &p_vertex_buffers, const Span<uint64_t> &p_offsets = Vector<uint64_t>());
|
||||
void draw_list_bind_index_array(DrawListID p_list, RID p_index_array);
|
||||
void draw_list_set_line_width(DrawListID p_list, float p_width);
|
||||
void draw_list_set_push_constant(DrawListID p_list, const void *p_data, uint32_t p_data_size);
|
||||
@@ -1749,6 +1751,7 @@ private:
|
||||
|
||||
VertexFormatID _vertex_format_create(const TypedArray<RDVertexAttribute> &p_vertex_formats);
|
||||
RID _vertex_array_create(uint32_t p_vertex_count, VertexFormatID p_vertex_format, const TypedArray<RID> &p_src_buffers, const Vector<int64_t> &p_offsets = Vector<int64_t>());
|
||||
void _draw_list_bind_vertex_buffers_format(DrawListID p_list, VertexFormatID p_vertex_format, uint32_t p_vertex_count, const TypedArray<RID> &p_vertex_buffers, const Vector<int64_t> &p_offsets = Vector<int64_t>());
|
||||
|
||||
Ref<RDShaderSPIRV> _shader_compile_spirv_from_source(const Ref<RDShaderSource> &p_source, bool p_allow_cache = true);
|
||||
Vector<uint8_t> _shader_compile_binary_from_spirv(const Ref<RDShaderSPIRV> &p_bytecode, const String &p_shader_name = "");
|
||||
|
||||
Reference in New Issue
Block a user