Blender V5.0
GPU_batch.hh File Reference
#include "BLI_index_range.hh"
#include "BLI_utildefines.h"
#include "GPU_index_buffer.hh"
#include "GPU_shader.hh"
#include "GPU_storage_buffer.hh"
#include "GPU_vertex_buffer.hh"

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::gpu

Macros

#define GPU_BATCH_OWNS_NONE   GPU_BATCH_INVALID

Enumerations

enum  GPUBatchFlag {
  GPU_BATCH_INVALID = 0 , GPU_BATCH_OWNS_VBO = (1 << 0) , GPU_BATCH_OWNS_VBO_MAX = (GPU_BATCH_OWNS_VBO << (GPU_BATCH_VBO_MAX_LEN - 1)) , GPU_BATCH_OWNS_VBO_ANY = ((GPU_BATCH_OWNS_VBO << GPU_BATCH_VBO_MAX_LEN) - 1) ,
  GPU_BATCH_OWNS_INDEX = (GPU_BATCH_OWNS_VBO_MAX << 1) , GPU_BATCH_INIT = (1 << 26) , GPU_BATCH_BUILDING = (1 << 26) , GPU_BATCH_DIRTY = (1 << 27)
}

Functions

Buffers Management
int GPU_batch_vertbuf_add (blender::gpu::Batch *batch, blender::gpu::VertBuf *vertex_buf, bool own_vbo)
void GPU_batch_elembuf_set (blender::gpu::Batch *batch, blender::gpu::IndexBuf *index_buf, bool own_ibo)
bool GPU_batch_vertbuf_has (const blender::gpu::Batch *batch, const blender::gpu::VertBuf *vertex_buf)
Procedural drawing

A draw-call always need a batch to be issued. These are dummy batches that contains no vertex data and can be used to render geometry without per vertex inputs.

blender::gpu::Batch * GPU_batch_procedural_points_get ()
blender::gpu::Batch * GPU_batch_procedural_lines_get ()
blender::gpu::Batch * GPU_batch_procedural_triangles_get ()
blender::gpu::Batch * GPU_batch_procedural_triangle_strips_get ()
Module init/exit
void gpu_batch_init ()
void gpu_batch_exit ()

Variables

static constexpr int GPU_BATCH_VBO_MAX_LEN = 16
static constexpr int GPU_BATCH_VAO_STATIC_LEN = 3
static constexpr int GPU_BATCH_VAO_DYN_ALLOC_COUNT = 16

Creation

#define GPU_batch_create(primitive_type, vertex_buf, index_buf)
#define GPU_batch_init(batch, primitive_type, vertex_buf, index_buf)
blender::gpu::Batch * GPU_batch_create_ex (GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)
blender::gpu::Batch * GPU_batch_create_procedural (GPUPrimType primitive_type, int32_t vertex_count)
void GPU_batch_init_ex (blender::gpu::Batch *batch, GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)
void GPU_batch_copy (blender::gpu::Batch *batch_dst, blender::gpu::Batch *batch_src)

Deletion

#define GPU_BATCH_CLEAR_SAFE(batch)
#define GPU_BATCH_DISCARD_SAFE(batch)
void GPU_batch_clear (blender::gpu::Batch *batch)
void GPU_batch_zero (blender::gpu::Batch *batch)
void GPU_batch_discard (blender::gpu::Batch *batch)

Shader Binding & Uniforms

