vk/image: Add anv_image::surf_type
authorChad Versace <chad.versace@intel.com>
Thu, 28 May 2015 14:45:31 +0000 (07:45 -0700)
committerChad Versace <chad.versace@intel.com>
Thu, 25 Jun 2015 23:52:16 +0000 (16:52 -0700)
This the gen SurfaceType, such as SURFTYPE_2D.

src/vulkan/image.c
src/vulkan/private.h

index 4beb58ef05fe31d60ca8b50545ad77c27e9060bf..8996d9cbcba7e06bf2d03ef07f24b3128da9f92a 100644 (file)
@@ -129,6 +129,9 @@ VkResult anv_image_create(
    image->swap_chain = NULL;
    image->tile_mode = anv_image_choose_tile_mode(pCreateInfo, extra);
 
+   /* TODO(chadv): How should we validate inputs? */
+   image->surf_type = anv_surf_type_from_image_type[pCreateInfo->imageType];
+
    assert(image->extent.width > 0);
    assert(image->extent.height > 0);
    assert(image->extent.depth > 0);
index fc7f65598f58e92a5c2a7c3e01d962ee01e99538..3cd8f3eab60cadf49dd80ac29355fed754c507b7 100644 (file)
@@ -814,6 +814,9 @@ struct anv_image {
    uint8_t h_align;
    uint8_t v_align;
    /** \} */
+
+   /** RENDER_SURFACE_STATE.SurfaceType */
+   uint8_t surf_type;
 };
 
 struct anv_surface_view {