From 7ea121687c9048788dc42ccdf4d0bbfc29810df1 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Thu, 28 May 2015 07:45:31 -0700 Subject: [PATCH] vk/image: Add anv_image::surf_type This the gen SurfaceType, such as SURFTYPE_2D. --- src/vulkan/image.c | 3 +++ src/vulkan/private.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/vulkan/image.c b/src/vulkan/image.c index 4beb58ef05f..8996d9cbcba 100644 --- a/src/vulkan/image.c +++ b/src/vulkan/image.c @@ -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); diff --git a/src/vulkan/private.h b/src/vulkan/private.h index fc7f65598f5..3cd8f3eab60 100644 --- a/src/vulkan/private.h +++ b/src/vulkan/private.h @@ -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 { -- 2.30.2