Blender V4.5
blender::gpu::VKShaderInterface Class Reference

#include <vk_shader_interface.hh>

Inherits blender::gpu::ShaderInterface.

Public Member Functions

 VKShaderInterface ()=default
 
void init (const shader::ShaderCreateInfo &info)
 
const VKDescriptorSet::Location descriptor_set_location (const shader::ShaderCreateInfo::Resource &resource) const
 
const std::optional< VKDescriptorSet::Locationdescriptor_set_location (const shader::ShaderCreateInfo::Resource::BindType &bind_type, int binding) const
 
const VKPushConstants::Layoutpush_constants_layout_get () const
 
const VKDescriptorSetLayoutInfodescriptor_set_layout_info_get () const
 
shader::Type get_attribute_type (int location) const
 
bool is_point_shader () const
 
const Span< VKResourceBindingresource_bindings_get () const
 
- Public Member Functions inherited from blender::gpu::ShaderInterface
 ShaderInterface ()
 
virtual ~ShaderInterface ()
 
void debug_print () const
 
const ShaderInputattr_get (const StringRefNull name) const
 
const ShaderInputattr_get (const int binding) const
 
const ShaderInputubo_get (const StringRefNull name) const
 
const ShaderInputubo_get (const int binding) const
 
const ShaderInputuniform_get (const StringRefNull name) const
 
const ShaderInputtexture_get (const int binding) const
 
const ShaderInputssbo_get (const StringRefNull name) const
 
const ShaderInputssbo_get (const int binding) const
 
const ShaderInputconstant_get (const StringRefNull name) const
 
const char * input_name_get (const ShaderInput *input) const
 
int32_t uniform_builtin (const GPUUniformBuiltin builtin) const
 
int32_t ubo_builtin (const GPUUniformBlockBuiltin builtin) const
 
uint valid_bindings_get (const ShaderInput *const inputs, const uint inputs_len) const
 

Additional Inherited Members

- Public Attributes inherited from blender::gpu::ShaderInterface
ShaderInputinputs_ = nullptr
 
char * name_buffer_ = nullptr
 
uint attr_len_ = 0
 
uint ubo_len_ = 0
 
uint uniform_len_ = 0
 
uint ssbo_len_ = 0
 
uint constant_len_ = 0
 
uint16_t enabled_attr_mask_ = 0
 
uint16_t enabled_ubo_mask_ = 0
 
uint8_t enabled_ima_mask_ = 0
 
uint64_t enabled_tex_mask_ = 0
 
uint16_t enabled_ssbo_mask_ = 0
 
uint16_t ssbo_attr_mask_ = 0
 
int32_t builtins_ [GPU_NUM_UNIFORMS]
 
int32_t builtin_blocks_ [GPU_NUM_UNIFORM_BLOCKS]
 
uint8_t attr_types_ [GPU_VERT_ATTR_MAX_LEN]
 
- Protected Member Functions inherited from blender::gpu::ShaderInterface
uint32_t set_input_name (ShaderInput *input, char *name, uint32_t name_len) const
 
void copy_input_name (ShaderInput *input, const StringRefNull &name, char *name_buffer, uint32_t &name_buffer_offset) const
 
void sort_inputs ()
 
- Static Protected Member Functions inherited from blender::gpu::ShaderInterface
static const char * builtin_uniform_name (GPUUniformBuiltin u)
 
static const char * builtin_uniform_block_name (GPUUniformBlockBuiltin u)
 

Detailed Description

Definition at line 49 of file vk_shader_interface.hh.

Constructor & Destructor Documentation

◆ VKShaderInterface()

blender::gpu::VKShaderInterface::VKShaderInterface ( )
default

Member Function Documentation

◆ descriptor_set_layout_info_get()

const VKDescriptorSetLayoutInfo & blender::gpu::VKShaderInterface::descriptor_set_layout_info_get ( ) const
inline

Definition at line 75 of file vk_shader_interface.hh.

◆ descriptor_set_location() [1/2]

