Blender
V3.3
|
#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 "BKE_volume.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_capabilities.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)) |
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 1076 of file draw_manager_data.c.
#define SCULPT_DEBUG_COLOR | ( | id | ) | (sculpt_debug_colors[id % 9]) |
Definition at line 1090 of file draw_manager_data.c.
#define SORT_IMPL_FUNC shgroup_sort_fn_r |
Definition at line 2238 of file draw_manager_data.c.
#define SORT_IMPL_LINKTYPE DRWShadingGroup |
Definition at line 2236 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 774 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 769 of file draw_manager_data.c.
References type.
Referenced by drw_command_create().
|
static |
Definition at line 46 of file draw_manager_data.c.
References ARRAY_SIZE, BLI_assert, KEY, and src.
Referenced by drw_resource_buffer_finish().
|
static |
Definition at line 1749 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, point, BoundSphere::radius, sub_v2_v2(), BoundBox::vec, and z.
Referenced by DRW_view_update().
|
static |
Definition at line 1689 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 1733 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 1864 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(), ViewInfos::persinv, ViewInfos::persmat, ViewInfos::viewinv, ViewInfos::viewmat, ViewInfos::viewvecs, ViewInfos::wininv, and ViewInfos::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 1365 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 1344 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_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), drw_shgroup_bone_envelope(), drw_shgroup_bone_octahedral(), drw_shgroup_bone_point(), drw_shgroup_custom_bone_curve(), OVERLAY_camera_cache_populate(), OVERLAY_edit_metaball_cache_populate(), and OVERLAY_metaball_cache_populate().
Definition at line 579 of file draw_manager_data.c.
References BKE_curve_texspace_ensure(), BKE_mesh_texspace_get_reference(), BKE_volume_boundbox_get(), copy_v3_fl(), Object::data, GS, ID_CU_LEGACY, ID_MB, ID_ME, ID_VO, if(), invert_v3(), Curve::loc, MetaBall::loc, mid_v3_v3v3(), mul_v3_v3(), mul_v3_v3fl(), ID::name, negate_v3(), NULL, size(), Curve::size, MetaBall::size, sub_v3_v3v3(), and BoundBox::vec.
Referenced by drw_call_obinfos_init().
|
static |
Definition at line 672 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 629 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 641 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(), 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, random(), DupliObject::random_id, and Object::transflag.
Referenced by drw_resource_handle().
|
static |
Definition at line 864 of file draw_manager_data.c.
References DRW_CMD_BARRIER, drw_command_create(), DRWCommandBarrier::type, and type.
Referenced by DRW_shgroup_barrier().
|
static |
Definition at line 904 of file draw_manager_data.c.
References DRWCommandClear::a, Freestyle::a, DRWCommandClear::b, usdtokens::b(), channels(), DRWCommandClear::clear_channels, DRWCommandClear::depth, DRW_CMD_CLEAR, drw_command_create(), DRWCommandClear::g, usdtokens::g(), DRWCommandClear::r, r, and DRWCommandClear::stencil.
Referenced by DRW_shgroup_clear_framebuffer().
|
static |
Definition at line 841 of file draw_manager_data.c.
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 858 of file draw_manager_data.c.
References DRW_CMD_COMPUTE_INDIRECT, drw_command_create(), and DRWCommandComputeIndirect::indirect_buf.
Referenced by DRW_shgroup_call_compute_indirect().
|
static |
Definition at line 852 of file draw_manager_data.c.
References DRW_CMD_COMPUTE_REF, drw_command_create(), and DRWCommandComputeRef::groups_ref.
Referenced by DRW_shgroup_call_compute_ref().
|
static |
Definition at line 779 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, DRWData::commands, DRWData::commands_small, DST, DRWShadingGroup::last, NULL, type, 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_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 804 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 821 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 831 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 870 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 811 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 923 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 881 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 890 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 719 of file draw_manager_data.c.
References DST, DRWManager::ob_handle, and DRWManager::resource_handle.
Referenced by blender::eevee::VelocityModule::step_object_sync(), and workbench_material_setup_ex().
Definition at line 2157 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, DRWData::passes, DRWPass::shgroups, state, DRWPass::state, and DRWManager::vmempool.
Referenced by DRW_curves_init(), 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(), select_debug_engine_init(), blender::eevee::Film::sync(), blender::eevee::ForwardPipeline::sync(), blender::eevee::WorldPipeline::sync(), workbench_dof_cache_init(), workbench_transparent_cache_init(), and workbench_volume_cache_init().
Create an instance of the original pass that will execute the same drawcalls but with its own DRWState.
Definition at line 2176 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 2205 of file draw_manager_data.c.
References callback, LISTBASE_FOREACH, and DRWPass::shgroups.
Definition at line 2191 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().
Link two passes so that they are both rendered if the first one is being drawn.
Definition at line 2184 of file draw_manager_data.c.
References BLI_assert, DRWPass::next, and NULL.
Referenced by EEVEE_materials_cache_init(), EEVEE_motion_blur_cache_init(), and blender::eevee::ForwardPipeline::sync().
Reverse Shading group submission order.
Definition at line 2294 of file draw_manager_data.c.
References BLI_linklist_reverse(), DRWPass::first, DRWPass::last, and DRWPass::shgroups.
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 2244 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, DRWData::obmats, DRWShadingGroup::pass_handle, pass_shgroup_dist_sort(), DRWPass::shgroups, DRWView::storage, sub_v3_v3v3(), DRWManager::view_active, ViewInfos::viewinv, DRWManager::vmempool, and DRWShadingGroup::z_sorting.
Referenced by eevee_draw_scene(), EEVEE_lightprobes_refresh_planar(), EEVEE_render_draw(), lightbake_render_scene_reflected(), OVERLAY_image_cache_finish(), and blender::eevee::ForwardPipeline::render().
Definition at line 76 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, 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, NULL, 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 729 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, 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(), and DRW_shgroup_call_range().
|
static |
Definition at line 696 of file draw_manager_data.c.
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().
|
static |
Definition at line 1176 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(), Mesh_Runtime::subdiv_ccg, and DRWSculptCallbackData::use_mats.
Referenced by DRW_shgroup_call_sculpt(), and DRW_shgroup_call_sculpt_with_materials().
Definition at line 1161 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 1527 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_curves_create_sub(), DRW_shgroup_hair_create_sub(), DRW_shgroup_material_create(), eevee_lookdev_hdri_preview_init(), EEVEE_volumes_cache_object_add(), material_opaque(), material_shadow(), and material_transparent().
void DRW_shgroup_barrier | ( | DRWShadingGroup * | shgroup, |
eGPUBarrier | type | ||
) |
Issue a barrier command.
Definition at line 1008 of file draw_manager_data.c.
References BLI_assert, drw_command_barrier(), GPU_compute_shader_support(), and type.
Referenced by blender::eevee::Film::sync(), and blender::eevee::WorldPipeline::sync().
void DRW_shgroup_buffer_texture | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
GPUVertBuf * | vertex_buffer | ||
) |
Definition at line 550 of file draw_manager_data.c.
References drw_shgroup_uniform_create_ex(), DRW_UNIFORM_VERTEX_BUFFER_AS_TEXTURE, GPU_shader_get_ssbo(), and DRWShadingGroup::shader.
void DRW_shgroup_buffer_texture_ref | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
GPUVertBuf ** | vertex_buffer | ||
) |
Definition at line 562 of file draw_manager_data.c.
References drw_shgroup_uniform_create_ex(), DRW_UNIFORM_VERTEX_BUFFER_AS_TEXTURE_REF, GPU_shader_get_ssbo(), and DRWShadingGroup::shader.
DRWCallBuffer* DRW_shgroup_call_buffer | ( | DRWShadingGroup * | shgroup, |
struct GPUVertFormat * | format, | ||
GPUPrimType | prim_type | ||
) |
Definition at line 1285 of file draw_manager_data.c.
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(), GPUBatch, DRWData::idatalist, inst_select_format, NULL, and DRWManager::vmempool.
DRWCallBuffer* DRW_shgroup_call_buffer_instance | ( | DRWShadingGroup * | shgroup, |
struct GPUVertFormat * | format, | ||
GPUBatch * | geom | ||
) |
Definition at line 1314 of file draw_manager_data.c.
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(), GPUBatch, DRWData::idatalist, inst_select_format, NULL, and DRWManager::vmempool.
Referenced by custom_bone_instance_shgroup(), and EEVEE_lightprobes_cache_init().
void DRW_shgroup_call_compute | ( | DRWShadingGroup * | shgroup, |
int | groups_x_len, | ||
int | groups_y_len, | ||
int | groups_z_len | ||
) |
Definition at line 984 of file draw_manager_data.c.
References BLI_assert, drw_command_compute(), and GPU_compute_shader_support().
Referenced by drw_curves_cache_update_compute(), drw_hair_particle_cache_update_compute(), and blender::eevee::Film::sync().
void DRW_shgroup_call_compute_indirect | ( | DRWShadingGroup * | shgroup, |
GPUStorageBuf * | indirect_buf | ||
) |
Definition at line 1002 of file draw_manager_data.c.
References BLI_assert, drw_command_compute_indirect(), and GPU_compute_shader_support().
void DRW_shgroup_call_compute_ref | ( | DRWShadingGroup * | shgroup, |
int | groups_ref[3] | ||
) |
Definition at line 995 of file draw_manager_data.c.
References BLI_assert, drw_command_compute_ref(), and GPU_compute_shader_support().
void DRW_shgroup_call_ex | ( | DRWShadingGroup * | shgroup, |
Object * | ob, | ||
float(*) | obmat[4], | ||
struct GPUBatch * | geom, | ||
bool | bypass_culling, | ||
void * | user_data | ||
) |
Definition at line 933 of file draw_manager_data.c.
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, 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_num | ||
) |
A count of 0 instance will use the default number of instance in the batch.
Definition at line 973 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(), blender::eevee::shgroup_geometry_call(), and workbench_object_drawcall().
void DRW_shgroup_call_instances | ( | DRWShadingGroup * | shgroup, |
Object * | ob, | ||
struct GPUBatch * | geom, | ||
uint | count | ||
) |
IN_PLACE_INSTANCES
defined. TODO: Should be removed. Definition at line 1047 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 1060 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, DRWData::idatalist, NULL, Object::obmat, 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 1015 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 1035 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 1029 of file draw_manager_data.c.
References drw_cache_procedural_points_get(), drw_shgroup_call_procedural_add_ex(), and GPUBatch.
Referenced by drw_curves_cache_update_transform_feedback(), drw_hair_particle_cache_update_transform_feedback(), 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 1041 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(), select_debug_engine_init(), blender::eevee::Film::sync(), 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_num | ||
) |
Definition at line 962 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(), motion_path_cache(), and blender::eevee::shgroup_geometry_call().
void DRW_shgroup_call_sculpt | ( | DRWShadingGroup * | shgroup, |
Object * | ob, | ||
bool | use_wire, | ||
bool | use_mask | ||
) |
Definition at line 1255 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_mode_transfer_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 1268 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 | ||
) |
Issue a clear command.
Definition at line 1635 of file draw_manager_data.c.
References Freestyle::a, usdtokens::b(), channels(), drw_command_clear(), usdtokens::g(), and r.
Referenced by GPENCIL_antialiasing_init(), and workbench_antialiasing_cache_init().
DRWShadingGroup* DRW_shgroup_create | ( | struct GPUShader * | shader, |
DRWPass * | pass | ||
) |
Definition at line 1594 of file draw_manager_data.c.
References drw_shgroup_create_ex(), and drw_shgroup_init().
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_curves_cache_update_compute(), drw_curves_cache_update_transform_feedback(), drw_hair_particle_cache_update_compute(), drw_hair_particle_cache_update_transform_feedback(), 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_cache_object_add(), EEVEE_volumes_output_init(), external_cache_init(), GPENCIL_antialiasing_init(), GPENCIL_cache_init(), gpencil_layer_cache_add(), gpencil_vfx_pass_create(), 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_curves_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_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_volume_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), select_cache_init(), select_debug_engine_init(), blender::eevee::Film::sync(), 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 1483 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, DRWShadingGroup::shader, DRWPass::shgroups, 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 1660 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, DRWData::passes, DRWShadingGroup::shader, DRWPass::shgroups, DRWData::shgroups, and DRWManager::vmempool.
Referenced by draw_select_id_edit_mesh(), draw_select_id_mesh(), drw_curves_cache_update_compute(), drw_hair_particle_cache_update_compute(), DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), drw_volume_object_grids_init(), drw_volume_object_mesh_init(), 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_grid_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 1397 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_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, NULL, 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 1567 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 1647 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 1582 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(), blender::eevee::ForwardPipeline::material_opaque_add(), blender::eevee::ForwardPipeline::material_transparent_add(), blender::eevee::ForwardPipeline::prepass_opaque_add(), blender::eevee::ForwardPipeline::prepass_transparent_add(), and blender::eevee::WorldPipeline::sync().
|
static |
Definition at line 1497 of file draw_manager_data.c.
References drw_shgroup_create_ex(), GPU_pass_shader_get(), NULL, and sh.
Referenced by DRW_shgroup_material_create().
|
static |
Definition at line 1515 of file draw_manager_data.c.
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 1617 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(), blender::eevee::ForwardPipeline::material_transparent_add(), OVERLAY_armature_cache_init(), OVERLAY_extra_cache_init(), blender::eevee::ForwardPipeline::prepass_transparent_add(), 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 1612 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(), blender::eevee::ForwardPipeline::material_transparent_add(), 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(), blender::eevee::ForwardPipeline::prepass_transparent_add(), workbench_opaque_cache_init(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
void DRW_shgroup_stencil_mask | ( | DRWShadingGroup * | shgroup, |
uint | mask | ||
) |
TODO: remove this function. Obsolete version. mask is actually reference value.
Definition at line 1630 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 | ||
) |
Reminders:
Definition at line 1622 of file draw_manager_data.c.
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 316 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_STORAGE_BLOCK, file, GPU_shader_get_ssbo(), NULL, 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 338 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_STORAGE_BLOCK_REF, file, GPU_shader_get_ssbo(), NULL, and DRWShadingGroup::shader.
DRWShadingGroup* DRW_shgroup_transform_feedback_create | ( | struct GPUShader * | shader, |
DRWPass * | pass, | ||
GPUVertBuf * | tf_target | ||
) |
Definition at line 1601 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, and NULL.
Referenced by drw_curves_cache_update_transform_feedback(), and drw_hair_particle_cache_update_transform_feedback().
|
static |
Definition at line 210 of file draw_manager_data.c.
References BLI_assert, 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(), blender::math::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_ex | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const GPUUniformBuf *ubo | DRW_DEBUG_FILE_LINE_ARGS | ||
) |
Definition at line 274 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BLOCK, file, GPU_shader_get_uniform_block_binding(), NULL, 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 295 of file draw_manager_data.c.
References BLI_assert, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_BLOCK_REF, file, GPU_shader_get_uniform_block_binding(), NULL, and DRWShadingGroup::shader.
void DRW_shgroup_uniform_bool | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const int * | value, | ||
int | arraysize | ||
) |
Definition at line 360 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_curves_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 463 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT_COPY.
Referenced by DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), 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(), 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_sculpt_curves_cache_populate(), 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 146 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, blender::math::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, DRWData::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 369 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(), and workbench_antialiasing_cache_init().
void DRW_shgroup_uniform_float_copy | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const float | value | ||
) |
Definition at line 469 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_curves_create_sub(), 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(), 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_curves_cache_init(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_gpencil_cache_populate(), OVERLAY_edit_mesh_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_paint_cache_init(), OVERLAY_sculpt_cache_init(), OVERLAY_sculpt_curves_cache_init(), OVERLAY_volume_extra(), OVERLAY_wireframe_cache_init(), select_cache_init(), blender::eevee::WorldPipeline::sync(), workbench_dof_cache_init(), workbench_image_setup_ex(), 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 | ||
) |
Only to be used when image load store is supported (GPU_shader_image_load_store_support()).
Definition at line 260 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 267 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(), blender::eevee::ForwardPipeline::material_opaque_add(), blender::eevee::Film::sync(), and blender::eevee::WorldPipeline::sync().
void DRW_shgroup_uniform_int | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const int * | value, | ||
int | arraysize | ||
) |
Definition at line 401 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_INT.
Referenced by dof_dilate_tiles_pass_init(), drw_curves_cache_shgrp_attach_resources(), drw_curves_cache_update_transform_feedback(), drw_hair_particle_cache_shgrp_attach_resources(), drw_hair_particle_cache_update_transform_feedback(), DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), EEVEE_lightprobes_cache_init(), EEVEE_renderpasses_cache_finish(), and EEVEE_screen_raytrace_cache_init().
void DRW_shgroup_uniform_int_copy | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const int | value | ||
) |
Definition at line 443 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_curves_cache_update_compute(), drw_hair_particle_cache_update_compute(), DRW_shgroup_curves_create_sub(), 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(), 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_grid_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 409 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 448 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 417 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 453 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 425 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 458 of file draw_manager_data.c.
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 433 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 438 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_curves_cache_populate(), EEVEE_motion_blur_hair_cache_populate(), EEVEE_temporal_sampling_cache_init(), and workbench_volume_object_cache_populate().
void DRW_shgroup_uniform_mat4_copy | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const float(*) | value[4] | ||
) |
Definition at line 489 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_curves_create_sub(), DRW_shgroup_hair_create_sub(), 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 240 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_curves_cache_shgrp_attach_resources(), drw_hair_particle_cache_shgrp_attach_resources(), DRW_shgroup_add_material_resources(), DRW_shgroup_curves_create_sub(), DRW_shgroup_hair_create_sub(), drw_volume_object_grids_init(), drw_volume_object_mesh_init(), drw_volume_world_grids_init(), EEVEE_lightbake_cache_init(), EEVEE_lookdev_cache_init(), EEVEE_material_bind_resources(), EEVEE_materials_cache_init(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_curves_cache_populate(), 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(), GPENCIL_antialiasing_init(), gpencil_layer_cache_add(), gpencil_layer_cache_populate(), gpencil_sbuffer_cache_populate(), gpencil_sbuffer_cache_populate_fast(), gpencil_stroke_cache_populate(), blender::eevee::ForwardPipeline::material_opaque_add(), 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_sculpt_curves_cache_populate(), OVERLAY_volume_extra(), select_debug_engine_init(), blender::eevee::WorldPipeline::sync(), 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 230 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(), 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 255 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(), drw_volume_object_mesh_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_materials_cache_init(), 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_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_curves_cache_init(), OVERLAY_edit_mesh_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_outline_cache_init(), OVERLAY_wireframe_cache_init(), blender::eevee::Film::sync(), 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 245 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(), EEVEE_subsurface_add_pass(), and blender::eevee::Film::sync().
void DRW_shgroup_uniform_vec2 | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const float * | value, | ||
int | arraysize | ||
) |
Definition at line 377 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(), and workbench_dof_cache_init().
void DRW_shgroup_uniform_vec2_copy | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const float * | value | ||
) |
Definition at line 474 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_vfx_blur(), gpencil_vfx_flip(), gpencil_vfx_glow(), gpencil_vfx_pixelize(), gpencil_vfx_rim(), gpencil_vfx_shadow(), gpencil_vfx_swirl(), gpencil_vfx_wave(), and OVERLAY_edit_uv_cache_init().
void DRW_shgroup_uniform_vec3 | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const float * | value, | ||
int | arraysize | ||
) |
Definition at line 385 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(), OVERLAY_background_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 479 of file draw_manager_data.c.
References drw_shgroup_uniform(), and DRW_UNIFORM_FLOAT_COPY.
Referenced by gpencil_layer_cache_add(), gpencil_vfx_colorize(), gpencil_vfx_rim(), motion_path_cache(), OVERLAY_edit_gpencil_cache_init(), OVERLAY_edit_uv_cache_init(), OVERLAY_gpencil_cache_init(), OVERLAY_grid_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 393 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_copy | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
const float * | value | ||
) |
Definition at line 484 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(), 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_mode_transfer_cache_populate(), OVERLAY_paint_cache_init(), OVERLAY_particle_cache_populate(), OVERLAY_volume_extra(), and workbench_antialiasing_cache_init().
void DRW_shgroup_vertex_buffer_ex | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
GPUVertBuf *vertex_buffer | DRW_DEBUG_FILE_LINE_ARGS | ||
) |
Definition at line 510 of file draw_manager_data.c.
References BLI_assert_msg, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE, file, GPU_shader_get_ssbo(), and DRWShadingGroup::shader.
void DRW_shgroup_vertex_buffer_ref_ex | ( | DRWShadingGroup * | shgroup, |
const char * | name, | ||
GPUVertBuf **vertex_buffer | DRW_DEBUG_FILE_LINE_ARGS | ||
) |
Definition at line 530 of file draw_manager_data.c.
References BLI_assert_msg, drw_shgroup_uniform_create_ex(), DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE_REF, file, GPU_shader_get_ssbo(), and DRWShadingGroup::shader.
Definition at line 2085 of file draw_manager_data.c.
References copy_v4_v4(), and view.
Referenced by blender::eevee::Camera::sync().
Definition at line 2080 of file draw_manager_data.c.
References copy_v4_v4(), and view.
Referenced by drw_manager_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).
Definition at line 2071 of file draw_manager_data.c.
References BLI_assert, MAX_CLIP_PLANES, and view.
Referenced by drw_manager_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 | ||
) |
Create a view with culling.
Definition at line 1924 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_num, view, DRWData::views, and DRWManager::vmempool.
Referenced by blender::draw::image_engine::ImageEngine< DrawingMode >::cache_init(), drw_manager_init(), eevee_ensure_cascade_views(), eevee_ensure_cube_views(), eevee_lightbake_cache_create(), EEVEE_render_view_sync(), GPENCIL_render_init(), lightbake_planar_ensure_view(), render_cubemap(), select_engine_init(), blender::eevee::ShadingView::sync(), and workbench_render_matrices_init().
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 1950 of file draw_manager_data.c.
References BLI_memblock_alloc(), DRW_view_update_sub(), DST, NULL, DRWView::parent, view, DRWData::views, and DRWManager::vmempool.
Referenced by DRW_view_create_with_zoffset(), EEVEE_lookdev_draw(), EEVEE_temporal_sampling_create_view(), render_cubemap(), blender::eevee::ShadingView::sync(), and workbench_antialiasing_setup().
Definition at line 2053 of file draw_manager_data.c.
References DST, and DRWManager::view_default.
Referenced by draw_armature_pose(), drw_sculpt_get_frustum_planes(), eevee_engine_init(), eevee_lightbake_cache_create(), eevee_lightprobes_culling_test(), EEVEE_lookdev_draw(), EEVEE_temporal_sampling_create_view(), OVERLAY_edit_curves_init(), 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().
MUST only be called once per render and only in render mode. Sets default view.
Definition at line 2065 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 2118 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(), blender::eevee::Camera::sync(), and workbench_render_result_z().
Definition at line 2090 of file draw_manager_data.c.
References view.
Definition at line 2095 of file draw_manager_data.c.
References view.
Referenced by drw_sculpt_get_frustum_planes().
Definition at line 2100 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(), blender::eevee::Camera::init(), and workbench_render_result_z().
These are in view-space, so negative if in perspective. Extract near and far clip distance from the projection matrix.
Definition at line 2106 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(), blender::eevee::Camera::sync(), and workbench_render_result_z().
Definition at line 2144 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(), blender::eevee::Camera::sync(), workbench_antialiasing_engine_init(), and workbench_antialiasing_setup().
Definition at line 2058 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] | ||
) |
Update matrices of a view created with DRW_view_create.
Definition at line 1985 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().
Update matrices of a view created with DRW_view_create_sub.
Definition at line 1975 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 2130 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(), external_image_space_matrix_set(), gpencil_depth_plane(), GPENCIL_engine_init(), lightbake_planar_ensure_view(), OVERLAY_gpencil_cache_init(), OVERLAY_grid_init(), OVERLAY_volume_extra(), select_engine_init(), blender::eevee::Camera::sync(), 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 2137 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(), 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(), lightbake_planar_ensure_view(), OVERLAY_grid_init(), select_engine_init(), blender::eevee::Camera::sync(), workbench_antialiasing_setup(), and workbench_render_result_z().
Definition at line 2214 of file draw_manager_data.c.
References Freestyle::a, usdtokens::b(), and DRWShadingGroup::z_sorting.
Referenced by DRW_pass_sort_shgroup_z().
|
static |
Definition at line 1138 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 1103 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 1283 of file draw_manager_data.c.
Referenced by DRW_shgroup_call_buffer(), and DRW_shgroup_call_buffer_instance().
|
static |
Definition at line 1091 of file draw_manager_data.c.