radv: handle depth/stencil image copy with layouts better. (v3.1)
authorDave Airlie <airlied@redhat.com>
Thu, 21 Dec 2017 06:23:30 +0000 (16:23 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 22 Dec 2017 04:10:04 +0000 (14:10 +1000)
commit821b5379f04cc536de714d0898b1cff25c46b5b9
tree84672a044edb11a364d6413ffb9af3d7d7bbe55e
parent286fe1db473f6341623520cdd75d361c38428c55
radv: handle depth/stencil image copy with layouts better. (v3.1)

If we are doing a general->general transfer with HIZ enabled,
we want to hit the tile surface disable bits in radv_emit_fb_ds_state,
however we never get the current layout to know we are in general
and meta hardcoded the transfer layout which is always tile enabled.

This fixes:
dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.depth_stencil.d32_sfloat_s8_uint_d32_sfloat_s8_uint.optimal_general
dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.depth_stencil.d32_sfloat_s8_uint_d32_sfloat_s8_uint.general_general

v2: refactor some shared helpers for blit patches
v3: we only need multiple render passes as they should be compatible.
v3.1: use enum (Bas)

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2 17.3" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_meta.h
src/amd/vulkan/radv_meta_blit2d.c
src/amd/vulkan/radv_meta_copy.c
src/amd/vulkan/radv_private.h