Skip to content

Commit a108277

Browse files
committed
tests: don't pass any -C target-feature=... for tests by default.
1 parent c020eda commit a108277

22 files changed

+36
-19
lines changed

crates/spirv-std/src/arch/primitive.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pub unsafe fn end_primitive() {
4747
#[spirv_std_macros::gpu_only]
4848
#[doc(alias = "OpEmitStreamVertex")]
4949
#[inline]
50+
// FIXME(eddyb) why does this require `i64` instead of `i32`?
5051
pub unsafe fn emit_stream_vertex<const STREAM: i64>() {
5152
unsafe {
5253
asm! {
@@ -69,6 +70,7 @@ pub unsafe fn emit_stream_vertex<const STREAM: i64>() {
6970
#[spirv_std_macros::gpu_only]
7071
#[doc(alias = "OpEndStreamPrimitive")]
7172
#[inline]
73+
// FIXME(eddyb) why does this require `i64` instead of `i32`?
7274
pub unsafe fn end_stream_primitive<const STREAM: i64>() {
7375
unsafe {
7476
asm! {

tests/compiletests/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,6 @@ struct TestDeps {
355355
/// The RUSTFLAGS passed to all SPIR-V builds.
356356
// FIXME(eddyb) expose most of these from `spirv-builder`.
357357
fn rust_flags(codegen_backend_path: &Path) -> String {
358-
let target_features = ["Int8", "Int16", "Int64", "Float64"];
359-
360358
[
361359
&*format!("-Zcodegen-backend={}", codegen_backend_path.display()),
362360
// Ensure the codegen backend is emitted in `.d` files to force Cargo
@@ -388,7 +386,6 @@ fn rust_flags(codegen_backend_path: &Path) -> String {
388386
// NOTE(eddyb) flags copied from `spirv-builder` are all above this line.
389387
"-Cdebuginfo=2",
390388
"-Cembed-bitcode=no",
391-
&format!("-Ctarget-feature=+{}", target_features.join(",+")),
392389
]
393390
.join(" ")
394391
}

tests/compiletests/ui/arch/convert_u_to_acceleration_structure_khr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags: -Ctarget-feature=+RayTracingKHR,+ext:SPV_KHR_ray_tracing
2+
// compile-flags: -Ctarget-feature=+Int64,+RayTracingKHR,+ext:SPV_KHR_ray_tracing
33

44
use spirv_std::spirv;
55

tests/compiletests/ui/arch/emit_stream_vertex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags: -C target-feature=+GeometryStreams
2+
// compile-flags: -C target-feature=+Int64,+GeometryStreams
33

44
use spirv_std::spirv;
55

tests/compiletests/ui/arch/end_stream_primitive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags: -C target-feature=+GeometryStreams
2+
// compile-flags: -C target-feature=+Int64,+GeometryStreams
33

44
use spirv_std::spirv;
55

tests/compiletests/ui/arch/integer_min_and_max.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// build-pass
2+
// compile-flags: -C target-feature=+Int8,+Int16,+Int64
23

34
use spirv_std::arch::{signed_max, signed_min, unsigned_max, unsigned_min};
45
use spirv_std::spirv;

tests/compiletests/ui/dis/const-float-cast-optimized.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// the smaller float type when not needed elsewhere.
33

44
// build-pass
5-
// compile-flags: -C llvm-args=--disassemble-globals
5+
// compile-flags: -C target-feature=+Float64 -C llvm-args=--disassemble-globals
66
// normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""
77
// normalize-stderr-test "OpSource .*\n" -> ""
88
// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""

tests/compiletests/ui/dis/const-float-cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test whether float constant casts need optimization
22

33
// build-pass
4-
// compile-flags: -C llvm-args=--disassemble-globals
4+
// compile-flags: -C target-feature=+Float64 -C llvm-args=--disassemble-globals
55
// normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""
66
// normalize-stderr-test "OpSource .*\n" -> ""
77
// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""

tests/compiletests/ui/dis/const-narrowing-cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// and produce the expected truncation behavior.
33

44
// build-pass
5-
// compile-flags: -C llvm-args=--disassemble-globals
5+
// compile-flags: -C target-feature=+Int8 -C llvm-args=--disassemble-globals
66
// normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""
77
// normalize-stderr-test "OpSource .*\n" -> ""
88
// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""

tests/compiletests/ui/dis/pass-mode-cast-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// the default Rust ABI adjustments, that we now override through query hooks)
66

77
// build-pass
8-
// compile-flags: -C llvm-args=--disassemble-entry=main
8+
// compile-flags: -C target-feature=+Int8,+Int64 -C llvm-args=--disassemble-entry=main
99

1010
use spirv_std::spirv;
1111

0 commit comments

Comments
 (0)