[v2,6/7] radv: do not enable DCC for mipmapped arrays because performance is worse

Submitted by Samuel Pitoiset on July 1, 2019, 2:31 p.m.

Details

Message ID 20190701143101.7326-6-samuel.pitoiset@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset July 1, 2019, 2:31 p.m.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
 src/amd/vulkan/radv_image.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 4099c57aa85..07d89d32edf 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -179,6 +179,10 @@  radv_use_dcc_for_image(struct radv_device *device,
 	if (pCreateInfo->arrayLayers > 1)
 		return false;
 
+	/* Do not enable DCC for mipmapped arrays because performance is worse. */
+	if (pCreateInfo->arrayLayers > 1 && pCreateInfo->mipLevels > 1)
+		return false;
+
 	if (radv_surface_has_scanout(device, create_info))
 		return false;