anv: Allow PMA optimization to be enabled in secondary command buffers
authorAlex Smith <asmith@feralinteractive.com>
Fri, 5 Jan 2018 11:09:19 +0000 (11:09 +0000)
committerAlex Smith <asmith@feralinteractive.com>
Mon, 8 Jan 2018 09:31:17 +0000 (09:31 +0000)
commit0d8b9c529ce34347032912d73c14c245919a3d37
treef017ec64f49aa339de4cdd6da4883e689b9ddc38
parent7e025def6d7d3d6bf94facd6ec6d956f40cbb31e
anv: Allow PMA optimization to be enabled in secondary command buffers

This was never enabled in secondary buffers because hiz_enabled was
never set to true for those.

If the app provides a framebuffer in the inheritance info when beginning
a secondary buffer, we can determine if HiZ is enabled and therefore
allow the PMA optimization to be enabled within the command buffer.

This improves performance by ~13% on an internal benchmark on Skylake.

v2: Use anv_cmd_buffer_get_depth_stencil_view().

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/genX_cmd_buffer.c