diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-02-04 20:32:40 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-02-04 20:54:32 +0300 |
commit | 9aa25ff53d9aa5a1ff7a7dd562b4ed95632e45bb (patch) | |
tree | 90648b38a5601c59cb2e9b290a3096318dfb35ec /source/blender/draw/intern/DRW_render.h | |
parent | 665997f1cd6c223f900a78b532ccc5c58091c2e4 (diff) |
DRW: Add compute_ref calls, barriers calls, and vertex_buffer_ref
- Compute ref let the size of dispatch be modified just before drawing.
- Barrier call makes it possible to chain multiple compute passes in one pass.
- DRW_shgroup_vertex_buffer_ref is the analog of DRW_shgroup_uniform_block_ref.
Diffstat (limited to 'source/blender/draw/intern/DRW_render.h')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 8c56d21746d..29a321df556 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -468,6 +468,10 @@ void DRW_shgroup_call_compute(DRWShadingGroup *shgroup, int groups_x_len, int groups_y_len, int groups_z_len); +/** + * \warning this keeps the ref to groups_ref until it actually dispatch. + */ +void DRW_shgroup_call_compute_ref(DRWShadingGroup *shgroup, int groups_ref[3]); void DRW_shgroup_call_procedural_points(DRWShadingGroup *sh, Object *ob, uint point_count); void DRW_shgroup_call_procedural_lines(DRWShadingGroup *sh, Object *ob, uint line_count); void DRW_shgroup_call_procedural_triangles(DRWShadingGroup *sh, Object *ob, uint tri_count); @@ -534,6 +538,11 @@ void DRW_shgroup_stencil_set(DRWShadingGroup *shgroup, void DRW_shgroup_stencil_mask(DRWShadingGroup *shgroup, uint mask); /** + * Issue a barrier command. + */ +void DRW_shgroup_barrier(DRWShadingGroup *shgroup, eGPUBarrier type); + +/** * Issue a clear command. */ void DRW_shgroup_clear_framebuffer(DRWShadingGroup *shgroup, @@ -627,6 +636,9 @@ void DRW_shgroup_uniform_vec4_array_copy(DRWShadingGroup *shgroup, void DRW_shgroup_vertex_buffer(DRWShadingGroup *shgroup, const char *name, struct GPUVertBuf *vertex_buffer); +void DRW_shgroup_vertex_buffer_ref(DRWShadingGroup *shgroup, + const char *name, + struct GPUVertBuf **vertex_buffer); bool DRW_shgroup_is_empty(DRWShadingGroup *shgroup); |