mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-07 03:30:35 +02:00
turnip: Disable tiling on 1D images.
If we know the height is 1, then it would be a waste to align each miplevel to tile height. For non-mipmapped textures, it doesn't save us memory (since you still align to 4 on the last miplevel), but it should be better cache locality by not loading those unused lines. Incidentally, this gets us some more coverage of swap != WZYX cases in CTS tests, which often use optimal tiling without also testing linear. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15293>
This commit is contained in:
parent
71fcb751eb
commit
4cd51efedb
1 changed files with 6 additions and 0 deletions
|
|
@ -402,6 +402,12 @@ tu_CreateImage(VkDevice _device,
|
|||
ubwc_enabled = false;
|
||||
}
|
||||
|
||||
/* No sense in tiling a 1D image, you'd just waste space and cache locality. */
|
||||
if (pCreateInfo->imageType == VK_IMAGE_TYPE_1D) {
|
||||
tile_mode = TILE6_LINEAR;
|
||||
ubwc_enabled = false;
|
||||
}
|
||||
|
||||
enum pipe_format format =
|
||||
tu_vk_format_to_pipe_format(image->vk_format);
|
||||
/* Whether a view of the image with an R8G8 format could be made. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue