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:
parent
6d79111834
commit
99bb4c22a5
|
@ -529,7 +529,7 @@ anv_CreateImageView(VkDevice _device,
|
||||||
.depth = anv_minify(image->extent.depth , range->baseMipLevel),
|
.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.base_array_layer = 0;
|
||||||
iview->isl.array_len = iview->extent.depth;
|
iview->isl.array_len = iview->extent.depth;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue