Blender V5.3
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)
VKDescriptorSet::Location descriptor_set_location (const shader::ShaderCreateInfo::Resource &resource) const
std::optional< VKDescriptorSet::Location > descriptor_set_location (const shader::ShaderCreateInfo::Resource::BindType &bind_type, int binding) const
const VKPushConstants::Layout & push_constants_layout_get () const
const VKDescriptorSetLayoutInfo & descriptor_set_layout_info_get () const
shader::Type get_attribute_type (int location) const
bool is_point_shader () const
const Span< VKResourceBinding > resource_bindings_get () const
Public Member Functions inherited from blender::gpu::ShaderInterface
 ShaderInterface ()
virtual ~ShaderInterface ()
void debug_print () const
const ShaderInput * attr_get (const StringRefNull name) const
const ShaderInput * attr_get (const int binding) const
const ShaderInput * ubo_get (const StringRefNull name) const
const ShaderInput * ubo_get (const int binding) const
const ShaderInput * uniform_get (const StringRefNull name) const
const ShaderInput * texture_get (const int binding) const
const ShaderInput * ssbo_get (const StringRefNull name) const
const ShaderInput * ssbo_get (const int binding) const
const ShaderInput * tlas_get (const StringRefNull name) const
const ShaderInput * tlas_get (const int binding) const
const ShaderInput * constant_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
bool attr_len_get () const
bool ubo_len_get () const
bool uniform_len_get () const
bool ssbo_len_get () const
bool constant_len_get () const

Additional Inherited Members

Public Types inherited from blender::gpu::ShaderInterface
using Key = uint64_t
Public Attributes inherited from blender::gpu::ShaderInterface
Key uid = 0
ShaderInput * inputs_ = nullptr
char * name_buffer_ = nullptr
uint attr_len_ = 0
uint ubo_len_ = 0
uint uniform_len_ = 0
uint ssbo_len_ = 0
uint tlas_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]
std::array< TextureWriteFormat, GPU_MAX_IMAGE > image_formats_
Static Public Attributes inherited from blender::gpu::ShaderInterface
static std::atomic< Key > next_uid_ {1}
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 ()
void set_image_formats_from_info (const shader::ShaderCreateInfo &info)
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 52 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 78 of file vk_shader_interface.hh.

◆ descriptor_set_location() [1/2]

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

Definition at line 413 of file vk_shader_interface.cc.

References blender::BLI_assert().

Referenced by blender::gpu::print_resource(), and VKShaderInterface().

◆ descriptor_set_location() [2/2]

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 83 of file vk_shader_interface.hh.

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

◆ init()

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

◆ is_point_shader()

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

Definition at line 88 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 73 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: