mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
spa: vulkan: simplify memcpy() call
This commit is contained in:
parent
bedcbf3631
commit
11e0492f79
1 changed files with 1 additions and 4 deletions
|
|
@ -244,11 +244,8 @@ int vulkan_write_pixels(struct vulkan_base *s, struct vulkan_write_pixels_info *
|
||||||
void *vmap;
|
void *vmap;
|
||||||
VK_CHECK_RESULT(vkMapMemory(s->device, vk_sbuf->memory, 0, VK_WHOLE_SIZE, 0, &vmap));
|
VK_CHECK_RESULT(vkMapMemory(s->device, vk_sbuf->memory, 0, VK_WHOLE_SIZE, 0, &vmap));
|
||||||
|
|
||||||
char *map = (char *)vmap;
|
|
||||||
|
|
||||||
// upload data
|
// upload data
|
||||||
const char *pdata = info->data;
|
memcpy(vmap, info->data, info->stride * info->size.height);
|
||||||
memcpy(map, pdata, info->stride * info->size.height);
|
|
||||||
|
|
||||||
info->copies[0] = (VkBufferImageCopy) {
|
info->copies[0] = (VkBufferImageCopy) {
|
||||||
.imageExtent.width = info->size.width,
|
.imageExtent.width = info->size.width,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue