radv: predicate cmask eliminate when using DCC.
authorDave Airlie <airlied@redhat.com>
Thu, 2 Mar 2017 21:39:10 +0000 (21:39 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 17 Jul 2017 00:44:43 +0000 (01:44 +0100)
commit9ee67467c9ea592340aee10a55ba54d7266ff0a9
tree4588211428eb7a5f369bd0ac3629f32d34863d8a
parent8eed291c2c4bfaddf256dcdb10bfa95bfe2b7c58
radv: predicate cmask eliminate when using DCC.

When using DCC some clear values don't require a cmask eliminate
step. This patch adds support for black and black with alpha 1,
there are other values, but I don't have access to a comprehensive list.

This works by setting the cmask eliminate predicate when doing the
fast clear, and later when doing the cmask elimination making sure
the draws are predicated.

This increases the fps on Sascha Willems deferred.

Tonga: 580fps->670fps on a Tonga PRO card.
Polaris 730->850fps

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_image.c
src/amd/vulkan/radv_meta_clear.c
src/amd/vulkan/radv_meta_fast_clear.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/si_cmd_buffer.c