anv: Allow selecting the slice of a 3D image

As per VK_KHR_maintenance1, clients can render to a slice of a 3D image
by creating a VK_IMAGE_VIEW_TYPE_2D view of it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand 2017-01-20 19:47:18 -08:00
parent 6d79111834
commit 99bb4c22a5
1 changed files with 1 additions and 1 deletions

View File

@ -529,7 +529,7 @@ anv_CreateImageView(VkDevice _device,
.depth = anv_minify(image->extent.depth , range->baseMipLevel),
};
if (image->type == VK_IMAGE_TYPE_3D) {
if (pCreateInfo->viewType == VK_IMAGE_VIEW_TYPE_3D) {
iview->isl.base_array_layer = 0;
iview->isl.array_len = iview->extent.depth;
}