59 return LayoutT::element_components_len(type) * LayoutT::component_mem_size(type);
64 return LayoutT::array_components_len(type) * LayoutT::component_mem_size(type);
76template<
typename LayoutT>
79 uint32_t alignment = LayoutT::element_alignment(type, array_size != 0);
80 uint32_t alignment_mask = alignment - 1;
82 if ((offset & alignment_mask) != 0) {
83 offset &= ~alignment_mask;
101template<
typename LayoutT>
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static void reserve(const shader::Type type, int32_t array_size, uint32_t *r_offset)
static void align_end_of_struct(uint32_t *r_offset)
static uint32_t array_stride(const shader::Type type)
static uint32_t element_stride(const shader::Type type)
static void align(const shader::Type &type, const int32_t array_size, uint32_t *r_offset)
static uint32_t array_components_len(const shader::Type type)
static uint32_t inner_row_padding(const shader::Type type)
static uint32_t element_components_len(const shader::Type type)
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_alignment(const shader::Type type, bool is_array)
static uint32_t array_components_len(const shader::Type type)
static uint32_t element_components_len(const shader::Type type)
static uint32_t component_mem_size(const shader::Type type)
static uint32_t inner_row_padding(const shader::Type type)