diff options
author | Jason Ekstrand <[email protected]> | 2015-12-31 18:31:31 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-01-04 16:08:05 -0800 |
commit | 2712c0cca32f85f6572e4c8f5593766e2e2e8a77 (patch) | |
tree | 0bc9b0a8343af6d43446122233525cbfe5f9b566 | |
parent | 603a3a943931092df0e6e697921156713467e59a (diff) |
anv/formats: Add a tiling parameter to get_isl_format
Currently, this parameter does nothing.
-rw-r--r-- | src/vulkan/anv_formats.c | 3 | ||||
-rw-r--r-- | src/vulkan/anv_image.c | 2 | ||||
-rw-r--r-- | src/vulkan/anv_meta.c | 3 | ||||
-rw-r--r-- | src/vulkan/anv_private.h | 3 | ||||
-rw-r--r-- | src/vulkan/gen7_pipeline.c | 3 | ||||
-rw-r--r-- | src/vulkan/gen8_pipeline.c | 3 |
6 files changed, 11 insertions, 6 deletions
diff --git a/src/vulkan/anv_formats.c b/src/vulkan/anv_formats.c index 6465fabd5b5..7aacc4f94d2 100644 --- a/src/vulkan/anv_formats.c +++ b/src/vulkan/anv_formats.c @@ -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]; diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index 1cb860f75f5..5a9f826ec43 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -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, diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index a435c26ee59..bb37899ce37 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -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); } diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 187a6e822b2..d915f694347 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -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) diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c index f4070743710..7dedcac08af 100644 --- a/src/vulkan/gen7_pipeline.c +++ b/src/vulkan/gen7_pipeline.c @@ -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); diff --git a/src/vulkan/gen8_pipeline.c b/src/vulkan/gen8_pipeline.c index 827a013ebdc..a405d290d50 100644 --- a/src/vulkan/gen8_pipeline.c +++ b/src/vulkan/gen8_pipeline.c @@ -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); |