[Mesa-dev] [PATCH 2/2] radv: reset the image's predicate after a color decompression pass
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Apr 18 12:34:55 UTC 2018
After performing a fast-clear eliminate, a FMASK decompress,
or a DCC decompress, we can reset the predicate to FALSE.
With that, the GPU should be able to skip unnecessary color
decompression passes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_meta_fast_clear.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c
index e702dc80a5..9dce834c67 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -670,6 +670,11 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
if (radv_image_has_dcc(image)) {
cmd_buffer->state.predicating = false;
radv_emit_set_predication_state_from_image(cmd_buffer, image, false);
+
+ /* Clear the image's fast-clear eliminate predicate because
+ * FMASK and DCC also imply a fast-clear eliminate.
+ */
+ radv_set_dcc_need_cmask_elim_pred(cmd_buffer, image, false);
}
radv_meta_restore(&saved_state, cmd_buffer);
}
--
2.17.0
More information about the mesa-dev
mailing list