ail: Add compression_layer_stride_B field

So we can index into the compression buffer of layered images.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20446>
This commit is contained in:
Alyssa Rosenzweig
2022-12-21 12:12:47 -05:00
parent d703c2887d
commit 21a35b58ba
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -220,7 +220,8 @@ ail_initialize_compression(struct ail_layout *layout)
height_px = DIV_ROUND_UP(height_px, 2);
}
layout->size_B += compbuf_B * layout->depth_px;
layout->compression_layer_stride_B = compbuf_B;
layout->size_B += layout->compression_layer_stride_B * layout->depth_px;
}
void
+3
View File
@@ -125,6 +125,9 @@ struct ail_layout {
/* Offset of the start of the compression metadata buffer */
uint32_t metadata_offset_B;
/* Stride between subsequent layers in the compression metadata buffer */
uint32_t compression_layer_stride_B;
/* Size of entire texture */
uint32_t size_B;
};