vk: Set color/blend state in meta clear if not set yet
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Wed, 3 Jun 2015 06:08:05 +0000 (23:08 -0700)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Wed, 3 Jun 2015 06:08:05 +0000 (23:08 -0700)
src/vulkan/meta.c

index ee9593ae995cb5b70f26e5718bc88f7b4186bd07..285c0202dee668133e4e673375d3e29d4c5541f6 100644 (file)
@@ -281,6 +281,11 @@ anv_cmd_buffer_clear(struct anv_cmd_buffer *cmd_buffer,
                                     VK_STATE_BIND_POINT_DEPTH_STENCIL,
                                     device->meta_state.shared.ds_state);
 
+   if (cmd_buffer->cb_state == NULL)
+      anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+                                    VK_STATE_BIND_POINT_COLOR_BLEND,
+                                    device->meta_state.shared.cb_state);
+
    anv_CmdDraw((VkCmdBuffer) cmd_buffer, 0, 3, 0, pass->num_clear_layers);
 
    /* Restore API state */