Blender V4.3
blender::gpu::Std140 Struct Reference

#include <vk_memory_layout.hh>

Static Public Member Functions

Std140 memory layout
static uint32_t component_mem_size (const shader::Type type)
 
static uint32_t element_alignment (const shader::Type type, bool is_array)
 
static uint32_t element_components_len (const shader::Type type)
 
static uint32_t array_components_len (const shader::Type type)
 
static uint32_t inner_row_padding (const shader::Type type)
 

Detailed Description

Information about alignment/components and memory size for types when using std140 layout.

Definition at line 18 of file vk_memory_layout.hh.

Member Function Documentation

◆ array_components_len()

◆ component_mem_size()

uint32_t blender::gpu::Std140::component_mem_size ( const shader::Type type)
static

Get the memory size in bytes of a single component using by the given type.

Definition at line 122 of file vk_memory_layout.cc.

◆ element_alignment()

◆ element_components_len()

◆ inner_row_padding()

uint32_t blender::gpu::Std140::inner_row_padding ( const shader::Type type)
static

After how many input values do we expect row padding.

Mat3 in Std430 needs to be padded so every row would contain 4 floats. inner_row_padding would contain 3 in this case, otherwise this is set to 0.

Definition at line 214 of file vk_memory_layout.cc.


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