Fix mesh 2d non indexed draw. (#15155)

Closes #15154. Looks like 2d was just missed in
d235d41af1.


![image](https://github.com/user-attachments/assets/1656d320-fed2-4a25-b2b0-14755e10faf7)
This commit is contained in:
charlotte 2024-09-12 05:38:56 -07:00 committed by GitHub
parent 327e1ddba4
commit 1fd478277e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -871,7 +871,7 @@ impl<P: PhaseItem> RenderCommand<P> for DrawMesh2d {
);
}
RenderMeshBufferInfo::NonIndexed => {
pass.draw(0..gpu_mesh.vertex_count, batch_range.clone());
pass.draw(vertex_buffer_slice.range, batch_range.clone());
}
}
RenderCommandResult::Success

View file

@ -300,7 +300,7 @@ impl<P: PhaseItem> RenderCommand<P> for DrawMeshInstanced {
);
}
RenderMeshBufferInfo::NonIndexed => {
pass.draw(0..gpu_mesh.vertex_count, 0..instance_buffer.length as u32);
pass.draw(vertex_buffer_slice.range, 0..instance_buffer.length as u32);
}
}
RenderCommandResult::Success