62 return LayoutT::element_components_len(type) * LayoutT::component_mem_size(type);
67 return LayoutT::array_components_len(type) * LayoutT::component_mem_size(type);
79template<
typename LayoutT>
82 uint32_t alignment = LayoutT::element_alignment(type, array_size != 0);
83 uint32_t alignment_mask = alignment - 1;
84 uint32_t offset = *r_offset;
85 if ((offset & alignment_mask) != 0) {
86 offset &= ~alignment_mask;
104template<
typename LayoutT>
146 (diff_y *
extent.x) + diff_x;
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)
VecBase< int32_t, 3 > int3
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)
int64_t result_offset(int3 sub_offset, int layer) const
int64_t sample_count() const