summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/vulkan/radv_meta.h')
-rw-r--r--src/amd/vulkan/radv_meta.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_meta.h b/src/amd/vulkan/radv_meta.h
index d58b08514fe..0cb31b9a7ec 100644
--- a/src/amd/vulkan/radv_meta.h
+++ b/src/amd/vulkan/radv_meta.h
@@ -222,6 +222,32 @@ 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"