radv: set the DCC/FCE predicates from the base level
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 14 Jun 2019 13:17:06 +0000 (15:17 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 17 Jun 2019 20:20:53 +0000 (22:20 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_fast_clear.c

index 8fba2aa4b5c0ed6288c30959765ddb195fa950ed..eba0477c40598e6141a70748d0cc42be191fce97 100644 (file)
@@ -604,6 +604,7 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
        if (radv_image_has_dcc(image)) {
                uint64_t pred_offset = decompress_dcc ? image->dcc_pred_offset :
                                                        image->fce_pred_offset;
+               pred_offset += 8 * subresourceRange->baseMipLevel;
 
                old_predicating = cmd_buffer->state.predicating;
 
@@ -695,6 +696,7 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
        if (radv_image_has_dcc(image)) {
                uint64_t pred_offset = decompress_dcc ? image->dcc_pred_offset :
                                                        image->fce_pred_offset;
+               pred_offset += 8 * subresourceRange->baseMipLevel;
 
                cmd_buffer->state.predicating = old_predicating;