This aligns the 4-element color float array to 16 byte boundaries.  This
should allow compiler vectorizers to generate better optimizations.
Also fixes broken vectorization generated by Intel compiler.

Reported-by: Tim Rowley <timothy.o.row...@intel.com>
Signed-off-by: Chuck Atkins <chuck.atk...@kitware.com>
---
 src/gallium/include/pipe/p_state.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/include/pipe/p_state.h 
b/src/gallium/include/pipe/p_state.h
index 1543e90..95f140f 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -326,7 +326,7 @@ struct pipe_blend_state
 
 struct pipe_blend_color
 {
-   float color[4];
+  PIPE_ALIGN_VAR(16) float color[4];
 };
 
 
-- 
2.5.5

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to