Lines Matching defs:alignment
566 split_unaligned_load(nir_builder *b, nir_intrinsic_instr *intrin, unsigned alignment)
577 const struct glsl_type *cast_type = get_cast_type(alignment * 8);
578 nir_deref_instr *cast = nir_build_deref_cast(b, &ptr->dest.ssa, ptr->modes, cast_type, alignment);
580 unsigned num_loads = DIV_ROUND_UP(comp_size * num_comps, alignment);
592 split_unaligned_store(nir_builder *b, nir_intrinsic_instr *intrin, unsigned alignment)
605 const struct glsl_type *cast_type = get_cast_type(alignment * 8);
606 nir_deref_instr *cast = nir_build_deref_cast(b, &ptr->dest.ssa, ptr->modes, cast_type, alignment);
608 unsigned num_stores = DIV_ROUND_UP(comp_size * num_comps, alignment);
610 nir_ssa_def *substore_val = nir_extract_bits(b, &value, 1, i * alignment * 8, 1, alignment * 8);
643 unsigned alignment = align_offset ? 1 << (ffs(align_offset) - 1) : align_mul;
645 /* We can load anything at 4-byte alignment, except for
648 if (alignment >= (deref->modes == nir_var_mem_ubo ? 16 : 4))
664 if (alignment >= natural_alignment)
668 split_unaligned_load(&b, intrin, alignment);
670 split_unaligned_store(&b, intrin, alignment);
1132 /* The alignment required for the pointee type is not easy to get from
1134 * the maximum alignment constraint (which is 128 bytes, since ulong16 or
1136 * maximum alignment constraint. For smaller types, we use the size
1137 * itself to calculate the alignment.
1139 unsigned alignment = size < 128 ? (1 << (ffs(size) - 1)) : 128;
1141 nir->info.shared_size = align(nir->info.shared_size, alignment);