summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_image.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-03-14 17:20:07 +0000
committerLionel Landwerlin <[email protected]>2017-10-06 11:46:03 +0100
commitbbc37007983a73bc0effae004dddcdee8ffef993 (patch)
tree495cf038769dca42c42588b71fed5e33ed4fad79 /src/intel/vulkan/anv_image.c
parent18914715d1c2dc5861c9b76aa98c6b1debf5b711 (diff)
anv: modify the internal concept of format to express multiple planes
A given Vulkan format can now be decomposed into a set of planes. We now use 'struct anv_format_plane' to represent the format of those planes. v2: by Jason Rename anv_get_plane_format() to anv_get_format_plane() Don't rename anv_get_isl_format() Replace ds_fmt() by fmt2() Introduce fmt_unsupported() Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_image.c')
-rw-r--r--src/intel/vulkan/anv_image.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 7561b9b52b4..6ee2d2ef7cb 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -972,8 +972,12 @@ anv_CreateImageView(VkDevice _device,
iview->aspect_mask = pCreateInfo->subresourceRange.aspectMask;
iview->vk_format = pCreateInfo->format;
- struct anv_format format = anv_get_format(&device->info, pCreateInfo->format,
- range->aspectMask, image->tiling);
+ struct anv_format_plane format =
+ anv_get_format_plane(&device->info, pCreateInfo->format,
+ range->aspectMask == (VK_IMAGE_ASPECT_DEPTH_BIT |
+ VK_IMAGE_ASPECT_STENCIL_BIT) ?
+ VK_IMAGE_ASPECT_DEPTH_BIT : range->aspectMask,
+ image->tiling);
iview->isl = (struct isl_view) {
.format = format.isl_format,