From 22e61c9da4cf81d2a3ce753cb6cfd2d74aac8e47 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 16 May 2015 10:23:43 -0700 Subject: [PATCH] vk/meta: Make clear a no-op if no layers need clearing Among other things, this prevents recursive meta. --- src/vulkan/meta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vulkan/meta.c b/src/vulkan/meta.c index 1255761c4d6..aa7b16aee34 100644 --- a/src/vulkan/meta.c +++ b/src/vulkan/meta.c @@ -199,6 +199,9 @@ anv_cmd_buffer_clear(struct anv_cmd_buffer *cmd_buffer, float color[4]; } *instance_data; + if (pass->num_clear_layers == 0) + return; + const float vertex_data[] = { /* Rect-list coordinates */ 0.0, 0.0, -- 2.30.2