|
Blender V4.5
|
#include "BLI_math_matrix.h"#include "BLI_string.h"#include "BLI_time.h"#include "GPU_capabilities.hh"#include "GPU_debug.hh"#include "GPU_matrix.hh"#include "GPU_platform.hh"#include "glsl_preprocess/glsl_preprocess.hh"#include "gpu_backend.hh"#include "gpu_context_private.hh"#include "gpu_profile_report.hh"#include "gpu_shader_create_info.hh"#include "gpu_shader_create_info_private.hh"#include "gpu_shader_dependency_private.hh"#include "gpu_shader_private.hh"#include <string>Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::gpu |
Functions | |
Creation / Destruction | |
| static void | standard_defines (Vector< StringRefNull > &sources) |
| GPUShader * | GPU_shader_create_ex (const std::optional< StringRefNull > vertcode, const std::optional< StringRefNull > fragcode, const std::optional< StringRefNull > geomcode, const std::optional< StringRefNull > computecode, const std::optional< StringRefNull > libcode, const std::optional< StringRefNull > defines, const StringRefNull shname) |
| void | GPU_shader_free (GPUShader *shader) |
Creation utils | |
| GPUShader * | GPU_shader_create (const std::optional< StringRefNull > vertcode, const std::optional< StringRefNull > fragcode, const std::optional< StringRefNull > geomcode, const std::optional< StringRefNull > libcode, const std::optional< StringRefNull > defines, const StringRefNull shname) |
| GPUShader * | GPU_shader_create_compute (const std::optional< StringRefNull > computecode, const std::optional< StringRefNull > libcode, const std::optional< StringRefNull > defines, const StringRefNull shname) |
| const GPUShaderCreateInfo * | GPU_shader_create_info_get (const char *info_name) |
| bool | GPU_shader_create_info_check_error (const GPUShaderCreateInfo *_info, char r_error[128]) |
| GPUShader * | GPU_shader_create_from_info_name (const char *info_name) |
| GPUShader * | GPU_shader_create_from_info (const GPUShaderCreateInfo *_info) |
| std::string | GPU_shader_preprocess_source (StringRefNull original) |
| GPUShader * | GPU_shader_create_from_info_python (const GPUShaderCreateInfo *_info) |
| GPUShader * | GPU_shader_create_from_python (std::optional< StringRefNull > vertcode, std::optional< StringRefNull > fragcode, std::optional< StringRefNull > geomcode, std::optional< StringRefNull > libcode, std::optional< StringRefNull > defines, const std::optional< StringRefNull > name) |
| BatchHandle | GPU_shader_batch_create_from_infos (Span< const GPUShaderCreateInfo * > infos, CompilationPriority priority) |
| bool | GPU_shader_batch_is_ready (BatchHandle handle) |
| Vector< GPUShader * > | GPU_shader_batch_finalize (BatchHandle &handle) |
| void | GPU_shader_batch_cancel (BatchHandle &handle) |
| bool | GPU_shader_batch_is_compiling () |
| void | GPU_shader_batch_wait_for_all () |
| void | GPU_shader_compile_static () |
| void | GPU_shader_cache_dir_clear_old () |
Binding | |
| void | GPU_shader_bind (GPUShader *gpu_shader, const shader::SpecializationConstants *constants_state) |
| void | GPU_shader_unbind () |
| GPUShader * | GPU_shader_get_bound () |
Shader name | |
| const char * | GPU_shader_get_name (GPUShader *shader) |
Shader cache warming | |
| void | GPU_shader_set_parent (GPUShader *shader, GPUShader *parent) |
| void | GPU_shader_warm_cache (GPUShader *shader, int limit) |
Assign specialization constants. | |
| const shader::SpecializationConstants & | GPU_shader_get_default_constant_state (GPUShader *sh) |
| SpecializationBatchHandle | GPU_shader_batch_specializations (blender::Span< ShaderSpecialization > specializations, CompilationPriority priority) |
| bool | GPU_shader_batch_specializations_is_ready (SpecializationBatchHandle &handle) |
| void | GPU_shader_batch_specializations_cancel (SpecializationBatchHandle &handle) |
Uniforms / Resource location | |
| int | GPU_shader_get_uniform (GPUShader *shader, const char *name) |
| int | GPU_shader_get_constant (GPUShader *shader, const char *name) |
| int | GPU_shader_get_builtin_uniform (GPUShader *shader, int builtin) |
| int | GPU_shader_get_builtin_block (GPUShader *shader, int builtin) |
| int | GPU_shader_get_ssbo_binding (GPUShader *shader, const char *name) |
| int | GPU_shader_get_uniform_block (GPUShader *shader, const char *name) |
| int | GPU_shader_get_ubo_binding (GPUShader *shader, const char *name) |
| int | GPU_shader_get_sampler_binding (GPUShader *shader, const char *name) |
| uint | GPU_shader_get_attribute_len (const GPUShader *shader) |
| uint | GPU_shader_get_ssbo_input_len (const GPUShader *shader) |
| int | GPU_shader_get_attribute (const GPUShader *shader, const char *name) |
| bool | GPU_shader_get_attribute_info (const GPUShader *shader, int attr_location, char r_name[256], int *r_type) |
| bool | GPU_shader_get_ssbo_input_info (const GPUShader *shader, int ssbo_location, char r_name[256]) |
Uniforms setters | |
| void | GPU_shader_uniform_float_ex (GPUShader *shader, int loc, int len, int array_size, const float *value) |
| void | GPU_shader_uniform_int_ex (GPUShader *shader, int loc, int len, int array_size, const int *value) |
| void | GPU_shader_uniform_1i (GPUShader *sh, const char *name, int value) |
| void | GPU_shader_uniform_1b (GPUShader *sh, const char *name, bool value) |
| void | GPU_shader_uniform_2f (GPUShader *sh, const char *name, float x, float y) |
| void | GPU_shader_uniform_3f (GPUShader *sh, const char *name, float x, float y, float z) |
| void | GPU_shader_uniform_4f (GPUShader *sh, const char *name, float x, float y, float z, float w) |
| void | GPU_shader_uniform_1f (GPUShader *sh, const char *name, float value) |
| void | GPU_shader_uniform_2fv (GPUShader *sh, const char *name, const float data[2]) |
| void | GPU_shader_uniform_3fv (GPUShader *sh, const char *name, const float data[3]) |
| void | GPU_shader_uniform_4fv (GPUShader *sh, const char *name, const float data[4]) |
| void | GPU_shader_uniform_2iv (GPUShader *sh, const char *name, const int data[2]) |
| void | GPU_shader_uniform_3iv (GPUShader *sh, const char *name, const int data[3]) |
| void | GPU_shader_uniform_mat4 (GPUShader *sh, const char *name, const float data[4][4]) |
| void | GPU_shader_uniform_mat3_as_mat4 (GPUShader *sh, const char *name, const float data[3][3]) |
| void | GPU_shader_uniform_1f_array (GPUShader *sh, const char *name, int len, const float *val) |
| void | GPU_shader_uniform_2fv_array (GPUShader *sh, const char *name, int len, const float(*val)[2]) |
| void | GPU_shader_uniform_4fv_array (GPUShader *sh, const char *name, int len, const float(*val)[4]) |
Variables | |
| char | datatoc_gpu_shader_colorspace_lib_glsl [] |
| void GPU_shader_batch_cancel | ( | BatchHandle & | handle | ) |
Cancel the compilation of the batch. WARNING: The handle will be invalidated by this call.
Definition at line 391 of file gpu_shader.cc.
References blender::gpu::ShaderCompiler::batch_cancel(), blender::gpu::GPUBackend::get(), and blender::gpu::GPUBackend::get_compiler().
Referenced by GPUPass::~GPUPass(), and blender::gpu::StaticShader::~StaticShader().
| BatchHandle GPU_shader_batch_create_from_infos | ( | blender::Span< const GPUShaderCreateInfo * > | infos, |
| CompilationPriority | priority = CompilationPriority::High ) |
Request the creation of multiple shaders at once, allowing the backend to use multithreaded compilation. Returns a handle that can be used to poll if all shaders have been compiled, and to retrieve the compiled shaders. NOTE: This function is asynchronous on OpenGL, but it's blocking on Vulkan. WARNING: The GPUShaderCreateInfo pointers should be valid until GPU_shader_batch_finalize has returned.
Definition at line 371 of file gpu_shader.cc.
References blender::gpu::ShaderCompiler::batch_compile(), blender::gpu::GPUBackend::get(), and blender::gpu::GPUBackend::get_compiler().
Referenced by blender::gpu::StaticShader::ensure_compile_async(), gpu_shader_create_info_compile(), GPUPass::GPUPass(), and GPUPass::update_compilation().
| Vector< GPUShader * > GPU_shader_batch_finalize | ( | BatchHandle & | handle | ) |
Retrieve the compiled shaders, in the same order as the GPUShaderCreateInfos. If the compilation has not finished yet, this call will block the thread until all the shaders are ready. Shaders with compilation errors are returned as null pointers. WARNING: The handle will be invalidated by this call, you can't request the same batch twice.
Definition at line 385 of file gpu_shader.cc.
References blender::gpu::ShaderCompiler::batch_finalize(), blender::gpu::GPUBackend::get(), blender::gpu::GPUBackend::get_compiler(), and result.
Referenced by blender::gpu::StaticShader::ensure_compile_async(), GPUPass::finalize_compilation(), blender::gpu::StaticShader::get(), and gpu_shader_create_info_compile().
| bool GPU_shader_batch_is_compiling | ( | ) |
Returns true if there's any batch still being compiled.
Definition at line 396 of file gpu_shader.cc.
References blender::gpu::GPUBackend::get(), blender::gpu::GPUBackend::get_compiler(), and blender::gpu::ShaderCompiler::is_compiling().
Referenced by bpy_app_is_job_running().
| bool GPU_shader_batch_is_ready | ( | BatchHandle | handle | ) |
Returns true if all the shaders from the batch have finished their compilation.
Definition at line 380 of file gpu_shader.cc.
References blender::gpu::ShaderCompiler::batch_is_ready(), blender::gpu::GPUBackend::get(), and blender::gpu::GPUBackend::get_compiler().
Referenced by blender::gpu::StaticShader::ensure_compile_async(), and GPUPass::update_compilation().
| SpecializationBatchHandle GPU_shader_batch_specializations | ( | blender::Span< ShaderSpecialization > | specializations, |
| CompilationPriority | priority = CompilationPriority::High ) |
Request the compilation of multiple specialization constant variations at once, allowing the backend to use multi-threaded compilation. Returns a handle that can be used to poll if all variations have been compiled. A NULL handle indicates no compilation of any variant was possible (likely due to some state being currently available) and so no batch was created. Compilation of the specialized variant will instead occur at draw/dispatch time. NOTE: This function is asynchronous on OpenGL and Metal and a no-op on Vulkan. Batches are processed one by one in FIFO order. WARNING: Binding a specialization before the batch finishes will fail.
Definition at line 534 of file gpu_shader.cc.
References blender::gpu::GPUBackend::get(), blender::gpu::GPUBackend::get_compiler(), and blender::gpu::ShaderCompiler::precompile_specializations().
Referenced by blender::eevee::ShaderModule::request_specializations().
| void GPU_shader_batch_specializations_cancel | ( | SpecializationBatchHandle & | handle | ) |
Cancel the specialization batch. WARNING: The handle will be invalidated by this call.
Definition at line 545 of file gpu_shader.cc.
References blender::gpu::ShaderCompiler::batch_cancel(), blender::gpu::GPUBackend::get(), and blender::gpu::GPUBackend::get_compiler().
Referenced by blender::eevee::ShaderModule::~ShaderModule().
| bool GPU_shader_batch_specializations_is_ready | ( | SpecializationBatchHandle & | handle | ) |
Returns true if all the specializations from the batch have finished their compilation. NOTE: Polling this function is required for the compilation process to keep progressing. WARNING: Invalidates the handle if it returns true.
Definition at line 540 of file gpu_shader.cc.
References blender::gpu::GPUBackend::get(), blender::gpu::GPUBackend::get_compiler(), and blender::gpu::ShaderCompiler::specialization_batch_is_ready().
Referenced by blender::eevee::ShaderModule::request_specializations().
| void GPU_shader_batch_wait_for_all | ( | ) |
Wait until all the requested batches have been compiled.
Definition at line 401 of file gpu_shader.cc.
References blender::gpu::GPUBackend::get(), blender::gpu::GPUBackend::get_compiler(), and blender::gpu::ShaderCompiler::wait_for_all().
Referenced by GPU_pass_cache_wait_for_all().
| void GPU_shader_bind | ( | GPUShader * | shader, |
| const blender::gpu::shader::SpecializationConstants * | constants_state = nullptr ) |
Set the given shader as active shader for the active GPU context. It replaces any already bound shader. All following draw-calls and dispatches will use this shader. Uniform functions need to have the shader bound in order to work. (TODO: until we use glProgramUniform)
Definition at line 423 of file gpu_shader.cc.
References BLI_assert_msg, blender::gpu::Context::get(), GPU_matrix_bind(), GPU_matrix_dirty_get(), GPU_SHADER_PRINTF_SLOT, GPU_storagebuf_bind(), Vector< T, InlineBufferCapacity, Allocator >::is_empty(), Vector< T, InlineBufferCapacity, Allocator >::last(), blender::gpu::Context::printf_buf, blender::gpu::Shader::set_srgb_uniform(), blender::gpu::Context::shader, blender::gpu::Context::shader_builtin_srgb_is_dirty, and blender::gpu::unwrap().
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_ghosts_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_streak_gpu(), blender::compositor::apply_morphological_operator_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter_gpu(), BlenderFallbackDisplayShader::bind(), blender::compositor::blend_neighborhood_gpu(), blender::compositor::blur_pass_gpu(), blender::compositor::blur_pass_gpu(), blender::compositor::calculate_blending_weights_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_base_ghost_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_bloom_downsample_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_bloom_upsample_gpu(), blender::nodes::node_composite_double_edge_mask_cc::DoubleEdgeMaskOperation::compute_boundary_gpu(), blender::compositor::compute_complete_blocks(), blender::compositor::compute_complete_x_prologues(), blender::compositor::compute_complete_y_prologues(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_depth_gpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_scale_gpu(), blender::nodes::node_composite_double_edge_mask_cc::DoubleEdgeMaskOperation::compute_gradient_gpu(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_image_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_image_gpu(), blender::compositor::compute_incomplete_prologues(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::compute_inpainting_boundary_gpu(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::compute_inpainting_region_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::compute_mask_gpu(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_matte_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_matte_gpu(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_max_tile_velocity(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_motion_blur(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_pick_gpu(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane_gpu(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_gpu(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane_mask_gpu(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_mask_gpu(), blender::compositor::compute_preview_gpu(), blender::draw::View::compute_procedural_bounds(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::compute_structure_tensor_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_tweaked_matte_gpu(), blender::draw::View::compute_visibility(), blender::compositor::detect_edges_gpu(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::dilate_max_velocity(), draw_filled_lasso(), blender::draw::draw_subdiv_accumulate_normals(), blender::draw::draw_subdiv_build_edge_fac_buffer(), blender::draw::draw_subdiv_build_edituv_stretch_angle_buffer(), blender::draw::draw_subdiv_build_edituv_stretch_area_buffer(), blender::draw::draw_subdiv_build_fdots_buffers(), blender::draw::draw_subdiv_build_lines_buffer(), blender::draw::draw_subdiv_build_lines_loose_buffer(), blender::draw::draw_subdiv_build_lnor_buffer(), blender::draw::draw_subdiv_build_sculpt_data_buffer(), blender::draw::draw_subdiv_build_tris_buffer(), blender::draw::draw_subdiv_extract_pos_nor(), blender::draw::draw_subdiv_extract_uvs(), blender::draw::draw_subdiv_finalize_custom_normals(), blender::draw::draw_subdiv_finalize_normals(), blender::draw::draw_subdiv_interp_custom_data(), blender::gpu::GLImmediate::end(), blender::gpu::MTLImmediate::end(), blender::draw::Manager::end_sync(), blender::compositor::ConversionOperation::execute(), blender::compositor::ShaderOperation::execute(), blender::draw::command::ShaderBind::execute(), blender::nodes::node_composite_crop_cc::CropOperation::execute_alpha_crop_gpu(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_anti_aliased_depth_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_anti_aliased_image_gpu(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_classic_convolution_gpu(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_classic_summed_area_table_gpu(), blender::nodes::node_composite_blur_cc::BlurOperation::execute_constant_size_gpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_constant_size_gpu(), blender::nodes::node_composite_composite_cc::CompositeOperation::execute_copy_gpu(), blender::nodes::node_composite_viewer_cc::ViewerOperation::execute_copy_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_distance_threshold_gpu(), blender::nodes::node_composite_bilateralblur_cc::BilateralBlurOperation::execute_gpu(), blender::nodes::node_composite_boxmask_cc::BoxMaskOperation::execute_gpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::execute_gpu(), blender::nodes::node_composite_despeckle_cc::DespeckleOperation::execute_gpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_gpu(), blender::nodes::node_composite_displace_cc::DisplaceOperation::execute_gpu(), blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::execute_gpu(), blender::nodes::node_composite_filter_cc::FilterOperation::execute_gpu(), blender::nodes::node_composite_flip_cc::FlipOperation::execute_gpu(), blender::nodes::node_composite_id_mask_cc::IDMaskOperation::execute_gpu(), blender::nodes::node_composite_map_uv_cc::MapUVOperation::execute_gpu(), blender::nodes::node_composite_moviedistortion_cc::MovieDistortionOperation::execute_gpu(), blender::nodes::node_composite_normalize_cc::NormalizeOperation::execute_gpu(), blender::nodes::node_composite_pixelate_cc::PixelateOperation::execute_gpu(), blender::nodes::node_composite_split_cc::SplitOperation::execute_gpu(), blender::nodes::node_composite_sunbeams_cc::SunBeamsOperation::execute_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_highlights_gpu(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_horizontal_distortion_gpu(), blender::nodes::node_composite_crop_cc::CropOperation::execute_image_crop_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_mix_gpu(), blender::nodes::node_composite_group_input_cc::GroupInputOperation::execute_pass_gpu(), blender::nodes::node_composite_render_layer_cc::RenderLayerOperation::execute_pass_gpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_photoreceptor_gpu(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_radial_distortion_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_simple_depth_gpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_simple_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_simple_image_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_anti_diagonal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_diagonal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_horizontal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_vertical_pass_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_horizontal_pass_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_vertical_pass_gpu(), blender::nodes::node_composite_blur_cc::BlurOperation::execute_variable_size_gpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_variable_size_gpu(), blender::nodes::node_composite_scale_cc::ScaleOperation::execute_variable_size_gpu(), blender::compositor::extract_alpha_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::extract_input_chroma_gpu(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::fill_inpainting_region_gpu(), blender::ed::vse::StripsDrawBatch::flush_batch(), blender::ed::vse::ThumbsDrawBatch::flush_batch(), blender::draw::command::DrawMultiBuf::generate_commands(), GPU_batch_bind_as_resources(), GPU_batch_draw(), GPU_batch_draw_instance_range(), GPU_batch_draw_range(), GPU_batch_set_shader(), GPU_compute_dispatch(), GPU_compute_dispatch_indirect(), GPU_indexbuf_build_curves_on_device(), GPU_shader_get_builtin_shader_with_config(), blender::compositor::horizontal_pass_gpu(), blender::compositor::horizontal_pass_gpu(), blender::compositor::horizontal_pass_gpu(), immBindShader(), blender::gpu::tests::Shader::init_shader(), blender::compositor::jump_flooding_pass_gpu(), blender::compositor::maximum_float3_gpu(), blender::compositor::maximum_float_gpu(), blender::compositor::maximum_float_in_range_gpu(), blender::compositor::maximum_luminance_gpu(), blender::compositor::minimum_float_gpu(), blender::compositor::minimum_float_in_range_gpu(), blender::compositor::minimum_luminance_gpu(), blender::compositor::morphological_distance_gpu(), pygpu_batch_program_use_begin(), pygpu_shader_bind(), pygpu_shader_image(), pygpu_shader_uniform_block(), pygpu_shader_uniform_bool(), pygpu_shader_uniform_float(), pygpu_shader_uniform_int(), pygpu_shader_uniform_sampler(), pygpu_shader_uniform_vector_float(), pygpu_shader_uniform_vector_int(), blender::render::hydra::ViewportEngine::render(), blender::nodes::node_composite_keying_cc::KeyingOperation::replace_input_chroma_gpu(), blender::compositor::sum_blue_gpu(), blender::compositor::sum_blue_squared_difference_gpu(), blender::compositor::sum_causal_and_non_causal_results_gpu(), blender::compositor::sum_causal_and_non_causal_results_gpu(), blender::compositor::sum_color_gpu(), blender::compositor::sum_green_gpu(), blender::compositor::sum_green_squared_difference_gpu(), blender::compositor::sum_log_luminance_gpu(), blender::compositor::sum_luminance_gpu(), blender::compositor::sum_luminance_squared_difference_gpu(), blender::compositor::sum_red_gpu(), blender::compositor::sum_red_squared_difference_gpu(), blender::gpu::tests::test_buffer_texture(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), 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(), blender::compositor::vertical_pass_gpu(), blender::compositor::vertical_pass_gpu(), blender::compositor::vertical_pass_gpu(), wm_draw_region_blend(), blender::nodes::node_composite_glare_cc::GlareOperation::write_glare_output_gpu(), and blender::nodes::node_composite_glare_cc::GlareOperation::write_highlights_output_gpu().
| void GPU_shader_cache_dir_clear_old | ( | ) |
Definition at line 412 of file gpu_shader.cc.
References blender::gpu::GPUBackend::get(), and blender::gpu::GPUBackend::shader_cache_dir_clear_old().
Referenced by WM_exit_ex().
| void GPU_shader_compile_static | ( | ) |
Compile all statically defined shaders and print a report to the console.
This is used for platform support, where bug reports can list all failing shaders.
Definition at line 406 of file gpu_shader.cc.
References gpu_shader_create_info_compile(), and printf.
Referenced by WM_init_gpu().
| GPUShader * GPU_shader_create | ( | const std::optional< StringRefNull > | vertcode, |
| const std::optional< StringRefNull > | fragcode, | ||
| const std::optional< StringRefNull > | geomcode, | ||
| const std::optional< StringRefNull > | libcode, | ||
| const std::optional< StringRefNull > | defines, | ||
| const StringRefNull | shname ) |
Definition at line 222 of file gpu_shader.cc.
References GPU_shader_create_ex().
| GPUShader * GPU_shader_create_compute | ( | const std::optional< StringRefNull > | computecode, |
| const std::optional< StringRefNull > | libcode, | ||
| const std::optional< StringRefNull > | defines, | ||
| const StringRefNull | shname ) |
Definition at line 233 of file gpu_shader.cc.
References GPU_shader_create_ex().
| GPUShader * GPU_shader_create_ex | ( | const std::optional< StringRefNull > | vertcode, |
| const std::optional< StringRefNull > | fragcode, | ||
| const std::optional< StringRefNull > | geomcode, | ||
| const std::optional< StringRefNull > | computecode, | ||
| const std::optional< StringRefNull > | libcode, | ||
| const std::optional< StringRefNull > | defines, | ||
| const StringRefNull | shname ) |
Definition at line 122 of file gpu_shader.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, blender::StringRefNull::c_str(), blender::gpu::GPUBackend::get(), blender::gpu::GPUBackend::shader_alloc(), standard_defines(), and blender::gpu::wrap().
Referenced by GPU_shader_create(), GPU_shader_create_compute(), and GPU_shader_create_from_python().
| GPUShader * GPU_shader_create_from_info | ( | const GPUShaderCreateInfo * | _info | ) |
Create a shader using the given #GPUShaderCreateInfo. Can return a null pointer if compilation fails.
Definition at line 272 of file gpu_shader.cc.
References blender::gpu::GPUBackend::get(), and blender::gpu::wrap().
Referenced by blender::compositor::CachedShader::CachedShader(), blender::opensubdiv::compile_eval_patches_shader(), blender::opensubdiv::compile_eval_stencil_shader(), blender::ocio::GPUShaderBinder::create_gpu_shader(), GPU_shader_create_from_info_name(), blender::gpu::tests::gpu_shader_lib_test(), GPUPass::GPUPass(), blender::gpu::tests::test_framebuffer_multi_viewport(), and blender::gpu::tests::test_framebuffer_subpass_input().
| GPUShader * GPU_shader_create_from_info_name | ( | const char * | info_name | ) |
Create a shader using a named #GPUShaderCreateInfo registered at startup. These are declared inside *_info.hh files using the GPU_SHADER_CREATE_INFO() macro. They are also expected to have been flagged using do_static_compilation. Can return a null pointer if compilation fails.
Definition at line 260 of file gpu_shader.cc.
References ShaderCreateInfo::do_static_compilation_, GPU_shader_create_from_info(), gpu_shader_create_info_get(), and ShaderCreateInfo::name_.
Referenced by compile_fallback_shader(), blender::gpu::StaticShader::get(), GPU_shader_get_builtin_shader_with_config(), blender::draw::edit_select::Instance::init(), blender::gpu::tests::Shader::init_shader(), blender::gpu::tests::ShaderSpecializationConst::init_shader(), blender::eevee::Precompute::Precompute(), blender::gpu::tests::test_buffer_texture(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::draw::test_eevee_shadow_finalize(), blender::draw::test_eevee_shadow_free(), blender::draw::test_eevee_shadow_page_mask_ex(), blender::draw::test_eevee_shadow_shift(), blender::draw::test_eevee_shadow_shift_clear(), blender::draw::test_eevee_shadow_tag_update(), blender::draw::test_eevee_shadow_tilemap_amend(), blender::draw::test_eevee_surfel_list(), 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(), blender::gpu::tests::test_shader_ssbo_binding(), blender::draw::TestAlloc::TestAlloc(), and blender::draw::TestDefrag::TestDefrag().
| GPUShader * GPU_shader_create_from_info_python | ( | const GPUShaderCreateInfo * | _info | ) |
Same as GPU_shader_create_from_info but will run preprocessor on source strings.
Definition at line 288 of file gpu_shader.cc.
References ShaderCreateInfo::compute_source_generated, ShaderCreateInfo::fragment_source_generated, ShaderCreateInfo::geometry_source_generated, blender::gpu::GPUBackend::get(), GPU_shader_preprocess_source(), result, ShaderCreateInfo::vertex_source_generated, and blender::gpu::wrap().
Referenced by pygpu_shader_create_from_info().
| GPUShader * GPU_shader_create_from_python | ( | std::optional< StringRefNull > | vertcode, |
| std::optional< StringRefNull > | fragcode, | ||
| std::optional< StringRefNull > | geomcode, | ||
| std::optional< StringRefNull > | libcode, | ||
| std::optional< StringRefNull > | defines, | ||
| const std::optional< StringRefNull > | name ) |
Definition at line 314 of file gpu_shader.cc.
References datatoc_gpu_shader_colorspace_lib_glsl, GPU_shader_create_ex(), and GPU_shader_preprocess_source().
Referenced by pygpu_shader__tp_new().
| bool GPU_shader_create_info_check_error | ( | const GPUShaderCreateInfo * | _info, |
| char | r_error[128] ) |
Error checking for user created shaders.
Definition at line 247 of file gpu_shader.cc.
References BLI_strncpy(), ShaderCreateInfo::check_error(), and error().
Referenced by pygpu_shader_create_from_info().
| const GPUShaderCreateInfo * GPU_shader_create_info_get | ( | const char * | info_name | ) |
Fetch a named #GPUShaderCreateInfo registered at startup. These are declared inside *_info.hh files using the GPU_SHADER_CREATE_INFO() macro. Can return a null pointer if no match is found.
Definition at line 242 of file gpu_shader.cc.
References gpu_shader_create_info_get().
Referenced by blender::compositor::CachedShader::CachedShader(), blender::gpu::StaticShader::ensure_compile_async(), and blender::eevee::ShaderModule::ShaderModule().
| void GPU_shader_free | ( | GPUShader * | shader | ) |
Definition at line 211 of file gpu_shader.cc.
References blender::gpu::unwrap().
Referenced by blender::gpu::MTLContextTextureUtils::cleanup(), BlenderFallbackDisplayShader::destroy_shader(), gpu_shader_create_info_compile(), GPU_shader_free_builtin_shaders(), blender::gpu::tests::gpu_shader_lib_test(), blender::eevee::Precompute::Precompute(), pygpu_shader__tp_dealloc(), blender::gpu::tests::test_buffer_texture(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::draw::test_eevee_shadow_finalize(), blender::draw::test_eevee_shadow_free(), blender::draw::test_eevee_shadow_page_mask_ex(), blender::draw::test_eevee_shadow_shift(), blender::draw::test_eevee_shadow_shift_clear(), blender::draw::test_eevee_shadow_tag_update(), blender::draw::test_eevee_shadow_tilemap_amend(), blender::draw::test_eevee_surfel_list(), blender::gpu::tests::test_framebuffer_multi_viewport(), blender::gpu::tests::test_framebuffer_subpass_input(), 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(), blender::gpu::tests::test_shader_ssbo_binding(), blender::draw::TestAlloc::TestAlloc(), blender::draw::TestDefrag::TestDefrag(), blender::compositor::CachedShader::~CachedShader(), blender::ocio::internal::GPUDisplayShader::~GPUDisplayShader(), blender::gpu::tests::Shader::~Shader(), and blender::gpu::tests::ShaderSpecializationConst::~ShaderSpecializationConst().
| int GPU_shader_get_attribute | ( | const GPUShader * | shader, |
| const char * | name ) |
Definition at line 622 of file gpu_shader.cc.
References interface.
Referenced by BlenderDisplayShader::get_position_attrib_location(), BlenderDisplayShader::get_tex_coord_attrib_location(), and pygpu_shader_attr_from_name().
| bool GPU_shader_get_attribute_info | ( | const GPUShader * | shader, |
| int | attr_location, | ||
| char | r_name[256], | ||
| int * | r_type ) |
Definition at line 629 of file gpu_shader.cc.
References BLI_strncpy(), and interface.
Referenced by GPU_vertformat_from_shader(), and pygpu_shader_attrs_info_get().
| uint GPU_shader_get_attribute_len | ( | const GPUShader * | shader | ) |
Definition at line 610 of file gpu_shader.cc.
References interface.
Referenced by GPU_vertformat_from_shader(), and pygpu_shader_attrs_info_get().
| GPUShader * GPU_shader_get_bound | ( | ) |
Return the currently bound shader to the active GPU context.
Definition at line 470 of file gpu_shader.cc.
References blender::gpu::Context::get(), blender::gpu::Context::shader, and blender::gpu::wrap().
Referenced by BlenderDisplaySpaceShader::bind(), and BlenderDisplaySpaceShader::get_shader_program().
| int GPU_shader_get_builtin_block | ( | GPUShader * | shader, |
| int | builtin ) |
DEPRECATED: Use hard-coded buffer location instead.
Definition at line 576 of file gpu_shader.cc.
References interface.
| int GPU_shader_get_builtin_uniform | ( | GPUShader * | shader, |
| int | builtin ) |
TODO: To be moved as private API. Not really used outside of gpu_matrix.cc and doesn't really offer a noticeable performance boost.
Definition at line 570 of file gpu_shader.cc.
References interface.
Referenced by GPU_matrix_bind(), immUniformColor4f(), blender::gpu::Shader::set_srgb_uniform(), and wm_draw_region_blend().
| int GPU_shader_get_constant | ( | GPUShader * | shader, |
| const char * | name ) |
Returns specialization constant location.
Definition at line 563 of file gpu_shader.cc.
References interface.
Referenced by blender::eevee::ShaderModule::request_specializations(), blender::gpu::tests::ShaderSpecializationConst::ShaderSpecializationConst(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
| const shader::SpecializationConstants & GPU_shader_get_default_constant_state | ( | GPUShader * | sh | ) |
Definition at line 518 of file gpu_shader.cc.
References blender::gpu::unwrap().
Referenced by blender::draw::command::Draw::execute(), blender::draw::command::ShaderBind::execute(), blender::draw::command::SpecializeConstant::execute(), blender::eevee::ShaderModule::request_specializations(), and blender::gpu::tests::ShaderSpecializationConst::ShaderSpecializationConst().
| const char * GPU_shader_get_name | ( | GPUShader * | shader | ) |
Definition at line 485 of file gpu_shader.cc.
References blender::gpu::unwrap().
Referenced by pygpu_shader_name(), and blender::draw::command::ShaderBind::serialize().
| int GPU_shader_get_sampler_binding | ( | GPUShader * | shader, |
| const char * | name ) |
Definition at line 603 of file gpu_shader.cc.
References interface.
Referenced by blender::compositor::SMAAPrecomputedTextures::bind_area_texture(), blender::compositor::Result::bind_as_image(), blender::compositor::Result::bind_as_texture(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_image(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_image(), blender::compositor::SMAAPrecomputedTextures::bind_search_texture(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_texture(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_texture(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_texture(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_texture(), blender::render::hydra::DrawTexture::draw(), immBindTexture(), immBindTextureSampler(), blender::compositor::parallel_reduction_dispatch(), pygpu_shader_image(), pygpu_shader_uniform_sampler(), blender::gpu::tests::test_buffer_texture(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::gpu::tests::test_shader_compute_1d(), blender::gpu::tests::test_shader_compute_2d(), blender::ed::vse::ThumbsDrawBatch::ThumbsDrawBatch(), and wm_draw_region_blend().
| int GPU_shader_get_ssbo_binding | ( | GPUShader * | shader, |
| const char * | name ) |
Definition at line 582 of file gpu_shader.cc.
References interface.
Referenced by blender::gpu::tests::Shader::bind(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_motion_blur(), blender::draw::View::compute_procedural_bounds(), blender::draw::View::compute_visibility(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::dilate_max_velocity(), blender::draw::Manager::end_sync(), blender::draw::command::DrawMultiBuf::generate_commands(), GPU_indexbuf_build_curves_on_device(), pygpu_shader_format_calc(), blender::gpu::tests::ShaderSpecializationConst::ShaderSpecializationConst(), blender::gpu::tests::test_buffer_texture(), 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::test_shader_ssbo_binding().
| bool GPU_shader_get_ssbo_input_info | ( | const GPUShader * | shader, |
| int | ssbo_location, | ||
| char | r_name[256] ) |
Definition at line 646 of file gpu_shader.cc.
References BLI_strncpy(), and interface.
Referenced by pygpu_shader_attrs_info_get().
| uint GPU_shader_get_ssbo_input_len | ( | const GPUShader * | shader | ) |
Definition at line 616 of file gpu_shader.cc.
References interface.
Referenced by pygpu_shader_attrs_info_get().
| int GPU_shader_get_ubo_binding | ( | GPUShader * | shader, |
| const char * | name ) |
Returns binding point location. Binding location are given to be set at shader compile time and immutable.
Definition at line 596 of file gpu_shader.cc.
References interface.
Referenced by blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_gpu(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_mask_gpu(), immBindUniformBuf(), pygpu_shader_uniform_block(), blender::ed::vse::StripsDrawBatch::StripsDrawBatch(), and blender::ed::vse::ThumbsDrawBatch::ThumbsDrawBatch().
| int GPU_shader_get_uniform | ( | GPUShader * | shader, |
| const char * | name ) |
Returns uniform location. If cached, it is faster than querying the interface for each uniform assignment.
Definition at line 556 of file gpu_shader.cc.
References interface.
Referenced by BlenderFallbackDisplayShader::create_shader_if_needed(), draw_filled_lasso(), ED_mask_draw_region(), GPU_shader_uniform_1f(), GPU_shader_uniform_1f_array(), GPU_shader_uniform_1i(), GPU_shader_uniform_2fv(), GPU_shader_uniform_2fv_array(), GPU_shader_uniform_2iv(), GPU_shader_uniform_3fv(), GPU_shader_uniform_3iv(), GPU_shader_uniform_4fv(), GPU_shader_uniform_4fv_array(), GPU_shader_uniform_mat4(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant_offset(), pygpu_shader_uniform_location_get(), blender::draw::test_draw_pass_all_commands(), and wm_draw_region_blend().
| int GPU_shader_get_uniform_block | ( | GPUShader * | shader, |
| const char * | name ) |
DEPRECATED: Kept only because of Python GPU API.
Definition at line 589 of file gpu_shader.cc.
References interface.
Referenced by pygpu_shader_uniform_block_from_name().
| std::string GPU_shader_preprocess_source | ( | blender::StringRefNull | original | ) |
Preprocess a raw GLSL source to adhere to our backend compatible shader language. Needed if the string was not part of our build system and is used in a #GPUShaderCreateInfo.
Definition at line 279 of file gpu_shader.cc.
References blender::StringRefBase::is_empty(), and blender::gpu::shader::Preprocessor::process().
Referenced by GPU_shader_create_from_info_python(), and GPU_shader_create_from_python().
| void GPU_shader_set_parent | ( | GPUShader * | shader, |
| GPUShader * | parent ) |
Definition at line 496 of file gpu_shader.cc.
References BLI_assert, blender::gpu::Shader::parent_set(), and blender::gpu::unwrap().
| void GPU_shader_unbind | ( | ) |
Unbind the active shader.
Definition at line 456 of file gpu_shader.cc.
References blender::gpu::Context::get(), blender::gpu::Context::shader, and blender::gpu::Shader::unbind().
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_ghosts_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_streak_gpu(), blender::compositor::apply_morphological_operator_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter_gpu(), blender::compositor::blend_neighborhood_gpu(), blender::compositor::blur_pass_gpu(), blender::compositor::blur_pass_gpu(), blender::compositor::calculate_blending_weights_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_base_ghost_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_bloom_downsample_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_bloom_upsample_gpu(), blender::nodes::node_composite_double_edge_mask_cc::DoubleEdgeMaskOperation::compute_boundary_gpu(), blender::compositor::compute_complete_blocks(), blender::compositor::compute_complete_x_prologues(), blender::compositor::compute_complete_y_prologues(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_depth_gpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_scale_gpu(), blender::nodes::node_composite_double_edge_mask_cc::DoubleEdgeMaskOperation::compute_gradient_gpu(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_image_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_image_gpu(), blender::compositor::compute_incomplete_prologues(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::compute_inpainting_boundary_gpu(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::compute_inpainting_region_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::compute_mask_gpu(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_matte_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_matte_gpu(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_max_tile_velocity(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_motion_blur(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_pick_gpu(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane_gpu(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_gpu(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane_mask_gpu(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_mask_gpu(), blender::compositor::compute_preview_gpu(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::compute_structure_tensor_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_tweaked_matte_gpu(), blender::compositor::detect_edges_gpu(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::dilate_max_velocity(), draw_filled_lasso(), blender::draw::draw_subdiv_accumulate_normals(), blender::draw::draw_subdiv_build_edge_fac_buffer(), blender::draw::draw_subdiv_build_edituv_stretch_angle_buffer(), blender::draw::draw_subdiv_build_edituv_stretch_area_buffer(), blender::draw::draw_subdiv_build_fdots_buffers(), blender::draw::draw_subdiv_build_lines_buffer(), blender::draw::draw_subdiv_build_lines_loose_buffer(), blender::draw::draw_subdiv_build_lnor_buffer(), blender::draw::draw_subdiv_build_sculpt_data_buffer(), blender::draw::draw_subdiv_build_tris_buffer(), blender::draw::draw_subdiv_extract_pos_nor(), blender::draw::draw_subdiv_extract_uvs(), blender::draw::draw_subdiv_finalize_custom_normals(), blender::draw::draw_subdiv_finalize_normals(), blender::draw::draw_subdiv_interp_custom_data(), DRW_shaders_free(), blender::compositor::ConversionOperation::execute(), blender::compositor::ShaderOperation::execute(), blender::nodes::node_composite_crop_cc::CropOperation::execute_alpha_crop_gpu(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_anti_aliased_depth_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_anti_aliased_image_gpu(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_classic_convolution_gpu(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_classic_summed_area_table_gpu(), blender::nodes::node_composite_blur_cc::BlurOperation::execute_constant_size_gpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_constant_size_gpu(), blender::nodes::node_composite_composite_cc::CompositeOperation::execute_copy_gpu(), blender::nodes::node_composite_viewer_cc::ViewerOperation::execute_copy_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_distance_threshold_gpu(), blender::nodes::node_composite_bilateralblur_cc::BilateralBlurOperation::execute_gpu(), blender::nodes::node_composite_boxmask_cc::BoxMaskOperation::execute_gpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::execute_gpu(), blender::nodes::node_composite_despeckle_cc::DespeckleOperation::execute_gpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_gpu(), blender::nodes::node_composite_displace_cc::DisplaceOperation::execute_gpu(), blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::execute_gpu(), blender::nodes::node_composite_filter_cc::FilterOperation::execute_gpu(), blender::nodes::node_composite_flip_cc::FlipOperation::execute_gpu(), blender::nodes::node_composite_id_mask_cc::IDMaskOperation::execute_gpu(), blender::nodes::node_composite_map_uv_cc::MapUVOperation::execute_gpu(), blender::nodes::node_composite_moviedistortion_cc::MovieDistortionOperation::execute_gpu(), blender::nodes::node_composite_normalize_cc::NormalizeOperation::execute_gpu(), blender::nodes::node_composite_pixelate_cc::PixelateOperation::execute_gpu(), blender::nodes::node_composite_split_cc::SplitOperation::execute_gpu(), blender::nodes::node_composite_sunbeams_cc::SunBeamsOperation::execute_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_highlights_gpu(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_horizontal_distortion_gpu(), blender::nodes::node_composite_crop_cc::CropOperation::execute_image_crop_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_mix_gpu(), blender::nodes::node_composite_group_input_cc::GroupInputOperation::execute_pass_gpu(), blender::nodes::node_composite_render_layer_cc::RenderLayerOperation::execute_pass_gpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_photoreceptor_gpu(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_radial_distortion_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_simple_depth_gpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_simple_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_simple_image_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_anti_diagonal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_diagonal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_horizontal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_vertical_pass_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_horizontal_pass_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_vertical_pass_gpu(), blender::nodes::node_composite_blur_cc::BlurOperation::execute_variable_size_gpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_variable_size_gpu(), blender::nodes::node_composite_scale_cc::ScaleOperation::execute_variable_size_gpu(), blender::compositor::extract_alpha_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::extract_input_chroma_gpu(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::fill_inpainting_region_gpu(), GPU_context_active_set(), GPU_indexbuf_build_curves_on_device(), GPU_shader_free_builtin_shaders(), blender::gpu::tests::gpu_shader_lib_test(), blender::compositor::horizontal_pass_gpu(), blender::compositor::horizontal_pass_gpu(), blender::compositor::horizontal_pass_gpu(), immUnbindProgram(), blender::compositor::jump_flooding_pass_gpu(), blender::compositor::maximum_float3_gpu(), blender::compositor::maximum_float_gpu(), blender::compositor::maximum_float_in_range_gpu(), blender::compositor::maximum_luminance_gpu(), blender::compositor::minimum_float_gpu(), blender::compositor::minimum_float_in_range_gpu(), blender::compositor::minimum_luminance_gpu(), blender::compositor::morphological_distance_gpu(), blender::eevee::Precompute::Precompute(), pygpu_batch_program_use_end(), pygpu_shader_unbind(), blender::render::hydra::ViewportEngine::render(), blender::nodes::node_composite_keying_cc::KeyingOperation::replace_input_chroma_gpu(), blender::compositor::sum_blue_gpu(), blender::compositor::sum_blue_squared_difference_gpu(), blender::compositor::sum_causal_and_non_causal_results_gpu(), blender::compositor::sum_causal_and_non_causal_results_gpu(), blender::compositor::sum_color_gpu(), blender::compositor::sum_green_gpu(), blender::compositor::sum_green_squared_difference_gpu(), blender::compositor::sum_log_luminance_gpu(), blender::compositor::sum_luminance_gpu(), blender::compositor::sum_luminance_squared_difference_gpu(), blender::compositor::sum_red_gpu(), blender::compositor::sum_red_squared_difference_gpu(), blender::gpu::tests::test_buffer_texture(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::draw::test_eevee_shadow_finalize(), blender::draw::test_eevee_shadow_free(), blender::draw::test_eevee_shadow_page_mask_ex(), blender::draw::test_eevee_shadow_shift(), blender::draw::test_eevee_shadow_shift_clear(), blender::draw::test_eevee_shadow_tag_update(), blender::draw::test_eevee_shadow_tilemap_amend(), blender::draw::test_eevee_surfel_list(), blender::gpu::tests::test_framebuffer_multi_viewport(), blender::gpu::tests::test_framebuffer_subpass_input(), 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(), blender::draw::TestAlloc::TestAlloc(), blender::draw::TestDefrag::TestDefrag(), BlenderFallbackDisplayShader::unbind(), blender::compositor::vertical_pass_gpu(), blender::compositor::vertical_pass_gpu(), blender::compositor::vertical_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::write_glare_output_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::write_highlights_output_gpu(), blender::gpu::tests::Shader::~Shader(), and blender::gpu::tests::ShaderSpecializationConst::~ShaderSpecializationConst().
| void GPU_shader_uniform_1b | ( | GPUShader * | sh, |
| const char * | name, | ||
| bool | value ) |
Definition at line 683 of file gpu_shader.cc.
References GPU_shader_uniform_1i().
Referenced by blender::nodes::node_composite_double_edge_mask_cc::DoubleEdgeMaskOperation::compute_boundary_gpu(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_max_tile_velocity(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_anti_aliased_image_gpu(), blender::nodes::node_composite_blur_cc::BlurOperation::execute_constant_size_gpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_constant_size_gpu(), blender::nodes::node_composite_flip_cc::FlipOperation::execute_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_simple_image_gpu(), blender::nodes::node_composite_blur_cc::BlurOperation::execute_variable_size_gpu(), blender::draw::command::DrawMultiBuf::generate_commands(), GPU_batch_bind_as_resources(), blender::compositor::horizontal_pass_gpu(), blender::compositor::horizontal_pass_gpu(), blender::compositor::parallel_reduction_dispatch(), blender::gpu::Immediate::polyline_draw_workaround(), polyline_draw_workaround(), blender::compositor::vertical_pass_gpu(), and blender::compositor::vertical_pass_gpu().
| void GPU_shader_uniform_1f | ( | GPUShader * | sh, |
| const char * | name, | ||
| float | value ) |
Definition at line 706 of file gpu_shader.cc.
References GPU_shader_get_uniform(), and GPU_shader_uniform_float_ex().
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_streak_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter_gpu(), blender::compositor::blur_pass_gpu(), blender::compositor::blur_pass_gpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_depth_gpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_scale_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_image_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_matte_gpu(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_motion_blur(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_tweaked_matte_gpu(), blender::compositor::detect_edges_gpu(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::dilate_max_velocity(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_distance_threshold_gpu(), blender::nodes::node_composite_bilateralblur_cc::BilateralBlurOperation::execute_gpu(), blender::nodes::node_composite_boxmask_cc::BoxMaskOperation::execute_gpu(), blender::nodes::node_composite_despeckle_cc::DespeckleOperation::execute_gpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_gpu(), blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::execute_gpu(), blender::nodes::node_composite_normalize_cc::NormalizeOperation::execute_gpu(), blender::nodes::node_composite_split_cc::SplitOperation::execute_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_highlights_gpu(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_horizontal_distortion_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_mix_gpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_photoreceptor_gpu(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_radial_distortion_gpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_simple_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_anti_diagonal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_diagonal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_horizontal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_vertical_pass_gpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_variable_size_gpu(), immUniform1f(), blender::compositor::maximum_float_in_range_gpu(), blender::compositor::minimum_float_in_range_gpu(), blender::compositor::sum_blue_squared_difference_gpu(), blender::compositor::sum_green_squared_difference_gpu(), blender::compositor::sum_luminance_squared_difference_gpu(), blender::compositor::sum_red_squared_difference_gpu(), blender::gpu::VKContext::update_pipeline_data(), blender::gpu::tests::Shader::update_push_constants(), and blender::nodes::node_composite_glare_cc::GlareOperation::write_glare_output_gpu().
| void GPU_shader_uniform_1f_array | ( | GPUShader * | sh, |
| const char * | name, | ||
| int | len, | ||
| const float * | val ) |
Definition at line 755 of file gpu_shader.cc.
References GPU_shader_get_uniform(), GPU_shader_uniform_float_ex(), and len.
Referenced by blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_matte_gpu().
| void GPU_shader_uniform_1i | ( | GPUShader * | sh, |
| const char * | name, | ||
| int | value ) |
Sets a generic push constant (a.k.a. uniform). length and array_size should match the create info push_constant declaration. These functions need to have the shader bound in order to work. (TODO: until we use glProgramUniform)
Definition at line 677 of file gpu_shader.cc.
References GPU_shader_get_uniform(), and GPU_shader_uniform_int_ex().
Referenced by bind_attribute_as_ssbo(), blender::compositor::calculate_blending_weights_gpu(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::compute_inpainting_region_gpu(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_matte_gpu(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_motion_blur(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_gpu(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane_mask_gpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_tweaked_matte_gpu(), blender::draw::View::compute_visibility(), blender::render::hydra::DrawTexture::draw(), blender::draw::Manager::end_sync(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_classic_convolution_gpu(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_classic_summed_area_table_gpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_constant_size_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_distance_threshold_gpu(), blender::nodes::node_composite_bilateralblur_cc::BilateralBlurOperation::execute_gpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::execute_gpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_gpu(), blender::nodes::node_composite_id_mask_cc::IDMaskOperation::execute_gpu(), blender::nodes::node_composite_pixelate_cc::PixelateOperation::execute_gpu(), blender::nodes::node_composite_sunbeams_cc::SunBeamsOperation::execute_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_anti_diagonal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_diagonal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_horizontal_pass_gpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_vertical_pass_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_horizontal_pass_gpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_vertical_pass_gpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_variable_size_gpu(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::fill_inpainting_region_gpu(), blender::draw::command::DrawMultiBuf::generate_commands(), GPU_batch_bind_as_resources(), GPU_indexbuf_build_curves_on_device(), GPU_shader_get_builtin_shader_with_config(), GPU_shader_uniform_1b(), immUniform1i(), blender::compositor::jump_flooding_pass_gpu(), blender::compositor::morphological_distance_gpu(), blender::gpu::Immediate::polyline_draw_workaround(), and pygpu_shader_uniform_sampler().
| void GPU_shader_uniform_2f | ( | GPUShader * | sh, |
| const char * | name, | ||
| float | x, | ||
| float | y ) |
Definition at line 688 of file gpu_shader.cc.
References data, GPU_shader_uniform_2fv(), x, and y.
Referenced by immUniform2f().
| void GPU_shader_uniform_2fv | ( | GPUShader * | sh, |
| const char * | name, | ||
| const float | data[2] ) |
Definition at line 712 of file gpu_shader.cc.
References data, GPU_shader_get_uniform(), and GPU_shader_uniform_float_ex().
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter_gpu(), blender::compositor::blur_pass_gpu(), blender::nodes::node_composite_boxmask_cc::BoxMaskOperation::execute_gpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_gpu(), blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::execute_gpu(), blender::nodes::node_composite_sunbeams_cc::SunBeamsOperation::execute_gpu(), GPU_shader_uniform_2f(), immUniform2fv(), and blender::gpu::tests::Shader::update_push_constants().
| void GPU_shader_uniform_2fv_array | ( | GPUShader * | sh, |
| const char * | name, | ||
| int | len, | ||
| const float(*) | val[2] ) |
Definition at line 761 of file gpu_shader.cc.
References GPU_shader_get_uniform(), GPU_shader_uniform_float_ex(), and len.
| void GPU_shader_uniform_2iv | ( | GPUShader * | sh, |
| const char * | name, | ||
| const int | data[2] ) |
Definition at line 730 of file gpu_shader.cc.
References data, GPU_shader_get_uniform(), and GPU_shader_uniform_int_ex().
Referenced by bind_attribute_as_ssbo(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_matte_gpu(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_pick_gpu(), blender::nodes::node_composite_crop_cc::CropOperation::execute_alpha_crop_gpu(), blender::nodes::node_composite_composite_cc::CompositeOperation::execute_copy_gpu(), blender::nodes::node_composite_viewer_cc::ViewerOperation::execute_copy_gpu(), blender::nodes::node_composite_boxmask_cc::BoxMaskOperation::execute_gpu(), blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::execute_gpu(), blender::nodes::node_composite_crop_cc::CropOperation::execute_image_crop_gpu(), blender::nodes::node_composite_group_input_cc::GroupInputOperation::execute_pass_gpu(), blender::nodes::node_composite_render_layer_cc::RenderLayerOperation::execute_pass_gpu(), and blender::gpu::Immediate::polyline_draw_workaround().
| void GPU_shader_uniform_3f | ( | GPUShader * | sh, |
| const char * | name, | ||
| float | x, | ||
| float | y, | ||
| float | z ) |
Definition at line 694 of file gpu_shader.cc.
References data, GPU_shader_uniform_3fv(), x, y, and z().
Referenced by immUniform3f().
| void GPU_shader_uniform_3fv | ( | GPUShader * | sh, |
| const char * | name, | ||
| const float | data[3] ) |
Definition at line 718 of file gpu_shader.cc.
References data, GPU_shader_get_uniform(), and GPU_shader_uniform_float_ex().
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter_gpu(), blender::compositor::detect_edges_gpu(), blender::compositor::ConversionOperation::execute(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_mix_gpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_photoreceptor_gpu(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_radial_distortion_gpu(), GPU_shader_uniform_3f(), immUniform3fv(), blender::compositor::maximum_luminance_gpu(), blender::compositor::minimum_luminance_gpu(), blender::compositor::sum_log_luminance_gpu(), blender::compositor::sum_luminance_gpu(), blender::compositor::sum_luminance_squared_difference_gpu(), blender::gpu::tests::Shader::update_push_constants(), and blender::nodes::node_composite_glare_cc::GlareOperation::write_glare_output_gpu().
| void GPU_shader_uniform_3iv | ( | GPUShader * | sh, |
| const char * | name, | ||
| const int | data[3] ) |
Definition at line 736 of file gpu_shader.cc.
References data, GPU_shader_get_uniform(), and GPU_shader_uniform_int_ex().
Referenced by blender::gpu::Immediate::polyline_draw_workaround(), and polyline_draw_workaround().
| void GPU_shader_uniform_4f | ( | GPUShader * | sh, |
| const char * | name, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | w ) |
Definition at line 700 of file gpu_shader.cc.
References data, GPU_shader_uniform_4fv(), w(), x, y, and z().
Referenced by button2d_draw_intern(), and immUniform4f().
| void GPU_shader_uniform_4fv | ( | GPUShader * | sh, |
| const char * | name, | ||
| const float | data[4] ) |
Definition at line 724 of file gpu_shader.cc.
References data, GPU_shader_get_uniform(), and GPU_shader_uniform_float_ex().
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_ghosts_gpu(), blender::compositor::blur_pass_gpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::execute_photoreceptor_gpu(), GPU_shader_uniform_4f(), immUniform4fv(), and blender::gpu::tests::Shader::update_push_constants().
| void GPU_shader_uniform_4fv_array | ( | GPUShader * | sh, |
| const char * | name, | ||
| int | len, | ||
| const float(*) | val[4] ) |
Definition at line 767 of file gpu_shader.cc.
References GPU_shader_get_uniform(), GPU_shader_uniform_float_ex(), and len.
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_ghosts_gpu(), and immUniformArray4fv().
| void GPU_shader_uniform_float_ex | ( | GPUShader * | shader, |
| int | location, | ||
| int | length, | ||
| int | array_size, | ||
| const float * | value ) |
Sets a generic push constant (a.k.a. uniform). length and array_size should match the create info push_constant declaration.
Definition at line 665 of file gpu_shader.cc.
References len, and blender::gpu::unwrap().
Referenced by BlenderFallbackDisplayShader::bind(), draw_filled_lasso(), ED_mask_draw_region(), blender::draw::command::PushConstant::execute(), GPU_matrix_bind(), GPU_shader_uniform_1f(), GPU_shader_uniform_1f_array(), GPU_shader_uniform_2fv(), GPU_shader_uniform_2fv_array(), GPU_shader_uniform_3fv(), GPU_shader_uniform_4fv(), GPU_shader_uniform_4fv_array(), GPU_shader_uniform_mat4(), immUniformColor4f(), pygpu_shader_uniform_float(), pygpu_shader_uniform_vector_float(), and wm_draw_region_blend().
| void GPU_shader_uniform_int_ex | ( | GPUShader * | shader, |
| int | loc, | ||
| int | len, | ||
| int | array_size, | ||
| const int * | value ) |
Definition at line 671 of file gpu_shader.cc.
References len, and blender::gpu::unwrap().
Referenced by BlenderFallbackDisplayShader::bind(), blender::draw::command::PushConstant::execute(), GPU_shader_uniform_1i(), GPU_shader_uniform_2iv(), GPU_shader_uniform_3iv(), pygpu_shader_uniform_bool(), pygpu_shader_uniform_int(), pygpu_shader_uniform_vector_int(), and blender::gpu::Shader::set_srgb_uniform().
| void GPU_shader_uniform_mat3_as_mat4 | ( | GPUShader * | sh, |
| const char * | name, | ||
| const float | data[3][3] ) |
Definition at line 748 of file gpu_shader.cc.
References copy_m4_m3(), data, and GPU_shader_uniform_mat4().
Referenced by blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane_gpu(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane_mask_gpu(), and blender::nodes::node_composite_filter_cc::FilterOperation::execute_gpu().
| void GPU_shader_uniform_mat4 | ( | GPUShader * | sh, |
| const char * | name, | ||
| const float | data[4][4] ) |
Definition at line 742 of file gpu_shader.cc.
References data, GPU_shader_get_uniform(), and GPU_shader_uniform_float_ex().
Referenced by GPU_shader_uniform_mat3_as_mat4(), and immUniformMatrix4fv().
| void GPU_shader_warm_cache | ( | GPUShader * | shader, |
| int | limit ) |
Shader cache warming. For each shader, rendering APIs perform a two-step compilation:
Shader Cache warming uses the specified parent shader set using GPU_shader_set_parent(..) as a template reference for pre-compiling Render Pipeline State Objects (PSOs) outside of the main render pipeline.
PSOs require descriptors containing information on the render state for a given shader, which includes input vertex data layout and output pixel formats, along with some state such as blend mode and color output masks. As this state information is usually consistent between similar draws, we can assign a parent shader and use this shader's cached pipeline state's to prime compilations.
Shaders do not necessarily have to be similar in functionality to be used as a parent, so long as the #GPUVertFormt and #GPUFrameBuffer which they are used with remain the same. Other bindings such as textures, uniforms and UBOs are all assigned independently as dynamic state.
This function should be called asynchronously, mitigating the impact of run-time stuttering from dynamic compilation of PSOs during normal rendering.
| shader: The shader whose cache to warm. | |
| limit | The maximum number of PSOs to compile within a call. Specifying a limit <= 0 will compile a PSO for all cached PSOs in the parent shader. |
Definition at line 507 of file gpu_shader.cc.
References blender::gpu::unwrap().
|
static |
Definition at line 68 of file gpu_shader.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, BLI_assert_msg, GPU_backend_get_type(), GPU_BACKEND_METAL, GPU_BACKEND_OPENGL, GPU_BACKEND_VULKAN, GPU_crappy_amd_driver(), GPU_DEVICE_ANY, GPU_DEVICE_APPLE, GPU_DEVICE_ATI, GPU_DEVICE_INTEL, GPU_DEVICE_NVIDIA, GPU_DRIVER_ANY, GPU_OS_ANY, GPU_OS_MAC, GPU_OS_UNIX, GPU_OS_WIN, GPU_type_matches(), and blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty().
Referenced by blender::gpu::ShaderCompiler::compile(), and GPU_shader_create_ex().
| char datatoc_gpu_shader_colorspace_lib_glsl[] |
Definition at line 30 of file gpu_shader.cc.
Referenced by GPU_shader_create_from_python().