mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-04 07:31:16 +00:00 
			
		
		
		
	Merge pull request #77022 from sakrel/fix_buffer_get_data
RenderingDeviceVulkan::buffer_get_data: Use draw command buffer instead of setup command buffer
This commit is contained in:
		
						commit
						8b0530be64
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -5939,10 +5939,10 @@ Vector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer, uint32_t p_
 | 
				
			||||||
		ERR_FAIL_V_MSG(Vector<uint8_t>(), "Buffer is either invalid or this type of buffer can't be retrieved. Only Index and Vertex buffers allow retrieving.");
 | 
							ERR_FAIL_V_MSG(Vector<uint8_t>(), "Buffer is either invalid or this type of buffer can't be retrieved. Only Index and Vertex buffers allow retrieving.");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Make sure no one is using the buffer -- the "false" gets us to the same command buffer as below.
 | 
						// Make sure no one is using the buffer -- the "true" gets us to the same command buffer as below.
 | 
				
			||||||
	_buffer_memory_barrier(buffer->buffer, 0, buffer->size, src_stage_mask, VK_PIPELINE_STAGE_TRANSFER_BIT, src_access_mask, VK_ACCESS_TRANSFER_READ_BIT, false);
 | 
						_buffer_memory_barrier(buffer->buffer, 0, buffer->size, src_stage_mask, VK_PIPELINE_STAGE_TRANSFER_BIT, src_access_mask, VK_ACCESS_TRANSFER_READ_BIT, true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	VkCommandBuffer command_buffer = frames[frame].setup_command_buffer;
 | 
						VkCommandBuffer command_buffer = frames[frame].draw_command_buffer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Size of buffer to retrieve.
 | 
						// Size of buffer to retrieve.
 | 
				
			||||||
	if (!p_size) {
 | 
						if (!p_size) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue