Take a look into this situation for vk::buffer_stream. There is a parameter called .device_size to specify the size in bytes of the total data to the buffer stream.
I realize this causes more requirements to ensure the usability for specifying information about its metadata. By passing in std::span, you should be able to extract the size of bytes through the .size_bytes() API, which span gives you.
Currently Specifying Parameters
buffer_parameters index_params = {
.device_size = p_info.indices.size_bytes(),
.physical_memory_properties = p_info.phsyical_memory_properties,
.property_flags = memory_property::host_visible_bit | memory_property::host_cached_bit,
.usage = buffer_usage::index_buffer_bit,
.debug_name = p_info.debug_name.c_str(),
.vkSetDebugUtilsObjectNameEXT = p_info.vkSetDebugUtilsObjectNameEXT
};
vk::buffer_stream32 index_buffer = buffer_stream32(logical_device, index_params);
Applied New Parameter Change
The constructor will accept indices. Writing the indices of meshes at object construction.
std::array<uint32_t, 4> indices = {0, 1, 1, 2};
buffer_parameters index_params = {
// .device_size // remove this
.physical_memory_properties = p_info.phsyical_memory_properties,
.property_flags = memory_property::host_visible_bit | memory_property::host_cached_bit,
.usage = buffer_usage::index_buffer_bit,
.debug_name = p_info.debug_name.c_str(),
.vkSetDebugUtilsObjectNameEXT = p_info.vkSetDebugUtilsObjectNameEXT
};
vk::buffer_stream32 index_buffer = buffer_stream32(logical_device, indices, index_params);
Requirement for Successfully Completing this Task
Goals behind this change is rather then having to specify extra parameters on the user-side. You sho
Goals behind this change:
Is to remove redundancy in the configuration step for the buffer streams. This task is relatively simple to get working.
Take a look into this situation for
vk::buffer_stream. There is a parameter called.device_sizeto specify the size in bytes of the total data to the buffer stream.I realize this causes more requirements to ensure the usability for specifying information about its metadata. By passing in
std::span, you should be able to extract the size of bytes through the.size_bytes()API, whichspangives you.Currently Specifying Parameters
buffer_parameters index_params = { .device_size = p_info.indices.size_bytes(), .physical_memory_properties = p_info.phsyical_memory_properties, .property_flags = memory_property::host_visible_bit | memory_property::host_cached_bit, .usage = buffer_usage::index_buffer_bit, .debug_name = p_info.debug_name.c_str(), .vkSetDebugUtilsObjectNameEXT = p_info.vkSetDebugUtilsObjectNameEXT }; vk::buffer_stream32 index_buffer = buffer_stream32(logical_device, index_params);Applied New Parameter Change
The constructor will accept indices. Writing the indices of meshes at object construction.
Requirement for Successfully Completing this Task
Goals behind this change is rather then having to specify extra parameters on the user-side. You sho
Goals behind this change:
Is to remove redundancy in the configuration step for the buffer streams. This task is relatively simple to get working.