mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05: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;
 | 
			
		||||
	VK_CHECK_RESULT(vkMapMemory(s->device, vk_sbuf->memory, 0, VK_WHOLE_SIZE, 0, &vmap));
 | 
			
		||||
 | 
			
		||||
	char *map = (char *)vmap;
 | 
			
		||||
 | 
			
		||||
	// upload data
 | 
			
		||||
	const char *pdata = info->data;
 | 
			
		||||
	memcpy(map, pdata, info->stride * info->size.height);
 | 
			
		||||
	memcpy(vmap, info->data, info->stride * info->size.height);
 | 
			
		||||
 | 
			
		||||
	info->copies[0] = (VkBufferImageCopy) {
 | 
			
		||||
		.imageExtent.width = info->size.width,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue