From a27a803961c6fe67e23c5c50dc05bfc71b49f0a7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 8 May 2024 21:56:53 -0400 Subject: [PATCH] asahi: add agx_index_size_to_B helper Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/agx_helpers.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/asahi/lib/agx_helpers.h b/src/asahi/lib/agx_helpers.h index 7a095d9f1d9..8b60ad39cb8 100644 --- a/src/asahi/lib/agx_helpers.h +++ b/src/asahi/lib/agx_helpers.h @@ -107,6 +107,12 @@ agx_translate_index_size(uint8_t size_B) return __builtin_ctz(size_B); } +static inline uint8_t +agx_index_size_to_B(enum agx_index_size size) +{ + return 1 << size; +} + static enum agx_conservative_depth agx_translate_depth_layout(enum gl_frag_depth_layout layout) {