Blender V4.3
gl_shader.cc File Reference
#include <iomanip>
#include "BKE_appdir.hh"
#include "BKE_global.hh"
#include "BLI_string.h"
#include "BLI_time.h"
#include "BLI_vector.hh"
#include "BLI_system.h"
#include "GPU_capabilities.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 <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 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 StageInterfaceInfofind_interface_by_name (const Span< StageInterfaceInfo * > ifaces, const StringRefNull &name)
 
Shader stage creation
static const char * glsl_patch_default_get ()
 
static const char * glsl_patch_compute_get ()
 

Variables

char datatoc_glsl_shader_defines_glsl []
 

Function Documentation

◆ find_interface_by_name()

static StageInterfaceInfo * find_interface_by_name ( const Span< StageInterfaceInfo * > ifaces,
const StringRefNull & name )
static

Definition at line 868 of file gl_shader.cc.

◆ glsl_patch_compute_get()

static const char * glsl_patch_compute_get ( )
static

Used for shader patching. Init once.

Definition at line 1073 of file gl_shader.cc.

References datatoc_glsl_shader_defines_glsl.

◆ glsl_patch_default_get()

◆ main_function_wrapper()

static std::string main_function_wrapper ( std::string & pre_main,
std::string & post_main )
static

Definition at line 651 of file gl_shader.cc.

◆ print_image_type()

static void print_image_type ( std::ostream & os,
const ImageType & type,
const ShaderCreateInfo::Resource::BindType bind_type )
static

Definition at line 326 of file gl_shader.cc.

◆ print_interface()

◆ print_qualifier()

static std::ostream & print_qualifier ( std::ostream & os,
const Qualifier & qualifiers )
static

Definition at line 455 of file gl_shader.cc.

◆ print_resource()

◆ print_resource_alias()

◆ to_component_type()

static Type to_component_type ( const Type & type)
static

Definition at line 161 of file gl_shader.cc.

References BLI_assert_unreachable.

◆ to_string() [1/6]

static const char * to_string ( const DepthWrite & value)
static

Definition at line 312 of file gl_shader.cc.

◆ to_string() [2/6]

◆ to_string() [3/6]

◆ to_string() [4/6]

static const char * to_string ( const PrimitiveIn & layout)
static

Definition at line 280 of file gl_shader.cc.

◆ to_string() [5/6]

static const char * to_string ( const PrimitiveOut & layout)
static

Definition at line 298 of file gl_shader.cc.

◆ to_string() [6/6]

static const char * to_string ( const Type & type)
static

Definition at line 96 of file gl_shader.cc.

References BLI_assert_unreachable.

Variable Documentation

◆ datatoc_glsl_shader_defines_glsl

char datatoc_glsl_shader_defines_glsl[]