nvk: KHR_descriptor_update_template
Implements KHR_descriptor_update_template
For testing this I have filtered the binding-model.txt set like this:
grep 'with_template' binding-model.txt | grep -v 'secondary_cmd_buf\|storage_image[a-z_\.]*3d'\|ray_query\|ray_tracing
We do not support secondary command buffers or ray tracing. With storage_image and 3d we hit an assert in nvk_descriptor_set.c write_image_view_desc() in this block:
if (descriptor_type != VK_DESCRIPTOR_TYPE_SAMPLER &&
info && info->imageView != VK_NULL_HANDLE) {
VK_FROM_HANDLE(nvk_image_view, view, info->imageView);
if (descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) {
assert(view->storage_desc_index > 0);
assert(view->storage_desc_index < (1 << 20));
/* The nv50 compiler currently does some whacky stuff with images.
* For now, just assert that we never do storage on 3D images and
* that our descriptor index is at most 11 bits.
*/
assert(view->storage_desc_index < (1 << 11));
assert(view->vk.image->image_type != VK_IMAGE_TYPE_3D);
desc.image_index = view->storage_desc_index;
} else {
assert(view->sampled_desc_index > 0);
assert(view->sampled_desc_index < (1 << 20));
desc.image_index = view->sampled_desc_index;
}
}
With the remaining tests we get:
Test run totals:
Passed: 5087/8180 (62.2%)
Failed: 0/8180 (0.0%)
Not supported: 3093/8180 (37.8%)
Warnings: 0/8180 (0.0%)
The "Not supported" are of two different kinds:
- NotSupported (2 is not supported at vktBindingShaderAccessTests.cpp:784)
- NotSupported (8 is not supported at vktBindingShaderAccessTests.cpp:784)
2 and 8 come from this enum in vulkancts:
enum VkShaderStageFlagBits
{
VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF,
};
We do not have support in nvk features for geometryShader
and tessellationShader
so that makes sense.