Commit 1f0f3583 authored by Jesse Natalie's avatar Jesse Natalie Committed by Erik Faye-Lund
Browse files

Revert "nir: Take packed attribute into account when calculating a field offset/elem stride"

This reverts commit fa36c562.
parent b47fba3f
......@@ -252,7 +252,6 @@ type_get_array_stride(const struct glsl_type *elem_type,
{
unsigned elem_size, elem_align;
size_align(elem_type, &elem_size, &elem_align);
elem_align = glsl_type_is_packed(elem_type) ? 1 : elem_align;
return ALIGN_POT(elem_size, elem_align);
}
......@@ -266,7 +265,6 @@ struct_type_get_field_offset(const struct glsl_type *struct_type,
for (unsigned i = 0; i <= field_idx; i++) {
unsigned elem_size, elem_align;
size_align(glsl_get_struct_field(struct_type, i), &elem_size, &elem_align);
elem_align = glsl_type_is_packed(struct_type) ? 1 : elem_align;
offset = ALIGN_POT(offset, elem_align);
if (i < field_idx)
offset += elem_size;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment