mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-08 23:00:28 +01:00
panvk: implement sparseResidencyImage3D
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38986>
This commit is contained in:
parent
a93cf2b991
commit
237e2d7b32
3 changed files with 6 additions and 7 deletions
|
|
@ -364,10 +364,6 @@ panvk_bind_queue_submit_sparse_block_memory_bind(
|
|||
uint64_t resource_va = image->sparse.device_address;
|
||||
const struct panvk_image_plane *plane = &image->planes[in->plane_index];
|
||||
|
||||
/* 3D images are not yet supported. See
|
||||
* https://gitlab.freedesktop.org/panfrost/mesa/-/issues/242 */
|
||||
assert(image->vk.image_type == VK_IMAGE_TYPE_2D);
|
||||
|
||||
/* Previously, sparse residency was implemented using block U-interleaved
|
||||
* (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37483).
|
||||
* Interleaved 64k offers better map and unmap performance (at most one bind
|
||||
|
|
@ -396,6 +392,8 @@ panvk_bind_queue_submit_sparse_block_memory_bind(
|
|||
in->extent.depth == 1);
|
||||
uint32_t tile_size_B = 65536;
|
||||
|
||||
assert(image->vk.image_type != VK_IMAGE_TYPE_3D || in->layer == 0);
|
||||
|
||||
const struct pan_image_slice_layout *slayout = &plane->plane.layout.slices[in->level];
|
||||
VkSparseMemoryBind bind = {
|
||||
.resourceOffset =
|
||||
|
|
|
|||
|
|
@ -1023,7 +1023,8 @@ panvk_get_sparse_block_desc(VkImageType type, VkFormat format)
|
|||
uint32_t texel_block_size_B = fmt_desc->block.bits / 8;
|
||||
|
||||
switch (type) {
|
||||
case VK_IMAGE_TYPE_2D: {
|
||||
case VK_IMAGE_TYPE_2D:
|
||||
case VK_IMAGE_TYPE_3D: {
|
||||
if (!util_is_power_of_two_nonzero(texel_block_size_B))
|
||||
break;
|
||||
|
||||
|
|
@ -1041,7 +1042,7 @@ panvk_get_sparse_block_desc(VkImageType type, VkFormat format)
|
|||
return (struct panvk_sparse_block_desc){
|
||||
.extent = extent,
|
||||
.size_B = STANDARD_SPARSE_BLOCK_SIZE_B,
|
||||
.standard = true,
|
||||
.standard = type == VK_IMAGE_TYPE_2D,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ panvk_per_arch(get_physical_device_features)(
|
|||
.sparseBinding = has_sparse,
|
||||
.sparseResidencyBuffer = has_sparse,
|
||||
.sparseResidencyImage2D = has_sparse,
|
||||
.sparseResidencyImage3D = false, /* https://gitlab.freedesktop.org/panfrost/mesa/-/issues/242 */
|
||||
.sparseResidencyImage3D = has_sparse,
|
||||
.sparseResidency2Samples = false,
|
||||
.sparseResidency4Samples = false,
|
||||
.sparseResidency8Samples = false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue