mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 01:30:25 +01:00
anv/image: Determine the alignment units for compressed formats
Alignment units, i and j, match the compressed format block width and height respectively. v2: Don't assert against HALIGN* and VALIGN* enums (Chad) Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
parent
381f602c6b
commit
41cf35d1d8
1 changed files with 4 additions and 2 deletions
|
|
@ -152,8 +152,10 @@ anv_image_make_surface(const struct anv_image_create_info *create_info,
|
|||
const struct anv_tile_info *tile_info =
|
||||
&anv_tile_info_table[tile_mode];
|
||||
|
||||
const uint32_t i = 4; /* FINISHME: Stop hardcoding subimage alignment */
|
||||
const uint32_t j = 4; /* FINISHME: Stop hardcoding subimage alignment */
|
||||
const uint32_t i = MAX(4, format->bw); /* FINISHME: Stop hardcoding subimage alignment */
|
||||
const uint32_t j = MAX(4, format->bh); /* FINISHME: Stop hardcoding subimage alignment */
|
||||
assert(i == 4 || i == 8 || i == 16);
|
||||
assert(j == 4 || j == 8 || j == 16);
|
||||
|
||||
uint16_t qpitch = min_qpitch;
|
||||
uint32_t mt_width = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue