From 4e1f5ef336a62b8d0cb635557fec3cb36e246fba Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 30 Apr 2026 15:36:20 -0400 Subject: [PATCH] util/format: support 256-bit formats in util_format_get_tilesize() Fixes: eb64ce43866 ("util: Add a helper for querying sparse tile sizes") Part-of: (cherry picked from commit 43051547b66d0756c5b43f056746f03ecf7cfac3) --- .pick_status.json | 2 +- src/util/format/u_format.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 00e277f83c8..eab08180651 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1644,7 +1644,7 @@ "description": "util/format: support 256-bit formats in util_format_get_tilesize()", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "eb64ce43866b0e87526dcd20807ccdeb5ba17c80", "notes": null diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c index ed2639ef53e..8f6defb3291 100644 --- a/src/util/format/u_format.c +++ b/src/util/format/u_format.c @@ -1375,13 +1375,14 @@ util_format_get_max_channel_size(enum pipe_format format) } } -static uint32_t blocksizes_64kb[5][6][3] = { +static uint32_t blocksizes_64kb[6][6][3] = { /* 3D 2D 1 sample 2D 2 samples 2D 4 samples 2D 8 samples 2D 16 samples) */ { { 64, 32, 32 }, { 256, 256, 1 }, { 128, 256, 1 }, { 128, 128, 1 }, { 64, 128, 1 }, { 64, 64, 1 } }, /* 8 bits */ { { 32, 32, 32 }, { 256, 128, 1 }, { 128, 128, 1 }, { 128, 64, 1 }, { 64, 64, 1 }, { 64, 32, 1 } }, /* 16 bits */ { { 32, 32, 16 }, { 128, 128, 1 }, { 64, 128, 1 }, { 64, 64, 1 }, { 32, 64, 1 }, { 32, 32, 1 } }, /* 32 bits */ { { 32, 16, 16 }, { 128, 64, 1 }, { 64, 64, 1 }, { 64, 32, 1 }, { 32, 32, 1 }, { 32, 16, 1 } }, /* 64 bits */ { { 16, 16, 16 }, { 64, 64, 1 }, { 32, 64, 1 }, { 32, 32, 1 }, { 16, 32, 1 }, { 16, 16, 1 } }, /* 128 bits */ + { { 16, 16, 8 }, { 64, 32, 1 }, { 32, 32, 1 }, { 32, 16, 1 }, { 16, 16, 1 }, { 16, 8, 1 } }, /* 256 bits */ }; uint32_t