#define GPU_batch_uniform_1i(batch, name, x)
#define GPU_batch_uniform_1b(batch, name, x)
#define GPU_batch_uniform_1f(batch, name, x)
#define GPU_batch_uniform_2f(batch, name, x, y)
#define GPU_batch_uniform_3f(batch, name, x, y, z)
#define GPU_batch_uniform_4f(batch, name, x, y, z, w)
#define GPU_batch_uniform_2fv(batch, name, val)
#define GPU_batch_uniform_3fv(batch, name, val)
#define GPU_batch_uniform_4fv(batch, name, val)
#define GPU_batch_uniform_2fv_array(batch, name, len, val)
#define GPU_batch_uniform_4fv_array(batch, name, len, val)
#define GPU_batch_uniform_mat4(batch, name, val)
#define GPU_batch_uniformbuf_bind(batch, name, ubo)
#define GPU_batch_texture_bind(batch, name, tex)
void GPU_batch_set_shader (blender::gpu::Batch *batch, blender::gpu::Shader *shader, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_batch_program_set_builtin (blender::gpu::Batch *batch, GPUBuiltinShader shader_id)
void GPU_batch_program_set_builtin_with_config (blender::gpu::Batch *batch, GPUBuiltinShader shader_id, GPUShaderConfig sh_cfg)
void GPU_batch_program_set_imm_shader (blender::gpu::Batch *batch)
void GPU_batch_bind_as_resources (blender::gpu::Batch *batch, blender::gpu::Shader *shader, const blender::gpu::shader::SpecializationConstants *constants=nullptr)
void GPU_batch_draw (blender::gpu::Batch *batch)
void GPU_batch_draw_range (blender::gpu::Batch *batch, int vertex_first, int vertex_count)
void GPU_batch_draw_instance_range (blender::gpu::Batch *batch, int instance_first, int instance_count)
void GPU_batch_draw_advanced (blender::gpu::Batch *batch, int vertex_first, int vertex_count, int instance_first, int instance_count)
void GPU_batch_draw_indirect (blender::gpu::Batch *batch, blender::gpu::StorageBuf *indirect_buf, intptr_t offset)
void GPU_batch_multi_draw_indirect (blender::gpu::Batch *batch, blender::gpu::StorageBuf *indirect_buf, int count, intptr_t offset, intptr_t stride)
void GPU_batch_draw_parameter_get (blender::gpu::Batch *batch, int *r_vertex_count, int *r_vertex_first, int *r_base_index, int *r_instance_count)
blender::IndexRange GPU_batch_draw_expanded_parameter_get (GPUPrimType input_prim_type, GPUPrimType output_prim_type, int vertex_count, int vertex_first, int output_primitive_cout)

Detailed Description

GPU geometry batch.

Contains Vertex Buffers, Index Buffers, and Shader reference, altogether representing a drawable entity. It is meant to be used for drawing large (> 1000 vertices) reusable (drawn multiple times) model with complex data layout. In other words, it is meant for all cases where the immediate drawing module (imm) is inadequate.

Vertex & Index Buffers can be owned by a batch. In such case they will be freed when the batch gets cleared or discarded.

Definition in file GPU_batch.hh.

Macro Definition Documentation

◆ GPU_BATCH_CLEAR_SAFE

#define GPU_BATCH_CLEAR_SAFE ( batch)
Value:
do { \
if (batch != nullptr) { \
GPU_batch_clear(batch); \
GPU_batch_zero(batch); \
} \
} while (0)
struct @021025263243242147216143265077100330027142264337::@225245033123204053237120173316075113304004012000 batch

Definition at line 183 of file GPU_batch.hh.

Referenced by blender::draw::DRW_mesh_batch_cache_create_requested(), and blender::draw::mesh_batch_cache_check_vertex_group().

◆ GPU_batch_create

#define GPU_batch_create ( primitive_type,
vertex_buf,
index_buf )

◆ GPU_BATCH_DISCARD_SAFE

◆ GPU_batch_init

#define GPU_batch_init ( batch,
primitive_type,
vertex_buf,
index_buf )
Value:
GPU_batch_init_ex(batch, primitive_type, vertex_buf, index_buf, (GPUBatchFlag)0)
void GPU_batch_init_ex(blender::gpu::Batch *batch, GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)

Initialize a cleared #blender::gpu::Batch without buffer ownership. A #blender::gpu::Batch is in cleared state if it was just allocated using GPU_batch_calloc() or cleared using GPU_batch_clear().

Definition at line 159 of file GPU_batch.hh.

Referenced by blender::draw::DRW_mesh_batch_cache_create_requested().

◆ GPU_BATCH_OWNS_NONE

#define GPU_BATCH_OWNS_NONE   GPU_BATCH_INVALID

Definition at line 56 of file GPU_batch.hh.

◆ GPU_batch_texture_bind

#define GPU_batch_texture_bind ( batch,
name,
tex )
Value:
int GPU_shader_get_sampler_binding(blender::gpu::Shader *shader, const char *name)
void GPU_texture_bind(blender::gpu::Texture *texture, int unit)
const char * name

Definition at line 288 of file GPU_batch.hh.

Referenced by blf_batch_draw().

◆ GPU_batch_uniform_1b

