diff options
author | Nanley Chery <[email protected]> | 2016-03-01 23:15:35 -0800 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2016-03-03 11:25:10 -0800 |
commit | 61ad78d0d1ffafc89cdc9da9d5ae710be36e3089 (patch) | |
tree | 16a660843bc0cf70b2f1a65d2d405e7006f8c51d /src/intel/vulkan/anv_meta_blit.c | |
parent | 2e9b08b9b89c0cf10cc7ca73fd39380766943283 (diff) |
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 <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_meta_blit.c')
-rw-r--r-- | src/intel/vulkan/anv_meta_blit.c | 13 |
1 files changed, 13 insertions, 0 deletions
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, |