From: Chad Versace Date: Thu, 28 May 2015 14:45:31 +0000 (-0700) Subject: vk/image: Add anv_image::surf_type X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ea121687c9048788dc42ccdf4d0bbfc29810df1;p=mesa.git vk/image: Add anv_image::surf_type This the gen SurfaceType, such as SURFTYPE_2D. --- 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 {