diff options
author | Samuel Pitoiset <[email protected]> | 2019-06-14 10:21:56 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-06-17 22:20:53 +0200 |
commit | 7295512037e895eebfc689c72cd01acf7f358464 (patch) | |
tree | 9ab78c8fdf52401ca2fe849df31c2797b7b07bd6 /src/amd/vulkan/radv_private.h | |
parent | 58506fec6355fb21de272218c18debcb8e067db2 (diff) |
radv: store the fast color clear values for each mip
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_private.h')
-rw-r--r-- | src/amd/vulkan/radv_private.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 37e56f04450..33075510740 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -1174,6 +1174,7 @@ struct radv_cmd_buffer { }; struct radv_image; +struct radv_image_view; bool radv_cmd_buffer_uses_mec(struct radv_cmd_buffer *cmd_buffer); @@ -1251,7 +1252,7 @@ void radv_update_ds_clear_metadata(struct radv_cmd_buffer *cmd_buffer, VkImageAspectFlags aspects); void radv_update_color_clear_metadata(struct radv_cmd_buffer *cmd_buffer, - struct radv_image *image, + const struct radv_image_view *iview, int cb_idx, uint32_t color_values[2]); @@ -1680,6 +1681,15 @@ radv_image_is_tc_compat_htile(const struct radv_image *image) return radv_image_has_htile(image) && image->tc_compatible_htile; } +static inline uint64_t +radv_image_get_fast_clear_va(const struct radv_image *image, + uint32_t base_level) +{ + uint64_t va = radv_buffer_get_va(image->bo); + va += image->offset + image->clear_value_offset + base_level * 8; + return va; +} + unsigned radv_image_queue_family_mask(const struct radv_image *image, uint32_t family, uint32_t queue_family); static inline uint32_t |