Blender
V3.3
|
#include "BKE_global.h"
#include "BLI_string.h"
#include "BLI_vector.hh"
#include "GPU_capabilities.h"
#include "GPU_platform.h"
#include "gl_debug.hh"
#include "gl_vertex_buffer.hh"
#include "gl_shader.hh"
#include "gl_shader_interface.hh"
Go to the source code of this file.
Functions | |
Create Info | |
static const char * | to_string (const Interpolation &interp) |
static const char * | to_string (const Type &type) |
static const char * | to_string (const eGPUTextureFormat &type) |
static const char * | to_string (const PrimitiveIn &layout) |
static const char * | to_string (const PrimitiveOut &layout) |
static const char * | to_string (const DepthWrite &value) |
static void | print_image_type (std::ostream &os, const ImageType &type, const ShaderCreateInfo::Resource::BindType bind_type) |
static std::ostream & | print_qualifier (std::ostream &os, const Qualifier &qualifiers) |
static void | print_resource (std::ostream &os, const ShaderCreateInfo::Resource &res) |
static void | print_resource_alias (std::ostream &os, const ShaderCreateInfo::Resource &res) |
static void | print_interface (std::ostream &os, const StringRefNull &prefix, const StageInterfaceInfo &iface, const StringRefNull &suffix="") |
static std::string | main_function_wrapper (std::string &pre_main, std::string &post_main) |
static StageInterfaceInfo * | find_interface_by_name (const Vector< StageInterfaceInfo * > &ifaces, const StringRefNull &name) |
Shader stage creation | |
static char * | glsl_patch_default_get () |
static char * | glsl_patch_compute_get () |
GPUVertFormat from Shader | |
static uint | calc_component_size (const GLenum gl_type) |
static void | get_fetch_mode_and_comp_type (int gl_type, GPUVertCompType *r_comp_type, GPUVertFetchMode *r_fetch_mode) |
Variables | |
char | datatoc_glsl_shader_defines_glsl [] |
|
static |
Definition at line 1139 of file gl_shader.cc.
Referenced by blender::gpu::GLShader::vertformat_from_shader().
|
static |
Definition at line 667 of file gl_shader.cc.
Referenced by blender::gpu::GLShader::geometry_interface_declare().
|
static |
Definition at line 1173 of file gl_shader.cc.
References BLI_assert, GPU_COMP_F32, GPU_COMP_I32, GPU_COMP_U32, GPU_FETCH_FLOAT, and GPU_FETCH_INT.
Referenced by blender::gpu::GLShader::vertformat_from_shader().
|
static |
Used for shader patching. Init once.
Definition at line 875 of file gl_shader.cc.
References BLI_assert, datatoc_glsl_shader_defines_glsl, and STR_CONCAT.
|
static |
Used for shader patching. Init once.
Definition at line 798 of file gl_shader.cc.
References BLI_assert, datatoc_glsl_shader_defines_glsl, blender::gpu::GLContext::derivative_signs, blender::gpu::GLContext::geometry_shader_invocations, GPU_shader_image_load_store_support(), blender::gpu::GLContext::layered_rendering_support, blender::gpu::GLContext::native_barycentric_support, blender::gpu::GLContext::shader_draw_parameters_support, STR_CONCAT, STR_CONCATF, blender::gpu::GLContext::texture_cube_map_array_support, and blender::gpu::GLContext::texture_gather_support.
|
static |
Definition at line 500 of file gl_shader.cc.
Referenced by blender::gpu::GLShader::fragment_interface_declare(), and blender::gpu::GLShader::vertex_interface_declare().
|
static |
|
static |
Definition at line 439 of file gl_shader.cc.
References blender::gpu::shader::StageInterfaceInfo::inouts, blender::gpu::shader::StageInterfaceInfo::instance_name, blender::gpu::shader::StageInterfaceInfo::InOut::interp, blender::StringRefBase::is_empty(), blender::gpu::shader::StageInterfaceInfo::InOut::name, blender::gpu::shader::StageInterfaceInfo::name, to_string(), and blender::gpu::shader::StageInterfaceInfo::InOut::type.
Referenced by blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::GLShader::geometry_interface_declare(), and blender::gpu::GLShader::vertex_interface_declare().
|
static |
Definition at line 349 of file gl_shader.cc.
Referenced by print_resource().
|
static |
Definition at line 363 of file gl_shader.cc.
References blender::gpu::shader::ShaderCreateInfo::Resource::bind_type, blender::gpu::GLContext::explicit_location_support, blender::gpu::shader::ShaderCreateInfo::Image::format, blender::gpu::shader::ShaderCreateInfo::Resource::image, blender::gpu::shader::ShaderCreateInfo::Sampler::name, blender::gpu::shader::ShaderCreateInfo::Image::name, print_image_type(), print_qualifier(), blender::gpu::shader::ShaderCreateInfo::Image::qualifiers, blender::gpu::shader::ShaderCreateInfo::Resource::sampler, blender::gpu::shader::ShaderCreateInfo::Resource::slot, blender::gpu::shader::ShaderCreateInfo::Resource::storagebuf, to_string(), blender::gpu::shader::ShaderCreateInfo::Sampler::type, blender::gpu::shader::ShaderCreateInfo::Image::type, and blender::gpu::shader::ShaderCreateInfo::Resource::uniformbuf.
Referenced by blender::gpu::GLShader::resources_declare().
|
static |
Definition at line 416 of file gl_shader.cc.
References blender::gpu::shader::ShaderCreateInfo::Resource::bind_type, blender::gpu::shader::ShaderCreateInfo::Resource::storagebuf, and blender::gpu::shader::ShaderCreateInfo::Resource::uniformbuf.
Referenced by blender::gpu::GLShader::resources_declare().
|
static |
Definition at line 219 of file gl_shader.cc.
|
static |
Definition at line 115 of file gl_shader.cc.
References GPU_R11F_G11F_B10F, GPU_R16, GPU_R16F, GPU_R16I, GPU_R16UI, GPU_R32F, GPU_R32I, GPU_R32UI, GPU_R8, GPU_R8I, GPU_R8UI, GPU_RG16, GPU_RG16F, GPU_RG16I, GPU_RG16UI, GPU_RG32F, GPU_RG32I, GPU_RG32UI, GPU_RG8, GPU_RG8I, GPU_RG8UI, GPU_RGB10_A2, GPU_RGBA16, GPU_RGBA16F, GPU_RGBA16I, GPU_RGBA16UI, GPU_RGBA32F, GPU_RGBA32I, GPU_RGBA32UI, GPU_RGBA8, GPU_RGBA8I, GPU_RGBA8UI, and type.
|
static |
Definition at line 63 of file gl_shader.cc.
References interp().
Referenced by blender::ed::space_node::create_inspection_string_for_geometry(), draw_horizontal_scale_indicators(), draw_vertical_scale_indicators(), blender::gpu::GLShader::fragment_interface_declare(), full_device_info_description(), RenderScheduler::full_report(), blender::gpu::GLShader::geometry_layout_declare(), MANTA::getFrame(), MANTA::getTimestep(), blender::deg::ComponentNode::OperationIDKey::identifier(), blender::deg::ComponentNode::identifier(), merge_channels_metadata(), TileManager::open_tile_output(), print_interface(), print_resource(), blender::gpu::GLShader::resources_declare(), BlenderSession::stamp_view_layer_metadata(), TileManager::TileManager(), MANTA::updatePointers(), and blender::gpu::GLShader::vertex_interface_declare().
|
static |
Definition at line 187 of file gl_shader.cc.
|
static |
Definition at line 205 of file gl_shader.cc.
|
static |
Definition at line 77 of file gl_shader.cc.
char datatoc_glsl_shader_defines_glsl[] |
Definition at line 26 of file gl_shader.cc.
Referenced by glsl_patch_compute_get(), and glsl_patch_default_get().