Blender V5.3
blender::gpu::GPUSource Struct Reference

Public Member Functions

GPUFunctionQual convert_qualifier (shader::metadata::Qualifier qualifier)
GPUType convert_type (shader::metadata::Type type)
 GPUSource (const char *path, const char *file, const char *datatoc, GPUFunctionDictionary *g_functions, GPUPrintFormatMap *g_formats, std::function< void(GPUSource &, GPUFunctionDictionary *, GPUPrintFormatMap *)> metadata_fn)
void add_builtin (shader::metadata::Builtin builtin)
void add_dependency (StringRef line)
void add_shared_variable (const shader::Type type, const StringRefNull name)
void add_printf_format (uint32_t format_hash, std::string format, GPUPrintFormatMap *format_map)
void add_function (StringRefNull name, Span< shader::metadata::ArgumentFormat > arguments, GPUFunctionDictionary *g_functions)
void print_error (const StringRef &input, int64_t offset, const StringRef message)
int init_dependencies (const GPUSourceDictionary &dict)
void source_get (Vector< StringRefNull > &result, Vector< StringRefNull > &included, const shader::GeneratedSourceList &generated_sources, const GPUSourceDictionary &dict, const GPUSource &from) const
void build (Vector< StringRefNull > &result, const shader::GeneratedSourceList &generated_sources, const GPUSourceDictionary &dict) const
shader::BuiltinBits builtins_get () const
bool is_from_material_library () const

Public Attributes

StringRefNull fullpath
StringRefNull filename
StringRefNull source
std::string patched_source
Vector< StringRef > dependencies_names
Vector< GPUSource * > dependencies
bool dependencies_init = false
shader::BuiltinBits builtins = shader::BuiltinBits::NONE
bool generated = false
Vector< shader::ShaderCreateInfo::SharedVariable, 0 > shared_variables

Detailed Description

Definition at line 131 of file gpu_shader_dependency.cc.

Constructor & Destructor Documentation

◆ GPUSource()

blender::gpu::GPUSource::GPUSource ( const char * path,
const char * file,
const char * datatoc,
GPUFunctionDictionary * g_functions,
GPUPrintFormatMap * g_formats,
std::function< void(GPUSource &, GPUFunctionDictionary *, GPUPrintFormatMap *)> metadata_fn )
inline

Member Function Documentation

◆ add_builtin()

void blender::gpu::GPUSource::add_builtin ( shader::metadata::Builtin builtin)
inline

◆ add_dependency()

void blender::gpu::GPUSource::add_dependency ( StringRef line)
inline

Definition at line 229 of file gpu_shader_dependency.cc.

References dependencies_names.

◆ add_function()

◆ add_printf_format()

◆ add_shared_variable()

void blender::gpu::GPUSource::add_shared_variable ( const shader::Type type,
const StringRefNull name )
inline

Definition at line 234 of file gpu_shader_dependency.cc.

References shared_variables.

◆ build()

void blender::gpu::GPUSource::build ( Vector< StringRefNull > & result,
const shader::GeneratedSourceList & generated_sources,
const GPUSourceDictionary & dict ) const
inline

◆ builtins_get()

shader::BuiltinBits blender::gpu::GPUSource::builtins_get ( ) const
inline

◆ convert_qualifier()

◆ convert_type()

◆ init_dependencies()

◆ is_from_material_library()

bool blender::gpu::GPUSource::is_from_material_library ( ) const
inline

Definition at line 509 of file gpu_shader_dependency.cc.

References filename.

◆ print_error()

◆ source_get()

Member Data Documentation

◆ builtins

shader::BuiltinBits blender::gpu::GPUSource::builtins = shader::BuiltinBits::NONE

Definition at line 139 of file gpu_shader_dependency.cc.

Referenced by add_builtin(), builtins_get(), and init_dependencies().

◆ dependencies

Vector<GPUSource *> blender::gpu::GPUSource::dependencies

Definition at line 137 of file gpu_shader_dependency.cc.

Referenced by builtins_get(), and init_dependencies().

◆ dependencies_init

bool blender::gpu::GPUSource::dependencies_init = false

Definition at line 138 of file gpu_shader_dependency.cc.

◆ dependencies_names

Vector<StringRef> blender::gpu::GPUSource::dependencies_names

Definition at line 136 of file gpu_shader_dependency.cc.

Referenced by add_dependency(), and init_dependencies().

◆ filename

StringRefNull blender::gpu::GPUSource::filename

◆ fullpath

StringRefNull blender::gpu::GPUSource::fullpath

Definition at line 132 of file gpu_shader_dependency.cc.

Referenced by GPUSource(), and print_error().

◆ generated

bool blender::gpu::GPUSource::generated = false

Definition at line 141 of file gpu_shader_dependency.cc.

◆ patched_source

std::string blender::gpu::GPUSource::patched_source

Definition at line 135 of file gpu_shader_dependency.cc.

◆ shared_variables

◆ source


The documentation for this struct was generated from the following file: