mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 21:51:22 +00:00 
			
		
		
		
	Fix multimesh buffer overflow in RendererStorageRD
This commit is contained in:
		
							parent
							
								
									d6f972fad4
								
							
						
					
					
						commit
						6b04f08b28
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -4419,7 +4419,8 @@ void RendererStorageRD::_update_dirty_multimeshes() { | ||||||
| 						if (multimesh->data_cache_dirty_regions[i]) { | 						if (multimesh->data_cache_dirty_regions[i]) { | ||||||
| 							uint32_t offset = i * region_size; | 							uint32_t offset = i * region_size; | ||||||
| 							uint32_t size = multimesh->stride_cache * (uint32_t)multimesh->instances * (uint32_t)sizeof(float); | 							uint32_t size = multimesh->stride_cache * (uint32_t)multimesh->instances * (uint32_t)sizeof(float); | ||||||
| 							RD::get_singleton()->buffer_update(multimesh->buffer, offset, MIN(region_size, size - offset), &data[i * region_size]); | 							uint32_t region_start_index = multimesh->stride_cache * MULTIMESH_DIRTY_REGION_SIZE * i; | ||||||
|  | 							RD::get_singleton()->buffer_update(multimesh->buffer, offset, MIN(region_size, size - offset), &data[region_start_index]); | ||||||
| 						} | 						} | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 SeleckyErik
						SeleckyErik