Mesa (master): anv: Allow selecting the slice of a 3D image

Jason Ekstrand jekstrand at kemper.freedesktop.org
Tue Jan 24 20:27:58 UTC 2017


Module: Mesa
Branch: master
Commit: 99bb4c22a5b0978b4beed80f974746852b113e50
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=99bb4c22a5b0978b4beed80f974746852b113e50

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Fri Jan 20 19:47:18 2017 -0800

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 at igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

---

 src/intel/vulkan/anv_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 12cca67..1c42821 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -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;
    }




More information about the mesa-commit mailing list