|
Blender V4.3
|
Go to the source code of this file.
Macros | |
| #define | GPU_uniformbuf_create(size) GPU_uniformbuf_create_ex(size, nullptr, __func__); |
| #define | GPU_UBO_BLOCK_NAME "node_tree" |
| #define | GPU_ATTRIBUTE_UBO_BLOCK_NAME "unf_attrs" |
| #define | GPU_LAYER_ATTRIBUTE_UBO_BLOCK_NAME "drw_layer_attrs" |
| #define | GPU_NODE_TREE_UBO_SLOT 0 |
Functions | |
| GPUUniformBuf * | GPU_uniformbuf_create_ex (size_t size, const void *data, const char *name) |
| GPUUniformBuf * | GPU_uniformbuf_create_from_list (ListBase *inputs, const char *name) |
| void | GPU_uniformbuf_free (GPUUniformBuf *ubo) |
| void | GPU_uniformbuf_update (GPUUniformBuf *ubo, const void *data) |
| void | GPU_uniformbuf_bind (GPUUniformBuf *ubo, int slot) |
| void | GPU_uniformbuf_bind_as_ssbo (GPUUniformBuf *ubo, int slot) |
| void | GPU_uniformbuf_unbind (GPUUniformBuf *ubo) |
| void | GPU_uniformbuf_debug_unbind_all () |
| void | GPU_uniformbuf_clear_to_zero (GPUUniformBuf *ubo) |
Uniform buffers API. Used to handle many uniforms update at once. Make sure that the data structure is compatible with what the implementation expect. (see "7.6.2.2 Standard Uniform Block Layout" from the OpenGL spec for more info about std140 layout) Rule of thumb: Padding to 16bytes, don't use vec3, don't use arrays of anything that is not vec4 aligned.
Definition in file GPU_uniform_buffer.hh.
| #define GPU_ATTRIBUTE_UBO_BLOCK_NAME "unf_attrs" |
Definition at line 50 of file GPU_uniform_buffer.hh.
Referenced by DRW_shgroup_add_material_resources(), GPUCodegen::generate_resources(), and blender::eevee::ShaderModule::material_create_info_amend().
| #define GPU_LAYER_ATTRIBUTE_UBO_BLOCK_NAME "drw_layer_attrs" |
Definition at line 51 of file GPU_uniform_buffer.hh.
Referenced by DRW_shgroup_add_material_resources().
| #define GPU_NODE_TREE_UBO_SLOT 0 |
Definition at line 52 of file GPU_uniform_buffer.hh.
Referenced by GPUCodegen::generate_resources(), and blender::draw::detail::PassBase< DrawCommandBufType >::material_set().
| #define GPU_UBO_BLOCK_NAME "node_tree" |
Definition at line 49 of file GPU_uniform_buffer.hh.
Referenced by DRW_shgroup_add_material_resources(), and GPUCodegen::generate_resources().
| #define GPU_uniformbuf_create | ( | size | ) | GPU_uniformbuf_create_ex(size, nullptr, __func__); |
Definition at line 32 of file GPU_uniform_buffer.hh.
Referenced by createGPUCurveMapping(), drw_resource_buffer_finish(), DRW_sparse_uniform_buffer_flush(), gpencil_light_pool_add(), gpencil_material_pool_add(), GPU_material_sss_profile_create(), OVERLAY_grid_cache_init(), blender::ed::seq::StripsDrawBatch::StripsDrawBatch(), ThumbsDrawBatch::ThumbsDrawBatch(), and updateGPUDisplayParameters().
| void GPU_uniformbuf_bind | ( | GPUUniformBuf * | ubo, |
| int | slot ) |
Definition at line 229 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by blender::draw::View::bind(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_mask(), blender::draw::View::compute_procedural_bounds(), blender::draw::View::compute_visibility(), draw_call_resource_bind(), blender::draw::draw_subdiv_ubo_update_and_bind(), draw_update_uniforms(), DRW_sparse_uniform_buffer_bind(), blender::draw::command::ResourceBind::execute(), blender::ed::seq::StripsDrawBatch::flush_batch(), ThumbsDrawBatch::flush_batch(), immBindUniformBuf(), pygpu_shader_uniform_block(), and blender::draw::Manager::resource_bind().
| void GPU_uniformbuf_bind_as_ssbo | ( | GPUUniformBuf * | ubo, |
| int | slot ) |
Definition at line 234 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by blender::draw::View::compute_procedural_bounds(), and blender::draw::command::ResourceBind::execute().
| void GPU_uniformbuf_clear_to_zero | ( | GPUUniformBuf * | ubo | ) |
Definition at line 249 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by blender::eevee::ShadowModule::set_view().
| GPUUniformBuf * GPU_uniformbuf_create_ex | ( | size_t | size, |
| const void * | data, | ||
| const char * | name ) |
Definition at line 191 of file gpu_uniform_buffer.cc.
References blender::gpu::GPUBackend::get(), blender::gpu::GPUBackend::uniformbuf_alloc(), blender::gpu::UniformBuf::update(), and blender::gpu::wrap().
Referenced by blender::ed::greasepencil::image_render::create_shader_ubo(), createGPUShader(), blender::draw::draw_subdiv_ubo_update_and_bind(), DRW_draw_depth_object(), drw_ensure_layer_attribute_buffer(), DRW_globals_update(), drw_manager_init(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::execute(), GPU_material_from_nodetree(), blender::ed::space_node::node_draw_link_bezier_ex(), blender::ed::space_node::nodelink_batch_draw(), pygpu_uniformbuffer__tp_new(), blender::ed::seq::StripsDrawBatch::StripsDrawBatch(), ui_draw_but_UNITVEC(), and blender::draw::detail::UniformCommon< T, len, device_only >::UniformCommon().
| GPUUniformBuf * GPU_uniformbuf_create_from_list | ( | ListBase * | inputs, |
| const char * | name ) |
Create UBO from inputs list. Return nullptr if failed to create or if
| inputs | is empty. |
| inputs | ListBase of BLI_genericNodeN(GPUInput). |
Definition at line 201 of file gpu_uniform_buffer.cc.
References blender::gpu::UniformBuf::attach_data(), BLI_listbase_is_empty(), buffer_fill_from_list(), buffer_from_list_inputs_sort(), buffer_size_from_list(), blender::gpu::GPUBackend::get(), MEM_mallocN, blender::gpu::GPUBackend::uniformbuf_alloc(), and blender::gpu::wrap().
Referenced by GPU_material_uniform_buffer_create().
| void GPU_uniformbuf_debug_unbind_all | ( | ) |
Resets the internal slot usage tracking. But there is no guarantee that this actually undo the bindings for the next draw call. Only has effect when G_DEBUG_GPU is set.
Definition at line 244 of file gpu_uniform_buffer.cc.
References blender::gpu::Context::debug_unbind_all_ubo(), and blender::gpu::Context::get().
Referenced by blender::draw::command::RecordingState::cleanup(), draw_shgroup(), DRW_state_reset(), and blender::realtime_compositor::ShaderOperation::execute().
| void GPU_uniformbuf_free | ( | GPUUniformBuf * | ubo | ) |
Definition at line 219 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by BPyGPUUniformBuf__tp_dealloc(), blender::ed::greasepencil::image_render::draw_grease_pencil_stroke(), blender::draw::draw_subdiv_cache_free(), DRW_draw_depth_object(), drw_resource_buffer_finish(), DRW_sparse_uniform_buffer_clear(), DRW_viewport_data_free(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::execute(), GPU_material_free_single(), blender::ed::space_node::node_draw_link_bezier_ex(), blender::ed::space_node::nodelink_batch_draw(), ui_draw_but_UNITVEC(), OCIO_GPUCurveMappping::~OCIO_GPUCurveMappping(), OCIO_GPUShader::~OCIO_GPUShader(), OCIO_GPUTextures::~OCIO_GPUTextures(), blender::ed::seq::StripsDrawBatch::~StripsDrawBatch(), ThumbsDrawBatch::~ThumbsDrawBatch(), and blender::draw::detail::UniformCommon< T, len, device_only >::~UniformCommon().
| void GPU_uniformbuf_unbind | ( | GPUUniformBuf * | ubo | ) |
Definition at line 239 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_mask(), draw_call_batching_finish(), draw_call_resource_bind(), DRW_sparse_uniform_buffer_unbind(), blender::ed::space_node::node_draw_link_bezier_ex(), blender::ed::space_node::nodelink_batch_draw(), blender::gpu::MTLContext::~MTLContext(), blender::ed::seq::StripsDrawBatch::~StripsDrawBatch(), and ThumbsDrawBatch::~ThumbsDrawBatch().
| void GPU_uniformbuf_update | ( | GPUUniformBuf * | ubo, |
| const void * | data ) |
Definition at line 224 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by blender::draw::draw_subdiv_ubo_update_and_bind(), drw_ensure_layer_attribute_buffer(), DRW_globals_update(), drw_resource_buffer_finish(), DRW_sparse_uniform_buffer_flush(), drw_update_view(), blender::ed::seq::StripsDrawBatch::flush_batch(), ThumbsDrawBatch::flush_batch(), GPENCIL_cache_finish(), OVERLAY_grid_cache_init(), blender::draw::detail::UniformCommon< T, len, device_only >::push_update(), pygpu_uniformbuffer_update(), updateGPUCurveMapping(), and updateGPUDisplayParameters().