diff options
author | Dave Airlie <[email protected]> | 2017-05-02 09:40:36 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-05-03 05:59:52 +1000 |
commit | d5400a5ec2afdbca1c2745183f171ac72d6f0647 (patch) | |
tree | 53fad192d7ddca1a4d517c47ce023f07d48dc158 /src/amd/vulkan/radv_private.h | |
parent | 80ac89a952930f068a058a9eee3c2536832b10c9 (diff) |
radv: provide a helper for comparing an image extents.
This just makes it easier to do the follow in cleanups of the surface.
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_private.h')
-rw-r--r-- | src/amd/vulkan/radv_private.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 045bb647d69..48d0f443e16 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -1284,6 +1284,15 @@ radv_sanitize_image_offset(const VkImageType imageType, } } +static inline bool +radv_image_extent_compare(const struct radv_image *image, + const VkExtent3D *extent) +{ + if (memcmp(extent, &image->extent, sizeof(*extent))) + return false; + return true; +} + struct radv_sampler { uint32_t state[4]; }; |