#define GPU_batch_uniform_1b ( batch,
name,
x )
Value:
void GPU_shader_uniform_1b(blender::gpu::Shader *sh, const char *name, bool value)

Definition at line 270 of file GPU_batch.hh.

◆ GPU_batch_uniform_1f

#define GPU_batch_uniform_1f ( batch,
name,
x )

◆ GPU_batch_uniform_1i

#define GPU_batch_uniform_1i ( batch,
name,
x )
Value:
void GPU_shader_uniform_1i(blender::gpu::Shader *sh, const char *name, int value)

Set uniform variables for the shader currently bound to the #blender::gpu::Batch.

Definition at line 269 of file GPU_batch.hh.

Referenced by blf_batch_draw(), ED_screen_draw_edges(), gpu_viewport_draw_colormanaged(), blender::ed::vse::sequencer_draw_scopes(), and wm_xr_raycast_draw().

◆ GPU_batch_uniform_2f

#define GPU_batch_uniform_2f ( batch,
name,
x,
y )
Value:
void GPU_shader_uniform_2f(blender::gpu::Shader *sh, const char *name, float x, float y)

Definition at line 272 of file GPU_batch.hh.

◆ GPU_batch_uniform_2fv

#define GPU_batch_uniform_2fv ( batch,
name,
val )
Value:
void GPU_shader_uniform_2fv(blender::gpu::Shader *sh, const char *name, const float data[2])

Definition at line 277 of file GPU_batch.hh.

Referenced by button2d_draw_intern(), draw_line_bounds(), draw_line_loop(), and draw_line_pairs().

◆ GPU_batch_uniform_2fv_array

#define GPU_batch_uniform_2fv_array ( batch,
name,
len,
val )
Value:
void GPU_shader_uniform_2fv_array(blender::gpu::Shader *sh, const char *name, int len, const float(*val)[2])
uint len

Definition at line 280 of file GPU_batch.hh.

◆ GPU_batch_uniform_3f

#define GPU_batch_uniform_3f ( batch,
name,
x,
y,
z )
Value:
void GPU_shader_uniform_3f(blender::gpu::Shader *sh, const char *name, float x, float y, float z)
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117

Definition at line 273 of file GPU_batch.hh.

◆ GPU_batch_uniform_3fv

#define GPU_batch_uniform_3fv ( batch,
name,
val )
Value:
void GPU_shader_uniform_3fv(blender::gpu::Shader *sh, const char *name, const float data[3])

Definition at line 278 of file GPU_batch.hh.

Referenced by blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), draw_widgetbase_batch(), UI_widgetbase_draw_cache_flush(), and wm_xr_raycast_draw().

◆ GPU_batch_uniform_4f

#define GPU_batch_uniform_4f ( batch,
name,
x,
y,
z,
w )
Value:
GPU_shader_uniform_4f((batch)->shader, name, x, y, z, w);
void GPU_shader_uniform_4f(blender::gpu::Shader *sh, const char *name, float x, float y, float z, float w)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition btQuadWord.h:119

Definition at line 275 of file GPU_batch.hh.

Referenced by waveform_draw_one().

◆ GPU_batch_uniform_4fv

#define GPU_batch_uniform_4fv ( batch,
name,
val )

◆ GPU_batch_uniform_4fv_array

#define GPU_batch_uniform_4fv_array ( batch,
name,
len,
val )
Value:
void GPU_shader_uniform_4fv_array(blender::gpu::Shader *sh, const char *name, int len, const float(*val)[4])

Definition at line 282 of file GPU_batch.hh.

Referenced by blender::ed::space_node::draw_node_socket_batch(), draw_widgetbase_batch(), blender::ed::space_node::nodesocket_cache_flush(), ui_draw_dropshadow(), UI_draw_roundbox_4fv_ex(), UI_widgetbase_draw_cache_flush(), and wm_xr_raycast_draw().

◆ GPU_batch_uniform_mat4

#define GPU_batch_uniform_mat4 ( batch,
name,
val )
Value:
void GPU_shader_uniform_mat4(blender::gpu::Shader *sh, const char *name, const float data[4][4])

Definition at line 284 of file GPU_batch.hh.

◆ GPU_batch_uniformbuf_bind

