Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/compiletests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ impl Runner {
"-Zunstable-options",
"-Zcrate-attr=no_std",
"-Zcrate-attr=feature(asm_experimental_arch)",
"-Zui-testing",
]
.join(" ")
}
Expand Down
196 changes: 98 additions & 98 deletions tests/compiletests/ui/arch/debug_printf_type_checking.stderr
Original file line number Diff line number Diff line change
@@ -1,167 +1,167 @@
error: Unterminated format specifier: missing type after precision
--> $DIR/debug_printf_type_checking.rs:11:23
|
11 | debug_printf!("%1");
LL | debug_printf!("%1");
| ^^^^

error: Unterminated format specifier: missing type after decimal point
--> $DIR/debug_printf_type_checking.rs:12:23
|
12 | debug_printf!("%1.");
LL | debug_printf!("%1.");
| ^^^^^

error: Unrecognised format specifier: '.'
--> $DIR/debug_printf_type_checking.rs:13:23
|
13 | debug_printf!("%.");
LL | debug_printf!("%.");
| ^^^^

error: Unrecognised format specifier: '.'
--> $DIR/debug_printf_type_checking.rs:14:23
|
14 | debug_printf!("%.1");
LL | debug_printf!("%.1");
| ^^^^^

error: Unterminated format specifier: missing type after fraction precision
--> $DIR/debug_printf_type_checking.rs:15:23
|
15 | debug_printf!("%1.1");
LL | debug_printf!("%1.1");
| ^^^^^^

error: Missing vector dimensions specifier
--> $DIR/debug_printf_type_checking.rs:16:23
|
16 | debug_printf!("%1.1v");
LL | debug_printf!("%1.1v");
| ^^^^^^^

error: Invalid width for vector: 5
--> $DIR/debug_printf_type_checking.rs:17:23
|
17 | debug_printf!("%1.1v5");
LL | debug_printf!("%1.1v5");
| ^^^^^^^^

error: Missing vector type specifier
--> $DIR/debug_printf_type_checking.rs:18:23
|
18 | debug_printf!("%1.1v2");
LL | debug_printf!("%1.1v2");
| ^^^^^^^^

error: Unrecognised vector type specifier: 'r'
--> $DIR/debug_printf_type_checking.rs:19:23
|
19 | debug_printf!("%1.1v2r");
LL | debug_printf!("%1.1v2r");
| ^^^^^^^^^

error: Unrecognised format specifier: 'r'
--> $DIR/debug_printf_type_checking.rs:20:23
|
20 | debug_printf!("%r", 11_i32);
LL | debug_printf!("%r", 11_i32);
| ^^^^

error[E0308]: mismatched types
--> $DIR/debug_printf_type_checking.rs:21:29
|
21 | debug_printf!("%f", 11_u32);
| --------------------^^^^^^-
| | |
| | expected `f32`, found `u32`
| arguments to this function are incorrect
|
--> $DIR/debug_printf_type_checking.rs:21:29
|
LL | debug_printf!("%f", 11_u32);
| --------------------^^^^^^-
| | |
| | expected `f32`, found `u32`
| arguments to this function are incorrect
|
help: the return type of this call is `u32` due to the type of the argument passed
--> $DIR/debug_printf_type_checking.rs:21:9
|
21 | debug_printf!("%f", 11_u32);
| ^^^^^^^^^^^^^^^^^^^^------^
| |
| this argument influences the return type of `debug_printf_assert_is_type`
--> $DIR/debug_printf_type_checking.rs:21:9
|
LL | debug_printf!("%f", 11_u32);
| ^^^^^^^^^^^^^^^^^^^^------^
| |
| this argument influences the return type of `debug_printf_assert_is_type`
note: function defined here
--> $SPIRV_STD_SRC/lib.rs:134:8
|
134 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
--> $SPIRV_STD_SRC/lib.rs:134:8
|
LL | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
help: change the type of the numeric literal from `u32` to `f32`
|
21 - debug_printf!("%f", 11_u32);
21 + debug_printf!("%f", 11_f32);
|
|
LL - debug_printf!("%f", 11_u32);
LL + debug_printf!("%f", 11_f32);
|

