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

#include <vk_memory_layout.hh>

Static Public Member Functions

Std430 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 std430 layout.

Definition at line 39 of file vk_memory_layout.hh.

Member Function Documentation

◆ array_components_len()

◆ component_mem_size()

uint32_t blender::gpu::Std430::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 17 of file vk_memory_layout.cc.

◆ element_alignment()

◆ element_components_len()

◆ inner_row_padding()

uint32_t blender::gpu::Std430::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 111 of file vk_memory_layout.cc.

References blender::gpu::shader::MAT3.


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