Method to copy data to mapped buffer
This commit is contained in:
parent
c9a018ca2e
commit
ad26540e4f
1 changed files with 13 additions and 0 deletions
|
|
@ -89,6 +89,19 @@ namespace vk
|
|||
descriptor.range = size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the specified data to the mapped buffer
|
||||
*
|
||||
* @param data Pointer to the data to copy
|
||||
* @param size Size of the data to copy in machine units
|
||||
*
|
||||
*/
|
||||
void copyTo(void* data, VkDeviceSize size)
|
||||
{
|
||||
assert(mapped);
|
||||
memcpy(mapped, data, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush a memory range of the buffer to make it visible to the device
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue