remove copyless (#6100)
# Objective Remove copyless copyless apparently isn't needed anymore to prevent extraneous memcopies and therefore got deprecated: https://github.com/kvark/copyless/issues/22
This commit is contained in:
parent
5875ea7db0
commit
128c169503
@ -65,7 +65,6 @@ hex = "0.4.2"
|
||||
hexasphere = "7.2"
|
||||
parking_lot = "0.12.1"
|
||||
regex = "1.5"
|
||||
copyless = "0.1.5"
|
||||
ddsfile = { version = "0.5.0", optional = true }
|
||||
ktx2 = { version = "0.3.0", optional = true }
|
||||
# For ktx2 supercompression
|
||||
|
@ -6,8 +6,6 @@ pub use draw_state::*;
|
||||
|
||||
use bevy_ecs::prelude::{Component, Query};
|
||||
|
||||
use copyless::VecHelper;
|
||||
|
||||
/// A resource to collect and sort draw requests for specific [`PhaseItems`](PhaseItem).
|
||||
#[derive(Component)]
|
||||
pub struct RenderPhase<I: PhaseItem> {
|
||||
@ -24,7 +22,7 @@ impl<I: PhaseItem> RenderPhase<I> {
|
||||
/// Adds a [`PhaseItem`] to this render phase.
|
||||
#[inline]
|
||||
pub fn add(&mut self, item: I) {
|
||||
self.items.alloc().init(item);
|
||||
self.items.push(item);
|
||||
}
|
||||
|
||||
/// Sorts all of its [`PhaseItems`](PhaseItem).
|
||||
|
@ -3,7 +3,6 @@ use crate::{
|
||||
renderer::{RenderDevice, RenderQueue},
|
||||
};
|
||||
use bevy_core::{cast_slice, Pod};
|
||||
use copyless::VecHelper;
|
||||
use wgpu::BufferUsages;
|
||||
|
||||
/// A structure for storing raw bytes that have already been properly formatted
|
||||
@ -72,7 +71,7 @@ impl<T: Pod> BufferVec<T> {
|
||||
|
||||
pub fn push(&mut self, value: T) -> usize {
|
||||
let index = self.values.len();
|
||||
self.values.alloc().init(value);
|
||||
self.values.push(value);
|
||||
index
|
||||
}
|
||||
|
||||
|
@ -31,4 +31,3 @@ guillotiere = "0.6.0"
|
||||
thiserror = "1.0"
|
||||
rectangle-pack = "0.4"
|
||||
bitflags = "1.2"
|
||||
copyless = "0.1.5"
|
||||
|
@ -31,7 +31,6 @@ use bevy_transform::components::GlobalTransform;
|
||||
use bevy_utils::FloatOrd;
|
||||
use bevy_utils::HashMap;
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
use copyless::VecHelper;
|
||||
use fixedbitset::FixedBitSet;
|
||||
|
||||
#[derive(Resource)]
|
||||
@ -253,7 +252,7 @@ pub fn extract_sprites(
|
||||
continue;
|
||||
}
|
||||
// PERF: we don't check in this function that the `Image` asset is ready, since it should be in most cases and hashing the handle is expensive
|
||||
extracted_sprites.sprites.alloc().init(ExtractedSprite {
|
||||
extracted_sprites.sprites.push(ExtractedSprite {
|
||||
entity,
|
||||
color: sprite.color,
|
||||
transform: *transform,
|
||||
@ -272,7 +271,7 @@ pub fn extract_sprites(
|
||||
}
|
||||
if let Some(texture_atlas) = texture_atlases.get(texture_atlas_handle) {
|
||||
let rect = Some(texture_atlas.textures[atlas_sprite.index as usize]);
|
||||
extracted_sprites.sprites.alloc().init(ExtractedSprite {
|
||||
extracted_sprites.sprites.push(ExtractedSprite {
|
||||
entity,
|
||||
color: atlas_sprite.color,
|
||||
transform: *transform,
|
||||
|
Loading…
Reference in New Issue
Block a user