From f330bad5453dfcdf56f5d7d1adecbd5a2de1392f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 18 May 2015 10:39:14 -0700 Subject: [PATCH] vk: Only fill render targets for meta clear Clear inherits the render targets from the current render pass. This means we need to fill out the binding table after switching to meta bindings. However, meta copies etc happen outside a render pass and break when we try to fill in the render targets. This change fills the render targets only for meta clear. --- src/vulkan/meta.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vulkan/meta.c b/src/vulkan/meta.c index ebdf1a2b08d..661584b0fdf 100644 --- a/src/vulkan/meta.c +++ b/src/vulkan/meta.c @@ -160,9 +160,6 @@ anv_cmd_buffer_save(struct anv_cmd_buffer *cmd_buffer, state->old_bindings = cmd_buffer->bindings; cmd_buffer->bindings = &state->bindings; state->old_pipeline = cmd_buffer->pipeline; - - /* Initialize render targets for the meta bindings. */ - anv_cmd_buffer_fill_render_targets(cmd_buffer); } static void @@ -245,6 +242,9 @@ anv_cmd_buffer_clear(struct anv_cmd_buffer *cmd_buffer, anv_cmd_buffer_save(cmd_buffer, &saved_state); + /* Initialize render targets for the meta bindings. */ + anv_cmd_buffer_fill_render_targets(cmd_buffer); + anv_CmdBindVertexBuffers((VkCmdBuffer) cmd_buffer, 0, 2, (VkBuffer[]) { (VkBuffer) &vertex_buffer, -- 2.30.2