|
Blender
V2.93
|
Go to the source code of this file.
Macros | |
| #define | GPU_uniformbuf_create(size) GPU_uniformbuf_create_ex(size, NULL, __func__); |
| #define | GPU_UBO_BLOCK_NAME "nodeTree" |
| #define | GPU_ATTRIBUTE_UBO_BLOCK_NAME "uniformAttrs" |
Typedefs | |
| typedef struct GPUUniformBuf | GPUUniformBuf |
Functions | |
| GPUUniformBuf * | GPU_uniformbuf_create_ex (size_t size, const void *data, const char *name) |
| GPUUniformBuf * | GPU_uniformbuf_create_from_list (struct 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_unbind (GPUUniformBuf *ubo) |
| void | GPU_uniformbuf_unbind_all (void) |
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.h.
| #define GPU_ATTRIBUTE_UBO_BLOCK_NAME "uniformAttrs" |
Definition at line 56 of file GPU_uniform_buffer.h.
| #define GPU_UBO_BLOCK_NAME "nodeTree" |
Definition at line 55 of file GPU_uniform_buffer.h.
| #define GPU_uniformbuf_create | ( | size | ) | GPU_uniformbuf_create_ex(size, NULL, __func__); |
Definition at line 45 of file GPU_uniform_buffer.h.
| typedef struct GPUUniformBuf GPUUniformBuf |
Opaque type hiding blender::gpu::UniformBuf.
Definition at line 1 of file GPU_uniform_buffer.h.
| void GPU_uniformbuf_bind | ( | GPUUniformBuf * | ubo, |
| int | slot | ||
| ) |
Definition at line 238 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by draw_call_resource_bind(), draw_update_uniforms(), DRW_sparse_uniform_buffer_bind(), and pygpu_shader_uniform_block().
| GPUUniformBuf* GPU_uniformbuf_create_ex | ( | size_t | size, |
| const void * | data, | ||
| const char * | name | ||
| ) |
Definition at line 194 of file gpu_uniform_buffer.cc.
References data, blender::gpu::GPUBackend::get(), size(), blender::gpu::GPUBackend::uniformbuf_alloc(), blender::gpu::UniformBuf::update(), and blender::gpu::wrap().
Referenced by DRW_globals_update(), drw_viewport_var_init(), EEVEE_materials_init(), EEVEE_shadows_init(), pygpu_uniformbuffer__tp_new(), workbench_cavity_samples_ubo_ensure(), and workbench_view_layer_data_ensure_ex().
| GPUUniformBuf* GPU_uniformbuf_create_from_list | ( | ListBase * | inputs, |
| const char * | name | ||
| ) |
Create UBO from inputs list. Return NULL if failed to create or if
| inputs | is empty. |
| inputs | ListBase of BLI_genericNodeN(GPUInput). |
Definition at line 210 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(), data, blender::gpu::GPUBackend::get(), inputs, MEM_mallocN, blender::gpu::GPUBackend::uniformbuf_alloc(), and blender::gpu::wrap().
Referenced by GPU_material_uniform_buffer_create().
| void GPU_uniformbuf_free | ( | GPUUniformBuf * | ubo | ) |
Definition at line 228 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by BPyGPUUniformBuf__tp_dealloc(), drw_resource_buffer_finish(), DRW_sparse_uniform_buffer_clear(), gpu_material_free_single(), GPU_viewport_free(), and OCIO_GPUCurveMappping::~OCIO_GPUCurveMappping().
| void GPU_uniformbuf_unbind | ( | GPUUniformBuf * | ubo | ) |
Definition at line 243 of file gpu_uniform_buffer.cc.
References blender::gpu::unwrap().
Referenced by draw_call_batching_finish(), draw_call_resource_bind(), and DRW_sparse_uniform_buffer_unbind().
| void GPU_uniformbuf_unbind_all | ( | void | ) |
Definition at line 248 of file gpu_uniform_buffer.cc.
Referenced by draw_shgroup(), and DRW_state_reset().
| void GPU_uniformbuf_update | ( | GPUUniformBuf * | ubo, |
| const void * | data | ||
| ) |
Definition at line 233 of file gpu_uniform_buffer.cc.
References data, and blender::gpu::unwrap().
Referenced by DRW_globals_update(), drw_resource_buffer_finish(), DRW_sparse_uniform_buffer_flush(), drw_update_view(), eevee_draw_scene(), eevee_lightbake_render_grid_sample(), eevee_lightbake_render_probe_sample(), eevee_lightbake_render_world_sample(), EEVEE_lightbake_update_world_quick(), EEVEE_lightprobes_cache_finish(), EEVEE_lightprobes_refresh_planar(), EEVEE_lights_cache_finish(), EEVEE_lookdev_draw(), EEVEE_material_output_accumulate(), EEVEE_materials_init(), EEVEE_render_draw(), EEVEE_shadows_draw(), GPENCIL_cache_finish(), GPU_material_sss_profile_get(), pygpu_uniformbuffer_update(), updateGPUCurveMapping(), workbench_dof_setup_samples(), workbench_update_material_ubos(), and workbench_update_world_ubo().