From: Nanley Chery Date: Wed, 2 Mar 2016 07:15:35 +0000 (-0800) Subject: anv/meta: Add function to create anv_meta_blit2d_surf from anv_image X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61ad78d0d1ffafc89cdc9da9d5ae710be36e3089;p=mesa.git anv/meta: Add function to create anv_meta_blit2d_surf from anv_image v2: Keep pitch in units of bytes (Jason) Signed-off-by: Nanley Chery Reviewed-by: Jason Ekstrand --- diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c index bef66751a7f..044998d0f56 100644 --- a/src/intel/vulkan/anv_meta_blit.c +++ b/src/intel/vulkan/anv_meta_blit.c @@ -417,6 +417,19 @@ vk_format_for_size(int bs) } } +static struct anv_meta_blit2d_surf +blit_surf_for_image(const struct anv_image* image, + const struct isl_surf *img_isl_surf) +{ + return (struct anv_meta_blit2d_surf) { + .bo = image->bo, + .tiling = img_isl_surf->tiling, + .base_offset = image->offset, + .bs = isl_format_get_layout(img_isl_surf->format)->bs, + .pitch = isl_surf_get_row_pitch(img_isl_surf), + }; +} + void anv_meta_blit2d(struct anv_cmd_buffer *cmd_buffer, struct anv_meta_blit2d_surf *src,