Blender V5.0
GPU_compute.hh File Reference
#include "BLI_sys_types.h"
#include "GPU_shader.hh"
#include "GPU_storage_buffer.hh"

Go to the source code of this file.

Functions

void GPU_compute_dispatch (blender::gpu::Shader *shader, uint groups_x_len, uint groups_y_len, uint groups_z_len, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)

Detailed Description

GPU Compute Pipeline

Allows to dispatch compute shader tasks on the GPU. Every dispatch is sent to the active GPUContext.

Definition in file GPU_compute.hh.

Function Documentation

◆ GPU_compute_dispatch()

void GPU_compute_dispatch ( blender::gpu::Shader * shader,
uint groups_x_len,
uint groups_y_len,
uint groups_z_len,
const blender::gpu::shader::SpecializationConstants * constants_state = nullptr )

Dispatch a compute shader task. The number of work groups (aka thread groups) is bounded by GPU_max_work_group_count() which might be different in each of the 3 dimensions.

Definition at line 14 of file gpu_compute.cc.

References blender::gpu::GPUBackend::compute_dispatch(), blender::gpu::debug_validate_binding_image_format(), blender::gpu::GPUBackend::get(), and GPU_shader_bind().

Referenced by blender::compositor::compute_complete_blocks(), blender::compositor::compute_complete_x_prologues(), blender::compositor::compute_complete_y_prologues(), blender::compositor::compute_dispatch_threads_at_least(), blender::compositor::compute_incomplete_prologues(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_max_tile_velocity(), blender::draw::View::compute_procedural_bounds(), blender::draw::View::compute_visibility(), blender::gpu::tests::Shader::dispatch(), blender::draw::drw_subdiv_compute_dispatch(), blender::draw::Manager::end_sync(), blender::draw::command::Dispatch::execute(), blender::draw::command::DrawMultiBuf::generate_commands(), GPU_indexbuf_build_curves_on_device(), blender::compositor::parallel_reduction_dispatch(), pygpu_compute_dispatch(), blender::compositor::sample_pixel_gpu(), blender::ed::vse::sequencer_draw_scopes(), blender::gpu::tests::test_buffer_texture(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_shader_compute_1d(), blender::gpu::tests::test_shader_compute_2d(), blender::gpu::tests::test_shader_compute_ibo(), blender::gpu::tests::test_shader_compute_ssbo(), blender::gpu::tests::test_shader_compute_vbo(), and blender::gpu::tests::ShaderSpecializationConst::validate().