OSDN Git Service

swr: Align query results allocation
authorGeorge Kyriazis <george.kyriazis@intel.com>
Wed, 18 Jan 2017 23:09:08 +0000 (17:09 -0600)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 24 Jan 2017 02:24:38 +0000 (02:24 +0000)
commite35cfa15cf2aa894dd267309eed250f6bc3c68c6
tree33ff80a18688af9a8fcd08146f23c7b71aa9c7e6
parent34f902e17efb2f3265d5629f387fdc9a8f08091d
swr: Align query results allocation

Some query results struct contents are declared as cache line aligned.
Use aligned malloc, and align the whole struct, to be safe.

Fixes crash when compiling with clang.

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
(cherry picked from commit 00847e4f14dd237dfcdb2c3d15be1325a08ccf5a)
src/gallium/drivers/swr/swr_query.cpp
src/gallium/drivers/swr/swr_query.h