Handle unallocated GPU memory for mesh extraction

This commit is contained in:
Máté Homolya 2025-07-13 10:16:23 -07:00
parent 1525dff7ad
commit dd07eba561
No known key found for this signature in database

View File

@ -1098,7 +1098,11 @@ impl RenderMeshInstanceGpuBuilder {
mesh_vertex_slice.range.start,
mesh_vertex_slice.range.end - mesh_vertex_slice.range.start,
),
None => (0, 0),
None => {
// GPU memory for this mesh hasn't been allocated yet. Retry next frame.
meshes_to_reextract_next_frame.insert(entity);
return None;
}
};
let (mesh_is_indexed, first_index_index, index_count) =
match mesh_allocator.mesh_index_slice(&self.shared.mesh_asset_id) {