summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_resolve.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-08-05 01:38:42 +0200
committerBas Nieuwenhuizen <[email protected]>2019-08-07 02:13:07 +0200
commit3a5950f50174390e817c619f972b8b8ea21c6705 (patch)
treeebc2131ac8aff15e953da49d6db5c48b58f98a50 /src/amd/vulkan/radv_meta_resolve.c
parent8c63ffe54d64adc09c9aafb31703476d0ea89cb0 (diff)
radv: Add device argument for dcc compression check.
Because it is about to be generation dependent. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_resolve.c')
-rw-r--r--src/amd/vulkan/radv_meta_resolve.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index dc5c2c65ecd..ea3d26c8d4c 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -330,7 +330,8 @@ enum radv_resolve_method {
RESOLVE_FRAGMENT,
};
-static void radv_pick_resolve_method_images(struct radv_image *src_image,
+static void radv_pick_resolve_method_images(struct radv_device *device,
+ struct radv_image *src_image,
VkFormat src_format,
struct radv_image *dest_image,
VkImageLayout dest_image_layout,
@@ -353,7 +354,7 @@ static void radv_pick_resolve_method_images(struct radv_image *src_image,
dest_image->info.array_size > 1)
*method = RESOLVE_COMPUTE;
- if (radv_layout_dcc_compressed(dest_image, dest_image_layout,
+ if (radv_layout_dcc_compressed(device, dest_image, dest_image_layout,
dest_render_loop, queue_mask)) {
*method = RESOLVE_FRAGMENT;
} else if (dest_image->planes[0].surface.micro_tile_mode !=
@@ -433,9 +434,10 @@ void radv_CmdResolveImage(
} else
resolve_method = RESOLVE_COMPUTE;
- radv_pick_resolve_method_images(src_image, src_image->vk_format,
- dest_image, dest_image_layout,
- false, cmd_buffer, &resolve_method);
+ radv_pick_resolve_method_images(cmd_buffer->device, src_image,
+ src_image->vk_format, dest_image,
+ dest_image_layout, false, cmd_buffer,
+ &resolve_method);
if (resolve_method == RESOLVE_FRAGMENT) {
radv_meta_resolve_fragment_image(cmd_buffer,
@@ -647,7 +649,8 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer)
struct radv_image_view *dst_iview =
cmd_buffer->state.attachments[dst_att.attachment].iview;
- radv_pick_resolve_method_images(src_iview->image,
+ radv_pick_resolve_method_images(cmd_buffer->device,
+ src_iview->image,
src_iview->vk_format,
dst_iview->image,
dst_att.layout,
@@ -701,8 +704,9 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer)
struct radv_image_view *src_iview= cmd_buffer->state.attachments[src_att.attachment].iview;
struct radv_image *src_img = src_iview->image;
- radv_pick_resolve_method_images(src_img, src_iview->vk_format,
- dst_img, dest_att.layout,
+ radv_pick_resolve_method_images(cmd_buffer->device, src_img,
+ src_iview->vk_format, dst_img,
+ dest_att.layout,
dest_att.in_render_loop,
cmd_buffer, &resolve_method);