|
Blender V5.0
|
#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 42 of file vk_memory_layout.hh.
|
static |
Get the number of components of the given type when used in an array.
Definition at line 79 of file vk_memory_layout.cc.
References BLI_assert_msg, blender::gpu::shader::bool_t, blender::gpu::shader::float2_t, blender::gpu::shader::float3_t, blender::gpu::shader::float3x3_t, blender::gpu::shader::float4_t, blender::gpu::shader::float4x4_t, blender::gpu::shader::float_t, blender::gpu::shader::int2_t, blender::gpu::shader::int3_t, blender::gpu::shader::int4_t, blender::gpu::shader::int_t, blender::gpu::shader::uint2_t, blender::gpu::shader::uint3_t, blender::gpu::shader::uint4_t, and blender::gpu::shader::uint_t.
|
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_t, blender::gpu::shader::float2_t, blender::gpu::shader::float3_t, blender::gpu::shader::float3x3_t, blender::gpu::shader::float4_t, blender::gpu::shader::float4x4_t, blender::gpu::shader::float_t, blender::gpu::shader::int2_t, blender::gpu::shader::int3_t, blender::gpu::shader::int4_t, blender::gpu::shader::int_t, blender::gpu::shader::uint2_t, blender::gpu::shader::uint3_t, blender::gpu::shader::uint4_t, and blender::gpu::shader::uint_t.
|
static |
Get the number of components that should be allocated for the given type.
Definition at line 49 of file vk_memory_layout.cc.
References BLI_assert_msg, blender::gpu::shader::bool_t, blender::gpu::shader::float2_t, blender::gpu::shader::float3_t, blender::gpu::shader::float3x3_t, blender::gpu::shader::float4_t, blender::gpu::shader::float4x4_t, blender::gpu::shader::float_t, blender::gpu::shader::int2_t, blender::gpu::shader::int3_t, blender::gpu::shader::int4_t, blender::gpu::shader::int_t, blender::gpu::shader::uint2_t, blender::gpu::shader::uint3_t, blender::gpu::shader::uint4_t, and blender::gpu::shader::uint_t.
|
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 108 of file vk_memory_layout.cc.
References blender::gpu::shader::float3x3_t.