|
Blender V4.5
|
#include "draw_context_private.hh"#include "draw_subdivision.hh"#include "DNA_mesh_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BKE_attribute.hh"#include "BKE_editmesh.hh"#include "BKE_mesh.hh"#include "BKE_mesh_mapping.hh"#include "BKE_object.hh"#include "BKE_subdiv.hh"#include "BKE_subdiv_eval.hh"#include "BKE_subdiv_foreach.hh"#include "BKE_subdiv_mesh.hh"#include "BKE_subdiv_modifier.hh"#include "BLI_linklist.h"#include "BLI_mutex.hh"#include "BLI_virtual_array.hh"#include "DRW_engine.hh"#include "DRW_render.hh"#include "GPU_capabilities.hh"#include "GPU_compute.hh"#include "GPU_index_buffer.hh"#include "GPU_state.hh"#include "GPU_uniform_buffer.hh"#include "GPU_vertex_buffer.hh"#include "opensubdiv_capi_type.hh"#include "opensubdiv_evaluator_capi.hh"#include "draw_cache_extract.hh"#include "draw_cache_impl.hh"#include "draw_cache_inline.hh"#include "draw_common_c.hh"#include "draw_shader.hh"#include "draw_subdiv_shader_shared.hh"#include "mesh_extractors/extract_mesh.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::draw |
Macros | |
| #define | SUBDIV_LOCAL_WORK_GROUP_SIZE 64 |
Functions | |
| static uint | blender::draw::tris_count_from_number_of_loops (const uint number_of_loops) |
| static uint | blender::draw::get_dispatch_size (uint elements) |
| static void | blender::draw::drw_subdiv_compute_dispatch (const DRWSubdivCache &cache, GPUShader *shader, const int src_offset, const int dst_offset, uint total_dispatch_size, const bool has_sculpt_mask=false, const uint edge_loose_offset=0) |
| void | blender::draw::draw_subdiv_extract_pos_nor (const DRWSubdivCache &cache, gpu::VertBuf *flags_buffer, gpu::VertBuf *pos_nor, gpu::VertBuf *orco) |
| void | blender::draw::draw_subdiv_extract_uvs (const DRWSubdivCache &cache, gpu::VertBuf *uvs, const int face_varying_channel, const int dst_offset) |
| void | blender::draw::draw_subdiv_interp_custom_data (const DRWSubdivCache &cache, gpu::VertBuf &src_data, gpu::VertBuf &dst_data, GPUVertCompType comp_type, int dimensions, int dst_offset) |
| void | blender::draw::draw_subdiv_build_sculpt_data_buffer (const DRWSubdivCache &cache, gpu::VertBuf *mask_vbo, gpu::VertBuf *face_set_vbo, gpu::VertBuf *sculpt_data) |
| void | blender::draw::draw_subdiv_accumulate_normals (const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *face_adjacency_offsets, gpu::VertBuf *face_adjacency_lists, gpu::VertBuf *vertex_loop_map, gpu::VertBuf *vert_normals) |
| void | blender::draw::draw_subdiv_finalize_normals (const DRWSubdivCache &cache, gpu::VertBuf *vert_normals, gpu::VertBuf *subdiv_loop_subdiv_vert_index, gpu::VertBuf *pos_nor) |
| void | blender::draw::draw_subdiv_finalize_custom_normals (const DRWSubdivCache &cache, gpu::VertBuf *src_custom_normals, gpu::VertBuf *pos_nor) |
| void | blender::draw::draw_subdiv_build_tris_buffer (const DRWSubdivCache &cache, gpu::IndexBuf *subdiv_tris, const int material_count) |
| void | blender::draw::draw_subdiv_build_fdots_buffers (const DRWSubdivCache &cache, gpu::VertBuf *fdots_pos, gpu::VertBuf *fdots_nor, gpu::IndexBuf *fdots_indices) |
| void | blender::draw::draw_subdiv_build_lines_buffer (const DRWSubdivCache &cache, gpu::IndexBuf *lines_indices) |
| void | blender::draw::draw_subdiv_build_lines_loose_buffer (const DRWSubdivCache &cache, gpu::IndexBuf *lines_indices, gpu::VertBuf *lines_flags, uint edge_loose_offset, uint num_loose_edges) |
| void | blender::draw::draw_subdiv_build_edge_fac_buffer (const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *edge_draw_flag, gpu::VertBuf *poly_other_map, gpu::VertBuf *edge_fac) |
| void | blender::draw::draw_subdiv_build_lnor_buffer (const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *lnor) |
| void | blender::draw::draw_subdiv_build_edituv_stretch_area_buffer (const DRWSubdivCache &cache, gpu::VertBuf *coarse_data, gpu::VertBuf *subdiv_data) |
| void | blender::draw::draw_subdiv_build_edituv_stretch_angle_buffer (const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *uvs, int uvs_offset, gpu::VertBuf *stretch_angles) |
| static void | blender::draw::draw_subdiv_cache_ensure_mat_offsets (DRWSubdivCache &cache, const Mesh *mesh_eval, uint mat_len) |
| static bool | blender::draw::draw_subdiv_create_requested_buffers (Object &ob, Mesh &mesh, MeshBatchCache &batch_cache, MeshBufferCache &mbc, const Span< IBOType > ibo_requests, const Span< VBOType > vbo_requests, const bool is_editmode, const bool is_paint_mode, const bool do_final, const bool do_uvedit, const bool do_cage, const ToolSettings *ts, const bool use_hide) |
| void | blender::draw::DRW_subdivide_loose_geom (DRWSubdivCache &subdiv_cache, const MeshBufferCache &cache) |
| void | blender::draw::DRW_create_subdivision (Object &ob, Mesh &mesh, MeshBatchCache &batch_cache, MeshBufferCache &mbc, const Span< IBOType > ibo_requests, const Span< VBOType > vbo_requests, const bool is_editmode, const bool is_paint_mode, const bool do_final, const bool do_uvedit, const bool do_cage, const ToolSettings *ts, const bool use_hide) |
| void | blender::draw::DRW_subdiv_cache_free (bke::subdiv::Subdiv *subdiv) |
| void | blender::draw::DRW_cache_free_old_subdiv () |
Vertex Formats | |
Used for data transfer from OpenSubdiv, and for data processing on our side. | |
| static const GPUVertFormat & | blender::draw::get_origindex_format () |
| const GPUVertFormat & | blender::draw::draw_subdiv_get_pos_nor_format () |
Utilities to build a gpu::VertBuf from an origindex buffer. | |
| gpu::VertBufPtr | blender::draw::draw_subdiv_init_origindex_buffer (int32_t *vert_origindex, uint num_loops, uint loose_len) |
| gpu::VertBuf * | blender::draw::draw_subdiv_build_origindex_buffer (int *vert_origindex, uint num_loops) |
Utilities for DRWPatchMap. | |
| static void | blender::draw::draw_patch_map_free (DRWPatchMap *gpu_patch_map) |
DRWSubdivUboStorage. | |
Common uniforms for the various shaders. | |
| static void | blender::draw::draw_subdiv_init_ubo_storage (const DRWSubdivCache &cache, DRWSubdivUboStorage *ubo, const int src_offset, const int dst_offset, const uint total_dispatch_size, const bool has_sculpt_mask, const uint edge_loose_offset) |
| static void | blender::draw::draw_subdiv_ubo_update_and_bind (const DRWSubdivCache &cache, const int src_offset, const int dst_offset, const uint total_dispatch_size, const bool has_sculpt_mask=false, const uint edge_loose_offset=0) |
Variables | |
| static OpenSubdiv_EvaluatorCache * | blender::draw::g_subdiv_evaluator_cache = nullptr |
| static uint64_t | blender::draw::g_subdiv_evaluator_users = 0 |
| static Mutex | blender::draw::g_subdiv_eval_mutex |
| static LinkNode * | blender::draw::gpu_subdiv_free_queue = nullptr |
| static blender::Mutex | blender::draw::gpu_subdiv_queue_mutex |
| #define SUBDIV_COARSE_FACE_FLAG_ACTIVE 4u |
Definition at line 279 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::compute_coarse_face_flag_bm().
| #define SUBDIV_COARSE_FACE_FLAG_ACTIVE_MASK (SUBDIV_COARSE_FACE_FLAG_ACTIVE << SUBDIV_COARSE_FACE_FLAG_OFFSET) |
Definition at line 288 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::draw_subdiv_init_ubo_storage().
| #define SUBDIV_COARSE_FACE_FLAG_HIDDEN 8u |
Definition at line 280 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::compute_coarse_face_flag_bm(), and blender::draw::draw_subdiv_cache_extra_coarse_face_data_mesh().
| #define SUBDIV_COARSE_FACE_FLAG_HIDDEN_MASK (SUBDIV_COARSE_FACE_FLAG_HIDDEN << SUBDIV_COARSE_FACE_FLAG_OFFSET) |
Definition at line 290 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::draw_subdiv_init_ubo_storage().
| #define SUBDIV_COARSE_FACE_FLAG_OFFSET 28u |
| #define SUBDIV_COARSE_FACE_FLAG_SELECT 2u |
Definition at line 278 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::compute_coarse_face_flag_bm(), and blender::draw::draw_subdiv_cache_extra_coarse_face_data_mesh().
| #define SUBDIV_COARSE_FACE_FLAG_SELECT_MASK (SUBDIV_COARSE_FACE_FLAG_SELECT << SUBDIV_COARSE_FACE_FLAG_OFFSET) |
Definition at line 286 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::draw_subdiv_init_ubo_storage().
| #define SUBDIV_COARSE_FACE_FLAG_SMOOTH 1u |
| #define SUBDIV_COARSE_FACE_FLAG_SMOOTH_MASK (SUBDIV_COARSE_FACE_FLAG_SMOOTH << SUBDIV_COARSE_FACE_FLAG_OFFSET) |
Definition at line 284 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::draw_subdiv_init_ubo_storage().
| #define SUBDIV_COARSE_FACE_LOOP_START_MASK |
Definition at line 293 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::draw_subdiv_init_ubo_storage().
| #define SUBDIV_LOCAL_WORK_GROUP_SIZE 64 |
Definition at line 928 of file draw_cache_impl_subdivision.cc.
Referenced by blender::draw::get_dispatch_size().