error[E0308]: mismatched types
--> $DIR/debug_printf_type_checking.rs:22:29
|
22 | debug_printf!("%u", 11.0_f32);
| --------------------^^^^^^^^-
| | |
| | expected `u32`, found `f32`
| arguments to this function are incorrect
|
--> $DIR/debug_printf_type_checking.rs:22:29
|
LL | debug_printf!("%u", 11.0_f32);
| --------------------^^^^^^^^-
| | |
| | expected `u32`, found `f32`
| arguments to this function are incorrect
|
help: the return type of this call is `f32` due to the type of the argument passed
--> $DIR/debug_printf_type_checking.rs:22:9
|
22 | debug_printf!("%u", 11.0_f32);
| ^^^^^^^^^^^^^^^^^^^^--------^
| |
| this argument influences the return type of `debug_printf_assert_is_type`
--> $DIR/debug_printf_type_checking.rs:22:9
|
LL | debug_printf!("%u", 11.0_f32);
| ^^^^^^^^^^^^^^^^^^^^--------^
| |
| this argument influences the return type of `debug_printf_assert_is_type`
note: function defined here
--> $SPIRV_STD_SRC/lib.rs:134:8
|
134 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
--> $SPIRV_STD_SRC/lib.rs:134:8
|
LL | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
help: change the type of the numeric literal from `f32` to `u32`
|
22 - debug_printf!("%u", 11.0_f32);
22 + debug_printf!("%u", 11u32);
|
|
LL - debug_printf!("%u", 11.0_f32);
LL + debug_printf!("%u", 11u32);
|

