[gtk/wip/chergert/glproto] increase alignment for dynamic uniform state
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] increase alignment for dynamic uniform state
- Date: Sat, 2 Jan 2021 07:05:17 +0000 (UTC)
commit 52d4f10c91ad66430fbaf9f773c334e608f3dde7
Author: Christian Hergert <chergert redhat com>
Date: Fri Jan 1 23:05:08 2021 -0800
increase alignment for dynamic uniform state
these need to be aligned more so that SIMD operations will work.
gsk/next/gskgluniformstate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/next/gskgluniformstate.c b/gsk/next/gskgluniformstate.c
index ffa7eac504..239a3ee789 100644
--- a/gsk/next/gskgluniformstate.c
+++ b/gsk/next/gskgluniformstate.c
@@ -134,7 +134,7 @@ alloc_uniform_data (GByteArray *buffer,
guint size,
guint *offset)
{
- guint align = size > 4 ? GLIB_SIZEOF_VOID_P : 4;
+ guint align = size > 8 ? 16 : (size > 4 ? 8 : 4);
guint masked = buffer->len & (align - 1);
guint old_len = buffer->len;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]