Blender  V3.3
Classes | Public Member Functions | Public Attributes | List of all members
GPUCodegenCreateInfo Struct Reference
Inheritance diagram for GPUCodegenCreateInfo:
blender::gpu::shader::ShaderCreateInfo

Classes

struct  NameBuffer
 

Public Member Functions

 GPUCodegenCreateInfo (const char *name)
 
 ~GPUCodegenCreateInfo ()
 
- Public Member Functions inherited from blender::gpu::shader::ShaderCreateInfo
 ShaderCreateInfo (const char *name)
 
 ~ShaderCreateInfo ()
 
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=-1, 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)
 
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, eGPUTextureFormat format, Qualifier qualifiers, ImageType type, StringRefNull name, Frequency freq=Frequency::PASS)
 
Selfsampler (int slot, ImageType type, StringRefNull name, Frequency freq=Frequency::PASS, eGPUSamplerState sampler=(eGPUSamplerState) -1)
 
Selfvertex_source (StringRefNull filename)
 
Selfgeometry_source (StringRefNull filename)
 
Selffragment_source (StringRefNull filename)
 
Selfcompute_source (StringRefNull filename)
 
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)
 
Selflegacy_resource_location (bool value)
 
Selfadditional_info (StringRefNull info_name0, StringRefNull info_name1="", StringRefNull info_name2="", StringRefNull info_name3="", StringRefNull info_name4="", StringRefNull info_name5="", StringRefNull info_name6="")
 
Selftypedef_source (StringRefNull filename)
 
void finalize ()
 
std::string check_error () const
 
void validate_merge (const ShaderCreateInfo &other_info)
 
void validate_vertex_attributes (const ShaderCreateInfo *other_info=nullptr)
 
bool operator== (const ShaderCreateInfo &b)
 
bool has_resource_type (Resource::BindType bind_type) const
 
bool has_resource_image () const
 
bool has_resource_storage () const
 

Public Attributes

StageInterfaceInfointerface_generated = nullptr
 
NameBuffer name_buffer
 
- Public Attributes inherited from blender::gpu::shader::ShaderCreateInfo
StringRefNull name_
 
bool do_static_compilation_ = false
 
bool finalized_ = false
 
bool auto_resource_location_ = false
 
bool early_fragment_test_ = false
 
bool legacy_resource_location_ = false
 
DepthWrite depth_write_ = DepthWrite::ANY
 
size_t interface_names_size_ = 0
 
BuiltinBits builtins_ = BuiltinBits::NONE
 
std::string vertex_source_generated = ""
 
std::string fragment_source_generated = ""
 
std::string geometry_source_generated = ""
 
std::string typedef_source_generated = ""
 
Vector< const char *, 0 > dependencies_generated
 
Vector< VertInvertex_inputs_
 
GeometryStageLayout geometry_layout_
 
ComputeStageLayout compute_layout_
 
Vector< FragOutfragment_outputs_
 
Vector< Resourcepass_resources_
 
Vector< Resourcebatch_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_
 
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

IMPORTANT: Never add external reference. The GPUMaterial used to create the GPUPass (and its GPUCodegenCreateInfo) can be free before actually compiling. This happens if there is an update before deferred compilation happens and the GPUPass gets picked up by another GPUMaterial (because of GPUPass reuse).

Definition at line 53 of file gpu_codegen.cc.

Constructor & Destructor Documentation

◆ GPUCodegenCreateInfo()

GPUCodegenCreateInfo::GPUCodegenCreateInfo ( const char *  name)
inline

Definition at line 78 of file gpu_codegen.cc.

◆ ~GPUCodegenCreateInfo()

GPUCodegenCreateInfo::~GPUCodegenCreateInfo ( )
inline

Definition at line 79 of file gpu_codegen.cc.

Member Data Documentation

◆ interface_generated

StageInterfaceInfo* GPUCodegenCreateInfo::interface_generated = nullptr

Optional generated interface.

Definition at line 74 of file gpu_codegen.cc.

Referenced by GPUCodegen::generate_attribs().

◆ name_buffer

NameBuffer GPUCodegenCreateInfo::name_buffer

Optional name buffer containing names referenced by StringRefNull.

Definition at line 76 of file gpu_codegen.cc.

Referenced by GPUCodegen::generate_attribs(), and GPUCodegen::generate_resources().


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