anv/formats: Add a tiling parameter to get_isl_format

Currently, this parameter does nothing.
This commit is contained in:
Jason Ekstrand 2015-12-31 18:31:31 -08:00
parent 603a3a9439
commit 2712c0cca3
6 changed files with 11 additions and 6 deletions

View File

@ -237,7 +237,8 @@ anv_format_for_vk_format(VkFormat format)
* Exactly one bit must be set in \a aspect.
*/
enum isl_format
anv_get_isl_format(VkFormat format, VkImageAspectFlags aspect)
anv_get_isl_format(VkFormat format, VkImageAspectFlags aspect,
VkImageTiling tiling)
{
const struct anv_format *anv_fmt = &anv_formats[format];

View File

@ -133,7 +133,7 @@ make_surface(const struct anv_device *dev,
ok = isl_surf_init(&dev->isl_dev, &anv_surf->isl,
.dim = vk_to_isl_surf_dim[vk_info->imageType],
.format = anv_get_isl_format(vk_info->format, aspect),
.format = anv_get_isl_format(vk_info->format, aspect, vk_info->tiling),
.width = vk_info->extent.width,
.height = vk_info->extent.height,
.depth = vk_info->extent.depth,

View File

@ -877,7 +877,8 @@ choose_buffer_format(struct anv_image *image, VkImageAspectFlagBits aspect)
* an RGB format here even if the tiled image is RGBA. XXX: This doesn't
* work if the buffer is the destination.
*/
enum isl_format linear_format = anv_get_isl_format(image->vk_format, aspect);
enum isl_format linear_format = anv_get_isl_format(image->vk_format, aspect,
VK_IMAGE_TILING_LINEAR);
return vk_format_for_size(isl_format_layouts[linear_format].bs);
}

View File

@ -1415,7 +1415,8 @@ const struct anv_format *
anv_format_for_vk_format(VkFormat format);
enum isl_format
anv_get_isl_format(VkFormat format, VkImageAspectFlags aspect);
anv_get_isl_format(VkFormat format, VkImageAspectFlags aspect,
VkImageTiling tiling);
static inline bool
anv_format_is_color(const struct anv_format *format)

View File

@ -74,7 +74,8 @@ emit_vertex_input(struct anv_pipeline *pipeline,
const VkVertexInputAttributeDescription *desc =
&info->pVertexAttributeDescriptions[i];
enum isl_format format = anv_get_isl_format(desc->format,
VK_IMAGE_ASPECT_COLOR_BIT);
VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_TILING_LINEAR);
assert(desc->binding < 32);

View File

@ -70,7 +70,8 @@ emit_vertex_input(struct anv_pipeline *pipeline,
const VkVertexInputAttributeDescription *desc =
&info->pVertexAttributeDescriptions[i];
enum isl_format format = anv_get_isl_format(desc->format,
VK_IMAGE_ASPECT_COLOR_BIT);
VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_TILING_LINEAR);
assert(desc->binding < 32);