#define GPU_batch_uniformbuf_bind ( batch,
name,
ubo )
Value:
int GPU_shader_get_ubo_binding(blender::gpu::Shader *shader, const char *name)
void GPU_uniformbuf_bind(blender::gpu::UniformBuf *ubo, int slot)

Definition at line 286 of file GPU_batch.hh.

Referenced by blender::ed::space_node::nodelink_batch_draw(), and ui_draw_but_UNITVEC().

Enumeration Type Documentation

◆ GPUBatchFlag

Enumerator
GPU_BATCH_INVALID 

Invalid default state.

GPU_BATCH_OWNS_VBO 

blender::gpu::VertBuf ownership. (One bit per vbo)

GPU_BATCH_OWNS_VBO_MAX 
GPU_BATCH_OWNS_VBO_ANY 
GPU_BATCH_OWNS_INDEX 

blender::gpu::IndexBuf ownership.

GPU_BATCH_INIT 

Has been initialized. At least one VBO is set.

GPU_BATCH_BUILDING 

Batch is initialized but its VBOs are still being populated. (optional)

GPU_BATCH_DIRTY 

Cached data need to be rebuild. (VAO, PSO, ...)

Definition at line 37 of file GPU_batch.hh.

Function Documentation

◆ GPU_batch_bind_as_resources()

void GPU_batch_bind_as_resources ( blender::gpu::Batch * batch,
blender::gpu::Shader * shader,
const blender::gpu::shader::SpecializationConstants * constants = nullptr )

Bind vertex and index buffers to SSBOs using Frequency::GEOMETRY.

References batch.

Referenced by blender::ed::greasepencil::image_render::draw_grease_pencil_stroke(), blender::draw::command::Draw::execute(), and blender::draw::command::DrawMulti::execute().

◆ GPU_batch_clear()

void GPU_batch_clear ( blender::gpu::Batch * batch)

Clear a #blender::gpu::Batch without freeing its own memory. The #blender::gpu::Batch can then be reused using GPU_batch_init(). Discards all owned vertex and index buffers.

References batch.

◆ GPU_batch_copy()

void GPU_batch_copy ( blender::gpu::Batch * batch_dst,
blender::gpu::Batch * batch_src )

DEPRECATED: It is easy to loose ownership with this. To be removed. This will share the VBOs with the new batch.

◆ GPU_batch_create_ex()

blender::gpu::Batch * GPU_batch_create_ex ( GPUPrimType primitive_type,
blender::gpu::VertBuf * vertex_buf,
blender::gpu::IndexBuf * index_buf,
GPUBatchFlag owns_flag )

◆ GPU_batch_create_procedural()

◆ GPU_batch_discard()

◆ GPU_batch_draw()

◆ GPU_batch_draw_advanced()

void GPU_batch_draw_advanced ( blender::gpu::Batch * batch,
int vertex_first,
int vertex_count,
int instance_first,
int instance_count )

Draw the #blender::gpu::Batch custom parameters. IMPORTANT: This does not bind/unbind shader and does not call GPU_matrix_bind().

A vertex_count of 0 will use the default number of vertex. An instance_count of 0 will use the default number of instances.

Note
No out-of-bound access check is made on the vertex buffers since they are tricky to detect. Double check that the range of vertex has data or that the data isn't read by the shader.

References batch.

Referenced by blf_batch_draw(), blender::ed::greasepencil::image_render::draw_grease_pencil_stroke(), blender::draw::command::Draw::execute(), blender::gpu::Immediate::polyline_draw_workaround(), and blender::gpu::tests::ShaderSpecializationConst::validate().

◆ GPU_batch_draw_expanded_parameter_get()

blender::IndexRange GPU_batch_draw_expanded_parameter_get ( GPUPrimType input_prim_type,
GPUPrimType output_prim_type,
int vertex_count,
int vertex_first,
int output_primitive_cout )

◆ GPU_batch_draw_indirect()

void GPU_batch_draw_indirect ( blender::gpu::Batch * batch,
blender::gpu::StorageBuf * indirect_buf,
intptr_t offset )

Issue a single draw call using arguments sourced from a blender::gpu::StorageBuf. The argument are expected to be valid for the type of geometry contained by this #blender::gpu::Batch (index or non-indexed).

The indirect buffer needs to be synced after filling its contents and before calling this function using GPU_storagebuf_sync_as_indirect_buffer.

