summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_wsi.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-07-19 12:14:19 +0100
committerLionel Landwerlin <[email protected]>2017-10-06 16:32:20 +0100
commita62a97933578a813beb0d27cc8e404850f7fd302 (patch)
tree4c2848c345858b68ca48b9d7f203a8797f5ceb6b /src/intel/vulkan/anv_wsi.c
parent185e719090c8d8a4056a041f3884d86ca224a400 (diff)
anv: enable multiple planes per image/imageView
This change introduce the concept of planes for image & views. It matches the planes available in new formats. We also refactor depth & stencil support through the usage of planes for the sake of uniformity. In the backend (genX_cmd_buffer.c) we have to take some care though with regard to auxilliary surfaces. Multiplanar color buffers can have multiple auxilliary surfaces but depth & stencil share the same HiZ one (only store in the depth plane). v2: by Jason Remove unused aspect parameters from anv_blorp.c Assert when attempting to resolve YUV images Drop redundant logic for plane offset in make_surface() Rework anv_foreach_plane_aspect_bit() Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_wsi.c')
-rw-r--r--src/intel/vulkan/anv_wsi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index c3e5dc1870b..3fca076894c 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -221,7 +221,7 @@ anv_wsi_image_create(VkDevice device_h,
result = anv_AllocateMemory(anv_device_to_handle(device),
&(VkMemoryAllocateInfo) {
.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
- .allocationSize = image->size,
+ .allocationSize = image->planes[0].surface.isl.size,
.memoryTypeIndex = 0,
},
NULL /* XXX: pAllocator */,
@@ -240,7 +240,7 @@ anv_wsi_image_create(VkDevice device_h,
anv_BindImageMemory(device_h, image_h, memory_h, 0);
- struct anv_surface *surface = &image->color_surface;
+ struct anv_surface *surface = &image->planes[0].surface;
assert(surface->isl.tiling == ISL_TILING_X);
*row_pitch = surface->isl.row_pitch;
@@ -266,8 +266,8 @@ anv_wsi_image_create(VkDevice device_h,
*image_p = image_h;
*memory_p = memory_h;
*fd_p = fd;
- *size = image->size;
- *offset = image->offset;
+ *size = image->planes[0].surface.isl.size;
+ *offset = image->planes[0].surface.offset;
return VK_SUCCESS;
fail_alloc_memory:
anv_FreeMemory(device_h, memory_h, pAllocator);