Mesa (master): iris: Align last_seqnos to 64 bits.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 26 05:23:38 UTC 2020


Module: Mesa
Branch: master
Commit: 293221dddaedb410781d39fdecf3c93bb111475b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=293221dddaedb410781d39fdecf3c93bb111475b

Author: Rafael Antognolli <rafael.antognolli at intel.com>
Date:   Wed Jun 24 18:52:55 2020 +0000

iris: Align last_seqnos to 64 bits.

last_seqnos is used in atomic operations. Specially on 32 bit platorms,
it tends to be slower if it's not aligned to 64 bits (see
cdc331c6f9f6b2ffc035018de4445dba9b67c1f7). This fixes a small regression
on Bioshock.

Fixes: aba3aed96e4 ("iris: fix export of GEM handles")
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5637>

---

 src/gallium/drivers/iris/iris_bufmgr.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_bufmgr.h b/src/gallium/drivers/iris/iris_bufmgr.h
index d1594ff3d62..e69b5a55e3f 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.h
+++ b/src/gallium/drivers/iris/iris_bufmgr.h
@@ -203,8 +203,11 @@ struct iris_bo {
     *
     * Although this is a global field, use in multiple contexts should be
     * safe, see iris_emit_buffer_barrier_for() for details.
+    *
+    * Also align it to 64 bits. This will make atomic operations faster on 32
+    * bit platforms.
     */
-   uint64_t last_seqnos[NUM_IRIS_DOMAINS];
+   uint64_t last_seqnos[NUM_IRIS_DOMAINS] __attribute__ ((aligned (8)));
 
    /**
     * Boolean of whether the GPU is definitely not accessing the buffer.



More information about the mesa-commit mailing list