Giovanni Mascellani (@giomasce) commented about libs/vkd3d/resource.c:
tile_extent = &sparse_requirements.formatProperties.imageGranularity;
tile_info = &resource->tiles.subresources[i];
compute_image_subresource_size_in_tiles(tile_extent, &resource->desc, miplevel_idx, &tile_info->extent);
tile_info->offset = start_idx;
tile_info->count = 0;
if (miplevel_idx < resource->tiles.standard_mip_count)
{
tile_count = tile_info->extent.width * tile_info->extent.height * tile_info->extent.depth;
start_idx += tile_count;
tile_info->count = tile_count;
}
else if (miplevel_idx == resource->tiles.standard_mip_count)
{
tile_info->count = 1; /* Non-zero dummy value */
Why are you using this dummy value? It seems that Vulkan tells you how long the miptail/packed region should be in the field `imageMipTailSize`.