Module: Mesa Branch: main Commit: 238f6d80a70b937890253507c5f1b3b9b5b494bc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=238f6d80a70b937890253507c5f1b3b9b5b494bc
Author: Alyssa Rosenzweig <[email protected]> Date: Fri Nov 12 11:11:25 2021 -0500 pan/bi: Make bi_index padding explicit Avoids reliance on UB. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13723> --- src/panfrost/bifrost/compiler.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index a734c60ea28..b3e8a4808cc 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -132,6 +132,9 @@ typedef struct { uint32_t offset : 2; bool reg : 1; enum bi_index_type type : 3; + + /* Must be zeroed so we can hash the whole 64-bits at a time */ + unsigned padding : (32 - 13); } bi_index; static inline bi_index
