summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-07-13 10:30:46 -0500
committerTim Rowley <[email protected]>2016-07-13 13:55:33 -0500
commit29f53d793781b67a92bb95fe66d7d38adc5488bb (patch)
tree5b9a778dd99f8aebd4c974b56e37072bb034cae2 /src/gallium
parent48ed8b6f26a40da40cb72b90cb52c9a653ff1e13 (diff)
Revert "gallium: Force blend color to 16-byte alignment"
This reverts commit d8d6091a846ac2a40a011d512d6d57f6c8442e6a. Heap allocations may be only 8-byte aligned on 32-bit system, and so having members with 16-byte alignment (such as in the case where pipe_blend_color is embedded in radeonsi's si_context) is undefined behavior which indeed causes crashes when compiled with gcc -O3. Cc: <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96835 Signed-off-by: Tim Rowley <[email protected]> Acked-by: Chuck Atkins <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/include/pipe/p_state.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index a73a77111a9..a3ae8701d29 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -326,17 +326,7 @@ struct pipe_blend_state
struct pipe_blend_color
{
- /**
- * Making the color array explicitly 16-byte aligned provides a hint to
- * compilers to make more efficient auto-vectorization optimizations.
- * The actual performance gains from vectorizing the blend color array are
- * fairly minimal, if any, but the alignment is necessary to work around
- * buggy vectorization in some compilers which fail to generate the correct
- * unaligned accessors resulting in a segfault. Specifically several
- * versions of the Intel compiler are known to be affected but it's likely
- * others are as well.
- */
- PIPE_ALIGN_VAR(16) float color[4];
+ float color[4];
};