mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
radv: fix copying 2D to 3D images
CTS is testing 2D to 3D image copies but the checks are incomplete and
we used to only copy the first slice.
This should fix
dEQP-GLES31.functional.copy_image.non_compressed.*.texture2d_array_to_texture3d
with ANGLE.
Cc: mesa-stable
Suggested-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23231>
(cherry picked from commit d2d07a7262)
This commit is contained in:
parent
07e26682f5
commit
91d6a4dec6
2 changed files with 7 additions and 13 deletions
|
|
@ -2560,7 +2560,7 @@
|
|||
"description": "radv: fix copying 2D to 3D images",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -497,19 +497,17 @@ copy_image(struct radv_cmd_buffer *cmd_buffer, struct radv_image *src_image,
|
|||
.height = img_extent_el.height,
|
||||
};
|
||||
|
||||
if (src_image->vk.image_type == VK_IMAGE_TYPE_3D)
|
||||
unsigned num_slices = region->srcSubresource.layerCount;
|
||||
|
||||
if (src_image->vk.image_type == VK_IMAGE_TYPE_3D) {
|
||||
b_src.layer = src_offset_el.z;
|
||||
num_slices = img_extent_el.depth;
|
||||
}
|
||||
|
||||
if (dst_image->vk.image_type == VK_IMAGE_TYPE_3D)
|
||||
b_dst.layer = dst_offset_el.z;
|
||||
|
||||
/* Loop through each 3D or array slice */
|
||||
unsigned num_slices_3d = img_extent_el.depth;
|
||||
unsigned num_slices_array = region->dstSubresource.layerCount;
|
||||
unsigned slice_3d = 0;
|
||||
unsigned slice_array = 0;
|
||||
while (slice_3d < num_slices_3d && slice_array < num_slices_array) {
|
||||
|
||||
for (unsigned slice = 0; slice < num_slices; slice++) {
|
||||
/* Finish creating blit rect */
|
||||
rect.dst_x = dst_offset_el.x;
|
||||
rect.dst_y = dst_offset_el.y;
|
||||
|
|
@ -529,10 +527,6 @@ copy_image(struct radv_cmd_buffer *cmd_buffer, struct radv_image *src_image,
|
|||
|
||||
b_src.layer++;
|
||||
b_dst.layer++;
|
||||
if (dst_image->vk.image_type == VK_IMAGE_TYPE_3D)
|
||||
slice_3d++;
|
||||
else
|
||||
slice_array++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue