Blender V5.0
blender::gpu::shader::GPUCodegenCreateInfo Struct Reference

#include <gpu_codegen.hh>

Inherits blender::gpu::shader::ShaderCreateInfo.

Classes

struct  NameBuffer

Public Member Functions

 GPUCodegenCreateInfo (const char *name)
 ~GPUCodegenCreateInfo ()
Public Member Functions inherited from blender::gpu::shader::ShaderCreateInfo
Vector< Resource > & resources_get_ (Frequency freq)
Vector< Resourceresources_get_all_ () const
 ShaderCreateInfo (const char *name)
 ~ShaderCreateInfo ()=default
Selfvertex_in (int slot, Type type, StringRefNull name)
Selfvertex_out (StageInterfaceInfo &interface)
Selfgeometry_layout (PrimitiveIn prim_in, PrimitiveOut prim_out, int max_vertices, int invocations=-1)
Selflocal_group_size (int local_size_x, int local_size_y=1, int local_size_z=1)
Selfearly_fragment_test (bool enable)
Selfgeometry_out (StageInterfaceInfo &interface)
Selffragment_out (int slot, Type type, StringRefNull name, DualBlend blend=DualBlend::NONE, int raster_order_group=-1)
Selfsubpass_in (int slot, Type type, ImageType img_type, StringRefNull name, int raster_order_group=-1)
Selfshared_resource_descriptor (void(*fn)(ShaderCreateInfo &))
Selfcompilation_constant (Type type, StringRefNull name, double default_value)
Selfspecialization_constant (Type type, StringRefNull name, double default_value)
Selfshared_variable (Type type, StringRefNull name)
Selfuniform_buf (int slot, StringRefNull type_name, StringRefNull name, Frequency freq=Frequency::PASS)
Selfstorage_buf (int slot, Qualifier qualifiers, StringRefNull type_name, StringRefNull name, Frequency freq=Frequency::PASS)
Selfimage (int slot, TextureFormat format, Qualifier qualifiers, ImageReadWriteType type, StringRefNull name, Frequency freq=Frequency::PASS)
Selfsampler (int slot, ImageType type, StringRefNull name, Frequency freq=Frequency::PASS, GPUSamplerState sampler=GPUSamplerState::internal_sampler())
Selfvertex_source (StringRefNull filename)
Selffragment_source (StringRefNull filename)
Selfcompute_source (StringRefNull filename)
Selfvertex_function (StringRefNull function_name)
Selffragment_function (StringRefNull function_name)
Selfcompute_function (StringRefNull function_name)
Selfpush_constant (Type type, StringRefNull name, int array_size=0)
Selfdefine (StringRefNull name, StringRefNull value="")
Selfdo_static_compilation (bool value)
Selfbuiltins (BuiltinBits builtin)
Selfdepth_write (DepthWrite value)
Selfauto_resource_location (bool value)
Selfmetal_backend_only (bool flag)
Selfadditional_info (StringRefNull info_name)
template<typename... Args>
Selfadditional_info (StringRefNull info_name, Args... args)
Selftypedef_source (StringRefNull filename)
Selfmtl_max_total_threads_per_threadgroup (ushort max_total_threads_per_threadgroup)
void finalize (const bool recursive=false)
void resource_guard_defines (std::string &defines) const
std::string check_error () const
bool is_vulkan_compatible () const
void validate_merge (const ShaderCreateInfo &other_info)
void validate_vertex_attributes (const ShaderCreateInfo *other_info=nullptr)
bool operator== (const ShaderCreateInfo &b) const
bool has_resource_type (Resource::BindType bind_type) const
bool has_resource_image () const

Public Attributes

StageInterfaceInfointerface_generated = nullptr
NameBuffer name_buffer
std::string info_name_
Public Attributes inherited from blender::gpu::shader::ShaderCreateInfo
StringRefNull name_
bool do_static_compilation_ = false
bool is_generated_ = true
bool finalized_ = false
bool auto_resource_location_ = false
bool early_fragment_test_ = false
DepthWrite depth_write_ = DepthWrite::UNCHANGED
bool metal_backend_only_ = false
size_t interface_names_size_ = 0
BuiltinBits builtins_ = BuiltinBits::NONE
std::string vertex_source_generated
std::string fragment_source_generated
std::string compute_source_generated
std::string geometry_source_generated
std::string typedef_source_generated
Vector< StringRefNull, 0 > dependencies_generated
GeneratedSourceList generated_sources
Vector< VertInvertex_inputs_
GeometryStageLayout geometry_layout_
ComputeStageLayout compute_layout_
Vector< FragOutfragment_outputs_
Vector< SubpassInsubpass_inputs_
Vector< CompilationConstant, 0 > compilation_constants_
Vector< SpecializationConstantspecialization_constants_
Vector< SharedVariable, 0 > shared_variables_
Vector< Resourcepass_resources_
Vector< Resourcebatch_resources_
Vector< Resourcegeometry_resources_
Vector< StageInterfaceInfo * > vertex_out_interfaces_
Vector< StageInterfaceInfo * > geometry_out_interfaces_
Vector< PushConstpush_constants_
Vector< StringRefNulltypedef_sources_
StringRefNull vertex_source_
StringRefNull geometry_source_
StringRefNull fragment_source_
StringRefNull compute_source_
StringRefNull vertex_entry_fn_ = "main"
StringRefNull geometry_entry_fn_ = "main"
StringRefNull fragment_entry_fn_ = "main"
StringRefNull compute_entry_fn_ = "main"
Vector< std::array< StringRefNull, 2 > > defines_
Vector< StringRefNulladditional_infos_

Additional Inherited Members

Public Types inherited from blender::gpu::shader::ShaderCreateInfo
using Self = ShaderCreateInfo

Detailed Description

Definition at line 28 of file gpu_codegen.hh.

Constructor & Destructor Documentation

◆ GPUCodegenCreateInfo()

blender::gpu::shader::GPUCodegenCreateInfo::GPUCodegenCreateInfo ( const char * name)
inline

◆ ~GPUCodegenCreateInfo()

blender::gpu::shader::GPUCodegenCreateInfo::~GPUCodegenCreateInfo ( )
inline

Definition at line 53 of file gpu_codegen.hh.

References interface_generated.

Member Data Documentation

◆ info_name_

std::string blender::gpu::shader::GPUCodegenCreateInfo::info_name_

Copy of the GPUMaterial name, to prevent dangling pointers.

Definition at line 46 of file gpu_codegen.hh.

Referenced by GPUCodegenCreateInfo().

◆ interface_generated

StageInterfaceInfo* blender::gpu::shader::GPUCodegenCreateInfo::interface_generated = nullptr

Optional generated interface.

Definition at line 42 of file gpu_codegen.hh.

Referenced by blender::gpu::shader::GPUCodegen::generate_attribs(), and ~GPUCodegenCreateInfo().

◆ name_buffer

NameBuffer blender::gpu::shader::GPUCodegenCreateInfo::name_buffer

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