error[E0277]: the trait bound `{float}: Vector<f32, 2>` is not satisfied
--> $DIR/debug_printf_type_checking.rs:23:9
|
23 | debug_printf!("%v2f", 11.0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Vector<f32, 2>` is not implemented for `{float}`
|
= help: the following other types implement trait `Vector<T, N>`:
`BVec2` implements `Vector<bool, 2>`
`BVec3` implements `Vector<bool, 3>`
`BVec4` implements `Vector<bool, 4>`
`DVec2` implements `Vector<f64, 2>`
`DVec3` implements `Vector<f64, 3>`
`DVec4` implements `Vector<f64, 4>`
`IVec2` implements `Vector<i32, 2>`
`IVec3` implements `Vector<i32, 3>`
and 8 others
--> $DIR/debug_printf_type_checking.rs:23:9
|
LL | debug_printf!("%v2f", 11.0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Vector<f32, 2>` is not implemented for `{float}`
|
= help: the following other types implement trait `Vector<T, N>`:
`BVec2` implements `Vector<bool, 2>`
`BVec3` implements `Vector<bool, 3>`
`BVec4` implements `Vector<bool, 4>`
`DVec2` implements `Vector<f64, 2>`
`DVec3` implements `Vector<f64, 3>`
`DVec4` implements `Vector<f64, 4>`
`IVec2` implements `Vector<i32, 2>`
`IVec3` implements `Vector<i32, 3>`
and 8 others
note: required by a bound in `debug_printf_assert_is_vector`
--> $SPIRV_STD_SRC/lib.rs:141:8
|
139 | pub fn debug_printf_assert_is_vector<
| ----------------------------- required by a bound in this function
140 | TY: crate::scalar::Scalar,
141 | V: crate::vector::Vector<TY, SIZE>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `debug_printf_assert_is_vector`
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
--> $SPIRV_STD_SRC/lib.rs:141:8
|
LL | pub fn debug_printf_assert_is_vector<
| ----------------------------- required by a bound in this function
LL | TY: crate::scalar::Scalar,
LL | V: crate::vector::Vector<TY, SIZE>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `debug_printf_assert_is_vector`
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
--> $DIR/debug_printf_type_checking.rs:24:29
|
24 | debug_printf!("%f", Vec2::splat(33.3));
| --------------------^^^^^^^^^^^^^^^^^-
| | |
| | expected `f32`, found `Vec2`
| arguments to this function are incorrect
|
--> $DIR/debug_printf_type_checking.rs:24:29
|
LL | debug_printf!("%f", Vec2::splat(33.3));
| --------------------^^^^^^^^^^^^^^^^^-
| | |
| | expected `f32`, found `Vec2`
| arguments to this function are incorrect
|
help: the return type of this call is `Vec2` due to the type of the argument passed
--> $DIR/debug_printf_type_checking.rs:24:9
|
24 | debug_printf!("%f", Vec2::splat(33.3));
| ^^^^^^^^^^^^^^^^^^^^-----------------^
| |
| this argument influences the return type of `debug_printf_assert_is_type`
--> $DIR/debug_printf_type_checking.rs:24:9
|
LL | debug_printf!("%f", Vec2::splat(33.3));
| ^^^^^^^^^^^^^^^^^^^^-----------------^
| |
| this argument influences the return type of `debug_printf_assert_is_type`
note: function defined here
--> $SPIRV_STD_SRC/lib.rs:134:8
|
134 | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
--> $SPIRV_STD_SRC/lib.rs:134:8
|
LL | pub fn debug_printf_assert_is_type<T>(ty: T) -> T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 14 previous errors

Expand Down
1 change: 1 addition & 0 deletions tests/compiletests/ui/arch/subgroup/subgroup_ballot.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// build-pass
// compile-flags: -C target-feature=+GroupNonUniform,+GroupNonUniformBallot,+ext:SPV_KHR_vulkan_memory_model
// compile-flags: -C llvm-args=--disassemble-fn=subgroup_ballot::subgroup_ballot
// normalize-stderr-test "OpLine .*\n" -> ""

use spirv_std::spirv;

Expand Down
2 changes: 0 additions & 2 deletions tests/compiletests/ui/arch/subgroup/subgroup_ballot.stderr
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpLabel
OpLine %6 364 13
%7 = OpGroupNonUniformBallot %8 %9 %4
OpLine %6 403 13
%10 = OpGroupNonUniformInverseBallot %2 %9 %7
OpNoLine
OpReturnValue %10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// build-pass
// compile-flags: -C target-feature=+GroupNonUniform,+GroupNonUniformBallot,+ext:SPV_KHR_vulkan_memory_model
// compile-flags: -C llvm-args=--disassemble-fn=subgroup_ballot_bit_count::subgroup_ballot_bit_count
// normalize-stderr-test "OpLine .*\n" -> ""

use spirv_std::arch::{GroupOperation, SubgroupMask};
use spirv_std::spirv;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %5
%6 = OpLabel
OpLine %7 498 0
%8 = OpGroupNonUniformBallotBitCount %2 %9 Reduce %4
OpNoLine
OpReturnValue %8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// build-pass
// compile-flags: -C target-feature=+GroupNonUniform,+GroupNonUniformBallot,+ext:SPV_KHR_vulkan_memory_model
// compile-flags: -C llvm-args=--disassemble-fn=subgroup_broadcast_first::subgroup_broadcast_first
// normalize-stderr-test "OpLine .*\n" -> ""

use glam::Vec3;
use spirv_std::spirv;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpLabel
OpLine %6 331 13
%7 = OpGroupNonUniformBroadcastFirst %2 %8 %4
OpNoLine
OpReturnValue %7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
error[E0080]: evaluation panicked: `ClusterSize` must be at least 1
--> $SPIRV_STD_SRC/arch/subgroup.rs:826:1
|
826 | / macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIAdd", subgroup_clustered_i_add; r"
827 | | An integer add group operation of all `value` operands contributed by active invocations in the group.
828 | |
829 | | Result Type must be a scalar or vector of integer type.
... |
842 | | * `ClusterSize` must not be greater than the size of the group
843 | | ");
| |__^ evaluation of `spirv_std::arch::subgroup_clustered_i_add::<0, u32, u32>::{constant#0}` failed here
|
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `macro_subgroup_op_clustered` (in Nightly builds, run with -Z macro-backtrace for more info)
--> $SPIRV_STD_SRC/arch/subgroup.rs:826:1
|
LL | / macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIAdd", subgroup_clustered_i_add; r"
LL | | An integer add group operation of all `value` operands contributed by active invocations in the group.
LL | |
LL | | Result Type must be a scalar or vector of integer type.
... |
LL | | * `ClusterSize` must not be greater than the size of the group
LL | | ");
| |__^ evaluation of `spirv_std::arch::subgroup_clustered_i_add::<0, u32, u32>::{constant#0}` failed here
|
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `macro_subgroup_op_clustered` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
--> $SPIRV_STD_SRC/arch/subgroup.rs:826:1
|
826 | / macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIAdd", subgroup_clustered_i_add; r"
827 | | An integer add group operation of all `value` operands contributed by active invocations in the group.
828 | |
829 | | Result Type must be a scalar or vector of integer type.
... |
842 | | * `ClusterSize` must not be greater than the size of the group
843 | | ");
| |__^
|
= note: this note originates in the macro `macro_subgroup_op_clustered` (in Nightly builds, run with -Z macro-backtrace for more info)
--> $SPIRV_STD_SRC/arch/subgroup.rs:826:1
|
LL | / macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIAdd", subgroup_clustered_i_add; r"
LL | | An integer add group operation of all `value` operands contributed by active invocations in the group.
LL | |
LL | | Result Type must be a scalar or vector of integer type.
... |
LL | | * `ClusterSize` must not be greater than the size of the group
LL | | ");
| |__^
|
= note: this note originates in the macro `macro_subgroup_op_clustered` (in Nightly builds, run with -Z macro-backtrace for more info)

note: the above error was encountered while instantiating `fn spirv_std::arch::subgroup_clustered_i_add::<0, u32, u32>`
--> $DIR/subgroup_cluster_size_0_fail.rs:10:5
|
10 | spirv_std::arch::subgroup_clustered_i_add::<0, _>(value)
LL | spirv_std::arch::subgroup_clustered_i_add::<0, _>(value)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
Expand Down
Loading