From: Jason Ekstrand Date: Mon, 1 Oct 2018 21:17:47 +0000 (-0500) Subject: anv: Drop some VK_IMAGE_TILING_OPTIMAL checks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44f5a92c0b16c18d7e0f5b73c243a68c94d97ad4;p=mesa.git anv: Drop some VK_IMAGE_TILING_OPTIMAL checks The DRM format modifiers extension adds a TILING_DRM_FORMAT_MODIFIER which will be used for modifiers so we can no longer use OPTIMAL to indicate tiled inside the driver. Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 1ba18191c2c..405c7326976 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -544,7 +544,7 @@ anv_get_image_format_features(const struct gen_device_info *devinfo, return 0; struct anv_format_plane base_plane_format = plane_format; - if (vk_tiling == VK_IMAGE_TILING_OPTIMAL) { + 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); diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 2e3be531325..d2395314c91 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -1104,7 +1104,7 @@ anv_layout_to_aux_usage(const struct gen_device_info * const devinfo, return ISL_AUX_USAGE_NONE; /* All images that use an auxiliary surface are required to be tiled. */ - assert(image->tiling == VK_IMAGE_TILING_OPTIMAL); + assert(image->planes[plane].surface.isl.tiling != ISL_TILING_LINEAR); /* Stencil has no aux */ assert(aspect != VK_IMAGE_ASPECT_STENCIL_BIT); @@ -1244,7 +1244,7 @@ anv_layout_to_fast_clear_type(const struct gen_device_info * const devinfo, return ANV_FAST_CLEAR_NONE; /* All images that use an auxiliary surface are required to be tiled. */ - assert(image->tiling == VK_IMAGE_TILING_OPTIMAL); + assert(image->planes[plane].surface.isl.tiling != ISL_TILING_LINEAR); /* Stencil has no aux */ assert(aspect != VK_IMAGE_ASPECT_STENCIL_BIT); diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index a5f3027eb9c..818d1b14a26 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -1031,7 +1031,7 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer, if (base_layer >= anv_image_aux_layers(image, aspect, base_level)) return; - assert(image->tiling == VK_IMAGE_TILING_OPTIMAL); + assert(image->planes[plane].surface.isl.tiling != ISL_TILING_LINEAR); if (initial_layout == VK_IMAGE_LAYOUT_UNDEFINED || initial_layout == VK_IMAGE_LAYOUT_PREINITIALIZED) {