[Mesa-dev] [PATCH] anv/blorp: multisample resolve all attachment layers
Iago Toral Quiroga
itoral at igalia.com
Wed Feb 14 12:10:00 UTC 2018
We were only resolving the first.
Fixes new CTS tests for multisampled layered rendering:
dEQP-VK.renderpass.multisample_resolve.layers_*
---
src/intel/vulkan/anv_blorp.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index d38b343671..cc87ce18b5 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -1536,6 +1536,9 @@ anv_cmd_buffer_resolve_subpass(struct anv_cmd_buffer *cmd_buffer)
assert(src_iview->aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT &&
dst_iview->aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT);
+ assert(src_iview->planes[0].isl.array_len ==
+ dst_iview->planes[0].isl.array_len);
+
struct blorp_surf src_surf, dst_surf;
get_blorp_surf_for_anv_image(cmd_buffer->device, src_iview->image,
VK_IMAGE_ASPECT_COLOR_BIT,
@@ -1543,25 +1546,29 @@ anv_cmd_buffer_resolve_subpass(struct anv_cmd_buffer *cmd_buffer)
get_blorp_surf_for_anv_image(cmd_buffer->device, dst_iview->image,
VK_IMAGE_ASPECT_COLOR_BIT,
dst_aux_usage, &dst_surf);
+
anv_cmd_buffer_mark_image_written(cmd_buffer, dst_iview->image,
VK_IMAGE_ASPECT_COLOR_BIT,
dst_surf.aux_usage,
dst_iview->planes[0].isl.base_level,
- dst_iview->planes[0].isl.base_array_layer, 1);
+ dst_iview->planes[0].isl.base_array_layer,
+ dst_iview->planes[0].isl.array_len);
assert(!src_iview->image->format->can_ycbcr);
assert(!dst_iview->image->format->can_ycbcr);
- resolve_surface(&batch,
- &src_surf,
- src_iview->planes[0].isl.base_level,
- src_iview->planes[0].isl.base_array_layer,
- &dst_surf,
- dst_iview->planes[0].isl.base_level,
- dst_iview->planes[0].isl.base_array_layer,
- render_area.offset.x, render_area.offset.y,
- render_area.offset.x, render_area.offset.y,
- render_area.extent.width, render_area.extent.height);
+ for (uint32_t i = 0; i < dst_iview->planes[0].isl.array_len; i++) {
+ resolve_surface(&batch,
+ &src_surf,
+ src_iview->planes[0].isl.base_level,
+ src_iview->planes[0].isl.base_array_layer + i,
+ &dst_surf,
+ dst_iview->planes[0].isl.base_level,
+ dst_iview->planes[0].isl.base_array_layer + i,
+ render_area.offset.x, render_area.offset.y,
+ render_area.offset.x, render_area.offset.y,
+ render_area.extent.width, render_area.extent.height);
+ }
}
blorp_batch_finish(&batch);
--
2.14.1
More information about the mesa-dev
mailing list