Skip to content

Commit c7dc679

Browse files
committed
rename in crevice code
1 parent 2a7f9c1 commit c7dc679

File tree

16 files changed

+34
-34
lines changed

16 files changed

+34
-34
lines changed

crates/bevy_crevice/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ uniform MAIN {
5050
```
5151

5252
```rust
53-
use crevice::std140::{AsStd140, Std140};
53+
use bevy_crevice::std140::{AsStd140, Std140};
5454

5555
#[derive(AsStd140)]
5656
struct MainUniform {
@@ -93,7 +93,7 @@ buffer POINT_LIGHTS {
9393
```
9494

9595
```rust
96-
use crevice::std140::{self, AsStd140};
96+
use bevy_crevice::std140::{self, AsStd140};
9797

9898
#[derive(AsStd140)]
9999
struct PointLight {

crates/bevy_crevice/bevy-crevice-derive/src/glsl.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub fn emit(input: DeriveInput) -> TokenStream {
1212
Data::Enum(_) | Data::Union(_) => panic!("Only structs are supported"),
1313
};
1414

15-
let base_trait_path: Path = parse_quote!(::crevice::glsl::Glsl);
16-
let struct_trait_path: Path = parse_quote!(::crevice::glsl::GlslStruct);
15+
let base_trait_path: Path = parse_quote!(::bevy_crevice::glsl::Glsl);
16+
let struct_trait_path: Path = parse_quote!(::bevy_crevice::glsl::GlslStruct);
1717

1818
let name = input.ident;
1919
let name_str = Literal::string(&name.to_string());
@@ -23,14 +23,14 @@ pub fn emit(input: DeriveInput) -> TokenStream {
2323
let glsl_fields = fields.named.iter().map(|field| {
2424
let field_ty = &field.ty;
2525
let field_name_str = Literal::string(&field.ident.as_ref().unwrap().to_string());
26-
let field_as = quote! {<#field_ty as ::crevice::glsl::GlslArray>};
26+
let field_as = quote! {<#field_ty as ::bevy_crevice::glsl::GlslArray>};
2727

2828
quote! {
2929
s.push_str("\t");
3030
s.push_str(#field_as::NAME);
3131
s.push_str(" ");
3232
s.push_str(#field_name_str);
33-
<#field_as::ArraySize as ::crevice::glsl::DimensionList>::push_to_string(s);
33+
<#field_as::ArraySize as ::bevy_crevice::glsl::DimensionList>::push_to_string(s);
3434
s.push_str(";\n");
3535
}
3636
});

crates/bevy_crevice/bevy-crevice-derive/src/layout.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn emit(
1111
let mod_name = Ident::new(mod_name, Span::call_site());
1212
let trait_name = Ident::new(trait_name, Span::call_site());
1313

14-
let mod_path: Path = parse_quote!(::crevice::#mod_name);
14+
let mod_path: Path = parse_quote!(::bevy_crevice::#mod_name);
1515
let trait_path: Path = parse_quote!(#mod_path::#trait_name);
1616

1717
let as_trait_name = format_ident!("As{}", trait_name);
@@ -63,7 +63,7 @@ pub fn emit(
6363

6464
let field_alignments = fields.iter().map(|field| layout_alignment_of_ty(&field.ty));
6565
let struct_alignment = quote! {
66-
::crevice::internal::max_arr([
66+
::bevy_crevice::internal::max_arr([
6767
#min_struct_alignment,
6868
#(#field_alignments,)*
6969
])
@@ -139,13 +139,13 @@ pub fn emit(
139139
// We set our target alignment to the larger of the
140140
// alignment due to the previous field and the alignment
141141
// requirement of the next field.
142-
let alignment = ::crevice::internal::max(
142+
let alignment = ::bevy_crevice::internal::max(
143143
#next_field_or_self_alignment,
144144
min_alignment,
145145
);
146146

147147
// Using everything we've got, compute our padding amount.
148-
::crevice::internal::align_offset(starting_offset, alignment)
148+
::bevy_crevice::internal::align_offset(starting_offset, alignment)
149149
}
150150
}
151151
})
@@ -222,7 +222,7 @@ pub fn emit(
222222
let size = ::core::mem::size_of::<Self>();
223223
let align = <Self as #trait_path>::ALIGNMENT;
224224

225-
let zeroed: Self = ::crevice::internal::bytemuck::Zeroable::zeroed();
225+
let zeroed: Self = ::bevy_crevice::internal::bytemuck::Zeroable::zeroed();
226226

227227
#[derive(Debug)]
228228
struct Field {
@@ -253,13 +253,13 @@ pub fn emit(
253253
#pad_fn_impls
254254
#struct_definition
255255

256-
unsafe impl #impl_generics ::crevice::internal::bytemuck::Zeroable for #generated_name #ty_generics #where_clause {}
257-
unsafe impl #impl_generics ::crevice::internal::bytemuck::Pod for #generated_name #ty_generics #where_clause {}
256+
unsafe impl #impl_generics ::bevy_crevice::internal::bytemuck::Zeroable for #generated_name #ty_generics #where_clause {}
257+
unsafe impl #impl_generics ::bevy_crevice::internal::bytemuck::Pod for #generated_name #ty_generics #where_clause {}
258258

259259
unsafe impl #impl_generics #mod_path::#trait_name for #generated_name #ty_generics #where_clause {
260260
const ALIGNMENT: usize = #struct_alignment;
261261
const PAD_AT_END: bool = true;
262-
type Padded = #padded_path<Self, {::crevice::internal::align_offset(
262+
type Padded = #padded_path<Self, {::bevy_crevice::internal::align_offset(
263263
::core::mem::size_of::<#generated_name>(),
264264
#struct_alignment
265265
)}>;
@@ -272,7 +272,7 @@ pub fn emit(
272272
Self::Output {
273273
#generated_struct_field_init
274274

275-
..::crevice::internal::bytemuck::Zeroable::zeroed()
275+
..::bevy_crevice::internal::bytemuck::Zeroable::zeroed()
276276
}
277277
}
278278

crates/bevy_crevice/crevice-tests/src/gpu.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use std::borrow::Cow;
22
use std::fmt::Debug;
33
use std::marker::PhantomData;
44

5-
use crevice::glsl::{Glsl, GlslStruct};
6-
use crevice::std140::{AsStd140, Std140};
7-
use crevice::std430::{AsStd430, Std430};
5+
use bevy_crevice::glsl::{Glsl, GlslStruct};
6+
use bevy_crevice::std140::{AsStd140, Std140};
7+
use bevy_crevice::std430::{AsStd430, Std430};
88
use futures::executor::block_on;
99
use wgpu::util::DeviceExt;
1010

crates/bevy_crevice/crevice-tests/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ fn test_round_trip_primitive<T>(_value: T) {}
1515
#[macro_use]
1616
mod util;
1717

18-
use crevice::glsl::GlslStruct;
19-
use crevice::std140::AsStd140;
20-
use crevice::std430::AsStd430;
18+
use bevy_crevice::glsl::GlslStruct;
19+
use bevy_crevice::std140::AsStd140;
20+
use bevy_crevice::std430::AsStd430;
2121
use mint::{ColumnMatrix2, ColumnMatrix3, ColumnMatrix4, Vector2, Vector3, Vector4};
2222

2323
#[test]

crates/bevy_crevice/src/glsl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Defines traits and types for generating GLSL code from Rust definitions.
22
3-
pub use crevice_derive::GlslStruct;
3+
pub use bevy_crevice_derive::GlslStruct;
44
use std::marker::PhantomData;
55

66
/// Type-level linked list of array dimensions

crates/bevy_crevice/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ uniform MAIN {
5656
```
5757
5858
```rust
59-
use crevice::std140::{AsStd140, Std140};
59+
use bevy_crevice::std140::{AsStd140, Std140};
6060
6161
#[derive(AsStd140)]
6262
struct MainUniform {
@@ -100,7 +100,7 @@ buffer POINT_LIGHTS {
100100
```
101101
102102
```rust
103-
use crevice::std140::{self, AsStd140};
103+
use bevy_crevice::std140::{self, AsStd140};
104104
105105
#[derive(AsStd140)]
106106
struct PointLight {

crates/bevy_crevice/src/std140.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ pub use self::traits::*;
1515
#[cfg(feature = "std")]
1616
pub use self::writer::*;
1717

18-
pub use crevice_derive::AsStd140;
18+
pub use bevy_crevice_derive::AsStd140;

crates/bevy_crevice/src/std140/sizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ buffer FROBS {
2525
```
2626
2727
```
28-
use crevice::std140::{self, AsStd140};
28+
use bevy_crevice::std140::{self, AsStd140};
2929
3030
#[derive(AsStd140)]
3131
struct Frob {

crates/bevy_crevice/src/std140/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ uniform CAMERA {
8989
```
9090
9191
```no_run
92-
use crevice::std140::{AsStd140, Std140};
92+
use bevy_crevice::std140::{AsStd140, Std140};
9393
9494
#[derive(AsStd140)]
9595
struct CameraUniform {

crates/bevy_crevice/src/std140/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ buffer POINT_LIGHTS {
3232
```
3333
3434
```
35-
use crevice::std140::{self, AsStd140};
35+
use bevy_crevice::std140::{self, AsStd140};
3636
3737
#[derive(AsStd140)]
3838
struct PointLight {

crates/bevy_crevice/src/std430.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ pub use self::traits::*;
1313
#[cfg(feature = "std")]
1414
pub use self::writer::*;
1515

16-
pub use crevice_derive::AsStd430;
16+
pub use bevy_crevice_derive::AsStd430;

crates/bevy_crevice/src/std430/sizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ buffer FROBS {
2525
```
2626
2727
```
28-
use crevice::std430::{self, AsStd430};
28+
use bevy_crevice::std430::{self, AsStd430};
2929
3030
#[derive(AsStd430)]
3131
struct Frob {

crates/bevy_crevice/src/std430/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ uniform CAMERA {
8989
```
9090
9191
```no_run
92-
use crevice::std430::{AsStd430, Std430};
92+
use bevy_crevice::std430::{AsStd430, Std430};
9393
9494
#[derive(AsStd430)]
9595
struct CameraUniform {

crates/bevy_crevice/src/std430/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ buffer POINT_LIGHTS {
3232
```
3333
3434
```
35-
use crevice::std430::{self, AsStd430};
35+
use bevy_crevice::std430::{self, AsStd430};
3636
3737
#[derive(AsStd430)]
3838
struct PointLight {

crates/bevy_crevice/tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crevice::glsl::GlslStruct;
2-
use crevice::std140::AsStd140;
1+
use bevy_crevice::glsl::GlslStruct;
2+
use bevy_crevice::std140::AsStd140;
33

44
#[test]
55
fn there_and_back_again() {

0 commit comments

Comments
 (0)