summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_rast.h
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2016-03-15 16:39:55 +0100
committerRoland Scheidegger <[email protected]>2016-03-15 19:42:15 +0100
commitbb2c5e657b5f4c55bcec49a8d96f352ed4c1e013 (patch)
treeeeaa1b316d8089ba95e25d92c1c3aae0a7c434af /src/gallium/drivers/llvmpipe/lp_rast.h
parent12a4f0bed6ff03031587e1eb6d69f18b131f5655 (diff)
llvmpipe: fix lp_rast_plane alignment on 32bit
Some rasterization code relies (for sse) on the first and third planes (but not the second for now) being 128bit aligned, and we didn't get that on 32bit - I mistakenly thought the 64bit number in the struct would get the thing aligned to 64bit even on 32bit archs. Stephane Marchesin really figured this out. Reviewed-by: Jose Fonseca <[email protected]> CC: <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h6
1 files changed, 6 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;
};
/**