X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Famd%2Fvulkan%2Fradv_meta.h;h=5880064ff30ed307db72ec0d1725b98fb42f6d75;hb=203f60ebf2f64dab3dc77ce9c098a6ae3d2aca43;hp=d58b08514fe1b39862a970da9ae945b925eab3a9;hpb=7971697efe77545229184fd70188b9415ee0653d;p=mesa.git diff --git a/src/amd/vulkan/radv_meta.h b/src/amd/vulkan/radv_meta.h index d58b08514fe..5880064ff30 100644 --- a/src/amd/vulkan/radv_meta.h +++ b/src/amd/vulkan/radv_meta.h @@ -218,10 +218,39 @@ uint32_t radv_clear_fmask(struct radv_cmd_buffer *cmd_buffer, uint32_t radv_clear_dcc(struct radv_cmd_buffer *cmd_buffer, struct radv_image *image, const VkImageSubresourceRange *range, uint32_t value); +uint32_t radv_dcc_clear_level(struct radv_cmd_buffer *cmd_buffer, + const struct radv_image *image, + uint32_t level, uint32_t value); uint32_t radv_clear_htile(struct radv_cmd_buffer *cmd_buffer, struct radv_image *image, const VkImageSubresourceRange *range, uint32_t value); +/** + * Return whether the bound pipeline is the FMASK decompress pass. + */ +static inline bool +radv_is_fmask_decompress_pipeline(struct radv_cmd_buffer *cmd_buffer) +{ + struct radv_meta_state *meta_state = &cmd_buffer->device->meta_state; + struct radv_pipeline *pipeline = cmd_buffer->state.pipeline; + + return radv_pipeline_to_handle(pipeline) == + meta_state->fast_clear_flush.fmask_decompress_pipeline; +} + +/** + * Return whether the bound pipeline is the DCC decompress pass. + */ +static inline bool +radv_is_dcc_decompress_pipeline(struct radv_cmd_buffer *cmd_buffer) +{ + struct radv_meta_state *meta_state = &cmd_buffer->device->meta_state; + struct radv_pipeline *pipeline = cmd_buffer->state.pipeline; + + return radv_pipeline_to_handle(pipeline) == + meta_state->fast_clear_flush.dcc_decompress_pipeline; +} + /* common nir builder helpers */ #include "nir/nir_builder.h"