ail: port tiling routines to c++

to fix macro hell

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
Alyssa Rosenzweig
2024-01-18 17:51:36 -04:00
committed by Marge Bot
parent 104ba72547
commit 075e595058
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
libasahi_layout_files = files(
'layout.c',
'tiling.c',
'tiling.cc',
)
libasahi_layout = static_library(

View File

@@ -90,8 +90,8 @@ ail_space_mask(unsigned x)
unsigned log2_tile_width_el = util_logbase2(tile_size.width_el); \
unsigned log2_tile_height_el = util_logbase2(tile_size.height_el); \
\
element_t *linear = _linear; \
element_t *tiled = _tiled; \
element_t *linear = (element_t *)_linear; \
element_t *tiled = (element_t *)_tiled; \
\
for (unsigned y_el = sy_el; y_el < sy_end_el; ++y_el) { \
unsigned y_rowtile = y_el >> log2_tile_height_el; \