radv: disable prediction only if it has been enabled
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 13 Apr 2018 17:14:43 +0000 (19:14 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 16 Apr 2018 12:20:39 +0000 (14:20 +0200)
When decompressing DCC we don't enable it, so it's useless
to disable it. This reduces the number of prediction packets
sent to the GPU when performing color decompression passes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_fast_clear.c

index 327c1ae44082de1dbe1f135b74558d80cc4838a6..d5af7a1b0cfcc43929689679d8c4c8d5da8ff923 100644 (file)
@@ -667,7 +667,7 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
                                        &cmd_buffer->pool->alloc);
 
        }
-       if (radv_image_has_dcc(image)) {
+       if (!decompress_dcc && radv_image_has_dcc(image)) {
                cmd_buffer->state.predicating = false;
                radv_emit_set_predication_state_from_image(cmd_buffer, image, false);
        }