Because it is about to be generation dependent.
Reviewed-by: Dave Airlie <airlied@redhat.com>
uint32_t cb_color_info = cb->cb_color_info;
struct radv_image *image = iview->image;
- if (!radv_layout_dcc_compressed(image, layout, in_render_loop,
+ if (!radv_layout_dcc_compressed(cmd_buffer->device, image, layout, in_render_loop,
radv_image_queue_family_mask(image,
cmd_buffer->queue_family_index,
cmd_buffer->queue_family_index))) {
uint32_t value = 0xffffffffu; /* Fully expanded mode. */
bool need_decompress_pass = false;
- if (radv_layout_dcc_compressed(image, dst_layout,
+ if (radv_layout_dcc_compressed(cmd_buffer->device, image, dst_layout,
dst_render_loop,
dst_queue_mask)) {
value = 0x20202020u;
if (radv_dcc_enabled(image, range->baseMipLevel)) {
if (src_layout == VK_IMAGE_LAYOUT_PREINITIALIZED) {
radv_initialize_dcc(cmd_buffer, image, range, 0xffffffffu);
- } else if (radv_layout_dcc_compressed(image, src_layout, src_render_loop, src_queue_mask) &&
- !radv_layout_dcc_compressed(image, dst_layout, dst_render_loop, dst_queue_mask)) {
+ } else if (radv_layout_dcc_compressed(cmd_buffer->device, image, src_layout, src_render_loop, src_queue_mask) &&
+ !radv_layout_dcc_compressed(cmd_buffer->device, image, dst_layout, dst_render_loop, dst_queue_mask)) {
radv_decompress_dcc(cmd_buffer, image, range);
} else if (radv_layout_can_fast_clear(image, src_layout, src_render_loop, src_queue_mask) &&
!radv_layout_can_fast_clear(image, dst_layout, dst_render_loop, dst_queue_mask)) {
return layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
}
-bool radv_layout_dcc_compressed(const struct radv_image *image,
+bool radv_layout_dcc_compressed(const struct radv_device *device,
+ const struct radv_image *image,
VkImageLayout layout,
bool in_render_loop,
unsigned queue_mask)
uint32_t queue_mask = radv_image_queue_family_mask(image,
cmd_buffer->queue_family_index,
cmd_buffer->queue_family_index);
- bool compressed = radv_layout_dcc_compressed(image, layout, false, queue_mask);
+ bool compressed = radv_layout_dcc_compressed(cmd_buffer->device, image, layout, false, queue_mask);
if (compressed) {
radv_decompress_dcc(cmd_buffer, image, &(VkImageSubresourceRange) {
.aspectMask = pRegions[r].imageSubresource.aspectMask,
uint32_t queue_mask = radv_image_queue_family_mask(image,
cmd_buffer->queue_family_index,
cmd_buffer->queue_family_index);
- bool compressed = radv_layout_dcc_compressed(image, layout, false, queue_mask);
+ bool compressed = radv_layout_dcc_compressed(cmd_buffer->device, image, layout, false, queue_mask);
if (compressed) {
radv_decompress_dcc(cmd_buffer, image, &(VkImageSubresourceRange) {
.aspectMask = pRegions[r].imageSubresource.aspectMask,
uint32_t dst_queue_mask = radv_image_queue_family_mask(dest_image,
cmd_buffer->queue_family_index,
cmd_buffer->queue_family_index);
- bool dst_compressed = radv_layout_dcc_compressed(dest_image, dest_image_layout, false, dst_queue_mask);
+ bool dst_compressed = radv_layout_dcc_compressed(cmd_buffer->device, dest_image, dest_image_layout, false, dst_queue_mask);
uint32_t src_queue_mask = radv_image_queue_family_mask(src_image,
cmd_buffer->queue_family_index,
cmd_buffer->queue_family_index);
- bool src_compressed = radv_layout_dcc_compressed(src_image, src_image_layout, false, src_queue_mask);
+ bool src_compressed = radv_layout_dcc_compressed(cmd_buffer->device, src_image, src_image_layout, false, src_queue_mask);
if (!src_compressed || radv_dcc_formats_compatible(b_src.format, b_dst.format)) {
b_src.format = b_dst.format;
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,
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 !=
} 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,
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,
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);
bool in_render_loop,
unsigned queue_mask);
-bool radv_layout_dcc_compressed(const struct radv_image *image,
+bool radv_layout_dcc_compressed(const struct radv_device *device,
+ const struct radv_image *image,
VkImageLayout layout,
bool in_render_loop,
unsigned queue_mask);