vk/image: Stop hardcoding SurfaceType of VkImageView
authorChad Versace <chad.versace@intel.com>
Thu, 28 May 2015 14:46:31 +0000 (07:46 -0700)
committerChad Versace <chad.versace@intel.com>
Thu, 25 Jun 2015 23:53:22 +0000 (16:53 -0700)
Instead, translate VkImageViewType to a gen SurfaceType.

src/vulkan/image.c

index 8996d9cbcba7e06bf2d03ef07f24b3128da9f92a..2a441a4705384564e033a4d8431cc6a85e92a92d 100644 (file)
@@ -270,7 +270,7 @@ anv_image_view_init(struct anv_surface_view *view,
    };
 
    struct GEN8_RENDER_SURFACE_STATE surface_state = {
-      .SurfaceType = SURFTYPE_2D,
+      .SurfaceType = anv_surf_type_from_image_view_type[pCreateInfo->viewType],
       .SurfaceArray = false,
       .SurfaceFormat = format,
       .SurfaceVerticalAlignment = anv_valign[image->v_align],