For more info see the GL documentation: https://registry.khronos.org/OpenGL-Refpages/gl4/html/glDrawArraysIndirect.xhtml

References batch.

Referenced by blender::draw::command::DrawIndirect::execute(), and blender::draw::command::DrawMulti::execute().

◆ GPU_batch_draw_instance_range()

void GPU_batch_draw_instance_range ( blender::gpu::Batch * batch,
int instance_first,
int instance_count )

Draw multiple instances of the #blender::gpu::Batch with custom instance range. Ensures the associated shader is bound. TODO(fclem) remove this behavior.

An instance_count of 0 will use the default number of instances. The instance_first sets the start of the instance-rate attributes.

Note
this can be used even if the #blender::gpu::Batch contains no instance-rate attributes.
No out-of-bound access check is made on the vertex buffers since they are tricky to detect. Double check that the range of vertex has data or that the data isn't read by the shader.

References batch.

Referenced by blender::ed::vse::StripsDrawBatch::flush_batch(), blender::ed::vse::ThumbsDrawBatch::flush_batch(), blender::ed::space_node::nodelink_batch_draw(), blender::ed::space_node::nodesocket_cache_flush(), pygpu_batch_draw_instanced(), and UI_widgetbase_draw_cache_flush().

◆ GPU_batch_draw_parameter_get()

void GPU_batch_draw_parameter_get ( blender::gpu::Batch * batch,
int * r_vertex_count,
int * r_vertex_first,
int * r_base_index,
int * r_instance_count )

Return indirect draw call parameters for this #blender::gpu::Batch. NOTE: r_base_index is set to -1 if not using an index buffer.

References batch.

Referenced by blender::draw::command::DrawMultiBuf::generate_commands().

◆ GPU_batch_draw_range()

void GPU_batch_draw_range ( blender::gpu::Batch * batch,
int vertex_first,
int vertex_count )

Draw the #blender::gpu::Batch with vertex count and instance count from its vertex buffers lengths. Ensures the associated shader is bound. TODO(fclem) remove this behavior.

A vertex_count of 0 will use the default number of vertex. The vertex_first sets the start of the instance-rate attributes.

Note
No out-of-bound access check is made on the vertex buffers since they are tricky to detect. Double check that the range of vertex has data or that the data isn't read by the shader.

References batch.

Referenced by blender::ed::vse::SeqQuadsBatch::draw(), knifetool_draw(), pygpu_batch_draw_range(), and wm_xr_controller_model_draw().

◆ GPU_batch_elembuf_set()

void GPU_batch_elembuf_set ( blender::gpu::Batch * batch,
blender::gpu::IndexBuf * index_buf,
bool own_ibo )

Set the index buffer of a #blender::gpu::Batch.

Note
Override any previously assigned index buffer (and free it if owned).

References batch.

Referenced by DRW_ibo_request().

◆ gpu_batch_exit()

void gpu_batch_exit ( )

Definition at line 541 of file gpu_batch.cc.

References gpu_batch_presets_exit().

Referenced by GPU_exit().

◆ gpu_batch_init()

void gpu_batch_init ( )

Definition at line 536 of file gpu_batch.cc.

References gpu_batch_presets_init().

Referenced by GPU_init().

◆ GPU_batch_init_ex()

void GPU_batch_init_ex ( blender::gpu::Batch * batch,
GPUPrimType primitive_type,
blender::gpu::VertBuf * vertex_buf,
blender::gpu::IndexBuf * index_buf,
GPUBatchFlag owns_flag )

Initialize a cleared #blender::gpu::Batch with explicit buffer ownership. A #blender::gpu::Batch is in cleared state if it was just allocated using GPU_batch_calloc() or cleared using GPU_batch_clear().

References batch.

Referenced by DRW_batch_requested().

◆ GPU_batch_multi_draw_indirect()

void GPU_batch_multi_draw_indirect ( blender::gpu::Batch * batch,
blender::gpu::StorageBuf * indirect_buf,
int count,
intptr_t offset,
intptr_t stride )

Issue count draw calls using arguments sourced from a blender::gpu::StorageBuf. The stride (in bytes) control the spacing between each command description. The argument are expected to be valid for the type of geometry contained by this #blender::gpu::Batch (index or non-indexed).

The indirect buffer needs to be synced after filling its contents and before calling this function using GPU_storagebuf_sync_as_indirect_buffer.

