Skip to content

Commit 8017c8c

Browse files
committed
Expose bindings to compute dispatch indirect rendering device
1 parent 7682bc3 commit 8017c8c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

doc/classes/RenderingDevice.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@
138138
Submits the compute list for processing on the GPU. This is the compute equivalent to [method draw_list_draw].
139139
</description>
140140
</method>
141+
<method name="compute_list_dispatch_indirect">
142+
<return type="void" />
143+
<param index="0" name="compute_list" type="int" />
144+
<param index="1" name="buffer" type="RID" />
145+
<param index="2" name="offset" type="int" />
146+
<description>
147+
Submits the compute list for processing on the GPU with the given group counts stored in the [param buffer] at [param offset]. Buffer must have been created with [constant STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT] flag.
148+
</description>
149+
</method>
141150
<method name="compute_list_end">
142151
<return type="void" />
143152
<description>

servers/rendering/rendering_device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5549,6 +5549,7 @@ void RenderingDevice::_bind_methods() {
55495549
ClassDB::bind_method(D_METHOD("compute_list_set_push_constant", "compute_list", "buffer", "size_bytes"), &RenderingDevice::_compute_list_set_push_constant);
55505550
ClassDB::bind_method(D_METHOD("compute_list_bind_uniform_set", "compute_list", "uniform_set", "set_index"), &RenderingDevice::compute_list_bind_uniform_set);
55515551
ClassDB::bind_method(D_METHOD("compute_list_dispatch", "compute_list", "x_groups", "y_groups", "z_groups"), &RenderingDevice::compute_list_dispatch);
5552+
ClassDB::bind_method(D_METHOD("compute_list_dispatch_indirect", "compute_list", "buffer", "offset"), &RenderingDevice::compute_list_dispatch_indirect);
55525553
ClassDB::bind_method(D_METHOD("compute_list_add_barrier", "compute_list"), &RenderingDevice::compute_list_add_barrier);
55535554
ClassDB::bind_method(D_METHOD("compute_list_end"), &RenderingDevice::compute_list_end);
55545555

0 commit comments

Comments
 (0)