|
Blender V4.5
|
#include <iomanip>#include "BKE_appdir.hh"#include "BKE_global.hh"#include "BLI_fileops.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_time.h"#include "BLI_vector.hh"#include "BLI_system.h"#include "GPU_capabilities.hh"#include "GPU_debug.hh"#include "GPU_platform.hh"#include "gpu_capabilities_private.hh"#include "gpu_shader_dependency_private.hh"#include "gl_debug.hh"#include "gl_vertex_buffer.hh"#include "gl_compilation_subprocess.hh"#include "gl_shader.hh"#include "gl_shader_interface.hh"#include <chrono>#include <sstream>#include <stdio.h>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 Type UNUSED_FUNCTION | to_component_type (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, bool auto_resource_location) |
| 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 Span< StageInterfaceInfo * > ifaces, const StringRefNull &name) |
Shader stage creation | |
| static StringRefNull | glsl_patch_vertex_get () |
| static StringRefNull | glsl_patch_geometry_get () |
| static StringRefNull | glsl_patch_fragment_get () |
| static StringRefNull | glsl_patch_compute_get () |
Variables | |
| char | datatoc_glsl_shader_defines_glsl [] |
|
static |
Definition at line 931 of file gl_shader.cc.
References find_interface_by_name().
Referenced by find_interface_by_name(), and blender::gpu::GLShader::geometry_interface_declare().
|
static |
Used for shader patching. Init once.
Definition at line 1190 of file gl_shader.cc.
References blender::gpu::GLContext::clip_control_support, datatoc_glsl_shader_defines_glsl, and glsl_patch_compute_get().
Referenced by glsl_patch_compute_get().
|
static |
Used for shader patching. Init once.
Definition at line 1152 of file gl_shader.cc.
References blender::gpu::GLContext::clip_control_support, datatoc_glsl_shader_defines_glsl, blender::gpu::GLContext::framebuffer_fetch_support, glsl_patch_fragment_get(), GPU_stencil_export_support(), blender::gpu::GLContext::layered_rendering_support, and blender::gpu::GLContext::native_barycentric_support.
Referenced by glsl_patch_fragment_get().
|
static |
Used for shader patching. Init once.
Definition at line 1121 of file gl_shader.cc.
References blender::gpu::GLContext::clip_control_support, datatoc_glsl_shader_defines_glsl, glsl_patch_geometry_get(), blender::gpu::GLContext::layered_rendering_support, and blender::gpu::GLContext::native_barycentric_support.
Referenced by glsl_patch_geometry_get().
|
static |
Used for shader patching. Init once.
Definition at line 1075 of file gl_shader.cc.
References blender::gpu::GLContext::clip_control_support, datatoc_glsl_shader_defines_glsl, glsl_patch_vertex_get(), blender::gpu::GLContext::layered_rendering_support, blender::gpu::GLContext::native_barycentric_support, and blender::gpu::GLContext::shader_draw_parameters_support.
Referenced by glsl_patch_vertex_get().
|
static |
Definition at line 703 of file gl_shader.cc.
References main_function_wrapper().
Referenced by blender::gpu::GLShader::fragment_interface_declare(), main_function_wrapper(), and blender::gpu::GLShader::vertex_interface_declare().
|
static |
Definition at line 353 of file gl_shader.cc.
References blender::gpu::shader::ShaderCreateInfo::Resource::IMAGE, and print_image_type().
Referenced by print_image_type(), and print_resource().
|
static |
Definition at line 579 of file gl_shader.cc.
References inout, blender::gpu::shader::StageInterfaceInfo::inouts, blender::gpu::shader::StageInterfaceInfo::instance_name, blender::StringRefBase::is_empty(), blender::gpu::shader::StageInterfaceInfo::name, print_interface(), and blender::gpu::to_string().
Referenced by blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::GLShader::geometry_interface_declare(), print_interface(), and blender::gpu::GLShader::vertex_interface_declare().
|
static |
Definition at line 482 of file gl_shader.cc.
References blender::gpu::shader::no_restrict, print_qualifier(), blender::gpu::shader::read, and blender::gpu::shader::write.
Referenced by print_qualifier(), and print_resource().
|
static |
Definition at line 496 of file gl_shader.cc.
References ShaderCreateInfo::Resource::bind_type, blender::gpu::GLContext::explicit_location_support, blender::gpu::shader::ShaderCreateInfo::Resource::IMAGE, print_image_type(), print_qualifier(), print_resource(), blender::gpu::shader::ShaderCreateInfo::Resource::SAMPLER, ShaderCreateInfo::Resource::slot, blender::gpu::shader::ShaderCreateInfo::Resource::STORAGE_BUFFER, blender::StringRef::StringRef(), blender::gpu::to_string(), and blender::gpu::shader::ShaderCreateInfo::Resource::UNIFORM_BUFFER.
Referenced by blender::gpu::GLShader::fragment_interface_declare(), print_resource(), and blender::gpu::GLShader::resources_declare().
|
static |
Definition at line 556 of file gl_shader.cc.
References ShaderCreateInfo::Resource::bind_type, print_resource_alias(), blender::gpu::shader::ShaderCreateInfo::Resource::STORAGE_BUFFER, blender::StringRef::StringRef(), and blender::gpu::shader::ShaderCreateInfo::Resource::UNIFORM_BUFFER.
Referenced by print_resource_alias(), and blender::gpu::GLShader::resources_declare().
|
static |
Definition at line 188 of file gl_shader.cc.
References BLI_assert_unreachable, blender::gpu::shader::bool_t, blender::gpu::shader::char2_t, blender::gpu::shader::char3_t, blender::gpu::shader::char4_t, blender::gpu::shader::char_t, blender::gpu::shader::float2_t, blender::gpu::shader::float3_10_10_10_2_t, blender::gpu::shader::float3_t, blender::gpu::shader::float3x3_t, blender::gpu::shader::float4_t, blender::gpu::shader::float4x4_t, blender::gpu::shader::float_t, blender::gpu::shader::int2_t, blender::gpu::shader::int3_t, blender::gpu::shader::int4_t, blender::gpu::shader::int_t, blender::gpu::shader::short2_t, blender::gpu::shader::short3_t, blender::gpu::shader::short4_t, blender::gpu::shader::short_t, to_component_type(), blender::gpu::shader::uchar2_t, blender::gpu::shader::uchar3_t, blender::gpu::shader::uchar4_t, blender::gpu::shader::uchar_t, blender::gpu::shader::uint2_t, blender::gpu::shader::uint3_t, blender::gpu::shader::uint4_t, blender::gpu::shader::uint_t, UNUSED_FUNCTION, blender::gpu::shader::ushort2_t, blender::gpu::shader::ushort3_t, blender::gpu::shader::ushort4_t, and blender::gpu::shader::ushort_t.
Referenced by to_component_type().
|
static |
Definition at line 339 of file gl_shader.cc.
References blender::gpu::shader::ANY, blender::gpu::shader::GREATER, blender::gpu::shader::LESS, and blender::gpu::to_string().
|
static |
Definition at line 235 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 blender::gpu::to_string().
|
static |
Definition at line 109 of file gl_shader.cc.
References blender::gpu::shader::FLAT, interp(), blender::gpu::shader::NO_PERSPECTIVE, blender::gpu::shader::SMOOTH, and blender::gpu::to_string().
|
static |
Definition at line 307 of file gl_shader.cc.
References blender::gpu::shader::LINES, blender::gpu::shader::LINES_ADJACENCY, blender::gpu::shader::POINTS, blender::gpu::to_string(), blender::gpu::shader::TRIANGLES, and blender::gpu::shader::TRIANGLES_ADJACENCY.
|
static |
Definition at line 325 of file gl_shader.cc.
References blender::gpu::shader::LINE_STRIP, blender::gpu::shader::POINTS, blender::gpu::to_string(), and blender::gpu::shader::TRIANGLE_STRIP.
Definition at line 123 of file gl_shader.cc.
References BLI_assert_unreachable, blender::gpu::shader::bool_t, blender::gpu::shader::char2_t, blender::gpu::shader::char3_t, blender::gpu::shader::char4_t, blender::gpu::shader::char_t, blender::gpu::shader::float2_t, blender::gpu::shader::float3_10_10_10_2_t, blender::gpu::shader::float3_t, blender::gpu::shader::float3x3_t, blender::gpu::shader::float4_t, blender::gpu::shader::float4x4_t, blender::gpu::shader::float_t, blender::gpu::shader::int2_t, blender::gpu::shader::int3_t, blender::gpu::shader::int4_t, blender::gpu::shader::int_t, blender::gpu::shader::short2_t, blender::gpu::shader::short3_t, blender::gpu::shader::short4_t, blender::gpu::shader::short_t, blender::gpu::to_string(), blender::gpu::shader::uchar2_t, blender::gpu::shader::uchar3_t, blender::gpu::shader::uchar4_t, blender::gpu::shader::uchar_t, blender::gpu::shader::uint2_t, blender::gpu::shader::uint3_t, blender::gpu::shader::uint4_t, blender::gpu::shader::uint_t, blender::gpu::shader::ushort2_t, blender::gpu::shader::ushort3_t, blender::gpu::shader::ushort4_t, and blender::gpu::shader::ushort_t.
| char datatoc_glsl_shader_defines_glsl[] |
Definition at line 48 of file gl_shader.cc.
Referenced by glsl_patch_compute_get(), glsl_patch_fragment_get(), glsl_patch_geometry_get(), glsl_patch_vertex_get(), and blender::gpu::VKDevice::init_glsl_patch().