For more info see the GL documentation: https://registry.khronos.org/OpenGL-Refpages/gl4/html/glMultiDrawArraysIndirect.xhtml

References batch, and count.

◆ GPU_batch_procedural_lines_get()

blender::gpu::Batch * GPU_batch_procedural_lines_get ( )

Batch with no attributes, suited for rendering procedural geometry. IMPORTANT: The returned batch is only valid for the current context.

Definition at line 515 of file gpu_batch.cc.

References blender::gpu::Context::get(), and blender::gpu::Context::procedural_lines_batch_get().

Referenced by blender::draw::command::procedural_batch_get(), and blender::draw::detail::PassBase< DrawCommandBufType >::procedural_batch_get().

◆ GPU_batch_procedural_points_get()

blender::gpu::Batch * GPU_batch_procedural_points_get ( )

Batch with no attributes, suited for rendering procedural geometry. IMPORTANT: The returned batch is only valid for the current context.

Definition at line 510 of file gpu_batch.cc.

References blender::gpu::Context::get(), and blender::gpu::Context::procedural_points_batch_get().

Referenced by blender::draw::command::procedural_batch_get(), and blender::draw::detail::PassBase< DrawCommandBufType >::procedural_batch_get().

◆ GPU_batch_procedural_triangle_strips_get()

blender::gpu::Batch * GPU_batch_procedural_triangle_strips_get ( )

Batch with no attributes, suited for rendering procedural geometry. IMPORTANT: The returned batch is only valid for the current context.

Definition at line 525 of file gpu_batch.cc.

References blender::gpu::Context::get(), and blender::gpu::Context::procedural_triangle_strips_batch_get().

Referenced by blender::draw::command::procedural_batch_get(), and blender::draw::detail::PassBase< DrawCommandBufType >::procedural_batch_get().

◆ GPU_batch_procedural_triangles_get()

blender::gpu::Batch * GPU_batch_procedural_triangles_get ( )

Batch with no attributes, suited for rendering procedural geometry. IMPORTANT: The returned batch is only valid for the current context.

Definition at line 520 of file gpu_batch.cc.

References blender::gpu::Context::get(), and blender::gpu::Context::procedural_triangles_batch_get().

Referenced by blender::draw::command::procedural_batch_get(), and blender::draw::detail::PassBase< DrawCommandBufType >::procedural_batch_get().

◆ GPU_batch_program_set_builtin()

◆ GPU_batch_program_set_builtin_with_config()

void GPU_batch_program_set_builtin_with_config ( blender::gpu::Batch * batch,
GPUBuiltinShader shader_id,
GPUShaderConfig sh_cfg )

References batch.

◆ GPU_batch_program_set_imm_shader()

void GPU_batch_program_set_imm_shader ( blender::gpu::Batch * batch)

Bind program bound to IMM (immediate mode) to the #blender::gpu::Batch.

XXX: Use this with much care. Drawing with the #blender::gpu::Batch API is not compatible with IMM. DO NOT DRAW WITH THE BATCH BEFORE CALLING immUnbindProgram.

References batch.

Referenced by gpu_viewport_draw_colormanaged().

◆ GPU_batch_set_shader()

◆ GPU_batch_vertbuf_add()

◆ GPU_batch_vertbuf_has()

bool GPU_batch_vertbuf_has ( const blender::gpu::Batch * batch,
const blender::gpu::VertBuf * vertex_buf )

Returns true if the #GPUbatch has vertex_buf in its vertex buffer list.

Note
The search is only conducted on the non-instance rate vertex buffer list.

References batch.

◆ GPU_batch_zero()

void GPU_batch_zero ( blender::gpu::Batch * batch)

References batch.

Variable Documentation

◆ GPU_BATCH_VAO_DYN_ALLOC_COUNT

int GPU_BATCH_VAO_DYN_ALLOC_COUNT = 16
staticconstexpr

Definition at line 35 of file GPU_batch.hh.

Referenced by blender::gpu::GLVaoCache::insert().

◆ GPU_BATCH_VAO_STATIC_LEN

int GPU_BATCH_VAO_STATIC_LEN = 3
staticconstexpr

Definition at line 34 of file GPU_batch.hh.

◆ GPU_BATCH_VBO_MAX_LEN