|
Blender
V2.93
|
#include "draw_manager.h"#include "BKE_curve.h"#include "BKE_duplilist.h"#include "BKE_global.h"#include "BKE_image.h"#include "BKE_mesh.h"#include "BKE_object.h"#include "BKE_paint.h"#include "BKE_pbvh.h"#include "DNA_curve_types.h"#include "DNA_mesh_types.h"#include "DNA_meta_types.h"#include "BLI_alloca.h"#include "BLI_hash.h"#include "BLI_link_utils.h"#include "BLI_listbase.h"#include "BLI_memblock.h"#include "BLI_mempool.h"#include "GPU_buffers.h"#include "GPU_material.h"#include "GPU_uniform_buffer.h"#include "intern/gpu_codegen.h"#include "../../blenlib/intern/list_sort_impl.h"Go to the source code of this file.
Classes | |
| struct | DRWSculptCallbackData |
Macros | |
| #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 (ViewportMemoryPool *vmempool) |
Uniforms (DRW_shgroup_uniform) | |
| static void | drw_shgroup_uniform_create_ex (DRWShadingGroup *shgroup, int loc, DRWUniformType type, const void *value, eGPUSamplerState 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, eGPUSamplerState 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, eGPUSamplerState 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 (DRWShadingGroup *shgroup, const char *name, const GPUUniformBuf *ubo) |
| void | DRW_shgroup_uniform_block_ref (DRWShadingGroup *shgroup, const char *name, GPUUniformBuf **ubo) |
| 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_vec4_array_copy (DRWShadingGroup *shgroup, const char *name, const float(*value)[4], int arraysize) |
Shading Groups (DRW_shgroup) | |
| static void | drw_shgroup_init (DRWShadingGroup *shgroup, GPUShader *shader) |
| static DRWShadingGroup * | drw_shgroup_create_ex (struct 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, eGPUSamplerState state) |
| void | DRW_shgroup_add_material_resources (DRWShadingGroup *grp, struct GPUMaterial *material) |
| GPUVertFormat * | DRW_shgroup_instance_format_array (const DRWInstanceAttrFormat attrs[], int arraysize) |
| DRWShadingGroup * | DRW_shgroup_material_create (struct GPUMaterial *material, DRWPass *pass) |
| DRWShadingGroup * | DRW_shgroup_create (struct GPUShader *shader, DRWPass *pass) |
| DRWShadingGroup * | DRW_shgroup_transform_feedback_create (struct GPUShader *shader, DRWPass *pass, GPUVertBuf *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 (DRWViewUboStorage *storage, 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) |
| void | DRW_view_reset (void) |
| void | DRW_view_default_set (DRWView *view) |
| void | DRW_view_clip_planes_set (DRWView *view, float(*planes)[4], int plane_len) |
| void | DRW_view_camtexco_set (DRWView *view, float texco[4]) |
| 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 *userData, DRWShadingGroup *shgrp), void *userData) |
| 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 KEY | ( | a | ) | ((((size_t)((a).draw.batch)) >> 6) % ARRAY_SIZE(idx)) |
| #define SCULPT_DEBUG_BUFFERS (G.debug_value == 889) |
Definition at line 879 of file draw_manager_data.c.
| #define SCULPT_DEBUG_COLOR | ( | id | ) | (sculpt_debug_colors[id % 9]) |
Definition at line 893 of file draw_manager_data.c.
| #define SORT_IMPL_FUNC shgroup_sort_fn_r |
Definition at line 2052 of file draw_manager_data.c.
| #define SORT_IMPL_LINKTYPE DRWShadingGroup |
Definition at line 2050 of file draw_manager_data.c.
| typedef struct DRWSculptCallbackData DRWSculptCallbackData |
| eDRWCommandType command_type_get | ( | const uint64_t * | command_type_bits, |
| int | index | ||
| ) |
Definition at line 636 of file draw_manager_data.c.
Referenced by draw_command_iter_step(), DRW_pass_sort_shgroup_z(), and DRW_shgroup_is_empty().
|
static |
Definition at line 631 of file draw_manager_data.c.
References type.
Referenced by drw_command_create().
|
static |
Definition at line 59 of file draw_manager_data.c.
References ARRAY_SIZE, BLI_assert, and KEY.
Referenced by drw_resource_buffer_finish().
|
static |
Definition at line 1550 of file draw_manager_data.c.
References add_v3_v3(), Freestyle::c, BoundSphere::center, CLAMP, copy_v3_fl3(), copy_v3_v3(), e, F, 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 1483 of file draw_manager_data.c.
References BKE_boundbox_init_from_minmax(), bottom, left, mul_m4_v3(), mul_project_m4_v3(), projmat_dimensions(), right, top, and BoundBox::vec.
Referenced by DRW_view_update().
|
static |
Definition at line 1534 of file draw_manager_data.c.
References normalize_v3(), and planes_from_projmat().
Referenced by DRW_view_update().
|
static |
If ortho : view_vecs[0] is the near-bottom-left corner of the frustum and view_vecs[1] is the vector going from the near-bottom-left corner to the far-top-right corner. If Persp : view_vecs[0].xy and view_vecs[1].xy are respectively the bottom-left corner when Z = 1, and top-left corner if Z = 1. view_vecs[0].z the near clip distance and view_vecs[1].z is the (signed) distance from the near plane to the far clip plane.
Definition at line 1663 of file draw_manager_data.c.
References copy_m4_m4(), copy_v3_v3(), invert_m4_m4(), mul_m4_m4m4(), mul_project_m4_v3(), mul_v2_fl(), DRWViewUboStorage::persinv, DRWViewUboStorage::persmat, DRWViewUboStorage::viewinv, DRWViewUboStorage::viewmat, DRWViewUboStorage::viewvecs, DRWViewUboStorage::wininv, and DRWViewUboStorage::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 1166 of file draw_manager_data.c.
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 1145 of file draw_manager_data.c.
References DRWCallBuffer::buf, DRWCallBuffer::buf_select, DRWCallBuffer::count, data, 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_solid(), drw_shgroup_bone_custom_wire(), drw_shgroup_bone_envelope(), drw_shgroup_bone_octahedral(), drw_shgroup_bone_point(), OVERLAY_camera_cache_populate(), OVERLAY_edit_metaball_cache_populate(), and OVERLAY_metaball_cache_populate().
Definition at line 455 of file draw_manager_data.c.
References BKE_curve_texspace_ensure(), BKE_mesh_texspace_get_reference(), copy_v3_fl(), Object::data, GS, ID_CU, ID_MB, ID_ME, if(), invert_v3(), Curve::loc, MetaBall::loc, mul_v3_v3(), mul_v3_v3fl(), ID::name, negate_v3(), NULL, Curve::size, MetaBall::size, and sub_v3_v3v3().
Referenced by drw_call_obinfos_init().
|
static |
Definition at line 534 of file draw_manager_data.c.
References BKE_object_boundbox_get(), DRWCullingState::bsphere, BoundSphere::center, len_v3v3(), mid_v3_v3v3(), mul_m4_v3(), mul_v3_m4v3(), NULL, Object::obmat, BoundSphere::radius, UNLIKELY, DRWCullingState::user_data, and BoundBox::vec.
Referenced by drw_resource_handle_new().
| BLI_INLINE void drw_call_matrix_init | ( | DRWObjectMatrix * | ob_mats, |
| Object * | ob, | ||
| float(*) | obmat[4] | ||
| ) |
Definition at line 496 of file draw_manager_data.c.
References copy_m4_m4(), Object::imat, invert_m4_m4(), DRWObjectMatrix::model, and DRWObjectMatrix::modelinverse.
Referenced by drw_resource_handle_new().
|
static |
Definition at line 508 of file draw_manager_data.c.
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(), 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, random(), DupliObject::random_id, and Object::transflag.
Referenced by drw_resource_handle().
|
static |
Definition at line 737 of file draw_manager_data.c.
References DRWCommandClear::a, Freestyle::a, DRWCommandClear::b, DRWCommandClear::clear_channels, DRWCommandClear::depth, DRW_CMD_CLEAR, drw_command_create(), DRWCommandClear::g, DRWCommandClear::r, r, and DRWCommandClear::stencil.
Referenced by DRW_shgroup_clear_framebuffer().
|
static |
Definition at line 641 of file draw_manager_data.c.
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, DRWCommandSmallChunk::commands, DRWCommandChunk::commands, ViewportMemoryPool::commands, ViewportMemoryPool::commands_small, DST, DRWShadingGroup::last, NULL, type, and DRWManager::vmempool.
Referenced by drw_command_clear(), drw_command_draw(), 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 666 of file draw_manager_data.c.
References DRWCommandDraw::batch, 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 683 of file draw_manager_data.c.
References DRWCommandDrawInstance::batch, 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 693 of file draw_manager_data.c.
References DRWCommandDrawInstanceRange::batch, 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 703 of file draw_manager_data.c.
References DRWCommandDrawProcedural::batch, 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 673 of file draw_manager_data.c.
References DRWCommandDrawRange::batch, 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 756 of file draw_manager_data.c.
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 714 of file draw_manager_data.c.
References BLI_assert, DRW_CMD_SELECTID, drw_command_create(), NULL, 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(), and DRW_shgroup_call_range().
|
static |
Definition at line 723 of file draw_manager_data.c.
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().
Definition at line 581 of file draw_manager_data.c.
References DST, DRWManager::ob_handle, and DRWManager::resource_handle.
Referenced by workbench_material_setup_ex().
Definition at line 1968 of file draw_manager_data.c.
References BLI_memblock_alloc(), BLI_strncpy(), DRW_handle_increment(), DRW_STATE_PROGRAM_POINT_SIZE, DST, DRWPass::first, G, G_DEBUG_GPU, DRWPass::handle, DRWPass::last, MAX_PASS_NAME, DRWPass::name, DRWPass::next, NULL, DRWPass::original, DRWManager::pass_handle, ViewportMemoryPool::passes, DRWPass::shgroups, DRWPass::state, state, and DRWManager::vmempool.
Referenced by DRW_hair_init(), DRW_pass_create_instance(), eevee_create_bloom_pass(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), external_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_pass_create(), IMAGE_cache_init(), workbench_dof_cache_init(), workbench_transparent_cache_init(), and workbench_volume_cache_init().
Definition at line 1989 of file draw_manager_data.c.
References DRW_pass_create(), DRWPass::original, and state.
Referenced by EEVEE_materials_cache_init().
| void DRW_pass_foreach_shgroup | ( | DRWPass * | pass, |
| void(*)(void *userData, DRWShadingGroup *shgrp) | callback, | ||
| void * | userData | ||
| ) |
Definition at line 2019 of file draw_manager_data.c.
References callback, LISTBASE_FOREACH, and DRWPass::shgroups.
| bool DRW_pass_is_empty | ( | DRWPass * | pass | ) |
Definition at line 2005 of file draw_manager_data.c.
References DRW_shgroup_is_empty(), LISTBASE_FOREACH, DRWPass::original, and DRWPass::shgroups.
Referenced by EEVEE_subsurface_compute(), OVERLAY_antialiasing_cache_finish(), OVERLAY_edit_mesh_draw(), OVERLAY_image_scene_background_draw(), OVERLAY_outline_draw(), select_draw_scene(), workbench_draw_sample(), and workbench_transparent_draw_depth_pass().
Definition at line 1998 of file draw_manager_data.c.
References BLI_assert, DRWPass::next, and NULL.
Referenced by EEVEE_materials_cache_init(), and EEVEE_motion_blur_cache_init().
| void DRW_pass_sort_shgroup_reverse | ( | DRWPass * | pass | ) |
Reverse Shading group submission order.
Definition at line 2115 of file draw_manager_data.c.
References BLI_linklist_reverse(), DRWPass::first, DRWPass::last, and DRWPass::shgroups.
| 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 2062 of file draw_manager_data.c.
References DRWShadingGroup::cmd, DRWCommandChunk::command_type, command_type_get(), DRWCommandChunk::command_used, DRWCommandChunk::commands, dot_v3v3(), DRWCommand::draw, DRW_CMD_DRAW, DRW_memblock_elem_from_handle(), DST, DRWShadingGroup::first, DRWPass::first, float(), DRWCommandDraw::handle, DRWPass::handle, DRWPass::last, DRWObjectMatrix::model, DRWShadingGroup::next, DRWCommandChunk::next, ViewportMemoryPool::obmats, DRWShadingGroup::pass_handle, pass_shgroup_dist_sort(), DRWPass::shgroups, DRWView::storage, sub_v3_v3v3(), DRWManager::view_active, DRWViewUboStorage::viewinv, DRWManager::vmempool, and DRWShadingGroup::z_sorting.
Referenced by eevee_draw_scene(), EEVEE_lightprobes_refresh_planar(), EEVEE_render_draw(), lightbake_render_scene_reflected(), and OVERLAY_image_cache_finish().
| void drw_resource_buffer_finish | ( | ViewportMemoryPool * | vmempool | ) |
Definition at line 89 of file draw_manager_data.c.
References ARRAY_SIZE, BLI_memblock_elem_get(), BLI_memblock_iternew(), BLI_memblock_iterstep(), DRWCommandChunk::command_type, DRWCommandChunk::command_used, DRWCommandChunk::commands, ViewportMemoryPool::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(), ViewportMemoryPool::matrices_ubo, MEM_callocN, MEM_freeN, MEM_mallocN_aligned, MEM_recallocN, NULL, ViewportMemoryPool::obattrs_ubo_pool, ViewportMemoryPool::obinfos, ViewportMemoryPool::obinfos_ubo, ViewportMemoryPool::obmats, DRWManager::resource_handle, and ViewportMemoryPool::ubo_len.
Referenced by DRW_draw_select_id(), and DRW_render_instance_buffer_finish().
|
static |
Definition at line 591 of file draw_manager_data.c.
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, NULL, DRWManager::ob_handle, DRWManager::ob_state_obinfo_init, ViewportMemoryPool::obattrs_ubo_pool, ViewportMemoryPool::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(), and DRW_shgroup_call_range().
|
static |
Definition at line 558 of file draw_manager_data.c.
References BLI_memblock_alloc(), ViewportMemoryPool::cullstates, drw_call_culling_init(), drw_call_matrix_init(), DRW_handle_increment(), DRW_handle_negative_scale_enable(), DST, OB_NEG_SCALE, ViewportMemoryPool::obinfos, ViewportMemoryPool::obmats, DRWManager::resource_handle, Object::transflag, UNUSED_VARS, and DRWManager::vmempool.
Referenced by drw_resource_handle().
|
static |
Definition at line 979 of file draw_manager_data.c.
References BKE_paint_get_active_from_context(), BKE_pbvh_draw_cb(), BKE_pbvh_draw_debug_cb(), BKE_pbvh_get_frustum_planes(), BKE_pbvh_set_frustum_planes(), BKE_pbvh_update_normals(), Object::data, DRW_context_state_get(), DRW_debug_modelmat(), drw_sculpt_get_frustum_planes(), DRWContextState::evil_C, DRWSculptCallbackData::fast_mode, if(), max, mesh, min, NULL, PBVHFrustumPlanes::num_planes, DRWSculptCallbackData::ob, Object::obmat, PAINT_FAST_NAVIGATE, PAINT_SCULPT_DELAY_UPDATES, SculptSession::pbvh, PBVHFrustumPlanes::planes, RegionView3D::rflag, Mesh::runtime, DRWContextState::rv3d, RV3D_NAVIGATING, RV3D_PAINTING, Object::sculpt, SCULPT_DEBUG_BUFFERS, sculpt_debug_cb(), sculpt_draw_cb(), and Mesh_Runtime::subdiv_ccg.
Referenced by DRW_shgroup_call_sculpt(), and DRW_shgroup_call_sculpt_with_materials().
Definition at line 964 of file draw_manager_data.c.
References DRW_view_default_get(), DRW_view_frustum_planes_get(), mul_m4_v4(), Object::obmat, and transpose_m4_m4().
Referenced by drw_sculpt_generate_calls().
| void DRW_shgroup_add_material_resources | ( | DRWShadingGroup * | grp, |
| struct GPUMaterial * | material | ||
| ) |
Definition at line 1317 of file draw_manager_data.c.
References BKE_image_get_gpu_texture(), BKE_image_get_gpu_tilemap(), BKE_image_get_gpu_tiles(), drw_shgroup_material_texture(), DRW_shgroup_uniform_block(), drw_shgroup_uniform_create_ex(), DRW_shgroup_uniform_texture(), DRW_UNIFORM_BLOCK_OBATTRS, GPU_ATTRIBUTE_UBO_BLOCK_NAME, GPU_material_textures(), GPU_material_uniform_attributes(), GPU_material_uniform_buffer_get(), GPU_shader_get_uniform_block_binding(), GPU_UBO_BLOCK_NAME, Tex::ima, Tex::iuser, LISTBASE_FOREACH, material, NULL, DRWShadingGroup::shader, tex, textures, and DRWShadingGroup::uniform_attrs.
Referenced by DRW_shgroup_material_create(), eevee_hair_cache_populate(), eevee_lookdev_hdri_preview_init(), material_opaque(), material_shadow(), and material_transparent().
| DRWCallBuffer* DRW_shgroup_call_buffer | ( | DRWShadingGroup * | shgroup, |
| struct GPUVertFormat * | format, | ||
| GPUPrimType | prim_type | ||
| ) |
Definition at line 1087 of file draw_manager_data.c.
References GPUVertFormat::attr_len, batch, BLI_assert, BLI_memblock_alloc(), DRWCallBuffer::buf, DRWCallBuffer::buf_select, ViewportMemoryPool::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(), GPUBatch, DRWManager::idatalist, inst_select_format, NULL, and DRWManager::vmempool.
| DRWCallBuffer* DRW_shgroup_call_buffer_instance | ( | DRWShadingGroup * | shgroup, |
| struct GPUVertFormat * | format, | ||
| GPUBatch * | geom | ||
| ) |
Definition at line 1116 of file draw_manager_data.c.
References GPUVertFormat::attr_len, batch, BLI_assert, BLI_memblock_alloc(), DRWCallBuffer::buf, DRWCallBuffer::buf_select, ViewportMemoryPool::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(), GPUBatch, DRWManager::idatalist, inst_select_format, NULL, and DRWManager::vmempool.
Referenced by custom_bone_instance_shgroup(), and EEVEE_lightprobes_cache_init().
| void DRW_shgroup_call_ex | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| float(*) | obmat[4], | ||
| struct GPUBatch * | geom, | ||
| bool | bypass_culling, | ||
| void * | user_data | ||
| ) |
Definition at line 766 of file draw_manager_data.c.
References BLI_assert, DRWCullingState::bsphere, ViewportMemoryPool::cullstates, drw_command_draw(), drw_command_set_select_id(), DRW_memblock_elem_from_handle(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, NULL, DRWManager::ob_handle, Object::obmat, BoundSphere::radius, DRWManager::select_id, user_data, DRWCullingState::user_data, and DRWManager::vmempool.
| void DRW_shgroup_call_instance_range | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| struct GPUBatch * | geom, | ||
| uint | i_sta, | ||
| uint | i_ct | ||
| ) |
Definition at line 807 of file draw_manager_data.c.
References BLI_assert, drw_command_draw_intance_range(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, NULL, Object::obmat, and DRWManager::select_id.
Referenced by gpencil_drawcall_add(), gpencil_drawcall_flush(), gpencil_stroke_cache_populate(), OVERLAY_outline_cache_populate(), and workbench_object_drawcall().
| void DRW_shgroup_call_instances | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| struct GPUBatch * | geom, | ||
| uint | count | ||
| ) |
Definition at line 851 of file draw_manager_data.c.
References BLI_assert, count, drw_command_draw_instance(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, NULL, Object::obmat, and DRWManager::select_id.
Referenced by EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), and OVERLAY_edit_curve_cache_populate().
| void DRW_shgroup_call_instances_with_attrs | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| struct GPUBatch * | geom, | ||
| struct GPUBatch * | inst_attributes | ||
| ) |
Definition at line 864 of file draw_manager_data.c.
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, GPUBatch, DRWManager::idatalist, NULL, Object::obmat, and DRWManager::select_id.
Referenced by overlay_edit_mesh_add_ob_to_pass(), OVERLAY_edit_mesh_cache_populate(), and OVERLAY_particle_cache_populate().
|
static |
Definition at line 818 of file draw_manager_data.c.
References BLI_assert, drw_command_draw_procedural(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, NULL, Object::obmat, 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_lines | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| uint | line_count | ||
| ) |
Definition at line 838 of file draw_manager_data.c.
References drw_cache_procedural_lines_get(), drw_shgroup_call_procedural_add_ex(), and GPUBatch.
Referenced by OVERLAY_gpencil_cache_init(), and OVERLAY_volume_extra().
| void DRW_shgroup_call_procedural_points | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| uint | point_count | ||
| ) |
Definition at line 832 of file draw_manager_data.c.
References drw_cache_procedural_points_get(), drw_shgroup_call_procedural_add_ex(), and GPUBatch.
Referenced by drw_hair_particle_cache_get(), OVERLAY_edit_gpencil_cache_init(), and OVERLAY_lightprobe_cache_populate().
| void DRW_shgroup_call_procedural_triangles | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| uint | tri_count | ||
| ) |
Definition at line 844 of file draw_manager_data.c.
References drw_cache_procedural_triangles_get(), drw_shgroup_call_procedural_add_ex(), and GPUBatch.
Referenced by dof_bokeh_pass_init(), dof_dilate_tiles_pass_init(), dof_filter_pass_init(), dof_flatten_tiles_pass_init(), dof_gather_pass_init(), dof_recombine_pass_init(), dof_reduce_pass_init(), dof_scatter_pass_init(), dof_setup_pass_init(), EEVEE_effects_cache_init(), EEVEE_lightprobes_cache_finish(), EEVEE_lightprobes_cache_init(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), EEVEE_motion_blur_cache_init(), EEVEE_occlusion_cache_init(), EEVEE_screen_raytrace_cache_init(), EEVEE_subsurface_add_pass(), EEVEE_volumes_cache_finish(), EEVEE_volumes_cache_init(), EEVEE_volumes_cache_object_add(), GPENCIL_antialiasing_init(), GPENCIL_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_blur(), gpencil_vfx_colorize(), gpencil_vfx_flip(), gpencil_vfx_glow(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), OVERLAY_antialiasing_cache_init(), OVERLAY_background_cache_init(), OVERLAY_outline_cache_init(), workbench_antialiasing_cache_init(), workbench_cavity_cache_init(), workbench_dof_cache_init(), workbench_opaque_cache_init(), workbench_outline_cache_init(), and workbench_transparent_cache_init().
| void DRW_shgroup_call_range | ( | DRWShadingGroup * | shgroup, |
| struct Object * | ob, | ||
| GPUBatch * | geom, | ||
| uint | v_sta, | ||
| uint | v_ct | ||
| ) |
Definition at line 795 of file draw_manager_data.c.
References BLI_assert, drw_command_draw_range(), drw_command_set_select_id(), drw_resource_handle(), DST, G, G_FLAG_PICKSEL, NULL, Object::obmat, and DRWManager::select_id.
Referenced by gpencil_drawcall_add(), gpencil_drawcall_flush(), gpencil_stroke_cache_populate(), and motion_path_cache().
| void DRW_shgroup_call_sculpt | ( | DRWShadingGroup * | shgroup, |
| Object * | ob, | ||
| bool | use_wire, | ||
| bool | use_mask | ||
| ) |
Definition at line 1057 of file draw_manager_data.c.
References drw_sculpt_generate_calls(), and DRWSculptCallbackData::ob.
Referenced by basic_cache_populate(), OVERLAY_facing_cache_populate(), OVERLAY_fade_cache_populate(), OVERLAY_sculpt_cache_populate(), OVERLAY_wireframe_cache_populate(), and workbench_cache_sculpt_populate().
| void DRW_shgroup_call_sculpt_with_materials | ( | DRWShadingGroup ** | shgroups, |
| int | num_shgroups, | ||
| Object * | ob | ||
| ) |
Definition at line 1070 of file draw_manager_data.c.
References drw_sculpt_generate_calls(), and DRWSculptCallbackData::ob.
Referenced by EEVEE_materials_cache_populate(), and workbench_cache_sculpt_populate().
| void DRW_shgroup_clear_framebuffer | ( | DRWShadingGroup * | shgroup, |
| eGPUFrameBufferBits | channels, | ||
| uchar | r, | ||
| uchar | g, | ||
| uchar | b, | ||
| uchar | a, | ||
| float | depth, | ||
| uchar | stencil | ||
| ) |
Definition at line 1429 of file draw_manager_data.c.
References Freestyle::a, drw_command_clear(), and r.
Referenced by GPENCIL_antialiasing_init(), and workbench_antialiasing_cache_init().
| DRWShadingGroup* DRW_shgroup_create | ( | struct GPUShader * | shader, |
| DRWPass * | pass | ||
| ) |
Definition at line 1383 of file draw_manager_data.c.
References drw_shgroup_create_ex(), drw_shgroup_init(), and shader().
Referenced by basic_cache_init(), dof_bokeh_pass_init(), dof_dilate_tiles_pass_init(), dof_filter_pass_init(), dof_flatten_tiles_pass_init(), dof_gather_pass_init(), dof_recombine_pass_init(), dof_reduce_pass_init(), dof_scatter_pass_init(), dof_setup_pass_init(), drw_hair_particle_cache_get(), eevee_create_bloom_pass(), eevee_cryptomatte_shading_group_create(), EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), EEVEE_lightprobes_cache_finish(), EEVEE_lightprobes_cache_init(), EEVEE_lookdev_cache_init(), eevee_lookdev_hdri_preview_init(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), EEVEE_materials_cache_init(), EEVEE_mist_output_init(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_cache_populate(), EEVEE_occlusion_cache_init(), EEVEE_occlusion_output_init(), EEVEE_renderpasses_cache_finish(), EEVEE_screen_raytrace_cache_init(), EEVEE_shadow_output_init(), EEVEE_shadows_cache_init(), EEVEE_subsurface_add_pass(), EEVEE_temporal_sampling_cache_init(), EEVEE_volumes_cache_finish(), EEVEE_volumes_cache_init(), EEVEE_volumes_output_init(), external_cache_init(), GPENCIL_antialiasing_init(), GPENCIL_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_pass_create(), image_cache_image(), material_opaque(), material_shadow(), material_transparent(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_gpencil_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_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), OVERLAY_metaball_cache_init(), OVERLAY_motion_path_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_init(), OVERLAY_sculpt_cache_init(), OVERLAY_volume_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), select_cache_init(), workbench_antialiasing_cache_init(), workbench_cavity_cache_init(), workbench_dof_cache_init(), workbench_opaque_cache_init(), workbench_outline_cache_init(), workbench_shadow_cache_init(), workbench_transparent_cache_init(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
|
static |
Definition at line 1273 of file draw_manager_data.c.
References BLI_LINKS_APPEND, BLI_memblock_alloc(), DRWShadingGroup::cmd, DST, DRWShadingGroup::first, DRWPass::handle, DRWShadingGroup::last, NULL, DRWShadingGroup::pass_handle, shader(), DRWShadingGroup::shader, DRWPass::shgroups, ViewportMemoryPool::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 1454 of file draw_manager_data.c.
References BLI_LINKS_INSERT_AFTER, BLI_memblock_alloc(), DRWShadingGroup::cmd, DRW_memblock_elem_from_handle(), drw_shgroup_init(), DST, DRWShadingGroup::first, DRWShadingGroup::last, NULL, DRWShadingGroup::pass_handle, ViewportMemoryPool::passes, DRWShadingGroup::shader, DRWPass::shgroups, ViewportMemoryPool::shgroups, and DRWManager::vmempool.
Referenced by draw_select_id_edit_mesh(), draw_select_id_mesh(), DRW_shgroup_hair_create_sub(), gpencil_layer_cache_populate(), gpencil_sbuffer_cache_populate(), gpencil_stroke_cache_populate(), gpencil_vfx_rim(), material_opaque(), material_shadow(), motion_path_cache(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_gpencil_cache_populate(), OVERLAY_extra_cache_init(), OVERLAY_lightprobe_cache_populate(), OVERLAY_outline_gpencil(), OVERLAY_particle_cache_populate(), sculpt_draw_cb(), wireframe_hair_cache_populate(), workbench_image_setup_ex(), workbench_material_setup_ex(), workbench_opaque_cache_init(), and workbench_shadow_cache_populate().
|
static |
Definition at line 1198 of file draw_manager_data.c.
References BLI_assert, 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_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, NULL, DRWShadingGroup::objectinfo, shader(), 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 1356 of file draw_manager_data.c.
References DRW_ATTR_INT, GPU_COMP_F32, GPU_COMP_I32, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_vertformat_attr_add(), MEM_callocN, and type.
| bool DRW_shgroup_is_empty | ( | DRWShadingGroup * | shgroup | ) |
Definition at line 1441 of file draw_manager_data.c.
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 | ( | struct GPUMaterial * | material, |
| DRWPass * | pass | ||
| ) |
Definition at line 1371 of file draw_manager_data.c.
References DRW_shgroup_add_material_resources(), drw_shgroup_init(), drw_shgroup_material_create_ex(), GPU_material_get_pass(), GPU_pass_shader_get(), and material.
Referenced by EEVEE_lightprobes_cache_init(), EEVEE_materials_cache_init(), EEVEE_volumes_cache_init(), and EEVEE_volumes_cache_object_add().
|
static |
Definition at line 1287 of file draw_manager_data.c.
References drw_shgroup_create_ex(), GPU_pass_shader_get(), and NULL.
Referenced by DRW_shgroup_material_create().
|
static |
Definition at line 1305 of file draw_manager_data.c.
References BLI_memblock_alloc(), DRW_shgroup_uniform_texture_ex(), DST, GPU_texture_ref(), ViewportMemoryPool::images, state, and DRWManager::vmempool.
Referenced by DRW_shgroup_add_material_resources().
| void DRW_shgroup_state_disable | ( | DRWShadingGroup * | shgroup, |
| DRWState | state | ||
| ) |
Definition at line 1410 of file draw_manager_data.c.
References drw_command_set_mutable_state(), and state.
Referenced by gpencil_layer_cache_add(), gpencil_vfx_rim(), material_transparent(), OVERLAY_armature_cache_init(), OVERLAY_extra_cache_init(), workbench_opaque_cache_init(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
| 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 1405 of file draw_manager_data.c.
References drw_command_set_mutable_state(), and state.
Referenced by gpencil_layer_cache_add(), gpencil_vfx_rim(), material_transparent(), OVERLAY_armature_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_paint_cache_init(), workbench_opaque_cache_init(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
| void DRW_shgroup_stencil_mask | ( | DRWShadingGroup * | shgroup, |
| uint | mask | ||
| ) |
Definition at line 1424 of file draw_manager_data.c.
References drw_command_set_stencil_mask(), and mask().
Referenced by EEVEE_subsurface_add_pass(), gpencil_layer_cache_add(), workbench_opaque_cache_init(), and workbench_shadow_cache_init().
| void DRW_shgroup_stencil_set | ( | DRWShadingGroup * | shgroup, |
| uint | write_mask, | ||
| uint | reference, | ||
| uint | compare_mask | ||
| ) |
Definition at line 1415 of file draw_manager_data.c.
References drw_command_set_stencil_mask().
| DRWShadingGroup* DRW_shgroup_transform_feedback_create | ( | struct GPUShader * | shader, |
| DRWPass * | pass, | ||
| GPUVertBuf * | tf_target | ||
| ) |
Definition at line 1390 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_create_ex(), drw_shgroup_init(), drw_shgroup_uniform_create_ex(), DRW_UNIFORM_TFEEDBACK_TARGET, NULL, and shader().
Referenced by drw_hair_particle_cache_get().
|
static |
Definition at line 223 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BLOCK, DRW_UNIFORM_BLOCK_REF, DRW_UNIFORM_TEXTURE, DRW_UNIFORM_TEXTURE_REF, ELEM, GPU_shader_get_uniform(), length(), DRWShadingGroup::shader, and type.
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 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUUniformBuf * | ubo | ||
| ) |
Definition at line 285 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BLOCK, GPU_shader_get_uniform_block_binding(), NULL, and DRWShadingGroup::shader.
Referenced by DRW_shgroup_add_material_resources(), EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), EEVEE_lightprobes_cache_init(), EEVEE_material_bind_resources(), EEVEE_materials_cache_init(), EEVEE_mist_output_init(), EEVEE_occlusion_cache_init(), EEVEE_occlusion_output_init(), EEVEE_screen_raytrace_cache_init(), EEVEE_shadow_output_init(), EEVEE_subsurface_add_pass(), EEVEE_temporal_sampling_cache_init(), EEVEE_volumes_cache_finish(), EEVEE_volumes_cache_init(), EEVEE_volumes_cache_object_add(), EEVEE_volumes_output_init(), gpencil_layer_cache_populate(), gpencil_sbuffer_cache_populate(), gpencil_stroke_cache_populate(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_gpencil_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_facing_cache_init(), OVERLAY_fade_cache_init(), OVERLAY_gpencil_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_metaball_cache_init(), OVERLAY_motion_path_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_init(), OVERLAY_volume_cache_init(), OVERLAY_wireframe_cache_init(), workbench_cavity_cache_init(), workbench_dof_cache_init(), workbench_material_setup_ex(), workbench_opaque_cache_init(), workbench_outline_cache_init(), workbench_transparent_cache_init(), workbench_transparent_lighting_uniforms(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
| void DRW_shgroup_uniform_block_ref | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUUniformBuf ** | ubo | ||
| ) |
Definition at line 294 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BLOCK_REF, GPU_shader_get_uniform_block_binding(), NULL, and DRWShadingGroup::shader.
Referenced by EEVEE_lightprobes_cache_init(), EEVEE_material_bind_resources(), EEVEE_materials_cache_init(), and EEVEE_renderpasses_cache_finish().
| void DRW_shgroup_uniform_bool | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize | ||
| ) |
Definition at line 301 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
Referenced by dof_dilate_tiles_pass_init(), EEVEE_motion_blur_cache_populate(), EEVEE_motion_blur_hair_cache_populate(), 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 404 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by DRW_shgroup_hair_create_sub(), EEVEE_bloom_output_init(), eevee_create_bloom_pass(), EEVEE_motion_blur_cache_init(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_layer_cache_populate(), gpencil_vfx_glow(), gpencil_vfx_rim(), gpencil_vfx_shadow(), image_cache_image(), motion_path_cache(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_gpencil_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_paint_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), workbench_image_setup_ex(), workbench_opaque_cache_init(), workbench_transparent_lighting_uniforms(), and workbench_volume_modifier_cache_populate().
|
static |
Definition at line 159 of file draw_manager_data.c.
References ARRAY_SIZE, 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, length(), DRWUniform::length, DRWUniform::location, DRWUniform::pvalue, DRWUniform::sampler_state, DRWUniform::texture, DRWUniform::texture_ref, DRWUniform::type, type, DRWUniform::uniform_attrs, DRWUniformChunk::uniform_len, DRWUniformChunk::uniform_used, DRWShadingGroup::uniforms, DRWUniformChunk::uniforms, ViewportMemoryPool::uniforms, and DRWManager::vmempool.
Referenced by DRW_shgroup_add_material_resources(), drw_shgroup_init(), DRW_shgroup_transform_feedback_create(), drw_shgroup_uniform(), DRW_shgroup_uniform_block(), DRW_shgroup_uniform_block_ref(), DRW_shgroup_uniform_image(), DRW_shgroup_uniform_image_ref(), DRW_shgroup_uniform_texture_ex(), DRW_shgroup_uniform_texture_ref_ex(), and DRW_shgroup_uniform_vec4_array_copy().
| void DRW_shgroup_uniform_float | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value, | ||
| int | arraysize | ||
| ) |
Definition at line 309 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by EEVEE_bloom_cache_init(), eevee_create_bloom_pass(), EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), EEVEE_lightprobes_cache_finish(), EEVEE_lut_update_ggx_btdf(), EEVEE_materials_cache_init(), EEVEE_temporal_sampling_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_grid_cache_init(), and workbench_antialiasing_cache_init().
| void DRW_shgroup_uniform_float_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float | value | ||
| ) |
Definition at line 410 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by dof_bokeh_pass_init(), dof_recombine_pass_init(), dof_reduce_pass_init(), dof_setup_pass_init(), DRW_shgroup_hair_create_sub(), EEVEE_lightprobes_cache_init(), EEVEE_lookdev_cache_init(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), EEVEE_material_bind_resources(), EEVEE_motion_blur_cache_init(), EEVEE_screen_raytrace_cache_init(), eevee_volume_object_grids_init(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_layer_cache_populate(), gpencil_sbuffer_cache_populate(), gpencil_vfx_colorize(), gpencil_vfx_flip(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), material_opaque(), OVERLAY_antialiasing_cache_init(), OVERLAY_armature_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_gpencil_cache_populate(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_paint_cache_init(), OVERLAY_sculpt_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), select_cache_init(), workbench_dof_cache_init(), workbench_shadow_cache_populate(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
| void DRW_shgroup_uniform_image | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUTexture * | tex | ||
| ) |
Definition at line 271 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_IMAGE, GPU_shader_get_texture_binding(), NULL, DRWShadingGroup::shader, and tex.
| void DRW_shgroup_uniform_image_ref | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUTexture ** | tex | ||
| ) |
Definition at line 278 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_IMAGE_REF, GPU_shader_get_texture_binding(), NULL, DRWShadingGroup::shader, and tex.
Referenced by EEVEE_volumes_cache_finish().
| void DRW_shgroup_uniform_int | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize | ||
| ) |
Definition at line 341 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
Referenced by dof_dilate_tiles_pass_init(), drw_hair_particle_cache_get(), DRW_shgroup_hair_create_sub(), EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), EEVEE_lightprobes_cache_init(), EEVEE_renderpasses_cache_finish(), EEVEE_screen_raytrace_cache_init(), and OVERLAY_grid_cache_init().
| void DRW_shgroup_uniform_int_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int | value | ||
| ) |
Definition at line 384 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by dof_scatter_pass_init(), draw_select_id_edit_mesh(), draw_select_id_mesh(), DRW_shgroup_hair_create_sub(), EEVEE_effects_cache_init(), EEVEE_material_bind_resources(), gpencil_layer_cache_add(), gpencil_layer_cache_populate(), gpencil_vfx_blur(), gpencil_vfx_colorize(), gpencil_vfx_glow(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), image_cache_image(), motion_path_cache(), OVERLAY_background_cache_init(), OVERLAY_edit_curve_cache_init(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_gpencil_cache_init(), OVERLAY_volume_extra(), select_cache_init(), workbench_material_setup_ex(), workbench_opaque_cache_init(), workbench_transparent_cache_init(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
| void DRW_shgroup_uniform_ivec2 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize | ||
| ) |
Definition at line 349 of file draw_manager_data.c.
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 389 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by EEVEE_motion_blur_cache_init().
| void DRW_shgroup_uniform_ivec3 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value, | ||
| int | arraysize | ||
| ) |
Definition at line 357 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
Referenced by EEVEE_lightprobes_cache_init().
| void DRW_shgroup_uniform_ivec3_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const int * | value | ||
| ) |
Definition at line 394 of file draw_manager_data.c.
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 365 of file draw_manager_data.c.
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 399 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by motion_path_cache().
| void DRW_shgroup_uniform_mat3 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float(*) | value[3] | ||
| ) |
Definition at line 373 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by EEVEE_lookdev_cache_init().
| void DRW_shgroup_uniform_mat4 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float(*) | value[4] | ||
| ) |
Definition at line 378 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by EEVEE_effects_cache_init(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_cache_populate(), EEVEE_motion_blur_hair_cache_populate(), EEVEE_temporal_sampling_cache_init(), eevee_volume_object_grids_init(), eevee_volume_object_mesh_init(), and workbench_volume_object_cache_populate().
| void DRW_shgroup_uniform_texture | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUTexture * | tex | ||
| ) |
Definition at line 251 of file draw_manager_data.c.
References DRW_shgroup_uniform_texture_ex(), GPU_SAMPLER_MAX, and tex.
Referenced by dof_gather_pass_init(), dof_recombine_pass_init(), drw_hair_particle_cache_get(), DRW_shgroup_add_material_resources(), DRW_shgroup_hair_create_sub(), EEVEE_lightbake_cache_init(), EEVEE_lookdev_cache_init(), EEVEE_material_bind_resources(), EEVEE_materials_cache_init(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_hair_cache_populate(), EEVEE_occlusion_cache_init(), EEVEE_occlusion_output_init(), EEVEE_screen_raytrace_cache_init(), EEVEE_shadow_output_init(), EEVEE_subsurface_add_pass(), eevee_volume_object_grids_init(), eevee_volume_object_mesh_init(), EEVEE_volumes_cache_init(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_layer_cache_populate(), gpencil_sbuffer_cache_populate(), gpencil_sbuffer_cache_populate_fast(), gpencil_stroke_cache_populate(), image_cache_image(), OVERLAY_edit_gpencil_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(), workbench_antialiasing_cache_init(), workbench_cavity_cache_init(), workbench_dof_cache_init(), workbench_image_setup_ex(), workbench_opaque_cache_init(), workbench_outline_cache_init(), workbench_transparent_cache_init(), workbench_transparent_lighting_uniforms(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
| void DRW_shgroup_uniform_texture_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const GPUTexture * | tex, | ||
| eGPUSamplerState | sampler_state | ||
| ) |
Definition at line 241 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_TEXTURE, GPU_shader_get_texture_binding(), NULL, DRWShadingGroup::shader, and tex.
Referenced by drw_shgroup_material_texture(), DRW_shgroup_uniform_texture(), EEVEE_effects_cache_init(), EEVEE_lookdev_cache_init(), image_cache_image(), workbench_antialiasing_cache_init(), workbench_dof_cache_init(), and workbench_image_setup_ex().
| void DRW_shgroup_uniform_texture_ref | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUTexture ** | tex | ||
| ) |
Definition at line 266 of file draw_manager_data.c.
References DRW_shgroup_uniform_texture_ref_ex(), GPU_SAMPLER_MAX, and tex.
Referenced by dof_dilate_tiles_pass_init(), dof_gather_pass_init(), dof_recombine_pass_init(), dof_scatter_pass_init(), eevee_create_bloom_pass(), EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), EEVEE_lightprobes_cache_finish(), EEVEE_lightprobes_cache_init(), EEVEE_material_bind_resources(), EEVEE_mist_output_init(), EEVEE_occlusion_cache_init(), EEVEE_occlusion_output_init(), EEVEE_renderpasses_cache_finish(), EEVEE_screen_raytrace_cache_init(), EEVEE_shadow_output_init(), EEVEE_subsurface_add_pass(), EEVEE_temporal_sampling_cache_init(), eevee_volume_object_mesh_init(), EEVEE_volumes_cache_finish(), EEVEE_volumes_output_init(), GPENCIL_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_pass_create(), OVERLAY_antialiasing_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_wireframe_cache_init(), workbench_opaque_cache_init(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
| void DRW_shgroup_uniform_texture_ref_ex | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| GPUTexture ** | tex, | ||
| eGPUSamplerState | sampler_state | ||
| ) |
Definition at line 256 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_TEXTURE_REF, GPU_shader_get_texture_binding(), NULL, DRWShadingGroup::shader, and tex.
Referenced by dof_filter_pass_init(), dof_flatten_tiles_pass_init(), dof_gather_pass_init(), dof_recombine_pass_init(), dof_reduce_pass_init(), dof_scatter_pass_init(), dof_setup_pass_init(), DRW_shgroup_uniform_texture_ref(), EEVEE_effects_cache_init(), EEVEE_motion_blur_cache_init(), EEVEE_screen_raytrace_cache_init(), and EEVEE_subsurface_add_pass().
| void DRW_shgroup_uniform_vec2 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value, | ||
| int | arraysize | ||
| ) |
Definition at line 317 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by basic_cache_init(), eevee_create_bloom_pass(), EEVEE_effects_cache_init(), EEVEE_motion_blur_cache_init(), eevee_volume_object_mesh_init(), and workbench_dof_cache_init().
| void DRW_shgroup_uniform_vec2_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value | ||
| ) |
Definition at line 415 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by dof_bokeh_pass_init(), dof_gather_pass_init(), dof_recombine_pass_init(), dof_reduce_pass_init(), dof_scatter_pass_init(), EEVEE_screen_raytrace_cache_init(), gpencil_layer_cache_add(), gpencil_layer_cache_populate(), gpencil_vfx_blur(), gpencil_vfx_flip(), gpencil_vfx_glow(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), image_cache_image(), and OVERLAY_edit_uv_cache_init().
| void DRW_shgroup_uniform_vec3 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value, | ||
| int | arraysize | ||
| ) |
Definition at line 325 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by eevee_create_bloom_pass(), EEVEE_lightprobes_cache_init(), EEVEE_materials_cache_init(), EEVEE_mist_output_init(), eevee_volume_object_mesh_init(), OVERLAY_background_cache_init(), OVERLAY_grid_cache_init(), sculpt_draw_cb(), workbench_dof_cache_init(), workbench_shadow_cache_populate(), and workbench_volume_modifier_cache_populate().
| void DRW_shgroup_uniform_vec3_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value | ||
| ) |
Definition at line 420 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by eevee_volume_object_grids_init(), gpencil_layer_cache_add(), gpencil_vfx_colorize(), gpencil_vfx_glow(), gpencil_vfx_rim(), motion_path_cache(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_gpencil_cache_init(), OVERLAY_paint_cache_init(), OVERLAY_volume_extra(), and workbench_volume_object_cache_populate().
| void DRW_shgroup_uniform_vec4 | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value, | ||
| int | arraysize | ||
| ) |
Definition at line 333 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT.
Referenced by EEVEE_bloom_cache_init(), GPENCIL_cache_init(), and OVERLAY_edit_text_cache_init().
| void DRW_shgroup_uniform_vec4_array_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float(*) | value[4], | ||
| int | arraysize | ||
| ) |
Definition at line 430 of file draw_manager_data.c.
References drw_shgroup_uniform_create_ex(), DRW_UNIFORM_FLOAT_COPY, GPU_shader_get_uniform(), and DRWShadingGroup::shader.
Referenced by DRW_shgroup_hair_create_sub(), OVERLAY_lightprobe_cache_populate(), and wireframe_hair_cache_populate().
| void DRW_shgroup_uniform_vec4_copy | ( | DRWShadingGroup * | shgroup, |
| const char * | name, | ||
| const float * | value | ||
| ) |
Definition at line 425 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by dof_recombine_pass_init(), dof_setup_pass_init(), eevee_cryptomatte_shading_group_create(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_layer_cache_populate(), gpencil_vfx_glow(), gpencil_vfx_shadow(), image_cache_image(), OVERLAY_armature_cache_init(), OVERLAY_background_cache_init(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_gpencil_cache_populate(), OVERLAY_edit_text_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_fade_cache_init(), OVERLAY_gpencil_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_populate(), OVERLAY_volume_extra(), and workbench_antialiasing_cache_init().
Definition at line 1893 of file draw_manager_data.c.
References copy_v4_v4(), and view.
Referenced by drw_viewport_var_init(), and EEVEE_render_view_sync().
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). NOTE: planes must be in world space.
Definition at line 1884 of file draw_manager_data.c.
References BLI_assert, MAX_CLIP_PLANES, and view.
Referenced by drw_viewport_var_init(), EEVEE_temporal_sampling_create_view(), and lightbake_planar_ensure_view().
| 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 | ||
| ) |
Definition at line 1724 of file draw_manager_data.c.
References BLI_assert, BLI_memblock_alloc(), copy_v4_fl4(), DRW_view_update(), DST, MAX_CULLED_VIEWS, NULL, DRWManager::primary_view_ct, view, ViewportMemoryPool::views, and DRWManager::vmempool.
Referenced by drw_viewport_var_init(), eevee_ensure_cascade_views(), eevee_ensure_cube_views(), eevee_lightbake_cache_create(), EEVEE_render_view_sync(), GPENCIL_render_init(), IMAGE_cache_init(), lightbake_planar_ensure_view(), render_cubemap(), select_engine_init(), and workbench_render_matrices_init().
| DRWView* DRW_view_create_sub | ( | const DRWView * | parent_view, |
| const float | viewmat[4][4], | ||
| const float | winmat[4][4] | ||
| ) |
Definition at line 1751 of file draw_manager_data.c.
References BLI_memblock_alloc(), DRW_view_update_sub(), DST, NULL, DRWView::parent, view, ViewportMemoryPool::views, and DRWManager::vmempool.
Referenced by DRW_view_create_with_zoffset(), EEVEE_lookdev_draw(), EEVEE_temporal_sampling_create_view(), render_cubemap(), and workbench_antialiasing_setup().
| const DRWView* DRW_view_default_get | ( | void | ) |
Definition at line 1859 of file draw_manager_data.c.
References DST, and DRWManager::view_default.
Referenced by drw_sculpt_get_frustum_planes(), eevee_lightbake_cache_create(), eevee_lightprobes_culling_test(), EEVEE_lookdev_draw(), EEVEE_temporal_sampling_create_view(), OVERLAY_edit_mesh_init(), OVERLAY_edit_text_cache_init(), OVERLAY_image_init(), OVERLAY_wireframe_init(), render_cubemap(), select_engine_init(), workbench_antialiasing_setup(), and workbench_shadow_object_cast_visible_shadow().
| void DRW_view_default_set | ( | DRWView * | view | ) |
Definition at line 1873 of file draw_manager_data.c.
References BLI_assert, DST, NULL, view, and DRWManager::view_default.
Referenced by eevee_lightbake_cache_create(), EEVEE_render_view_sync(), GPENCIL_render_init(), and workbench_render_matrices_init().
Definition at line 1929 of file draw_manager_data.c.
References DRW_view_is_persp_get(), DST, view, and DRWManager::view_default.
Referenced by EEVEE_mist_output_init(), eevee_motion_blur_sync_camera(), EEVEE_shadows_draw_cascades(), EEVEE_volumes_init(), GPENCIL_render_init(), GPENCIL_render_result_z(), and workbench_render_result_z().
Definition at line 1899 of file draw_manager_data.c.
References view.
Definition at line 1906 of file draw_manager_data.c.
References view.
Referenced by drw_sculpt_get_frustum_planes().
| bool DRW_view_is_persp_get | ( | const DRWView * | view | ) |
Definition at line 1911 of file draw_manager_data.c.
References DST, view, and DRWManager::view_default.
Referenced by DRW_view_far_distance_get(), DRW_view_near_distance_get(), EEVEE_motion_blur_cache_init(), EEVEE_screen_raytrace_init(), EEVEE_volumes_init(), gpencil_depth_plane(), gpencil_object_cache_add(), GPENCIL_render_init(), GPENCIL_render_result_z(), and workbench_render_result_z().
Definition at line 1917 of file draw_manager_data.c.
References DRW_view_is_persp_get(), DST, view, and DRWManager::view_default.
Referenced by EEVEE_mist_output_init(), eevee_motion_blur_sync_camera(), EEVEE_shadows_draw_cascades(), EEVEE_volumes_init(), GPENCIL_render_init(), GPENCIL_render_result_z(), and workbench_render_result_z().
Definition at line 1955 of file draw_manager_data.c.
References copy_m4_m4(), DST, inverse(), view, and DRWManager::view_default.
Referenced by drw_debug_draw_spheres(), EEVEE_draw_effects(), EEVEE_motion_blur_init(), eevee_motion_blur_sync_camera(), EEVEE_temporal_sampling_draw(), EEVEE_temporal_sampling_init(), EEVEE_temporal_sampling_matrices_calc(), gpencil_vfx_blur(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), lightbake_planar_ensure_view(), workbench_antialiasing_engine_init(), and workbench_antialiasing_setup().
| void DRW_view_reset | ( | void | ) |
Definition at line 1865 of file draw_manager_data.c.
References DST, NULL, DRWManager::view_active, DRWManager::view_default, and DRWManager::view_previous.
Referenced by DRW_render_gpencil(), DRW_render_to_image(), and EEVEE_render_view_sync().
| 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] | ||
| ) |
Definition at line 1790 of file draw_manager_data.c.
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, NULL, view, and DRWManager::view_default.
Referenced by DRW_view_create(), eevee_ensure_cascade_views(), eevee_ensure_cube_views(), lightbake_planar_ensure_view(), and render_cubemap().
DRWView Update: This is meant to be done on existing views when rendering in a loop and there is no need to allocate more DRWViews.
Definition at line 1779 of file draw_manager_data.c.
References BLI_assert, draw_view_matrix_state_update(), is_negative_m4(), NULL, and view.
Referenced by DRW_view_create_sub(), EEVEE_lookdev_draw(), EEVEE_temporal_sampling_matrices_calc(), render_cubemap(), and workbench_antialiasing_setup().
Definition at line 1941 of file draw_manager_data.c.
References copy_m4_m4(), DST, inverse(), view, and DRWManager::view_default.
Referenced by DRW_object_axis_orthogonal_to_view(), DRW_view_create_with_zoffset(), EEVEE_lookdev_cache_init(), EEVEE_lookdev_draw(), EEVEE_motion_blur_init(), eevee_motion_blur_sync_camera(), EEVEE_temporal_sampling_create_view(), EEVEE_temporal_sampling_matrices_calc(), gpencil_depth_plane(), GPENCIL_engine_init(), lightbake_planar_ensure_view(), OVERLAY_gpencil_cache_init(), OVERLAY_grid_init(), OVERLAY_volume_extra(), select_engine_init(), workbench_antialiasing_setup(), workbench_shadow_data_update(), workbench_studiolight_data_update(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
Definition at line 1948 of file draw_manager_data.c.
References copy_m4_m4(), DST, inverse(), view, and DRWManager::view_default.
Referenced by DRW_view_create_with_zoffset(), EEVEE_temporal_sampling_create_view(), EEVEE_temporal_sampling_matrices_calc(), GPENCIL_render_result_z(), gpencil_vfx_blur(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), lightbake_planar_ensure_view(), OVERLAY_grid_init(), select_engine_init(), workbench_antialiasing_setup(), and workbench_render_result_z().
|
static |
Definition at line 2028 of file draw_manager_data.c.
References Freestyle::a, and DRWShadingGroup::z_sorting.
Referenced by DRW_pass_sort_shgroup_z().
|
static |
Definition at line 941 of file draw_manager_data.c.
References BKE_boundbox_init_from_minmax(), DRW_debug_bbox(), PBVH_Leaf, SCULPT_DEBUG_COLOR, and user_data.
Referenced by drw_sculpt_generate_calls().
|
static |
Definition at line 906 of file draw_manager_data.c.
References DRWSculptCallbackData::debug_node_nr, DRW_shgroup_call_no_cull, DRW_shgroup_create_sub(), DRW_shgroup_uniform_vec3(), DRWSculptCallbackData::fast_mode, GPU_pbvh_buffers_batch_get(), GPU_pbvh_buffers_has_overlays(), GPU_pbvh_buffers_material_index_get(), GPUBatch, NULL, DRWSculptCallbackData::num_shading_groups, DRWSculptCallbackData::ob, SCULPT_DEBUG_BUFFERS, SCULPT_DEBUG_COLOR, DRWSculptCallbackData::shading_groups, DRWSculptCallbackData::use_mask, DRWSculptCallbackData::use_mats, and DRWSculptCallbackData::use_wire.
Referenced by drw_sculpt_generate_calls().
|
static |
Definition at line 1085 of file draw_manager_data.c.
Referenced by DRW_shgroup_call_buffer(), and DRW_shgroup_call_buffer_instance().
|
static |
Definition at line 894 of file draw_manager_data.c.