Task Overview
Currently the buffer streams handle API's for mapping data transfers to GPU memory through.
This is done through using the .write API. Which I originally designed for this API for simplicity in transferring data.
Realizing that this makes it quite difficult to transfer data to GPU memory. This task is for moving the write API to the utilities function.
Replacing with .map and .unmap API to perform the mapping operations to GPU memory.
The .write API will still be provided, but in the utilities.cppm.
Current API Example
As shown below here, this is what the current way of handling
vk::buffer_stream staging_buffer(logical_device, /* buffer stream params */);
std::span<const vertex> vertices = /* some arbitrary vertices */;
// This right here
test_stream.write(vertices);
Newer API Example
Users can specify the scope of the data they would like to map to GPU memory in their transferring operations.
vk::buffer_stream staging_buffer(logical_device, /* buffer stream params */);
std::span<const vertex> vertices = /* some arbitrary vertices */;
// This right here
test_stream.map();
test_stream.transfer(vertices);
// .. do other operations ...
test_stream.unmap();
What does completion look like?
You should be able to replace the use of .write with the .map and .unmap API's.
These should do what is intended for transferring data to GPU memory.
To verify if this works, what you can do is test the API's on one of the demos for verification. The usage should look similar to the newer API example as shown above.
Task Overview
Currently the buffer streams handle API's for mapping data transfers to GPU memory through.
This is done through using the
.writeAPI. Which I originally designed for this API for simplicity in transferring data.Realizing that this makes it quite difficult to transfer data to GPU memory. This task is for moving the
writeAPI to the utilities function.Replacing with
.mapand.unmapAPI to perform the mapping operations to GPU memory.The
.writeAPI will still be provided, but in the utilities.cppm.Current API Example
As shown below here, this is what the current way of handling
Newer API Example
Users can specify the scope of the data they would like to map to GPU memory in their transferring operations.
What does completion look like?
You should be able to replace the use of
.writewith the.mapand.unmapAPI's.These should do what is intended for transferring data to GPU memory.
To verify if this works, what you can do is test the API's on one of the demos for verification. The usage should look similar to the newer API example as shown above.