Skip to content

Commit f197b09

Browse files
committed
ByteAddressableBuffer: fixup tests
1 parent da4f9b2 commit f197b09

File tree

9 files changed

+26
-26
lines changed

9 files changed

+26
-26
lines changed

tests/ui/arch/debug_printf_type_checking.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ help: the return type of this call is `u32` due to the type of the argument pass
7575
| |
7676
| this argument influences the return type of `spirv_std`
7777
note: function defined here
78-
--> $SPIRV_STD_SRC/lib.rs:136:8
78+
--> $SPIRV_STD_SRC/lib.rs:139:8
7979
|
80-
136 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
80+
139 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
8181
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
8282
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
8383
help: change the type of the numeric literal from `u32` to `f32`
@@ -102,9 +102,9 @@ help: the return type of this call is `f32` due to the type of the argument pass
102102
| |
103103
| this argument influences the return type of `spirv_std`
104104
note: function defined here
105-
--> $SPIRV_STD_SRC/lib.rs:136:8
105+
--> $SPIRV_STD_SRC/lib.rs:139:8
106106
|
107-
136 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
107+
139 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
108108
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
109109
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
110110
help: change the type of the numeric literal from `f32` to `u32`
@@ -129,12 +129,12 @@ error[E0277]: the trait bound `{float}: Vector<f32, 2>` is not satisfied
129129
<UVec3 as Vector<u32, 3>>
130130
and 5 others
131131
note: required by a bound in `debug_printf_assert_is_vector`
132-
--> $SPIRV_STD_SRC/lib.rs:143:8
132+
--> $SPIRV_STD_SRC/lib.rs:146:8
133133
|
134-
141 | pub fn debug_printf_assert_is_vector<
134+
144 | pub fn debug_printf_assert_is_vector<
135135
| ----------------------------- required by a bound in this function
136-
142 | TY: crate::scalar::Scalar,
137-
143 | V: crate::vector::Vector<TY, SIZE>,
136+
145 | TY: crate::scalar::Scalar,
137+
146 | V: crate::vector::Vector<TY, SIZE>,
138138
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `debug_printf_assert_is_vector`
139139
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
140140

@@ -155,9 +155,9 @@ help: the return type of this call is `Vec2` due to the type of the argument pas
155155
| |
156156
| this argument influences the return type of `spirv_std`
157157
note: function defined here
158-
--> $SPIRV_STD_SRC/lib.rs:136:8
158+
--> $SPIRV_STD_SRC/lib.rs:139:8
159159
|
160-
136 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
160+
139 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
161161
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
162162
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
163163

tests/ui/byte_addressable_buffer/arr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-pass
22

33
use spirv_std::spirv;
4-
use spirv_std::{glam::Vec4, ByteAddressableBuffer};
4+
use spirv_std::{glam::Vec4, ByteAddressableBuffer, MutByteAddressableBuffer};
55

66
#[spirv(fragment)]
77
pub fn load(
@@ -20,7 +20,7 @@ pub fn store(
2020
#[spirv(flat)] val: [i32; 4],
2121
) {
2222
unsafe {
23-
let mut buf = ByteAddressableBuffer::new(buf);
23+
let mut buf = MutByteAddressableBuffer::new(buf);
2424
buf.store(5, val);
2525
}
2626
}

tests/ui/byte_addressable_buffer/big_struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-pass
22

33
use spirv_std::spirv;
4-
use spirv_std::ByteAddressableBuffer;
4+
use spirv_std::{ByteAddressableBuffer, MutByteAddressableBuffer};
55

66
pub struct BigStruct {
77
a: u32,
@@ -29,7 +29,7 @@ pub fn store(
2929
#[spirv(flat)] val: BigStruct,
3030
) {
3131
unsafe {
32-
let mut buf = ByteAddressableBuffer::new(buf);
32+
let mut buf = MutByteAddressableBuffer::new(buf);
3333
buf.store(5, val);
3434
}
3535
}

tests/ui/byte_addressable_buffer/complex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-pass
22

33
use spirv_std::spirv;
4-
use spirv_std::{glam::Vec2, ByteAddressableBuffer};
4+
use spirv_std::{glam::Vec2, ByteAddressableBuffer, MutByteAddressableBuffer};
55

66
pub struct Complex {
77
x: u32,
@@ -35,7 +35,7 @@ pub fn store(
3535
val: Nesty,
3636
) {
3737
unsafe {
38-
let mut buf = ByteAddressableBuffer::new(buf);
38+
let mut buf = MutByteAddressableBuffer::new(buf);
3939
buf.store(5, val);
4040
}
4141
}

tests/ui/byte_addressable_buffer/empty_struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-pass
22

33
use spirv_std::spirv;
4-
use spirv_std::ByteAddressableBuffer;
4+
use spirv_std::{ByteAddressableBuffer, MutByteAddressableBuffer};
55

66
pub struct EmptyStruct {}
77

@@ -20,7 +20,7 @@ pub fn load(
2020
pub fn store(#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] buf: &mut [u32]) {
2121
let val = EmptyStruct {};
2222
unsafe {
23-
let mut buf = ByteAddressableBuffer::new(buf);
23+
let mut buf = MutByteAddressableBuffer::new(buf);
2424
buf.store(5, val);
2525
}
2626
}

tests/ui/byte_addressable_buffer/f32.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-pass
22

33
use spirv_std::spirv;
4-
use spirv_std::ByteAddressableBuffer;
4+
use spirv_std::{ByteAddressableBuffer, MutByteAddressableBuffer};
55

66
#[spirv(fragment)]
77
pub fn load(
@@ -17,7 +17,7 @@ pub fn load(
1717
#[spirv(fragment)]
1818
pub fn store(#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] buf: &mut [u32], val: f32) {
1919
unsafe {
20-
let mut buf = ByteAddressableBuffer::new(buf);
20+
let mut buf = MutByteAddressableBuffer::new(buf);
2121
buf.store(5, val);
2222
}
2323
}

tests/ui/byte_addressable_buffer/small_struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-pass
22

33
use spirv_std::spirv;
4-
use spirv_std::ByteAddressableBuffer;
4+
use spirv_std::{ByteAddressableBuffer, MutByteAddressableBuffer};
55

66
pub struct SmallStruct {
77
a: u32,
@@ -27,7 +27,7 @@ pub fn store(
2727
) {
2828
let val = SmallStruct { a, b };
2929
unsafe {
30-
let mut buf = ByteAddressableBuffer::new(buf);
30+
let mut buf = MutByteAddressableBuffer::new(buf);
3131
buf.store(5, val);
3232
}
3333
}

tests/ui/byte_addressable_buffer/u32.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-pass
22

33
use spirv_std::spirv;
4-
use spirv_std::ByteAddressableBuffer;
4+
use spirv_std::{ByteAddressableBuffer, MutByteAddressableBuffer};
55

66
#[spirv(fragment)]
77
pub fn load(
@@ -20,7 +20,7 @@ pub fn store(
2020
#[spirv(flat)] val: u32,
2121
) {
2222
unsafe {
23-
let mut buf = ByteAddressableBuffer::new(buf);
23+
let mut buf = MutByteAddressableBuffer::new(buf);
2424
buf.store(5, val);
2525
}
2626
}

tests/ui/byte_addressable_buffer/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-pass
22

33
use spirv_std::spirv;
4-
use spirv_std::{glam::Vec4, ByteAddressableBuffer};
4+
use spirv_std::{glam::Vec4, ByteAddressableBuffer, MutByteAddressableBuffer};
55

66
#[spirv(matrix)]
77
pub struct Mat4 {
@@ -31,7 +31,7 @@ pub fn store(
3131
valmat: Mat4,
3232
) {
3333
unsafe {
34-
let mut buf = ByteAddressableBuffer::new(buf);
34+
let mut buf = MutByteAddressableBuffer::new(buf);
3535
buf.store(5, val);
3636
buf.store(5, valmat);
3737
}

0 commit comments

Comments
 (0)