vk/image: Add anv_image::surf_type

This the gen SurfaceType, such as SURFTYPE_2D.
This commit is contained in:
Chad Versace 2015-05-28 07:45:31 -07:00
parent cb30acaced
commit 7ea121687c
2 changed files with 6 additions and 0 deletions

View 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);

View 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 {