An entry-point array of buffers, that is not part of a Metal argument buffer, requires a known length, so it can be emitted as discrete buffers. For runtime arrays of resources, this can be retrieved from the resource binding information added via add_msl_resource_binding().
Redefine get_resource_array_size() to consolidate array sizing using both var type, and runtime array sizing from resource bindings, if not found in type.
Use get_resource_array_size() to fix issue for runtime arrays of buffers.
Update runtime arrays of images and samplers to use get_resource_array_size().
Add .DS_Store to .gitignore (unrelated).
This has been tested in MoltenVK, but I couldn't think of a way of defining a SPRIV-Cross unit test for this, as it would involve calling add_msl_resource_binding() with some complex input.
Found as a regression during testing for the next Vulkan SDK release.
An entry-point array of buffers, that is not part of a Metal argument buffer, requires a known length, so it can be emitted as discrete buffers. For runtime arrays of resources, this can be retrieved from the resource binding information added via
add_msl_resource_binding()
.get_resource_array_size()
to consolidate array sizing using both var type, and runtime array sizing from resource bindings, if not found in type.get_resource_array_size()
to fix issue for runtime arrays of buffers.get_resource_array_size()
..DS_Store
to.gitignore
(unrelated).This has been tested in MoltenVK, but I couldn't think of a way of defining a SPRIV-Cross unit test for this, as it would involve calling
add_msl_resource_binding()
with some complex input.Found as a regression during testing for the next Vulkan SDK release.