vk: Cache each render pass's number of clear ops
authorChad Versace <chad.versace@intel.com>
Thu, 20 Aug 2015 17:03:58 +0000 (10:03 -0700)
committerChad Versace <chad.versace@intel.com>
Thu, 20 Aug 2015 17:25:04 +0000 (10:25 -0700)
commit0db3d67a1488089602f787c281b2dff888fb7acd
tree93e65da8e0f58619f4947c863633c6c6cda5a0d8
parent23872191012a0b95a1ef7bcefeb6609ce595fecf
vk: Cache each render pass's number of clear ops

During vkCreateRenderPass, count the number of clear ops and store them
in new members of anv_render_pass:

    uint32_t num_color_clear_attachments
    bool has_depth_clear_attachment
    bool has_stencil_clear_attachment

Cacheing these 8 bytes (including padding) reduces the number of times
that anv_cmd_buffer_clear_attachments needs to loop over the pass's
attachments.
src/vulkan/anv_device.c
src/vulkan/anv_meta.c
src/vulkan/anv_private.h