summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 34008e1c01e..d9be7f392ef 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -116,6 +116,12 @@ struct lp_rast_plane {
/* one-pixel sized trivial reject offsets for each plane */
uint32_t eo;
+ /*
+ * We rely on this struct being 64bit aligned (ideally it would be 128bit
+ * but that's quite the waste) and therefore on 32bit we need padding
+ * since otherwise (even with the 64bit number in there) it wouldn't be.
+ */
+ uint32_t pad;
};
/**
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 29aee726941..98243a12de1 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -94,6 +94,8 @@ lp_setup_alloc_triangle(struct lp_scene *scene,
unsigned plane_sz = nr_planes * sizeof(struct lp_rast_plane);
struct lp_rast_triangle *tri;
+ STATIC_ASSERT(sizeof(struct lp_rast_plane) % 8 == 0);
+
*tri_size = (sizeof(struct lp_rast_triangle) +
3 * input_array_sz +
plane_sz);