Blender V4.5
blender::gpu::GPUSource Struct Reference

Public Member Functions

shader::BuiltinBits convert_builtin_bit (shader::metadata::Builtin builtin)
GPUFunctionQual convert_qualifier (shader::metadata::Qualifier qualifier)
eGPUType convert_type (shader::metadata::Type type)
 GPUSource (const char *path, const char *file, const char *datatoc, GPUFunctionDictionnary *g_functions, GPUPrintFormatMap *g_formats, std::function< void(GPUSource &, GPUFunctionDictionnary *, GPUPrintFormatMap *)> metadata_fn)
void add_builtin (shader::metadata::Builtin builtin)
void add_dependency (StringRef line)
void add_printf_format (uint32_t format_hash, std::string format, GPUPrintFormatMap *format_map)
void add_function (StringRefNull name, Span< shader::metadata::ArgumentFormat > arguments, GPUFunctionDictionnary *g_functions)
void print_error (const StringRef &input, int64_t offset, const StringRef message)
int init_dependencies (const GPUSourceDictionnary &dict, const GPUFunctionDictionnary &g_functions)
void build (Vector< StringRefNull > &result) 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< StringRefdependencies_names
Vector< GPUSource * > dependencies
bool dependencies_init = false
shader::BuiltinBits builtins = shader::BuiltinBits::NONE

Detailed Description

Definition at line 53 of file gpu_shader_dependency.cc.

Constructor & Destructor Documentation

◆ GPUSource()

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

Member Function Documentation

◆ add_builtin()

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

Definition at line 174 of file gpu_shader_dependency.cc.

References builtins, and convert_builtin_bit().

◆ add_dependency()

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

Definition at line 179 of file gpu_shader_dependency.cc.

References dependencies_names.

◆ add_function()

◆ add_printf_format()

◆ build()

void blender::gpu::GPUSource::build ( Vector< StringRefNull > & result) const
inline

◆ builtins_get()

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

◆ convert_builtin_bit()

shader::BuiltinBits blender::gpu::GPUSource::convert_builtin_bit ( shader::metadata::Builtin builtin)
inline

◆ convert_qualifier()

◆ convert_type()

◆ init_dependencies()

◆ is_from_material_library()

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

Definition at line 358 of file gpu_shader_dependency.cc.

References filename.

◆ print_error()

void blender::gpu::GPUSource::print_error ( const StringRef & input,
int64_t offset,
const StringRef message )
inline

Member Data Documentation

◆ builtins

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

Definition at line 61 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 59 of file gpu_shader_dependency.cc.

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

◆ dependencies_init

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

Definition at line 60 of file gpu_shader_dependency.cc.

◆ dependencies_names

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

Definition at line 58 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 54 of file gpu_shader_dependency.cc.

Referenced by GPUSource(), and print_error().

◆ patched_source

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

Definition at line 57 of file gpu_shader_dependency.cc.

◆ source


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