Blender V4.5
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< Resource > resources_get_all_ () const
 
 ShaderCreateInfo (const char *name)
 
 ~ShaderCreateInfo ()=default
 
Self & vertex_in (int slot, Type type, StringRefNull name)
 
Self & vertex_out (StageInterfaceInfo &interface)
 
Self & geometry_layout (PrimitiveIn prim_in, PrimitiveOut prim_out, int max_vertices, int invocations=-1)
 
Self & local_group_size (int local_size_x, int local_size_y=1, int local_size_z=1)
 
Self & early_fragment_test (bool enable)
 
Self & geometry_out (StageInterfaceInfo &interface)
 
Self & fragment_out (int slot, Type type, StringRefNull name, DualBlend blend=DualBlend::NONE, int raster_order_group=-1)
 
Self & subpass_in (int slot, Type type, ImageType img_type, StringRefNull name, int raster_order_group=-1)
 
Self & compilation_constant (Type type, StringRefNull name, double default_value)
 
Self & specialization_constant (Type type, StringRefNull name, double default_value)
 
Self & uniform_buf (int slot, StringRefNull type_name, StringRefNull name, Frequency freq=Frequency::PASS)
 
Self & storage_buf (int slot, Qualifier qualifiers, StringRefNull type_name, StringRefNull name, Frequency freq=Frequency::PASS)
 
Self & image (int slot, eGPUTextureFormat format, Qualifier qualifiers, ImageReadWriteType type, StringRefNull name, Frequency freq=Frequency::PASS)
 
Self & sampler (int slot, ImageType type, StringRefNull name, Frequency freq=Frequency::PASS, GPUSamplerState sampler=GPUSamplerState::internal_sampler())
 
Self & vertex_source (StringRefNull filename)
 
Self & fragment_source (StringRefNull filename)
 
Self & compute_source (StringRefNull filename)
 
Self & push_constant (Type type, StringRefNull name, int array_size=0)
 
Self & define (StringRefNull name, StringRefNull value="")
 
Self & do_static_compilation (bool value)
 
Self & builtins (BuiltinBits builtin)
 
Self & depth_write (DepthWrite value)
 
Self & auto_resource_location (bool value)
 
Self & metal_backend_only (bool flag)
 
Self & additional_info (StringRefNull info_name)
 
template<typename... Args>
Self & additional_info (StringRefNull info_name, Args... args)
 
Self & typedef_source (StringRefNull filename)
 
Self & mtl_max_total_threads_per_threadgroup (ushort max_total_threads_per_threadgroup)
 
void finalize (const bool recursive=false)
 
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

StageInterfaceInfo * interface_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 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
 
Vector< VertIn > vertex_inputs_
 
GeometryStageLayout geometry_layout_
 
ComputeStageLayout compute_layout_
 
Vector< FragOut > fragment_outputs_
 
Vector< SubpassIn > subpass_inputs_
 
Vector< CompilationConstant, 0 > compilation_constants_
 
Vector< SpecializationConstant > specialization_constants_
 
Vector< Resource > pass_resources_
 
Vector< Resource > batch_resources_
 
Vector< Resource > geometry_resources_
 
Vector< StageInterfaceInfo * > vertex_out_interfaces_
 
Vector< StageInterfaceInfo * > geometry_out_interfaces_
 
Vector< PushConst > push_constants_
 
Vector< StringRefNull > typedef_sources_
 
StringRefNull vertex_source_
 
StringRefNull geometry_source_
 
StringRefNull fragment_source_
 
StringRefNull compute_source_
 
Vector< std::array< StringRefNull, 2 > > defines_
 
Vector< StringRefNull > additional_infos_
 

Additional Inherited Members

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

Detailed Description

Definition at line 27 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 52 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 45 of file gpu_codegen.hh.

Referenced by GPUCodegenCreateInfo().

◆ interface_generated

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

Optional generated interface.

Definition at line 41 of file gpu_codegen.hh.

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

◆ name_buffer

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

Optional name buffer containing names referenced by StringRefNull.

Definition at line 43 of file gpu_codegen.hh.

Referenced by blender::gpu::shader::GPUCodegenCreateInfo::NameBuffer::append_sampler_name().


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