mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
Revert "gallium: Force blend color to 16-byte alignment"
This reverts commitd8d6091a84. 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: <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96835 Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com> Acked-by: Chuck Atkins <chuck.atkins@kitware.com> (cherry picked from commit29f53d7937)
This commit is contained in:
parent
0aae486a8b
commit
2e010ab1cc
1 changed files with 1 additions and 11 deletions
|
|
@ -318,17 +318,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];
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue