vk/image: Add tables for gen SurfaceType
authorChad Versace <chad.versace@intel.com>
Thu, 28 May 2015 14:37:59 +0000 (07:37 -0700)
committerChad Versace <chad.versace@intel.com>
Thu, 25 Jun 2015 23:52:16 +0000 (16:52 -0700)
Tables for mapping VkImageType and VkImageViewType to gen SurfaceType.
Tables are unused.

src/vulkan/image.c

index eaa0f24f7329f28a67277ce6dde293c871f83924..4beb58ef05fe31d60ca8b50545ad77c27e9060bf 100644 (file)
@@ -41,6 +41,19 @@ static const uint8_t anv_valign[] = {
     [16] = VALIGN16,
 };
 
+static const uint8_t anv_surf_type_from_image_type[] = {
+   [VK_IMAGE_TYPE_1D] = SURFTYPE_1D,
+   [VK_IMAGE_TYPE_2D] = SURFTYPE_2D,
+   [VK_IMAGE_TYPE_3D] = SURFTYPE_3D,
+};
+
+static const uint8_t anv_surf_type_from_image_view_type[] = {
+   [VK_IMAGE_VIEW_TYPE_1D]    = SURFTYPE_1D,
+   [VK_IMAGE_VIEW_TYPE_2D]    = SURFTYPE_2D,
+   [VK_IMAGE_VIEW_TYPE_3D]    = SURFTYPE_3D,
+   [VK_IMAGE_VIEW_TYPE_CUBE]  = SURFTYPE_CUBE,
+};
+
 static const struct anv_tile_info {
    uint32_t width;
    uint32_t height;