|
Blender V4.3
|
#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) |
Information about alignment/components and memory size for types when using std430 layout.
Definition at line 39 of file vk_memory_layout.hh.
|
static |
Get the number of components of the given type when used in an array.
Definition at line 82 of file vk_memory_layout.cc.
References BLI_assert_msg, blender::gpu::shader::BOOL, blender::gpu::shader::FLOAT, blender::gpu::shader::INT, blender::gpu::shader::IVEC2, blender::gpu::shader::IVEC3, blender::gpu::shader::IVEC4, blender::gpu::shader::MAT3, blender::gpu::shader::MAT4, blender::gpu::shader::UINT, blender::gpu::shader::UVEC2, blender::gpu::shader::UVEC3, blender::gpu::shader::UVEC4, blender::gpu::shader::VEC2, blender::gpu::shader::VEC3, and blender::gpu::shader::VEC4.
|
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.
|
static |
Get to alignment of the given type in bytes.
Definition at line 22 of file vk_memory_layout.cc.
References BLI_assert_msg, blender::gpu::shader::BOOL, blender::gpu::shader::FLOAT, blender::gpu::shader::INT, blender::gpu::shader::IVEC2, blender::gpu::shader::IVEC3, blender::gpu::shader::IVEC4, blender::gpu::shader::MAT3, blender::gpu::shader::MAT4, blender::gpu::shader::UINT, blender::gpu::shader::UVEC2, blender::gpu::shader::UVEC3, blender::gpu::shader::UVEC4, blender::gpu::shader::VEC2, blender::gpu::shader::VEC3, and blender::gpu::shader::VEC4.
|
static |
Get the number of components that should be allocated for the given type.
Definition at line 52 of file vk_memory_layout.cc.
References BLI_assert_msg, blender::gpu::shader::BOOL, blender::gpu::shader::FLOAT, blender::gpu::shader::INT, blender::gpu::shader::IVEC2, blender::gpu::shader::IVEC3, blender::gpu::shader::IVEC4, blender::gpu::shader::MAT3, blender::gpu::shader::MAT4, blender::gpu::shader::UINT, blender::gpu::shader::UVEC2, blender::gpu::shader::UVEC3, blender::gpu::shader::UVEC4, blender::gpu::shader::VEC2, blender::gpu::shader::VEC3, and blender::gpu::shader::VEC4.
|
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.