mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
anv: Fix some usage flags not propagated to ISL for explicit layouts
Some vulkancts tests rely on vkGetImageMemoryRequirements to return the same
exact size after exporting and importing an image. This broke when we started
adding padding to sampled surfaces to manage overfetch, because the texture
usage flag does not get applied to the ISL surface when the image is recreated
using an explicit layout.
Fixes: 8d13628f7 ("isl: Add additional alignment/padding requirements to prevent overfetch")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41376>
This commit is contained in:
parent
5636a57f60
commit
efc6a3053d
1 changed files with 10 additions and 2 deletions
|
|
@ -1557,12 +1557,20 @@ add_all_surfaces_explicit_layout(
|
|||
plane, image->vk.tiling);
|
||||
const VkSubresourceLayout *primary_layout = &drm_info->pPlaneLayouts[plane];
|
||||
|
||||
VkImageUsageFlags vk_usage = vk_image_usage(&image->vk, aspect);
|
||||
isl_surf_usage_flags_t isl_usage =
|
||||
anv_image_choose_isl_surf_usage(device->physical,
|
||||
image->vk.format,
|
||||
format_list_info,
|
||||
image->vk.create_flags, vk_usage,
|
||||
isl_extra_usage_flags, aspect,
|
||||
image->vk.compr_flags);
|
||||
|
||||
result = add_primary_surface(device, image, plane,
|
||||
format_plane,
|
||||
primary_layout->offset,
|
||||
primary_layout->rowPitch,
|
||||
isl_tiling_flags,
|
||||
isl_extra_usage_flags);
|
||||
isl_tiling_flags, isl_usage);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue