diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-12-28 02:54:10 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-12-29 12:21:53 +0100 |
commit | 44fcf5874454dc5b68596c4eceeb9067bbe6527f (patch) | |
tree | 880d65dbd65ff0915a26fc9d4155c05d4a769964 /src/amd/vulkan/radv_meta_resolve.c | |
parent | 95f50f7f6cd0e2b2708b501c051e8980b8ec3008 (diff) |
radv: Disable DCC for GENERAL layout and compute transfer dest.
Apps can use this for render feedback loops, where things are
defined if they render each pixel only once. However, DCC fails
here, as the level of coherence is a block not a pixel, so disable it.
This is also going to help implementing other stuff.
Even if we optimize this later to only happen if there actually is
a loop (if possible at all ...), then the machinery is still useful
to exclude images accessible by the SDMA queue when that is implemented.
Reviewed-by: Dave Airlie <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_resolve.c')
-rw-r--r-- | src/amd/vulkan/radv_meta_resolve.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c index 26489b7834f..49326fe9d10 100644 --- a/src/amd/vulkan/radv_meta_resolve.c +++ b/src/amd/vulkan/radv_meta_resolve.c @@ -315,10 +315,15 @@ enum radv_resolve_method { static void radv_pick_resolve_method_images(struct radv_image *src_image, struct radv_image *dest_image, + VkImageLayout dest_image_layout, + struct radv_cmd_buffer *cmd_buffer, enum radv_resolve_method *method) { - if (dest_image->surface.num_dcc_levels > 0) { + uint32_t queue_mask = radv_image_queue_family_mask(dest_image, + cmd_buffer->queue_family_index, + cmd_buffer->queue_family_index); + if (radv_layout_dcc_compressed(dest_image, dest_image_layout, queue_mask)) { *method = RESOLVE_FRAGMENT; } else if (dest_image->surface.micro_tile_mode != src_image->surface.micro_tile_mode) { *method = RESOLVE_COMPUTE; @@ -360,6 +365,7 @@ void radv_CmdResolveImage( resolve_method = RESOLVE_COMPUTE; radv_pick_resolve_method_images(src_image, dest_image, + dest_image_layout, cmd_buffer, &resolve_method); if (resolve_method == RESOLVE_FRAGMENT) { @@ -577,7 +583,7 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer) struct radv_image *dst_img = cmd_buffer->state.framebuffer->attachments[dest_att.attachment].attachment->image; struct radv_image *src_img = cmd_buffer->state.framebuffer->attachments[src_att.attachment].attachment->image; - radv_pick_resolve_method_images(dst_img, src_img, &resolve_method); + radv_pick_resolve_method_images(dst_img, src_img, dest_att.layout, cmd_buffer, &resolve_method); if (resolve_method == RESOLVE_FRAGMENT) { break; } |