const VKDescriptorSet::Location blender::gpu::VKShaderInterface::descriptor_set_location ( const shader::ShaderCreateInfo::Resource & resource) const

◆ descriptor_set_location() [2/2]

const std::optional< VKDescriptorSet::Location > blender::gpu::VKShaderInterface::descriptor_set_location ( const shader::ShaderCreateInfo::Resource::BindType & bind_type,
int binding ) const

◆ get_attribute_type()

shader::Type blender::gpu::VKShaderInterface::get_attribute_type ( int location) const
inline

Definition at line 80 of file vk_shader_interface.hh.

References blender::gpu::ShaderInterface::attr_types_.

◆ init()

void blender::gpu::VKShaderInterface::init ( const shader::ShaderCreateInfo & info)

Definition at line 32 of file vk_shader_interface.cc.

References blender::gpu::ARRAYED, blender::gpu::ShaderInterface::attr_len_, blender::gpu::ShaderInterface::attr_types_, blender::gpu::BIND_SPACE_IMAGE_OFFSET, blender::gpu::ShaderInput::binding, BLI_assert, BLI_assert_msg, blender::gpu::ShaderInterface::builtin_blocks_, blender::gpu::ShaderInterface::builtin_uniform_block_name(), blender::gpu::ShaderInterface::builtin_uniform_name(), blender::gpu::ShaderInterface::builtins_, blender::gpu::ShaderInterface::constant_len_, blender::gpu::ShaderInterface::copy_input_name(), descriptor_set_location(), blender::gpu::VKPushConstants::Layout::determine_storage_type(), blender::gpu::VKBackend::device, blender::gpu::DONT_CARE, blender::gpu::VKExtensions::dynamic_rendering_local_read, ELEM, blender::gpu::ShaderInterface::enabled_attr_mask_, blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::gpu::VKDevice::extensions_get(), blender::gpu::VKBackend::get(), GPU_NUM_UNIFORM_BLOCKS, GPU_NUM_UNIFORMS, info, blender::gpu::VKPushConstants::Layout::init(), input, blender::gpu::INPUT_ATTACHMENT, blender::gpu::ShaderInterface::input_name_get(), blender::gpu::ShaderInterface::inputs_, blender::gpu::ShaderInput::location, MEM_calloc_arrayN(), MEM_mallocN(), blender::gpu::ShaderInterface::name_buffer_, blender::gpu::NOT_ARRAYED, blender::gpu::shader::ShaderCreateInfo::Resource::SAMPLER, blender::gpu::ShaderInterface::sort_inputs(), blender::gpu::ShaderInterface::ssbo_attr_mask_, blender::gpu::ShaderInterface::ssbo_len_, STREQ, blender::gpu::ShaderInterface::texture_get(), blender::gpu::to_bind_type(), blender::gpu::ShaderInterface::ubo_get(), blender::gpu::ShaderInterface::ubo_len_, blender::gpu::UNIFORM_BUFFER, blender::gpu::VKPushConstants::UNIFORM_BUFFER, blender::gpu::ShaderInterface::uniform_get(), and blender::gpu::ShaderInterface::uniform_len_.

Referenced by blender::gpu::VKShader::init().

◆ is_point_shader()

bool blender::gpu::VKShaderInterface::is_point_shader ( ) const
inline

Definition at line 85 of file vk_shader_interface.hh.

References blender::gpu::shader::POINT_SIZE.

◆ push_constants_layout_get()

const VKPushConstants::Layout & blender::gpu::VKShaderInterface::push_constants_layout_get ( ) const
inline

Get the Layout of the shader.

Definition at line 70 of file vk_shader_interface.hh.

Referenced by blender::gpu::VKShader::finalize(), and blender::gpu::VKShader::resources_declare().

◆ resource_bindings_get()

const Span< VKResourceBinding > blender::gpu::VKShaderInterface::resource_bindings_get ( ) const
inline

The documentation for this class was generated from the following files: