anv: Rework the way render target surfaces are allocated
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 19 Oct 2016 18:33:55 +0000 (11:33 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 16 Nov 2016 18:11:07 +0000 (10:11 -0800)
commitd2b4a9da038a200db3c5c61a11d5ea451cc6cc98
tree2a4b74fc4198128708228164b8225314ff65dcb3
parente283cd549c4aaf12cd74d7f15ddf4bda3fb009b0
anv: Rework the way render target surfaces are allocated

This commit moves the allocation and filling out of surface state from
CreateImageView time to BeginRenderPass time.  Instead of allocating the
render target surface state as part of the image view, we allocate it in
the command buffer state at the same time that we set up clears.  For
secondary command buffers, we allocate memory for the surface states in
BeginCommandBuffer but don't fill them out; instead, we use our new
SOL-based memcpy function to copy the surface states from the primary
command buffer.  This allows us to handle secondary command buffers without
the user specifying the framebuffer ahead-of-time.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/vulkan/anv_cmd_buffer.c
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_cmd_buffer.c