mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
anv: refactor choose_isl_tiling_flags to pass fewer arguments
Signed-off-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: José Roberto de Souza <None> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32771>
This commit is contained in:
parent
f96b2c002d
commit
308c2b9828
1 changed files with 4 additions and 5 deletions
|
|
@ -304,9 +304,9 @@ anv_image_choose_isl_surf_usage(struct anv_physical_device *device,
|
|||
|
||||
static isl_tiling_flags_t
|
||||
choose_isl_tiling_flags(const struct intel_device_info *devinfo,
|
||||
const struct anv_image *image,
|
||||
const struct anv_image_create_info *anv_info,
|
||||
const struct isl_drm_modifier_info *isl_mod_info,
|
||||
bool legacy_scanout)
|
||||
const struct isl_drm_modifier_info *isl_mod_info)
|
||||
{
|
||||
const VkImageCreateInfo *base_info = anv_info->vk_info;
|
||||
isl_tiling_flags_t flags = 0;
|
||||
|
|
@ -332,7 +332,7 @@ choose_isl_tiling_flags(const struct intel_device_info *devinfo,
|
|||
flags &= anv_info->isl_tiling_flags;
|
||||
}
|
||||
|
||||
if (legacy_scanout) {
|
||||
if (image->vk.wsi_legacy_scanout) {
|
||||
isl_tiling_flags_t legacy_mask = ISL_TILING_LINEAR_BIT;
|
||||
if (devinfo->has_tiling_uapi)
|
||||
legacy_mask |= ISL_TILING_X_BIT;
|
||||
|
|
@ -1806,8 +1806,7 @@ anv_image_init(struct anv_device *device, struct anv_image *image,
|
|||
isl_extra_usage_flags |= ISL_SURF_USAGE_DISPLAY_BIT;
|
||||
|
||||
const isl_tiling_flags_t isl_tiling_flags =
|
||||
choose_isl_tiling_flags(device->info, create_info, isl_mod_info,
|
||||
image->vk.wsi_legacy_scanout);
|
||||
choose_isl_tiling_flags(device->info, image, create_info, isl_mod_info);
|
||||
|
||||
const VkImageFormatListCreateInfo *fmt_list =
|
||||
vk_find_struct_const(pCreateInfo->pNext,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue