anv: Rename anv_get_format_plane to anv_get_format_aspect

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141>
This commit is contained in:
Jason Ekstrand
2021-07-30 06:31:03 -05:00
committed by Marge Bot
parent 5dd55b0881
commit 4518ae8284
4 changed files with 22 additions and 22 deletions

View File

@@ -689,11 +689,11 @@ blit_image(struct anv_cmd_buffer *cmd_buffer,
dst_image_layout, ISL_AUX_USAGE_NONE, &dst);
struct anv_format_plane src_format =
anv_get_format_plane(&cmd_buffer->device->info, src_image->vk_format,
1U << aspect_bit, src_image->tiling);
anv_get_format_aspect(&cmd_buffer->device->info, src_image->vk_format,
1U << aspect_bit, src_image->tiling);
struct anv_format_plane dst_format =
anv_get_format_plane(&cmd_buffer->device->info, dst_image->vk_format,
1U << aspect_bit, dst_image->tiling);
anv_get_format_aspect(&cmd_buffer->device->info, dst_image->vk_format,
1U << aspect_bit, dst_image->tiling);
unsigned dst_start, dst_end;
if (dst_image->type == VK_IMAGE_TYPE_3D) {
@@ -1031,8 +1031,8 @@ void anv_CmdClearColorImage(
imageLayout, ISL_AUX_USAGE_NONE, &surf);
struct anv_format_plane src_format =
anv_get_format_plane(&cmd_buffer->device->info, image->vk_format,
VK_IMAGE_ASPECT_COLOR_BIT, image->tiling);
anv_get_format_aspect(&cmd_buffer->device->info, image->vk_format,
VK_IMAGE_ASPECT_COLOR_BIT, image->tiling);
unsigned base_layer = pRanges[r].baseArrayLayer;
unsigned layer_count = anv_get_layerCount(image, &pRanges[r]);

View File

@@ -468,9 +468,9 @@ anv_format_has_npot_plane(const struct anv_format *anv_format) {
* _cannot_ check for compatibility).
*/
struct anv_format_plane
anv_get_format_plane(const struct intel_device_info *devinfo,
VkFormat vk_format,
VkImageAspectFlagBits aspect, VkImageTiling tiling)
anv_get_format_aspect(const struct intel_device_info *devinfo,
VkFormat vk_format,
VkImageAspectFlagBits aspect, VkImageTiling tiling)
{
const struct anv_format *format = anv_get_format(vk_format);
const struct anv_format_plane unsupported = {
@@ -581,17 +581,17 @@ anv_get_image_format_features(const struct intel_device_info *devinfo,
}
const struct anv_format_plane plane_format =
anv_get_format_plane(devinfo, vk_format, VK_IMAGE_ASPECT_COLOR_BIT,
vk_tiling);
anv_get_format_aspect(devinfo, vk_format, VK_IMAGE_ASPECT_COLOR_BIT,
vk_tiling);
if (plane_format.isl_format == ISL_FORMAT_UNSUPPORTED)
return 0;
struct anv_format_plane base_plane_format = plane_format;
if (vk_tiling != VK_IMAGE_TILING_LINEAR) {
base_plane_format = anv_get_format_plane(devinfo, vk_format,
VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_TILING_LINEAR);
base_plane_format = anv_get_format_aspect(devinfo, vk_format,
VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_TILING_LINEAR);
}
enum isl_format base_isl_format = base_plane_format.isl_format;

View File

@@ -1035,7 +1035,7 @@ add_all_surfaces_implicit_layout(
VkImageAspectFlagBits aspect = 1 << b;
uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
const struct anv_format_plane plane_format =
anv_get_format_plane(devinfo, image->vk_format, aspect, image->tiling);
anv_get_format_aspect(devinfo, image->vk_format, aspect, image->tiling);
VkImageUsageFlags vk_usage = image->usage;
if (aspect == VK_IMAGE_ASPECT_STENCIL_BIT)
@@ -1156,7 +1156,7 @@ add_all_surfaces_explicit_layout(
const VkImageAspectFlagBits aspect = 1 << b;
const uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
const struct anv_format_plane format_plane =
anv_get_format_plane(devinfo, image->vk_format, aspect, image->tiling);
anv_get_format_aspect(devinfo, image->vk_format, aspect, image->tiling);
const VkSubresourceLayout *primary_layout = &drm_info->pPlaneLayouts[plane];
result = add_primary_surface(device, image, plane,
@@ -2819,8 +2819,8 @@ anv_CreateImageView(VkDevice _device,
VkImageAspectFlags vplane_aspect =
anv_plane_to_aspect(iview->aspect_mask, vplane);
struct anv_format_plane format =
anv_get_format_plane(&device->info, iview->vk_format,
vplane_aspect, image->tiling);
anv_get_format_aspect(&device->info, iview->vk_format,
vplane_aspect, image->tiling);
iview->planes[vplane].image_plane = iplane;

View File

@@ -3839,15 +3839,15 @@ anv_get_format_planes(VkFormat vk_format)
}
struct anv_format_plane
anv_get_format_plane(const struct intel_device_info *devinfo,
VkFormat vk_format,
VkImageAspectFlagBits aspect, VkImageTiling tiling);
anv_get_format_aspect(const struct intel_device_info *devinfo,
VkFormat vk_format,
VkImageAspectFlagBits aspect, VkImageTiling tiling);
static inline enum isl_format
anv_get_isl_format(const struct intel_device_info *devinfo, VkFormat vk_format,
VkImageAspectFlags aspect, VkImageTiling tiling)
{
return anv_get_format_plane(devinfo, vk_format, aspect, tiling).isl_format;
return anv_get_format_aspect(devinfo, vk_format, aspect, tiling).isl_format;
}
bool anv_formats_ccs_e_compatible(const struct intel_device_info *devinfo,