I'm getting this warning message when rendering meshes:
"[ UNASSIGNED-BestPractices-vkCmdDrawIndexed-sparse-index-buffer ] Object 0: handle = 0x564eecccdf50, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x9b6a1f08 | [Arm] The indices which were specified for the draw call only utilise approximately 5.89% of index buffer value range. Arm Mali architectures before G71 do not have IDVS (Index-Driven Vertex Shading), meaning all vertices corresponding to indices between the minimum and maximum would be loaded, and possibly shaded, whether or not they are used."
I think the problem is about using a u16 to represent the index.
I understand the warning, it looks like there is a possibility for vertices to be shaded even though they shouldn't be due to how some older Mali GPUs work.
Vulkan-ValidationLayers/+/HEAD/layers/best_practices_utils.cpp:2106
I'm merging several meshes in three buffers, one for index, position and another for normal + texcoord.
"Recommendations
Store positional attribute data in one buffer.
Interleave all remaining attributes in a second buffer."
https://developer.samsung.com/galaxy-gamedev/resources/articles/asset.html#interleavedvertexattributes
Meshes info:
(Monkey head) index type: u16, index count: 2904(Cone) index type: u16, index count: 186(UV Sphere) index type: u16, index count: 2880
Rendering is working perfectly but these warning messages keep popping up.
What should I do?
Ensure all indices between min and max index are used.
Sparse ranges "work" but will get vertex overshading on older hardware (Midgard). Even on some of the newer hardware (Bifrost) you avoid the over-shading, but still allocate the memory for storing the vertex outputs, so you can run into OOM problems.Cheers, Pete