mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 02:50:16 +01:00
v3dv: include depth offset on image view creation
When creating the image view in the texel buffer shader copy function, take in account the region to copy can start in a different Z-offset than 0. This fixes several dEQP-VK.image.concurrent_copy.* failing tests. Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34112>
This commit is contained in:
parent
91ee8ab284
commit
0d2ebca39f
1 changed files with 2 additions and 3 deletions
|
|
@ -2631,14 +2631,13 @@ texel_buffer_shader_copy(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
*
|
||||
* If we are batching (region_count > 1) all our regions have the same
|
||||
* image subresource so we can take this from the first region. For 3D
|
||||
* images we require the same depth extent.
|
||||
* images we require the same depth extent and Z offset.
|
||||
*/
|
||||
const VkImageSubresourceLayers *resource = ®ions[0].imageSubresource;
|
||||
uint32_t num_layers;
|
||||
if (image->vk.image_type != VK_IMAGE_TYPE_3D) {
|
||||
num_layers = vk_image_subresource_layer_count(&image->vk, resource);
|
||||
} else {
|
||||
assert(region_count == 1);
|
||||
num_layers = regions[0].imageExtent.depth;
|
||||
}
|
||||
assert(num_layers > 0);
|
||||
|
|
@ -2732,7 +2731,7 @@ texel_buffer_shader_copy(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
.aspectMask = aspect,
|
||||
.baseMipLevel = resource->mipLevel,
|
||||
.levelCount = 1,
|
||||
.baseArrayLayer = resource->baseArrayLayer,
|
||||
.baseArrayLayer = resource->baseArrayLayer + regions[0].imageOffset.z,
|
||||
.layerCount = num_layers,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue