|
Blender V4.3
|
#include "DRW_pbvh.hh"#include "draw_attributes.hh"#include "draw_manager_c.hh"#include "BKE_attribute.hh"#include "BKE_curve.hh"#include "BKE_duplilist.hh"#include "BKE_global.hh"#include "BKE_image.hh"#include "BKE_mesh.hh"#include "BKE_object.hh"#include "BKE_paint.hh"#include "BKE_volume.hh"#include "WM_api.hh"#include "wm_window.hh"#include "DNA_curve_types.h"#include "DNA_mesh_types.h"#include "DNA_meta_types.h"#include "DNA_screen_types.h"#include "BLI_array.hh"#include "BLI_hash.h"#include "BLI_link_utils.h"#include "BLI_listbase.h"#include "BLI_math_bits.h"#include "BLI_memblock.h"#include "BLI_mempool.h"#include "GPU_capabilities.hh"#include "GPU_material.hh"#include "GPU_uniform_buffer.hh"#include "intern/gpu_codegen.hh"#include "../../blenlib/intern/list_sort_impl.h"Go to the source code of this file.
Classes | |
| struct | DRWSculptCallbackData |
Macros | |
| #define | DISABLE_DEBUG_SHADER_PRINT_BARRIER |
| #define | KEY(a) ((size_t((a).draw.batch) >> 6) % ARRAY_SIZE(idx)) |
Functions | |
Uniform Buffer Object (DRW_uniformbuffer) | |
| static void | draw_call_sort (DRWCommand *array, DRWCommand *array_tmp, int array_len) |
| void | drw_resource_buffer_finish (DRWData *vmempool) |
Uniforms (DRW_shgroup_uniform) | |
| static void | drw_shgroup_uniform_create_ex (DRWShadingGroup *shgroup, int loc, DRWUniformType type, const void *value, GPUSamplerState sampler_state, int length, int arraysize) |
| static void | drw_shgroup_uniform (DRWShadingGroup *shgroup, const char *name, DRWUniformType type, const void *value, int length, int arraysize) |
| void | DRW_shgroup_uniform_texture_ex (DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex, GPUSamplerState sampler_state) |
| void | DRW_shgroup_uniform_texture (DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex) |
| void | DRW_shgroup_uniform_texture_ref_ex (DRWShadingGroup *shgroup, const char *name, GPUTexture **tex, GPUSamplerState sampler_state) |
| void | DRW_shgroup_uniform_texture_ref (DRWShadingGroup *shgroup, const char *name, GPUTexture **tex) |
| void | DRW_shgroup_uniform_image (DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex) |
| void | DRW_shgroup_uniform_image_ref (DRWShadingGroup *shgroup, const char *name, GPUTexture **tex) |
| void | DRW_shgroup_uniform_block_ex (DRWShadingGroup *shgroup, const char *name, const GPUUniformBuf *ubo DRW_DEBUG_FILE_LINE_ARGS) |
| void | DRW_shgroup_uniform_block_ref_ex (DRWShadingGroup *shgroup, const char *name, GPUUniformBuf **ubo DRW_DEBUG_FILE_LINE_ARGS) |
| void | DRW_shgroup_storage_block_ex (DRWShadingGroup *shgroup, const char *name, const GPUStorageBuf *ssbo DRW_DEBUG_FILE_LINE_ARGS) |
| void | DRW_shgroup_storage_block_ref_ex (DRWShadingGroup *shgroup, const char *name, GPUStorageBuf **ssbo DRW_DEBUG_FILE_LINE_ARGS) |
| void | DRW_shgroup_uniform_bool (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize) |
| void | DRW_shgroup_uniform_float (DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize) |
| void | DRW_shgroup_uniform_vec2 (DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize) |
| void | DRW_shgroup_uniform_vec3 (DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize) |
| void | DRW_shgroup_uniform_vec4 (DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize) |
| void | DRW_shgroup_uniform_int (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize) |
| void | DRW_shgroup_uniform_ivec2 (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize) |
| void | DRW_shgroup_uniform_ivec3 (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize) |
| void | DRW_shgroup_uniform_ivec4 (DRWShadingGroup *shgroup, const char *name, const int *value, int arraysize) |
| void | DRW_shgroup_uniform_mat3 (DRWShadingGroup *shgroup, const char *name, const float(*value)[3]) |
| void | DRW_shgroup_uniform_mat4 (DRWShadingGroup *shgroup, const char *name, const float(*value)[4]) |
| void | DRW_shgroup_uniform_int_copy (DRWShadingGroup *shgroup, const char *name, const int value) |
| void | DRW_shgroup_uniform_ivec2_copy (DRWShadingGroup *shgroup, const char *name, const int *value) |
| void | DRW_shgroup_uniform_ivec3_copy (DRWShadingGroup *shgroup, const char *name, const int *value) |
| void | DRW_shgroup_uniform_ivec4_copy (DRWShadingGroup *shgroup, const char *name, const int *value) |
| void | DRW_shgroup_uniform_bool_copy (DRWShadingGroup *shgroup, const char *name, const bool value) |
| void | DRW_shgroup_uniform_float_copy (DRWShadingGroup *shgroup, const char *name, const float value) |
| void | DRW_shgroup_uniform_vec2_copy (DRWShadingGroup *shgroup, const char *name, const float *value) |
| void | DRW_shgroup_uniform_vec3_copy (DRWShadingGroup *shgroup, const char *name, const float *value) |
| void | DRW_shgroup_uniform_vec4_copy (DRWShadingGroup *shgroup, const char *name, const float *value) |
| void | DRW_shgroup_uniform_mat4_copy (DRWShadingGroup *shgroup, const char *name, const float(*value)[4]) |
| void | DRW_shgroup_vertex_buffer_ex (DRWShadingGroup *shgroup, const char *name, blender::gpu::VertBuf *vertex_buffer DRW_DEBUG_FILE_LINE_ARGS) |
| void | DRW_shgroup_vertex_buffer_ref_ex (DRWShadingGroup *shgroup, const char *name, blender::gpu::VertBuf **vertex_buffer DRW_DEBUG_FILE_LINE_ARGS) |
| void | DRW_shgroup_buffer_texture (DRWShadingGroup *shgroup, const char *name, blender::gpu::VertBuf *vertex_buffer) |
| void | DRW_shgroup_buffer_texture_ref (DRWShadingGroup *shgroup, const char *name, blender::gpu::VertBuf **vertex_buffer) |
Shading Groups (DRW_shgroup) | |
| static void | drw_shgroup_init (DRWShadingGroup *shgroup, GPUShader *shader) |
| static DRWShadingGroup * | drw_shgroup_create_ex (GPUShader *shader, DRWPass *pass) |
| static DRWShadingGroup * | drw_shgroup_material_create_ex (GPUPass *gpupass, DRWPass *pass) |
| static void | drw_shgroup_material_texture (DRWShadingGroup *grp, GPUTexture *gputex, const char *name, GPUSamplerState state) |
| void | DRW_shgroup_add_material_resources (DRWShadingGroup *grp, GPUMaterial *material) |
| GPUVertFormat * | DRW_shgroup_instance_format_array (const DRWInstanceAttrFormat attrs[], int arraysize) |
| DRWShadingGroup * | DRW_shgroup_material_create (GPUMaterial *material, DRWPass *pass) |
| DRWShadingGroup * | DRW_shgroup_create (GPUShader *shader, DRWPass *pass) |
| DRWShadingGroup * | DRW_shgroup_transform_feedback_create (GPUShader *shader, DRWPass *pass, blender::gpu::VertBuf *tf_target) |
| void | DRW_shgroup_state_enable (DRWShadingGroup *shgroup, DRWState state) |
| void | DRW_shgroup_state_disable (DRWShadingGroup *shgroup, DRWState state) |
| void | DRW_shgroup_stencil_set (DRWShadingGroup *shgroup, uint write_mask, uint reference, uint compare_mask) |
| void | DRW_shgroup_stencil_mask (DRWShadingGroup *shgroup, uint mask) |
| void | DRW_shgroup_clear_framebuffer (DRWShadingGroup *shgroup, eGPUFrameBufferBits channels, uchar r, uchar g, uchar b, uchar a, float depth, uchar stencil) |
| bool | DRW_shgroup_is_empty (DRWShadingGroup *shgroup) |
| DRWShadingGroup * | DRW_shgroup_create_sub (DRWShadingGroup *shgroup) |
View (DRW_view) | |
| static void | draw_frustum_boundbox_calc (const float(*viewinv)[4], const float(*projmat)[4], BoundBox *r_bbox) |
| static void | draw_frustum_culling_planes_calc (const float(*persmat)[4], float(*frustum_planes)[4]) |
| static void | draw_frustum_bound_sphere_calc (const BoundBox *bbox, const float(*viewinv)[4], const float(*projmat)[4], const float(*projinv)[4], BoundSphere *bsphere) |
| static void | draw_view_matrix_state_update (DRWView *view, const float viewmat[4][4], const float winmat[4][4]) |
| DRWView * | DRW_view_create (const float viewmat[4][4], const float winmat[4][4], const float(*culling_viewmat)[4], const float(*culling_winmat)[4], DRWCallVisibilityFn *visibility_fn) |
| DRWView * | DRW_view_create_sub (const DRWView *parent_view, const float viewmat[4][4], const float winmat[4][4]) |
| void | DRW_view_update_sub (DRWView *view, const float viewmat[4][4], const float winmat[4][4]) |
| void | DRW_view_update (DRWView *view, const float viewmat[4][4], const float winmat[4][4], const float(*culling_viewmat)[4], const float(*culling_winmat)[4]) |
| const DRWView * | DRW_view_default_get () |
| void | DRW_view_reset () |
| void | DRW_view_default_set (const DRWView *view) |
| void | DRW_view_clip_planes_set (DRWView *view, float(*planes)[4], int plane_len) |
| void | DRW_view_frustum_corners_get (const DRWView *view, BoundBox *corners) |
| void | DRW_view_frustum_planes_get (const DRWView *view, float planes[6][4]) |
| bool | DRW_view_is_persp_get (const DRWView *view) |
| float | DRW_view_near_distance_get (const DRWView *view) |
| float | DRW_view_far_distance_get (const DRWView *view) |
| void | DRW_view_viewmat_get (const DRWView *view, float mat[4][4], bool inverse) |
| void | DRW_view_winmat_get (const DRWView *view, float mat[4][4], bool inverse) |
| void | DRW_view_persmat_get (const DRWView *view, float mat[4][4], bool inverse) |
Passes (DRW_pass) | |
| #define | SORT_IMPL_LINKTYPE DRWShadingGroup |
| #define | SORT_IMPL_FUNC shgroup_sort_fn_r |
| DRWPass * | DRW_pass_create (const char *name, DRWState state) |
| DRWPass * | DRW_pass_create_instance (const char *name, DRWPass *original, DRWState state) |
| void | DRW_pass_link (DRWPass *first, DRWPass *second) |
| bool | DRW_pass_is_empty (DRWPass *pass) |
| void | DRW_pass_foreach_shgroup (DRWPass *pass, void(*callback)(void *user_data, DRWShadingGroup *shgrp), void *user_data) |
| static int | pass_shgroup_dist_sort (const void *a, const void *b) |
| void | DRW_pass_sort_shgroup_z (DRWPass *pass) |
| void | DRW_pass_sort_shgroup_reverse (DRWPass *pass) |
| #define DISABLE_DEBUG_SHADER_PRINT_BARRIER |
IMPORTANT: In order to be able to write to the same print buffer sequentially, we add a barrier to allow multiple shader calls writing to the same buffer. However, this adds explicit synchronization events which might change the rest of the application behavior and hide some bugs. If you know you are using shader debug print in only one shader pass, you can comment this out to remove the aforementioned barrier.
Definition at line 59 of file draw_manager_data.cc.
| #define KEY | ( | a | ) | ((size_t((a).draw.batch) >> 6) % ARRAY_SIZE(idx)) |
Referenced by draw_call_sort().
| #define SCULPT_DEBUG_BUFFERS (G.debug_value == 889) |
Definition at line 1221 of file draw_manager_data.cc.
Referenced by draw_pbvh_nodes(), and drw_sculpt_generate_calls().
| #define SCULPT_DEBUG_COLOR | ( | id | ) | (sculpt_debug_colors[id % 9]) |
Definition at line 1236 of file draw_manager_data.cc.
Referenced by draw_pbvh_nodes(), and DRW_sculpt_debug_cb().
| #define SORT_IMPL_FUNC shgroup_sort_fn_r |
Definition at line 2501 of file draw_manager_data.cc.
| #define SORT_IMPL_LINKTYPE DRWShadingGroup |
Definition at line 2499 of file draw_manager_data.cc.
| eDRWCommandType command_type_get | ( | const uint64_t * | command_type_bits, |
| int | index ) |
Definition at line 845 of file draw_manager_data.cc.
Referenced by draw_command_iter_step(), DRW_pass_sort_shgroup_z(), and DRW_shgroup_is_empty().
|
static |
Definition at line 840 of file draw_manager_data.cc.
Referenced by drw_command_create().
|
static |
Definition at line 65 of file draw_manager_data.cc.
References ARRAY_SIZE, BLI_assert, and KEY.
Referenced by drw_resource_buffer_finish().
|
static |
Definition at line 2069 of file draw_manager_data.cc.
References add_v3_v3(), BoundSphere::center, CLAMP, copy_v3_fl3(), copy_v3_v3(), e, interp_v3_v3v3(), len, len_squared_v3(), len_squared_v3v3(), len_v2(), len_v3v3(), mid_v3_v3v3(), mul_m4_v3(), mul_v2_v2fl(), mul_v3_fl(), mul_v3_project_m4_v3(), N, BoundSphere::radius, sub_v2_v2(), BoundBox::vec, and z().
Referenced by DRW_view_update().
|
static |
Definition at line 2009 of file draw_manager_data.cc.
References BKE_boundbox_init_from_minmax(), left, mul_m4_v3(), mul_project_m4_v3(), projmat_dimensions(), top, and BoundBox::vec.
Referenced by DRW_view_update().
|
static |
Definition at line 2053 of file draw_manager_data.cc.
References normalize_v3(), and planes_from_projmat().
Referenced by DRW_view_update().
|
static |
Definition at line 1249 of file draw_manager_data.cc.
References DRW_shgroup_call_no_cull, DRW_shgroup_create_sub(), DRW_shgroup_uniform_vec3(), blender::index_mask::IndexMask::foreach_index(), blender::Span< T >::is_empty(), SCULPT_DEBUG_BUFFERS, and SCULPT_DEBUG_COLOR.
Referenced by drw_sculpt_generate_calls().
|
static |
Definition at line 2184 of file draw_manager_data.cc.
References copy_m4_m4(), invert_m4_m4(), mul_m4_m4m4(), ViewMatrices::viewinv, ViewMatrices::viewmat, ViewMatrices::wininv, and ViewMatrices::winmat.
Referenced by DRW_view_update(), and DRW_view_update_sub().
| void DRW_buffer_add_entry_array | ( | DRWCallBuffer * | callbuf, |
| const void * | attr[], | ||
| uint | attr_len ) |
Definition at line 1617 of file draw_manager_data.cc.
References BLI_assert, DRWCallBuffer::buf, DRWCallBuffer::buf_select, DRWCallBuffer::count, DRW_BUFFER_VERTS_CHUNK, DST, G, G_FLAG_PICKSEL, GPU_vertbuf_attr_set(), GPU_vertbuf_data_resize(), GPU_vertbuf_get_format(), GPU_vertbuf_get_vertex_alloc(), DRWManager::select_id, UNLIKELY, and UNUSED_VARS_NDEBUG.
| void DRW_buffer_add_entry_struct | ( | DRWCallBuffer * | callbuf, |
| const void * | data ) |
Definition at line 1596 of file draw_manager_data.cc.
References DRWCallBuffer::buf, DRWCallBuffer::buf_select, DRWCallBuffer::count, DRW_BUFFER_VERTS_CHUNK, DST, G, G_FLAG_PICKSEL, GPU_vertbuf_attr_set(), GPU_vertbuf_data_resize(), GPU_vertbuf_get_vertex_alloc(), GPU_vertbuf_vert_set(), DRWManager::select_id, and UNLIKELY.
Referenced by camera_stereoscopy_extra(), drw_shgroup_bone_box(), drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), drw_shgroup_bone_envelope(), drw_shgroup_bone_octahedral(), drw_shgroup_bone_sphere(), drw_shgroup_custom_bone_curve(), OVERLAY_camera_cache_populate(), OVERLAY_edit_metaball_cache_populate(), and OVERLAY_metaball_cache_populate().
Definition at line 635 of file draw_manager_data.cc.
References BKE_curve_texspace_ensure(), BKE_mesh_texspace_get_reference(), BKE_volume_min_max(), bounds(), copy_v3_fl(), Object::data, GS, ID_CU_LEGACY, ID_MB, ID_ME, ID_VO, invert_v3(), mid_v3_v3v3(), mul_v3_v3(), mul_v3_v3fl(), ID::name, negate_v3(), sub_v3_v3v3(), Curve::texspace_location, MetaBall::texspace_location, Curve::texspace_size, and MetaBall::texspace_size.
Referenced by drw_call_obinfos_init().
|
static |
Definition at line 739 of file draw_manager_data.cc.
References BKE_object_boundbox_get(), bounds(), DRWCullingState::bsphere, BoundSphere::center, len_v3v3(), mid_v3_v3v3(), mul_m4_v3(), mul_v3_m4v3(), BoundSphere::radius, UNLIKELY, and DRWCullingState::user_data.
Referenced by drw_resource_handle_new().
| BLI_INLINE void drw_call_matrix_init | ( | DRWObjectMatrix * | ob_mats, |
| const Object * | ob, | ||
| const float(*) | obmat[4] ) |
Definition at line 694 of file draw_manager_data.cc.
References copy_m4_m4(), invert_m4_m4(), DRWObjectMatrix::model, and DRWObjectMatrix::modelinverse.
Referenced by drw_resource_handle_new().
|
static |
Definition at line 708 of file draw_manager_data.cc.
References Object::base_flag, BASE_FROM_DUPLI, BASE_FROM_SET, BASE_SELECTED, BLI_assert, BLI_hash_int_2d(), BLI_hash_string(), Object::color, copy_v4_v4(), DRWManager::draw_ctx, drw_call_calc_orco(), DRW_object_get_dupli_parent(), DST, DRWManager::dupli_source, float, Object::id, Object::index, ID::name, DRWObjectInfos::ob_color, DRWObjectInfos::ob_flag, DRWObjectInfos::ob_index, OB_NEG_SCALE, DRWObjectInfos::ob_random, DRWContextState::obact, DRWObjectInfos::orcotexfac, DupliObject::random_id, and Object::transflag.
Referenced by drw_resource_handle().
|
static |
Definition at line 953 of file draw_manager_data.cc.
References DRW_CMD_BARRIER, drw_command_create(), and DRWCommandBarrier::type.
Referenced by DRW_shgroup_barrier().
|
static |
Definition at line 1011 of file draw_manager_data.cc.
References DRWCommandClear::a, b, DRWCommandClear::b, channels(), DRWCommandClear::clear_channels, DRWCommandClear::depth, DRW_CMD_CLEAR, drw_command_create(), DRWCommandClear::g, DRWCommandClear::r, and DRWCommandClear::stencil.
Referenced by DRW_shgroup_clear_framebuffer().
|
static |
Definition at line 927 of file draw_manager_data.cc.
References DRW_CMD_COMPUTE, drw_command_create(), DRWCommandCompute::groups_x_len, DRWCommandCompute::groups_y_len, and DRWCommandCompute::groups_z_len.
Referenced by DRW_shgroup_call_compute().
|
static |
Definition at line 946 of file draw_manager_data.cc.
References DRW_CMD_COMPUTE_INDIRECT, drw_command_create(), and DRWCommandComputeIndirect::indirect_buf.
Referenced by DRW_shgroup_call_compute_indirect().
|
static |
Definition at line 939 of file draw_manager_data.cc.
References DRW_CMD_COMPUTE_REF, drw_command_create(), and DRWCommandComputeRef::groups_ref.
Referenced by DRW_shgroup_call_compute_ref().
|
static |
Definition at line 850 of file draw_manager_data.cc.
References ARRAY_SIZE, BLI_LINKS_APPEND, BLI_memblock_alloc(), DRWShadingGroup::cmd, DRWCommandChunk::command_len, DRWCommandSmallChunk::command_len, DRWCommandChunk::command_type, DRWCommandSmallChunk::command_type, command_type_set(), DRWCommandChunk::command_used, DRWCommandSmallChunk::command_used, DRWCommandChunk::commands, DRWCommandSmallChunk::commands, DRWData::commands, DRWData::commands_small, DST, DRWShadingGroup::last, and DRWManager::vmempool.
Referenced by drw_command_barrier(), drw_command_clear(), drw_command_compute(), drw_command_compute_indirect(), drw_command_compute_ref(), drw_command_draw(), drw_command_draw_indirect(), drw_command_draw_instance(), drw_command_draw_intance_range(), drw_command_draw_procedural(), drw_command_draw_range(), drw_command_set_mutable_state(), drw_command_set_select_id(), and drw_command_set_stencil_mask().
|
static |
Definition at line 876 of file draw_manager_data.cc.
References batch, DRWCommandDraw::batch, DRW_CMD_DRAW, drw_command_create(), and DRWCommandDraw::handle.
Referenced by DRW_shgroup_call_buffer(), DRW_shgroup_call_buffer_instance(), and DRW_shgroup_call_ex().
|
static |
Definition at line 972 of file draw_manager_data.cc.
References batch, DRWCommandDrawIndirect::batch, DRW_CMD_DRAW_INDIRECT, drw_command_create(), DRWCommandDrawIndirect::handle, and DRWCommandDrawIndirect::indirect_buf.
Referenced by DRW_shgroup_call_procedural_indirect().
|
static |
Definition at line 899 of file draw_manager_data.cc.
References batch, DRWCommandDrawInstance::batch, count, DRW_CMD_DRAW_INSTANCE, drw_command_create(), DRWCommandDrawInstance::handle, DRWCommandDrawInstance::inst_count, and DRWCommandDrawInstance::use_attrs.
Referenced by DRW_shgroup_call_instances(), and DRW_shgroup_call_instances_with_attrs().
|
static |
Definition at line 913 of file draw_manager_data.cc.
References batch, DRWCommandDrawInstanceRange::batch, count, DRW_CMD_DRAW_INSTANCE_RANGE, drw_command_create(), DRWCommandDrawInstanceRange::handle, DRWCommandDrawInstanceRange::inst_count, and DRWCommandDrawInstanceRange::inst_first.
Referenced by DRW_shgroup_call_instance_range().
|
static |
Definition at line 960 of file draw_manager_data.cc.
References batch, DRWCommandDrawProcedural::batch, DRW_CMD_DRAW_PROCEDURAL, drw_command_create(), DRWCommandDrawProcedural::handle, and DRWCommandDrawProcedural::vert_count.
Referenced by drw_shgroup_call_procedural_add_ex().
|
static |
Definition at line 885 of file draw_manager_data.cc.
References batch, DRWCommandDrawRange::batch, count, DRW_CMD_DRAW_RANGE, drw_command_create(), DRWCommandDrawRange::handle, DRWCommandDrawRange::vert_count, and DRWCommandDrawRange::vert_first.
Referenced by DRW_shgroup_call_range().
|
static |
Definition at line 1031 of file draw_manager_data.cc.
References DRWCommandSetMutableState::disable, DRW_CMD_DRWSTATE, drw_command_create(), and DRWCommandSetMutableState::enable.
Referenced by DRW_shgroup_state_disable(), and DRW_shgroup_state_enable().
|
static |
Definition at line 984 of file draw_manager_data.cc.
References BLI_assert, DRW_CMD_SELECTID, drw_command_create(), DRWCommandSetSelectID::select_buf, and DRWCommandSetSelectID::select_id.
Referenced by DRW_shgroup_call_buffer(), DRW_shgroup_call_buffer_instance(), DRW_shgroup_call_ex(), DRW_shgroup_call_instance_range(), DRW_shgroup_call_instances(), DRW_shgroup_call_instances_with_attrs(), drw_shgroup_call_procedural_add_ex(), DRW_shgroup_call_procedural_indirect(), and DRW_shgroup_call_range().
|
static |
Definition at line 996 of file draw_manager_data.cc.
References BLI_assert, DRWCommandSetStencil::comp_mask, DRW_CMD_STENCIL, drw_command_create(), DRWCommandSetStencil::ref, and DRWCommandSetStencil::write_mask.
Referenced by DRW_shgroup_stencil_mask(), and DRW_shgroup_stencil_set().
Can only be called during iteration phase.
Definition at line 790 of file draw_manager_data.cc.
References DST, DRWManager::ob_handle, and DRWManager::resource_handle.
Definition at line 2420 of file draw_manager_data.cc.
References BLI_memblock_alloc(), DRW_handle_increment(), DRW_STATE_PROGRAM_POINT_SIZE, DST, G, G_DEBUG_GPU, DRWManager::pass_handle, DRWData::passes, DRWPass::state, state, STRNCPY, and DRWManager::vmempool.
Referenced by blender::draw::DRW_curves_init(), DRW_hair_init(), DRW_pass_create_instance(), external_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_pass_create(), grease_pencil_layer_cache_add(), and select_debug_engine_init().
Create an instance of the original pass that will execute the same drawcalls but with its own DRWState.
Definition at line 2439 of file draw_manager_data.cc.
References DRW_pass_create(), and state.
| void DRW_pass_foreach_shgroup | ( | DRWPass * | pass, |
| void(* | callback )(void *user_data, DRWShadingGroup *shgrp), | ||
| void * | user_data ) |
Definition at line 2468 of file draw_manager_data.cc.
References callback, and LISTBASE_FOREACH.
| bool DRW_pass_is_empty | ( | DRWPass * | pass | ) |
Definition at line 2454 of file draw_manager_data.cc.
References DRW_pass_is_empty(), DRW_shgroup_is_empty(), and LISTBASE_FOREACH.
Referenced by DRW_pass_is_empty(), OVERLAY_antialiasing_cache_finish(), OVERLAY_edit_mesh_draw(), OVERLAY_image_scene_background_draw(), OVERLAY_outline_draw(), and select_draw_scene().
Link two passes so that they are both rendered if the first one is being drawn.
Definition at line 2447 of file draw_manager_data.cc.
References BLI_assert, and DRWPass::next.
| void DRW_pass_sort_shgroup_reverse | ( | DRWPass * | pass | ) |
Reverse Shading group submission order.
Definition at line 2558 of file draw_manager_data.cc.
References BLI_linklist_reverse(), and DRWShadingGroup::last.
| void DRW_pass_sort_shgroup_z | ( | DRWPass * | pass | ) |
Sort Shading groups by decreasing Z of their first draw call. This is useful for order dependent effect such as alpha-blending.
Definition at line 2507 of file draw_manager_data.cc.
References DRWShadingGroup::cmd, DRWCommandChunk::command_type, command_type_get(), DRWCommandChunk::command_used, DRWCommandChunk::commands, DRWShadingGroup::distance, dot_v3v3(), DRWCommand::draw, DRW_CMD_DRAW, DRW_memblock_elem_from_handle(), DST, DRWShadingGroup::first, DRWCommandDraw::handle, DRWObjectMatrix::model, DRWCommandChunk::next, DRWShadingGroup::next, DRWData::obmats, DRWShadingGroup::original_index, DRWShadingGroup::pass_handle, pass_shgroup_dist_sort(), DRWView::storage, sub_v3_v3v3(), DRWManager::view_active, ViewMatrices::viewinv, DRWManager::vmempool, and DRWShadingGroup::z_sorting.
Referenced by OVERLAY_image_cache_finish().
| void drw_resource_buffer_finish | ( | DRWData * | vmempool | ) |
Definition at line 95 of file draw_manager_data.cc.
References ARRAY_SIZE, BLI_memblock_elem_get(), BLI_memblock_iternew(), BLI_memblock_iterstep(), DRWCommandChunk::command_type, DRWCommandChunk::command_used, DRWCommandChunk::commands, DRWData::commands, draw_call_sort(), DRW_handle_chunk_get(), DRW_handle_id_get(), DRW_RESOURCE_CHUNK_LEN, DRW_uniform_attrs_pool_flush_all(), DST, GPU_uniformbuf_create, GPU_uniformbuf_free(), GPU_uniformbuf_update(), DRWData::matrices_ubo, MEM_callocN, MEM_freeN(), MEM_mallocN_aligned(), MEM_recallocN, DRWData::obattrs_ubo_pool, DRWData::obinfos, DRWData::obinfos_ubo, DRWData::obmats, DRWManager::resource_handle, and DRWData::ubo_len.
Referenced by DRW_draw_select_id(), and DRW_render_instance_buffer_finish().
|
static |
Definition at line 800 of file draw_manager_data.cc.
References drw_call_obinfos_init(), DRW_memblock_elem_from_handle(), drw_resource_handle_new(), drw_uniform_attrs_pool_update(), DST, DRWManager::dupli_parent, DRWManager::dupli_source, DRWManager::ob_handle, DRWManager::ob_state_obinfo_init, DRWData::obattrs_ubo_pool, DRWData::obinfos, DRWShadingGroup::objectinfo, DRWShadingGroup::uniform_attrs, and DRWManager::vmempool.
Referenced by DRW_shgroup_call_buffer(), DRW_shgroup_call_buffer_instance(), DRW_shgroup_call_ex(), DRW_shgroup_call_instance_range(), DRW_shgroup_call_instances(), DRW_shgroup_call_instances_with_attrs(), drw_shgroup_call_procedural_add_ex(), DRW_shgroup_call_procedural_indirect(), and DRW_shgroup_call_range().
|
static |
Definition at line 764 of file draw_manager_data.cc.
References BLI_memblock_alloc(), DRWData::cullstates, drw_call_culling_init(), drw_call_matrix_init(), DRW_handle_increment(), DRW_handle_negative_scale_enable(), DST, OB_NEG_SCALE, DRWData::obinfos, DRWData::obmats, DRWManager::resource_handle, Object::transflag, UNUSED_VARS, and DRWManager::vmempool.
Referenced by drw_resource_handle().
| void DRW_sculpt_debug_cb | ( | blender::bke::pbvh::Node * | node, |
| void * | user_data, | ||
| const float | bmin[3], | ||
| const float | bmax[3], | ||
| PBVHNodeFlags | flag ) |
Definition at line 1276 of file draw_manager_data.cc.
References BKE_boundbox_init_from_minmax(), BKE_pbvh_debug_draw_gen_get(), DRW_debug_bbox(), flag, PBVH_Leaf, PBVH_TexLeaf, and SCULPT_DEBUG_COLOR.
Referenced by basic_cache_populate(), and drw_sculpt_generate_calls().
|
static |
Definition at line 1319 of file draw_manager_data.cc.
References DRWSculptCallbackData::attrs, BKE_paint_get_active_from_context(), BKE_pbvh_draw_debug_cb(), BKE_pbvh_node_frustum_contain_AABB(), BKE_pbvh_node_fully_hidden_get(), blender::bke::pbvh::Tree::draw_data, draw_pbvh_nodes(), DRW_context_state_get(), DRW_debug_modelmat(), DRW_sculpt_debug_cb(), drw_sculpt_get_frustum_planes(), blender::draw::pbvh::DrawCache::ensure_lines_batches(), blender::draw::pbvh::DrawCache::ensure_material_indices(), blender::draw::pbvh::DrawCache::ensure_tris_batches(), DRWContextState::evil_C, DRWSculptCallbackData::fast_mode, min, PBVHFrustumPlanes::num_planes, DRWSculptCallbackData::num_shading_groups, DRWSculptCallbackData::ob, PAINT_FAST_NAVIGATE, PAINT_SCULPT_DELAY_UPDATES, PBVHFrustumPlanes::planes, ptr, RegionView3D::rflag, DRWContextState::rv3d, RV3D_NAVIGATING, RV3D_PAINTING, SCULPT_DEBUG_BUFFERS, DRWSculptCallbackData::shading_groups, DRWSculptCallbackData::use_mats, and DRWSculptCallbackData::use_wire.
Referenced by DRW_shgroup_call_sculpt(), and DRW_shgroup_call_sculpt_with_materials().
Definition at line 1304 of file draw_manager_data.cc.
References DRW_view_default_get(), DRW_view_frustum_planes_get(), mul_m4_v4(), and transpose_m4_m4().
Referenced by drw_sculpt_generate_calls().
| void DRW_shgroup_add_material_resources | ( | DRWShadingGroup * | grp, |
| GPUMaterial * | material ) |
Definition at line 1832 of file draw_manager_data.cc.
References BKE_image_get_gpu_material_texture(), GPUSamplerState::default_sampler(), drw_shgroup_material_texture(), DRW_shgroup_uniform_block, drw_shgroup_uniform_create_ex(), DRW_shgroup_uniform_texture(), DRW_shgroup_uniform_texture_ex(), DRW_UNIFORM_BLOCK_OBATTRS, DRW_UNIFORM_BLOCK_VLATTRS, GPU_ATTRIBUTE_UBO_BLOCK_NAME, GPU_LAYER_ATTRIBUTE_UBO_BLOCK_NAME, GPU_material_layer_attributes(), GPU_material_textures(), GPU_material_uniform_attributes(), GPU_material_uniform_buffer_get(), GPU_shader_get_ubo_binding(), GPU_UBO_BLOCK_NAME, Tex::ima, Tex::iuser, LISTBASE_FOREACH, DRWShadingGroup::shader, tex, ImageGPUTextures::texture, ImageGPUTextures::tile_mapping, and DRWShadingGroup::uniform_attrs.
Referenced by blender::draw::DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), and DRW_shgroup_material_create().
| void DRW_shgroup_barrier | ( | DRWShadingGroup * | shgroup, |
| eGPUBarrier | type ) |
Issue a barrier command.
Definition at line 1115 of file draw_manager_data.cc.
References drw_command_barrier().
| void DRW_shgroup_buffer_texture | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| blender::gpu::VertBuf * | vertex_buffer ) |
Definition at line 596 of file draw_manager_data.cc.
References GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_VERTEX_BUFFER_AS_TEXTURE, GPU_shader_get_sampler_binding(), and DRWShadingGroup::shader.
Referenced by blender::draw::drw_curves_cache_shgrp_attach_resources(), drw_hair_particle_cache_shgrp_attach_resources(), blender::draw::DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), blender::draw::DRW_shgroup_pointcloud_create_sub(), grease_pencil_object_cache_populate(), OVERLAY_outline_grease_pencil(), populate_cache_for_geometry(), and populate_selection_overlay().
| void DRW_shgroup_buffer_texture_ref | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| blender::gpu::VertBuf ** | vertex_buffer ) |
Definition at line 613 of file draw_manager_data.cc.
References GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_VERTEX_BUFFER_AS_TEXTURE_REF, GPU_shader_get_sampler_binding(), and DRWShadingGroup::shader.
Referenced by populate_cache_for_geometry().
| DRWCallBuffer * DRW_shgroup_call_buffer | ( | DRWShadingGroup * | shgroup, |
| GPUVertFormat * | format, | ||
| GPUPrimType | prim_type ) |
Definition at line 1534 of file draw_manager_data.cc.
References GPUVertFormat::attr_len, batch, BLI_assert, BLI_memblock_alloc(), DRWCallBuffer::buf, DRWCallBuffer::buf_select, DRWData::callbuffers, DRWCallBuffer::count, drw_command_draw(), drw_command_set_select_id(), drw_resource_handle(), DRW_temp_batch_request(), DRW_temp_buffer_request(), DST, ELEM, G, G_FLAG_PICKSEL, GPU_COMP_I32, GPU_FETCH_INT, GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRI_FAN, GPU_vertformat_attr_add(), DRWData::idatalist, inst_select_format, and DRWManager::vmempool.
| DRWCallBuffer * DRW_shgroup_call_buffer_instance | ( | DRWShadingGroup * | shgroup, |
| GPUVertFormat * | format, | ||
| blender::gpu::Batch * | geom ) |
Definition at line 1565 of file draw_manager_data.cc.
References GPUVertFormat::attr_len, batch, BLI_assert, BLI_memblock_alloc(), DRWCallBuffer::buf, DRWCallBuffer::buf_select, DRWData::callbuffers, DRWCallBuffer::count, drw_command_draw(), drw_command_set_select_id(), drw_resource_handle(), DRW_temp_batch_instance_request(), DRW_temp_buffer_request(), DST, G, G_FLAG_PICKSEL, GPU_COMP_I32, GPU_FETCH_INT, GPU_vertformat_attr_add(), DRWData::idatalist, inst_select_format, and DRWManager::vmempool.
Referenced by custom_bone_instance_shgroup().
| void DRW_shgroup_call_compute | ( | DRWShadingGroup * | shgroup, |
| int | groups_x_len, | ||
| int | groups_y_len, | ||
| int | groups_z_len ) |
Definition at line 1096 of file draw_manager_data.cc.
References BLI_assert, and drw_command_compute().
Referenced by blender::draw::drw_curves_cache_update_compute(), and drw_hair_particle_cache_update_compute().
| void DRW_shgroup_call_compute_indirect | ( | DRWShadingGroup * | shgroup, |
| GPUStorageBuf * | indirect_buf ) |
Definition at line 1110 of file draw_manager_data.cc.
References drw_command_compute_indirect().
| void DRW_shgroup_call_compute_ref | ( | DRWShadingGroup * | shgroup, |
| int | groups_ref[3] ) |
Definition at line 1105 of file draw_manager_data.cc.
References drw_command_compute_ref().
| void DRW_shgroup_call_ex | ( | DRWShadingGroup * | shgroup, |
| const Object * | ob, | ||
| const float(*) | obmat[4], | ||
| blender::gpu::Batch * | geom, | ||
| bool | bypass_culling, | ||
| void * | user_data ) |
Definition at line 1042 of file draw_manager_data.cc.
References BLI_assert, DRWCullingState::bsphere, DRWData::cullstates, drw_command_draw(), drw_command_set_select_id(), DRW_memblock_elem_from_handle(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, DRWManager::ob_handle, BoundSphere::radius, DRWManager::select_id, DRWCullingState::user_data, and DRWManager::vmempool.
| void DRW_shgroup_call_instance_range | ( | DRWShadingGroup * | shgroup, |
| const Object * | ob, | ||
| blender::gpu::Batch * | geom, | ||
| uint | i_sta, | ||
| uint | i_num ) |
A count of 0 instance will use the default number of instance in the batch.
Definition at line 1084 of file draw_manager_data.cc.
References BLI_assert, drw_command_draw_intance_range(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, and DRWManager::select_id.
| void DRW_shgroup_call_instances | ( | DRWShadingGroup * | shgroup, |
| const Object * | ob, | ||
| blender::gpu::Batch * | geom, | ||
| uint | count ) |
IN_PLACE_INSTANCES defined. TODO: Should be removed. Definition at line 1190 of file draw_manager_data.cc.
References BLI_assert, count, drw_command_draw_instance(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, and DRWManager::select_id.
Referenced by OVERLAY_edit_curve_cache_populate().
| void DRW_shgroup_call_instances_with_attrs | ( | DRWShadingGroup * | shgroup, |
| const Object * | ob, | ||
| blender::gpu::Batch * | geom, | ||
| blender::gpu::Batch * | inst_attributes ) |
Definition at line 1204 of file draw_manager_data.cc.
References batch, BLI_assert, drw_command_draw_instance(), drw_command_set_select_id(), drw_resource_handle(), DRW_temp_batch_instance_request(), DST, G, G_FLAG_PICKSEL, DRWData::idatalist, DRWManager::select_id, and DRWManager::vmempool.
Referenced by overlay_edit_mesh_add_ob_to_pass(), OVERLAY_edit_mesh_cache_populate(), and OVERLAY_particle_cache_populate().
|
static |
Definition at line 1120 of file draw_manager_data.cc.
References BLI_assert, drw_command_draw_procedural(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, and DRWManager::select_id.
Referenced by DRW_shgroup_call_procedural_lines(), DRW_shgroup_call_procedural_points(), and DRW_shgroup_call_procedural_triangles().
| void DRW_shgroup_call_procedural_indirect | ( | DRWShadingGroup * | shgroup, |
| GPUPrimType | primitive_type, | ||
| Object * | ob, | ||
| GPUStorageBuf * | indirect_buf ) |
Definition at line 1157 of file draw_manager_data.cc.
References BLI_assert_msg, drw_cache_procedural_lines_get(), drw_cache_procedural_points_get(), drw_cache_procedural_triangle_strips_get(), drw_cache_procedural_triangles_get(), drw_command_draw_indirect(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRI_STRIP, GPU_PRIM_TRIS, and DRWManager::select_id.
| void DRW_shgroup_call_procedural_lines | ( | DRWShadingGroup * | shgroup, |
| const Object * | ob, | ||
| uint | line_count ) |
Definition at line 1143 of file draw_manager_data.cc.
References drw_cache_procedural_lines_get(), and drw_shgroup_call_procedural_add_ex().
Referenced by OVERLAY_gpencil_legacy_cache_init(), OVERLAY_grease_pencil_cache_init(), and OVERLAY_volume_extra().
| void DRW_shgroup_call_procedural_points | ( | DRWShadingGroup * | shgroup, |
| const Object * | ob, | ||
| uint | point_count ) |
Definition at line 1135 of file draw_manager_data.cc.
References drw_cache_procedural_points_get(), and drw_shgroup_call_procedural_add_ex().
Referenced by OVERLAY_edit_gpencil_legacy_cache_init(), and OVERLAY_lightprobe_cache_populate().
| void DRW_shgroup_call_procedural_triangles | ( | DRWShadingGroup * | shgroup, |
| const Object * | ob, | ||
| uint | tri_count ) |
Definition at line 1149 of file draw_manager_data.cc.
References drw_cache_procedural_triangles_get(), and drw_shgroup_call_procedural_add_ex().
Referenced by GPENCIL_antialiasing_init(), GPENCIL_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_blur(), gpencil_vfx_cache_populate(), gpencil_vfx_colorize(), gpencil_vfx_flip(), gpencil_vfx_glow(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), grease_pencil_layer_cache_add(), OVERLAY_antialiasing_cache_init(), OVERLAY_background_cache_init(), OVERLAY_outline_cache_init(), and select_debug_engine_init().
| void DRW_shgroup_call_range | ( | DRWShadingGroup * | shgroup, |
| const Object * | ob, | ||
| blender::gpu::Batch * | geom, | ||
| uint | v_sta, | ||
| uint | v_num ) |
Definition at line 1072 of file draw_manager_data.cc.
References BLI_assert, drw_command_draw_range(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, and DRWManager::select_id.
Referenced by grease_pencil_object_cache_populate(), motion_path_cache(), and OVERLAY_outline_grease_pencil().
| void DRW_shgroup_call_sculpt | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| bool | use_wire, | ||
| bool | use_mask, | ||
| bool | use_fset, | ||
| bool | use_color, | ||
| bool | use_uv ) |
Definition at line 1426 of file draw_manager_data.cc.
References BKE_object_get_original_mesh(), CD_PROP_FLOAT2, CustomData_get_active_layer_name(), blender::draw::pbvh::GenericRequest::domain, drw_sculpt_generate_calls(), and DRWSculptCallbackData::ob.
Referenced by basic_cache_populate(), OVERLAY_facing_cache_populate(), OVERLAY_fade_cache_populate(), OVERLAY_mode_transfer_cache_populate(), OVERLAY_sculpt_cache_populate(), and OVERLAY_wireframe_cache_populate().
| void DRW_shgroup_call_sculpt_with_materials | ( | DRWShadingGroup ** | shgroups, |
| GPUMaterial ** | gpumats, | ||
| int | num_shgroups, | ||
| const Object * | ob ) |
Definition at line 1479 of file draw_manager_data.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::draw::DRW_AttributeRequest::attribute_name, CD_PROP_FLOAT2, blender::draw::DRW_AttributeRequest::cd_type, CustomData_get_layer_index_n(), Object::data, blender::draw::DRW_AttributeRequest::domain, drw_sculpt_generate_calls(), blender::draw::pbvh::GenericRequest::name, blender::draw::DRW_Attributes::num_requests, DRWSculptCallbackData::ob, blender::draw::DRW_Attributes::requests, and blender::draw::DRW_MeshCDMask::uv.
| void DRW_shgroup_clear_framebuffer | ( | DRWShadingGroup * | shgroup, |
| eGPUFrameBufferBits | channels, | ||
| uchar | r, | ||
| uchar | g, | ||
| uchar | b, | ||
| uchar | a, | ||
| float | depth, | ||
| uchar | stencil ) |
Issue a clear command.
Definition at line 1954 of file draw_manager_data.cc.
References b, and drw_command_clear().
Referenced by GPENCIL_antialiasing_init().
| DRWShadingGroup * DRW_shgroup_create | ( | GPUShader * | shader, |
| DRWPass * | pass ) |
Definition at line 1907 of file draw_manager_data.cc.
References drw_shgroup_create_ex(), and drw_shgroup_init().
Referenced by basic_cache_init(), blender::draw::drw_curves_cache_update_compute(), drw_hair_particle_cache_update_compute(), external_cache_init(), GPENCIL_antialiasing_init(), GPENCIL_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_pass_create(), grease_pencil_layer_cache_add(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_curves_cache_init(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_edit_grease_pencil_cache_init(), OVERLAY_edit_lattice_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_particle_cache_init(), OVERLAY_edit_text_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_facing_cache_init(), OVERLAY_fade_cache_init(), OVERLAY_gpencil_legacy_cache_init(), OVERLAY_grease_pencil_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), OVERLAY_metaball_cache_init(), OVERLAY_mode_transfer_cache_populate(), OVERLAY_motion_path_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_init(), OVERLAY_sculpt_cache_init(), OVERLAY_sculpt_curves_cache_init(), OVERLAY_viewer_attribute_cache_init(), OVERLAY_volume_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), select_cache_init(), and select_debug_engine_init().
|
static |
Definition at line 1787 of file draw_manager_data.cc.
References BLI_LINKS_APPEND, BLI_memblock_alloc(), DRWShadingGroup::cmd, DST, DRWShadingGroup::first, DRWShadingGroup::last, DRWShadingGroup::pass_handle, DRWShadingGroup::shader, DRWData::shgroups, and DRWManager::vmempool.
Referenced by DRW_shgroup_create(), drw_shgroup_material_create_ex(), and DRW_shgroup_transform_feedback_create().
| DRWShadingGroup * DRW_shgroup_create_sub | ( | DRWShadingGroup * | shgroup | ) |
Definition at line 1979 of file draw_manager_data.cc.
References BLI_LINKS_INSERT_AFTER, BLI_memblock_alloc(), DRWShadingGroup::cmd, DRW_memblock_elem_from_handle(), drw_shgroup_init(), DST, DRWShadingGroup::first, DRWShadingGroup::last, DRWShadingGroup::pass_handle, DRWData::passes, DRWShadingGroup::shader, DRWData::shgroups, DRWPass::shgroups, and DRWManager::vmempool.
Referenced by draw_pbvh_nodes(), draw_select_id_edit_mesh(), draw_select_id_mesh(), blender::draw::drw_curves_cache_update_compute(), drw_hair_particle_cache_update_compute(), blender::draw::DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), blender::draw::DRW_shgroup_pointcloud_create_sub(), drw_volume_object_grids_init(), drw_volume_object_mesh_init(), gpencil_vfx_cache_populate(), gpencil_vfx_rim(), grease_pencil_object_cache_populate(), motion_path_cache(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_lightprobe_cache_populate(), OVERLAY_outline_grease_pencil(), OVERLAY_particle_cache_populate(), populate_cache_for_instance(), and wireframe_hair_cache_populate().
|
static |
Definition at line 1649 of file draw_manager_data.cc.
References BLI_assert, DRW_Global::clipping_ubo, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BASE_INSTANCE, DRW_UNIFORM_BLOCK, DRW_UNIFORM_BLOCK_OBINFOS, DRW_UNIFORM_BLOCK_OBMATS, DRW_UNIFORM_MODEL_MATRIX, DRW_UNIFORM_MODEL_MATRIX_INVERSE, DRW_UNIFORM_RESOURCE_CHUNK, DRW_UNIFORM_RESOURCE_ID, G_draw, GPU_shader_get_builtin_block(), GPU_shader_get_builtin_uniform(), GPU_UNIFORM_BASE_INSTANCE, GPU_UNIFORM_BLOCK_DRW_CLIPPING, GPU_UNIFORM_BLOCK_DRW_INFOS, GPU_UNIFORM_BLOCK_DRW_MODEL, GPU_UNIFORM_BLOCK_DRW_VIEW, GPU_UNIFORM_BLOCK_INFO, GPU_UNIFORM_BLOCK_MODEL, GPU_UNIFORM_BLOCK_VIEW, GPU_UNIFORM_CLIPPLANES, GPU_UNIFORM_MODEL, GPU_UNIFORM_MODEL_INV, GPU_UNIFORM_MODELVIEW, GPU_UNIFORM_MODELVIEW_INV, GPU_UNIFORM_MVP, GPU_UNIFORM_NORMAL, GPU_UNIFORM_PROJECTION, GPU_UNIFORM_PROJECTION_INV, GPU_UNIFORM_RESOURCE_CHUNK, GPU_UNIFORM_RESOURCE_ID, GPU_UNIFORM_VIEW, GPU_UNIFORM_VIEW_INV, GPU_UNIFORM_VIEWPROJECTION, GPU_UNIFORM_VIEWPROJECTION_INV, DRWShadingGroup::objectinfo, DRWShadingGroup::uniform_attrs, DRWShadingGroup::uniforms, and DRW_Global::view_ubo.
Referenced by DRW_shgroup_create(), DRW_shgroup_create_sub(), DRW_shgroup_material_create(), and DRW_shgroup_transform_feedback_create().
| GPUVertFormat * DRW_shgroup_instance_format_array | ( | const DRWInstanceAttrFormat | attrs[], |
| int | arraysize ) |
Definition at line 1880 of file draw_manager_data.cc.
References DRWInstanceAttrFormat::components, DRW_ATTR_INT, GPU_COMP_F32, GPU_COMP_I32, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_vertformat_attr_add(), and DRWInstanceAttrFormat::type.
| bool DRW_shgroup_is_empty | ( | DRWShadingGroup * | shgroup | ) |
Definition at line 1966 of file draw_manager_data.cc.
References DRWShadingGroup::cmd, DRWCommandChunk::command_type, command_type_get(), DRWCommandChunk::command_used, DRW_MAX_DRAW_CMD_TYPE, DRWShadingGroup::first, and DRWCommandChunk::next.
Referenced by DRW_pass_is_empty().
| DRWShadingGroup * DRW_shgroup_material_create | ( | GPUMaterial * | material, |
| DRWPass * | pass ) |
Definition at line 1895 of file draw_manager_data.cc.
References DRW_shgroup_add_material_resources(), drw_shgroup_init(), drw_shgroup_material_create_ex(), GPU_material_get_pass(), and GPU_pass_shader_get().
|
static |
Definition at line 1802 of file draw_manager_data.cc.
References drw_shgroup_create_ex(), and GPU_pass_shader_get().
Referenced by DRW_shgroup_material_create().
|
static |
Definition at line 1820 of file draw_manager_data.cc.
References BLI_memblock_alloc(), DRW_shgroup_uniform_texture_ex(), DST, GPU_texture_ref(), DRWData::images, state, and DRWManager::vmempool.
Referenced by DRW_shgroup_add_material_resources().
| void DRW_shgroup_state_disable | ( | DRWShadingGroup * | shgroup, |
| DRWState | state ) |
Definition at line 1936 of file draw_manager_data.cc.
References drw_command_set_mutable_state(), DRW_STATE_NO_DRAW, and state.
Referenced by gpencil_layer_cache_add(), gpencil_vfx_cache_populate(), gpencil_vfx_rim(), grease_pencil_layer_cache_add(), OVERLAY_armature_cache_init(), and OVERLAY_extra_cache_init().
| void DRW_shgroup_state_enable | ( | DRWShadingGroup * | shgroup, |
| DRWState | state ) |
State is added to #Pass.state while drawing. Use to temporarily enable draw options.
Definition at line 1931 of file draw_manager_data.cc.
References drw_command_set_mutable_state(), DRW_STATE_NO_DRAW, and state.
Referenced by gpencil_layer_cache_add(), gpencil_vfx_cache_populate(), gpencil_vfx_rim(), grease_pencil_layer_cache_add(), OVERLAY_armature_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_curves_cache_init(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_extra_cache_init(), and OVERLAY_paint_cache_init().
| void DRW_shgroup_stencil_mask | ( | DRWShadingGroup * | shgroup, |
| uint | mask ) |
TODO: remove this function. Obsolete version. mask is actually reference value.
Definition at line 1949 of file draw_manager_data.cc.
References drw_command_set_stencil_mask().
Referenced by gpencil_layer_cache_add(), and grease_pencil_layer_cache_add().
| void DRW_shgroup_stencil_set | ( | DRWShadingGroup * | shgroup, |
| uint | write_mask, | ||
| uint | reference, | ||
| uint | compare_mask ) |
Reminders:
Definition at line 1941 of file draw_manager_data.cc.
References drw_command_set_stencil_mask().
| void DRW_shgroup_storage_block_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUStorageBuf *ssbo | DRW_DEBUG_FILE_LINE_ARGS ) |
Definition at line 343 of file draw_manager_data.cc.
References BLI_assert, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_STORAGE_BLOCK, GPU_shader_get_ssbo_binding(), printf, and DRWShadingGroup::shader.
| void DRW_shgroup_storage_block_ref_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUStorageBuf **ssbo | DRW_DEBUG_FILE_LINE_ARGS ) |
Definition at line 366 of file draw_manager_data.cc.
References BLI_assert, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_STORAGE_BLOCK_REF, GPU_shader_get_ssbo_binding(), printf, and DRWShadingGroup::shader.
| DRWShadingGroup * DRW_shgroup_transform_feedback_create | ( | GPUShader * | shader, |
| DRWPass * | pass, | ||
| blender::gpu::VertBuf * | tf_target ) |
Definition at line 1914 of file draw_manager_data.cc.
References BLI_assert, GPUSamplerState::default_sampler(), drw_shgroup_create_ex(), drw_shgroup_init(), drw_shgroup_uniform_create_ex(), and DRW_UNIFORM_TFEEDBACK_TARGET.
|
static |
Definition at line 232 of file draw_manager_data.cc.
References BLI_assert, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BLOCK, DRW_UNIFORM_BLOCK_REF, DRW_UNIFORM_STORAGE_BLOCK, DRW_UNIFORM_STORAGE_BLOCK_REF, DRW_UNIFORM_TEXTURE, DRW_UNIFORM_TEXTURE_REF, ELEM, GPU_shader_get_uniform(), and DRWShadingGroup::shader.
Referenced by DRW_shgroup_uniform_bool(), DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_float(), DRW_shgroup_uniform_float_copy(), DRW_shgroup_uniform_int(), DRW_shgroup_uniform_int_copy(), DRW_shgroup_uniform_ivec2(), DRW_shgroup_uniform_ivec2_copy(), DRW_shgroup_uniform_ivec3(), DRW_shgroup_uniform_ivec3_copy(), DRW_shgroup_uniform_ivec4(), DRW_shgroup_uniform_ivec4_copy(), DRW_shgroup_uniform_mat3(), DRW_shgroup_uniform_mat4(), DRW_shgroup_uniform_vec2(), DRW_shgroup_uniform_vec2_copy(), DRW_shgroup_uniform_vec3(), DRW_shgroup_uniform_vec3_copy(), DRW_shgroup_uniform_vec4(), and DRW_shgroup_uniform_vec4_copy().
| void DRW_shgroup_uniform_block_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUUniformBuf *ubo | DRW_DEBUG_FILE_LINE_ARGS ) |
Definition at line 299 of file draw_manager_data.cc.
References BLI_assert, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BLOCK, GPU_shader_get_ubo_binding(), printf, and DRWShadingGroup::shader.
| void DRW_shgroup_uniform_block_ref_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUUniformBuf **ubo | DRW_DEBUG_FILE_LINE_ARGS ) |
Definition at line 321 of file draw_manager_data.cc.
References BLI_assert, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BLOCK_REF, GPU_shader_get_ubo_binding(), printf, and DRWShadingGroup::shader.
| void DRW_shgroup_uniform_bool | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize ) |
Definition at line 389 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
Referenced by GPENCIL_cache_init(), and OVERLAY_edit_uv_cache_init().
| void DRW_shgroup_uniform_bool_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const bool | value ) |
Definition at line 492 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by blender::draw::DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_vfx_glow(), gpencil_vfx_rim(), gpencil_vfx_shadow(), grease_pencil_layer_cache_add(), motion_path_cache(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_curves_cache_init(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_edit_grease_pencil_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_particle_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), OVERLAY_outline_cache_init(), OVERLAY_outline_grease_pencil(), OVERLAY_paint_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), populate_cache_for_geometry(), and populate_selection_overlay().
|
static |
Definition at line 168 of file draw_manager_data.cc.
References DRWUniform::arraysize, BLI_assert, BLI_LINKS_PREPEND, BLI_memblock_alloc(), DRWUniform::block, DRWUniform::block_ref, DRW_UNIFORM_BLOCK, DRW_UNIFORM_BLOCK_OBATTRS, DRW_UNIFORM_BLOCK_REF, DRW_UNIFORM_FLOAT_COPY, DRW_UNIFORM_IMAGE, DRW_UNIFORM_IMAGE_REF, DRW_UNIFORM_INT_COPY, DRW_UNIFORM_TEXTURE, DRW_UNIFORM_TEXTURE_REF, DST, DRWUniform::fvalue, DRWUniform::ivalue, DRWUniform::length, length(), DRWUniform::location, DRWUniform::pvalue, DRWUniform::sampler_state, DRWUniform::texture, DRWUniform::texture_ref, DRWUniform::type, DRWUniform::uniform_attrs, DRWUniformChunk::uniform_len, DRWUniformChunk::uniform_used, DRWData::uniforms, DRWShadingGroup::uniforms, DRWUniformChunk::uniforms, and DRWManager::vmempool.
Referenced by DRW_shgroup_add_material_resources(), DRW_shgroup_buffer_texture(), DRW_shgroup_buffer_texture_ref(), drw_shgroup_init(), DRW_shgroup_storage_block_ex(), DRW_shgroup_storage_block_ref_ex(), DRW_shgroup_transform_feedback_create(), drw_shgroup_uniform(), DRW_shgroup_uniform_block_ex(), DRW_shgroup_uniform_block_ref_ex(), DRW_shgroup_uniform_image(), DRW_shgroup_uniform_image_ref(), DRW_shgroup_uniform_mat4_copy(), DRW_shgroup_uniform_texture_ex(), DRW_shgroup_uniform_texture_ref_ex(), DRW_shgroup_vertex_buffer_ex(), and DRW_shgroup_vertex_buffer_ref_ex().
| void DRW_shgroup_uniform_float | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value, | ||
| int | arraysize ) |
Definition at line 398 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by OVERLAY_edit_uv_cache_init().
| void DRW_shgroup_uniform_float_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float | value ) |
Definition at line 498 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by blender::draw::DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_vfx_colorize(), gpencil_vfx_flip(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), grease_pencil_layer_cache_add(), grease_pencil_object_cache_populate(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_outline_grease_pencil(), OVERLAY_paint_cache_init(), OVERLAY_sculpt_cache_init(), OVERLAY_sculpt_curves_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), populate_cache_for_geometry(), and select_cache_init().
| void DRW_shgroup_uniform_image | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUTexture * | tex ) |
Definition at line 283 of file draw_manager_data.cc.
References BLI_assert, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_IMAGE, GPU_shader_get_sampler_binding(), DRWShadingGroup::shader, and tex.
| void DRW_shgroup_uniform_image_ref | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUTexture ** | tex ) |
Definition at line 291 of file draw_manager_data.cc.
References BLI_assert, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_IMAGE_REF, GPU_shader_get_sampler_binding(), DRWShadingGroup::shader, and tex.
| void DRW_shgroup_uniform_int | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize ) |
Definition at line 430 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
Referenced by blender::draw::drw_curves_cache_shgrp_attach_resources(), drw_hair_particle_cache_shgrp_attach_resources(), blender::draw::DRW_shgroup_curves_create_sub(), and DRW_shgroup_hair_create_sub().
| void DRW_shgroup_uniform_int_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int | value ) |
Definition at line 472 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by draw_select_id_edit_mesh(), draw_select_id_mesh(), blender::draw::drw_curves_cache_update_compute(), drw_hair_particle_cache_update_compute(), blender::draw::DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), gpencil_layer_cache_add(), gpencil_vfx_blur(), gpencil_vfx_cache_populate(), gpencil_vfx_colorize(), gpencil_vfx_glow(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), grease_pencil_layer_cache_add(), grease_pencil_object_cache_populate(), motion_path_cache(), OVERLAY_background_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_gpencil_legacy_cache_init(), OVERLAY_grease_pencil_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), and select_cache_init().
| void DRW_shgroup_uniform_ivec2 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize ) |
Definition at line 438 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
| void DRW_shgroup_uniform_ivec2_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value ) |
Definition at line 477 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
| void DRW_shgroup_uniform_ivec3 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize ) |
Definition at line 446 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
| void DRW_shgroup_uniform_ivec3_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value ) |
Definition at line 482 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by OVERLAY_volume_extra().
| void DRW_shgroup_uniform_ivec4 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize ) |
Definition at line 454 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
Referenced by OVERLAY_edit_mesh_cache_init().
| void DRW_shgroup_uniform_ivec4_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value ) |
Definition at line 487 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by motion_path_cache(), and OVERLAY_edit_mesh_cache_init().
| void DRW_shgroup_uniform_mat3 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float(*) | value[3] ) |
Definition at line 462 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
| void DRW_shgroup_uniform_mat4 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float(*) | value[4] ) |
Definition at line 467 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
| void DRW_shgroup_uniform_mat4_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float(*) | value[4] ) |
Definition at line 518 of file draw_manager_data.cc.
References GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_FLOAT_COPY, GPU_shader_get_uniform(), and DRWShadingGroup::shader.
Referenced by blender::draw::DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), motion_path_cache(), OVERLAY_lightprobe_cache_populate(), and wireframe_hair_cache_populate().
| void DRW_shgroup_uniform_texture | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUTexture * | tex ) |
Definition at line 263 of file draw_manager_data.cc.
References DRW_shgroup_uniform_texture_ex(), GPUSamplerState::internal_sampler(), and tex.
Referenced by DRW_shgroup_add_material_resources(), DRW_shgroup_hair_create_sub(), drw_volume_object_grids_init(), drw_volume_object_mesh_init(), drw_volume_world_grids_init(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), grease_pencil_layer_cache_add(), grease_pencil_object_cache_populate(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_edit_grease_pencil_cache_init(), OVERLAY_edit_lattice_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_particle_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_init(), OVERLAY_volume_extra(), and select_debug_engine_init().
| void DRW_shgroup_uniform_texture_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUTexture * | tex, | ||
| GPUSamplerState | sampler_state ) |
Definition at line 253 of file draw_manager_data.cc.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_TEXTURE, GPU_shader_get_sampler_binding(), DRWShadingGroup::shader, and tex.
Referenced by DRW_shgroup_add_material_resources(), drw_shgroup_material_texture(), and DRW_shgroup_uniform_texture().
| void DRW_shgroup_uniform_texture_ref | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUTexture ** | tex ) |
Definition at line 278 of file draw_manager_data.cc.
References DRW_shgroup_uniform_texture_ref_ex(), GPUSamplerState::internal_sampler(), and tex.
Referenced by drw_volume_object_mesh_init(), GPENCIL_cache_init(), gpencil_layer_cache_add(), grease_pencil_layer_cache_add(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_outline_cache_init(), and OVERLAY_wireframe_cache_init().
| void DRW_shgroup_uniform_texture_ref_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUTexture ** | tex, | ||
| GPUSamplerState | sampler_state ) |
Definition at line 268 of file draw_manager_data.cc.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_TEXTURE_REF, GPU_shader_get_sampler_binding(), DRWShadingGroup::shader, and tex.
Referenced by DRW_shgroup_uniform_texture_ref(), and gpencil_vfx_pass_create().
| void DRW_shgroup_uniform_vec2 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value, | ||
| int | arraysize ) |
Definition at line 406 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
| void DRW_shgroup_uniform_vec2_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value ) |
Definition at line 503 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by gpencil_vfx_blur(), gpencil_vfx_flip(), gpencil_vfx_glow(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), grease_pencil_object_cache_populate(), and OVERLAY_edit_uv_cache_init().
| void DRW_shgroup_uniform_vec3 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value, | ||
| int | arraysize ) |
Definition at line 414 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by draw_pbvh_nodes(), and OVERLAY_background_cache_init().
| void DRW_shgroup_uniform_vec3_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value ) |
Definition at line 508 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by gpencil_layer_cache_add(), gpencil_vfx_colorize(), gpencil_vfx_rim(), grease_pencil_layer_cache_add(), motion_path_cache(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_gpencil_legacy_cache_init(), OVERLAY_grease_pencil_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_paint_cache_init(), and OVERLAY_volume_extra().
| void DRW_shgroup_uniform_vec4 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value, | ||
| int | arraysize ) |
Definition at line 422 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by GPENCIL_cache_init(), and OVERLAY_edit_text_cache_init().
| void DRW_shgroup_uniform_vec4_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value ) |
Definition at line 513 of file draw_manager_data.cc.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_vfx_glow(), gpencil_vfx_shadow(), grease_pencil_layer_cache_add(), OVERLAY_armature_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_gpencil_legacy_cache_init(), OVERLAY_edit_text_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_fade_cache_init(), OVERLAY_gpencil_legacy_cache_init(), OVERLAY_grease_pencil_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), OVERLAY_mode_transfer_cache_populate(), OVERLAY_outline_grease_pencil(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_populate(), OVERLAY_volume_extra(), and populate_cache_for_instance().
| void DRW_shgroup_vertex_buffer_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| blender::gpu::VertBuf *vertex_buffer | DRW_DEBUG_FILE_LINE_ARGS ) |
Definition at line 545 of file draw_manager_data.cc.
References BLI_assert_msg, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE, GPU_shader_get_ssbo_binding(), printf, and DRWShadingGroup::shader.
| void DRW_shgroup_vertex_buffer_ref_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| blender::gpu::VertBuf **vertex_buffer | DRW_DEBUG_FILE_LINE_ARGS ) |
Definition at line 570 of file draw_manager_data.cc.
References BLI_assert_msg, GPUSamplerState::default_sampler(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE_REF, GPU_shader_get_ssbo_binding(), printf, and DRWShadingGroup::shader.
This only works if DRWPasses have been tagged with DRW_STATE_CLIP_PLANES, and if the shaders have support for it (see usage of gl_ClipDistance).
Definition at line 2345 of file draw_manager_data.cc.
References BLI_assert, and MAX_CLIP_PLANES.
Referenced by drw_manager_init().
| DRWView * DRW_view_create | ( | const float | viewmat[4][4], |
| const float | winmat[4][4], | ||
| const float(*) | culling_viewmat[4], | ||
| const float(*) | culling_winmat[4], | ||
| DRWCallVisibilityFn * | visibility_fn ) |
Create a view with culling.
Definition at line 2200 of file draw_manager_data.cc.
References BLI_assert, BLI_memblock_alloc(), DRWView::culling_mask, DRW_view_update(), DST, MAX_CULLED_VIEWS, DRWManager::primary_view_num, view, DRWData::views, and DRWManager::vmempool.
Referenced by blender::draw::image_engine::ImageEngine< DrawingMode >::begin_sync(), blender::draw::DRW_curves_update(), drw_manager_init(), GPENCIL_render_init(), and workbench_render_to_image().
| DRWView * DRW_view_create_sub | ( | const DRWView * | parent_view, |
| const float | viewmat[4][4], | ||
| const float | winmat[4][4] ) |
Create a view with culling done by another view.
Definition at line 2224 of file draw_manager_data.cc.
References BLI_memblock_alloc(), DRW_view_update_sub(), DST, DRWView::parent, view, DRWData::views, and DRWManager::vmempool.
Referenced by DRW_view_create_with_zoffset().
| const DRWView * DRW_view_default_get | ( | ) |
Definition at line 2327 of file draw_manager_data.cc.
References DST, and DRWManager::view_default.
Referenced by blender::draw::overlay::Fluids::begin_sync(), blender::draw::overlay::Instance::begin_sync(), blender::eevee::Film::display(), blender::draw::overlay::Instance::draw(), blender::workbench::Instance::draw(), blender::draw::overlay::Armatures::draw_armature_pose(), blender::draw::DRW_curves_update(), drw_sculpt_get_frustum_planes(), eevee_engine_init(), blender::workbench::ShadowPass::object_sync(), OVERLAY_edit_curves_init(), OVERLAY_edit_mesh_init(), OVERLAY_edit_text_cache_init(), OVERLAY_image_init(), OVERLAY_wireframe_init(), blender::draw::sculpt_batches_get_ex(), select_engine_init(), and blender::workbench::AntiAliasingPass::setup_view().
| void DRW_view_default_set | ( | const DRWView * | view | ) |
MUST only be called once per render and only in render mode. Sets default view.
Definition at line 2339 of file draw_manager_data.cc.
References BLI_assert, DST, and DRWManager::view_default.
Referenced by blender::draw::DRW_curves_update(), GPENCIL_render_init(), and workbench_render_to_image().
Definition at line 2382 of file draw_manager_data.cc.
References DRW_view_is_persp_get(), DST, view, and DRWManager::view_default.
Referenced by GPENCIL_render_init(), GPENCIL_render_result_z(), blender::eevee::Camera::sync(), and write_render_z_output().
Definition at line 2354 of file draw_manager_data.cc.
Definition at line 2359 of file draw_manager_data.cc.
Referenced by drw_sculpt_get_frustum_planes(), and blender::draw::sculpt_batches_get_ex().
| bool DRW_view_is_persp_get | ( | const DRWView * | view | ) |
Definition at line 2364 of file draw_manager_data.cc.
References DST, DRWView::storage, view, DRWManager::view_default, and ViewMatrices::winmat.
Referenced by blender::draw::overlay::Outline::begin_sync(), blender::draw::overlay::Prepass::begin_sync(), DRW_view_far_distance_get(), DRW_view_near_distance_get(), gpencil_depth_plane(), gpencil_object_cache_add(), GPENCIL_render_init(), GPENCIL_render_result_z(), blender::eevee::Camera::init(), and write_render_z_output().
These are in view-space, so negative if in perspective. Extract near and far clip distance from the projection matrix.
Definition at line 2370 of file draw_manager_data.cc.
References DRW_view_is_persp_get(), DST, view, and DRWManager::view_default.
Referenced by GPENCIL_render_init(), GPENCIL_render_result_z(), blender::eevee::Camera::sync(), and write_render_z_output().
Definition at line 2408 of file draw_manager_data.cc.
References copy_m4_m4(), DST, inverse(), view, and DRWManager::view_default.
Referenced by gpencil_vfx_blur(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), blender::workbench::SceneState::init(), and blender::workbench::AntiAliasingPass::setup_view().
| void DRW_view_reset | ( | ) |
Definition at line 2332 of file draw_manager_data.cc.
References DST, DRWManager::view_active, DRWManager::view_default, and DRWManager::view_previous.
Referenced by DRW_render_gpencil(), and DRW_render_to_image().
| void DRW_view_update | ( | DRWView * | view, |
| const float | viewmat[4][4], | ||
| const float | winmat[4][4], | ||
| const float(*) | culling_viewmat[4], | ||
| const float(*) | culling_winmat[4] ) |
Update matrices of a view created with DRW_view_create.
Definition at line 2259 of file draw_manager_data.cc.
References bitscan_forward_uint(), BLI_assert, copy_m4_m4(), draw_frustum_bound_sphere_calc(), draw_frustum_boundbox_calc(), draw_frustum_culling_planes_calc(), draw_view_matrix_state_update(), DRW_debug_bbox(), DRW_debug_sphere(), DST, G, invert_m4_m4(), is_negative_m4(), MAX_CULLED_VIEWS, and DRWManager::view_default.
Referenced by DRW_view_create().
Update matrices of a view created with DRW_view_create_sub.
Definition at line 2249 of file draw_manager_data.cc.
References BLI_assert, draw_view_matrix_state_update(), and is_negative_m4().
Referenced by DRW_view_create_sub().
Definition at line 2394 of file draw_manager_data.cc.
References copy_m4_m4(), DST, inverse(), view, DRWManager::view_default, ViewMatrices::viewinv, and ViewMatrices::viewmat.
Referenced by blender::draw::overlay::Outline::begin_sync(), blender::draw::overlay::Prepass::begin_sync(), DRW_object_axis_orthogonal_to_view(), DRW_view_create_with_zoffset(), external_image_space_matrix_set(), blender::workbench::get_world_shading_rotation_matrix(), gpencil_depth_plane(), GPENCIL_engine_init(), blender::workbench::ShadowPass::init(), OVERLAY_gpencil_legacy_cache_init(), OVERLAY_grease_pencil_cache_init(), OVERLAY_grid_init(), OVERLAY_volume_extra(), blender::workbench::AntiAliasingPass::setup_view(), blender::draw::View::sync(), and blender::eevee::Camera::sync().
Definition at line 2401 of file draw_manager_data.cc.
References copy_m4_m4(), DST, inverse(), view, DRWManager::view_default, ViewMatrices::wininv, and ViewMatrices::winmat.
Referenced by DRW_view_create_with_zoffset(), external_image_space_matrix_set(), GPENCIL_render_result_z(), gpencil_vfx_blur(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), OVERLAY_grid_init(), blender::workbench::AntiAliasingPass::setup_view(), blender::draw::View::sync(), and blender::eevee::Camera::sync().
|
static |
Definition at line 2477 of file draw_manager_data.cc.
References b, DRWShadingGroup::distance, DRWShadingGroup::original_index, and DRWShadingGroup::z_sorting.
Referenced by DRW_pass_sort_shgroup_z().
|
static |
Definition at line 1532 of file draw_manager_data.cc.
Referenced by DRW_shgroup_call_buffer(), and DRW_shgroup_call_buffer_instance().
|
static |
Definition at line 1237 of file draw_manager_data.cc.