diff options
author | Samuel Pitoiset <[email protected]> | 2018-11-16 13:40:10 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-11-19 14:05:35 +0100 |
commit | 55c75d2b49707baa3fee34b7637415090bff8e78 (patch) | |
tree | 46880b528da241b128652efb760f6ce6d409d40e /src | |
parent | 483a28bfd48733d266858b010e3901520a347d59 (diff) |
radv: always clear the FCE predicate after DCC/FMASK/CMASK decompressions
DCC and FMASK also imply a fast-clear eliminate, so it should be
safe to reset the predicate unconditionally. We still only skip
FMASK or CMASK decompressions for now.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_meta_fast_clear.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c index 77fa4e2fa55..a54b78c2a6c 100644 --- a/src/amd/vulkan/radv_meta_fast_clear.c +++ b/src/amd/vulkan/radv_meta_fast_clear.c @@ -702,11 +702,6 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer, 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_update_fce_metadata(cmd_buffer, image, false); - if (cmd_buffer->state.predication_type != -1) { /* Restore previous conditional rendering user state. */ si_emit_set_predication_state(cmd_buffer, @@ -714,6 +709,14 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer, cmd_buffer->state.predication_va); } } + + if (radv_image_has_dcc(image)) { + /* Clear the image's fast-clear eliminate predicate because + * FMASK and DCC also imply a fast-clear eliminate. + */ + radv_update_fce_metadata(cmd_buffer, image, false); + } + radv_meta_restore(&saved_state, cmd_buffer); } |