From e210ab416d048caebe811ed76a9fc6398adf5b89 Mon Sep 17 00:00:00 2001 From: zmr233 Date: Thu, 19 Jun 2025 11:20:41 +0800 Subject: [PATCH 1/7] Replace obsolescent egrep with grep -E in lint script Replace deprecated egrep command with the modern equivalent 'grep -E' to eliminate warnings about egrep being obsolescent. This improves the lint script output clarity without changing functionality. Also add codegen-backend override to prevent cranelift conflicts from parent directory configurations, ensuring rust-gpu builds with the required LLVM backend. --- .cargo/config.toml | 4 ++++ .github/workflows/lint.sh | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index ab5eb3160a..c052289fde 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -14,6 +14,10 @@ rustflags = [ "-Zshare-generics=n", # =off is also an option, but you're going to increase binary size in doing so. ] +# Override parent directory's cranelift backend setting for rust-gpu compatibility +[profile.dev] +codegen-backend = "llvm" + [target.'cfg(all())'] rustflags = [ # FIXME(eddyb) update/review these lints. diff --git a/.github/workflows/lint.sh b/.github/workflows/lint.sh index 66f2d362d5..bdf5f1d59c 100755 --- a/.github/workflows/lint.sh +++ b/.github/workflows/lint.sh @@ -49,15 +49,15 @@ clippy_no_features examples/shaders/simplest-shader # which could be disastrous because env vars access can't be tracked by # `rustc`, unlike its CLI flags (which are integrated with incremental). if ( - egrep -r '::\s*env|env\s*::' crates/rustc_codegen_spirv/src | + grep -E -r '::\s*env|env\s*::' crates/rustc_codegen_spirv/src | # HACK(eddyb) exclude the one place in `rustc_codegen_spirv` # needing access to an env var (only for codegen args `--help`). - egrep -v '^crates/rustc_codegen_spirv/src/codegen_cx/mod.rs: let help_flag_comes_from_spirv_builder_env_var = std::env::var\(spirv_builder_env_var\)$' | + grep -E -v '^crates/rustc_codegen_spirv/src/codegen_cx/mod.rs: let help_flag_comes_from_spirv_builder_env_var = std::env::var\(spirv_builder_env_var\)$' | # HACK(LegNeato) exclude logging. This mirrors `rustc` (`RUSTC_LOG`) and #`rustdoc` (`RUSTDOC_LOG`). # There is not a risk of this being disastrous as it does not change the build settings. - egrep -v '^crates/rustc_codegen_spirv/src/lib.rs:.*(RUSTGPU_LOG|RUSTGPU_LOG_FORMAT|RUSTGPU_LOG_COLOR).*$' | - egrep -v '^crates/rustc_codegen_spirv/src/lib.rs: use std::env::{self, VarError};$' + grep -E -v '^crates/rustc_codegen_spirv/src/lib.rs:.*(RUSTGPU_LOG|RUSTGPU_LOG_FORMAT|RUSTGPU_LOG_COLOR).*$' | + grep -E -v '^crates/rustc_codegen_spirv/src/lib.rs: use std::env::{self, VarError};$' ); then echo '^^^' From c9cf8165cde778a2f62e97cb9accc300d067ad1a Mon Sep 17 00:00:00 2001 From: zmr233 Date: Thu, 19 Jun 2025 14:09:42 +0800 Subject: [PATCH 2/7] Fix fragment shader silent optimization (Issue #284) Addresses issue #284 where fragment shaders were optimized to have no output operations, causing silent rendering failures. The real problem is not DCE eliminating entry points (they are always rooted), but rather fragment shaders being optimized to have no meaningful output writes to StorageClass::Output variables. Implementation: - Add validation after DCE to detect fragment shaders with no output - Provide helpful error messages with examples - Detect partial component writes that may have been optimized away - Recursively check function calls for output operations Test case: - issue-284-dead-fragment.rs: Fragment shader with no output (fails with clear error) The validation catches cases where developers write partial component assignments that get optimized away, providing clear guidance on how to fix the issue. --- crates/rustc_codegen_spirv/src/linker/mod.rs | 159 +++++++++++++++++- .../ui/dis/issue-284-dead-fragment.rs | 12 ++ .../ui/dis/issue-284-dead-fragment.stderr | 8 + 3 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 tests/compiletests/ui/dis/issue-284-dead-fragment.rs create mode 100644 tests/compiletests/ui/dis/issue-284-dead-fragment.stderr diff --git a/crates/rustc_codegen_spirv/src/linker/mod.rs b/crates/rustc_codegen_spirv/src/linker/mod.rs index 6b5d7919b1..ad6c6aa7d2 100644 --- a/crates/rustc_codegen_spirv/src/linker/mod.rs +++ b/crates/rustc_codegen_spirv/src/linker/mod.rs @@ -23,7 +23,7 @@ use crate::custom_decorations::{CustomDecoration, SrcLocDecoration, ZombieDecora use crate::custom_insts; use either::Either; use rspirv::binary::{Assemble, Consumer}; -use rspirv::dr::{Block, Loader, Module, ModuleHeader, Operand}; +use rspirv::dr::{Block, Function, Loader, Module, ModuleHeader, Operand}; use rspirv::spirv::{Op, StorageClass, Word}; use rustc_data_structures::fx::FxHashMap; use rustc_errors::ErrorGuaranteed; @@ -710,6 +710,9 @@ pub fn link( dce::dce(output); } + // Validate fragment shaders after DCE to catch silent optimization failures + validate_fragment_shader_outputs(sess, output)?; + { let _timer = sess.timer("link_remove_duplicate_debuginfo"); duplicates::remove_duplicate_debuginfo(output); @@ -820,3 +823,157 @@ impl Drop for SpirtDumpGuard<'_> { } } } + +/// Validate that fragment shaders have meaningful output operations +/// This catches the case described in issue #284 where fragment shaders +/// are optimized to have no output, causing silent rendering failures +fn validate_fragment_shader_outputs(sess: &Session, module: &Module) -> Result<()> { + use rspirv::spirv::{ExecutionModel, Op}; + + // Find all fragment entry points + for entry in &module.entry_points { + if entry.class.opcode == Op::EntryPoint { + if let Some(execution_model) = entry.operands.first() { + if execution_model.unwrap_execution_model() == ExecutionModel::Fragment { + let function_id = entry.operands[1].unwrap_id_ref(); + let entry_name = entry.operands[2].unwrap_literal_string(); + + // Check if this fragment shader has meaningful output operations + if !fragment_shader_writes_output(module, function_id) { + let mut err = sess.dcx().struct_err(format!( + "fragment shader `{}` produces no output", + entry_name + )); + + err = err.with_help( + "fragment shaders must write to output parameters to produce visible results" + ).with_note( + "use complete assignment like `*out_frag_color = vec4(r, g, b, a)` instead of partial component assignments" + ).with_note( + "partial component assignments may be optimized away if not all components are written" + ); + + // Look for the function to provide better diagnostics + if let Some(func) = module + .functions + .iter() + .find(|f| f.def_id() == Some(function_id)) + { + if has_partial_output_writes(module, func) { + err = err.with_note( + "detected partial component writes (e.g., `out.x = value`) which were optimized away" + ).with_help( + "write all components at once: `*out_frag_color = vec4(r, g, b, 1.0)`" + ); + } + } + + return Err(err.emit()); + } + } + } + } + } + + Ok(()) +} + +/// Check if a fragment shader function has any meaningful output writes +fn fragment_shader_writes_output(module: &Module, function_id: Word) -> bool { + // Find the function definition + let function = match module + .functions + .iter() + .find(|f| f.def_id() == Some(function_id)) + { + Some(func) => func, + None => return true, // If function not found, assume it's valid + }; + + // Check all instructions in the function for output writes + for block in &function.blocks { + for inst in &block.instructions { + if inst.class.opcode == Op::Store { + if let Some(target_id) = inst.operands.first().and_then(|op| op.id_ref_any()) { + if is_output_storage_variable(module, target_id) { + return true; + } + } + } + + // Check function calls recursively + if inst.class.opcode == Op::FunctionCall { + if let Some(callee_id) = inst.operands.first().and_then(|op| op.id_ref_any()) { + if fragment_shader_writes_output(module, callee_id) { + return true; + } + } + } + } + } + + false +} + +/// Check if a fragment shader has partial output writes that might have been optimized away +fn has_partial_output_writes(module: &Module, function: &Function) -> bool { + use rspirv::spirv::Op; + + // Look for AccessChain operations on output variables + // This suggests the shader was trying to write individual components + for block in &function.blocks { + for inst in &block.instructions { + if matches!(inst.class.opcode, Op::AccessChain | Op::InBoundsAccessChain) { + if let Some(base_id) = inst.operands.first().and_then(|op| op.id_ref_any()) { + if is_output_storage_variable(module, base_id) { + return true; + } + } + } + } + } + + false +} + +/// Check if a variable ID refers to an Output storage class variable +fn is_output_storage_variable(module: &Module, var_id: Word) -> bool { + use rspirv::spirv::{Op, StorageClass}; + + // Check direct output variables + for inst in &module.types_global_values { + if inst.result_id == Some(var_id) && inst.class.opcode == Op::Variable { + if let Some(storage_class) = inst.operands.first() { + return storage_class.unwrap_storage_class() == StorageClass::Output; + } + } + } + + // Check if this is a pointer derived from an output variable + for inst in &module.types_global_values { + if inst.result_id == Some(var_id) + && matches!(inst.class.opcode, Op::AccessChain | Op::InBoundsAccessChain) + { + if let Some(base_id) = inst.operands.first().and_then(|op| op.id_ref_any()) { + return is_output_storage_variable(module, base_id); + } + } + } + + // Check in function bodies for derived pointers + for function in &module.functions { + for block in &function.blocks { + for inst in &block.instructions { + if inst.result_id == Some(var_id) + && matches!(inst.class.opcode, Op::AccessChain | Op::InBoundsAccessChain) + { + if let Some(base_id) = inst.operands.first().and_then(|op| op.id_ref_any()) { + return is_output_storage_variable(module, base_id); + } + } + } + } + } + + false +} diff --git a/tests/compiletests/ui/dis/issue-284-dead-fragment.rs b/tests/compiletests/ui/dis/issue-284-dead-fragment.rs new file mode 100644 index 0000000000..7506d02de0 --- /dev/null +++ b/tests/compiletests/ui/dis/issue-284-dead-fragment.rs @@ -0,0 +1,12 @@ +//@ compile-flags: --crate-type dylib --emit=metadata +// Test for issue #284: A fragment shader that produces no output should fail + +use spirv_std::spirv; + +#[spirv(fragment)] +pub fn main_fs(#[spirv(flat)] in_color: u32, out_frag_color: &mut spirv_std::glam::Vec4) { + // This fragment shader reads input but doesn't write output + // The assignment is optimized away, causing no visible output + let _temp = in_color; + // Note: No assignment to out_frag_color, so this shader produces no output +} diff --git a/tests/compiletests/ui/dis/issue-284-dead-fragment.stderr b/tests/compiletests/ui/dis/issue-284-dead-fragment.stderr new file mode 100644 index 0000000000..7386d31246 --- /dev/null +++ b/tests/compiletests/ui/dis/issue-284-dead-fragment.stderr @@ -0,0 +1,8 @@ +error: fragment shader `main_fs` produces no output + | + = help: fragment shaders must write to output parameters to produce visible results + = note: use complete assignment like `*out_frag_color = vec4(r, g, b, a)` instead of partial component assignments + = note: partial component assignments may be optimized away if not all components are written + +error: aborting due to 1 previous error + From 9f0357541f3d5532e0349a6698b4c94ac51699f1 Mon Sep 17 00:00:00 2001 From: zmr233 Date: Thu, 19 Jun 2025 17:46:16 +0800 Subject: [PATCH 3/7] Remove codegen-backend config override This addresses maintainer feedback to keep the codegen-backend setting as a local-only configuration rather than in the committed repository. --- .cargo/config.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c052289fde..ab5eb3160a 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -14,10 +14,6 @@ rustflags = [ "-Zshare-generics=n", # =off is also an option, but you're going to increase binary size in doing so. ] -# Override parent directory's cranelift backend setting for rust-gpu compatibility -[profile.dev] -codegen-backend = "llvm" - [target.'cfg(all())'] rustflags = [ # FIXME(eddyb) update/review these lints. From 623613ee277a7bd8e4ea8ebdf30543f0f43c9425 Mon Sep 17 00:00:00 2001 From: zmr233 Date: Thu, 26 Jun 2025 13:14:45 +0800 Subject: [PATCH 4/7] Fix comma-separated llvm-args parsing in CodegenArgs::from_session Previously, when multiple llvm-args were passed as comma-separated values (e.g., `-C llvm-args=--disassemble-fn=foo,--allow-fragment-no-output`), they were treated as a single argument instead of being properly split. This change modifies CodegenArgs::from_session to: - Split comma-separated llvm-args into individual arguments - Preserve existing functionality for single arguments - Enable proper parsing of multiple compiler flags Fixes parameter processing for compound llvm-args usage in rust-gpu. --- crates/rustc_codegen_spirv/src/codegen_cx/mod.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs b/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs index f3a3828018..57f62dc6b3 100644 --- a/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs +++ b/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs @@ -337,7 +337,14 @@ pub struct CodegenArgs { impl CodegenArgs { pub fn from_session(sess: &Session) -> Self { - match CodegenArgs::parse(&sess.opts.cg.llvm_args) { + // Split comma-separated arguments within each llvm_args entry + // This handles cases like "--disassemble-fn=foo,--allow-fragment-no-output" + let expanded_args: Vec = sess.opts.cg.llvm_args + .iter() + .flat_map(|arg| arg.split(',').map(|s| s.to_string())) + .collect(); + + match CodegenArgs::parse(&expanded_args) { Ok(ok) => ok, Err(err) => sess .dcx() @@ -420,6 +427,11 @@ impl CodegenArgs { "disables SPIR-V Storage Class inference", ); opts.optflag("", "no-structurize", "disables CFG structurization"); + opts.optflag( + "", + "allow-fragment-no-output", + "allow fragment shaders with no output operations", + ); opts.optmulti( "", @@ -628,6 +640,7 @@ impl CodegenArgs { // FIXME(eddyb) deduplicate between `CodegenArgs` and `linker::Options`. spirv_metadata, keep_link_exports: false, + allow_fragment_no_output: matches.opt_present("allow-fragment-no-output"), // NOTE(eddyb) these are debugging options that used to be env vars // (for more information see `docs/src/codegen-args.md`). From c097666c70b419b8945359610157b9e6409e5db3 Mon Sep 17 00:00:00 2001 From: zmr233 Date: Thu, 26 Jun 2025 13:15:32 +0800 Subject: [PATCH 5/7] Add --allow-fragment-no-output compiler flag to bypass fragment shader validation Implements a new compiler flag that allows fragment shaders with no output operations to compile without errors. This addresses issue #284 where fragment shaders optimized by DCE (Dead Code Elimination) would fail validation even when the lack of output was intentional. Changes: - Add `allow_fragment_no_output` field to linker Options struct - Add command-line flag parsing for `--allow-fragment-no-output` - Skip fragment shader output validation when flag is enabled - Update error message to include usage hint for the new flag This flag is intended for testing scenarios and special use cases where fragment shaders legitimately produce no output. The validation remains active by default to catch unintentional issues. --- crates/rustc_codegen_spirv/src/linker/mod.rs | 11 ++++++++++- .../ui/dis/issue-284-dead-fragment.stderr | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/rustc_codegen_spirv/src/linker/mod.rs b/crates/rustc_codegen_spirv/src/linker/mod.rs index ad6c6aa7d2..15d2ad5d88 100644 --- a/crates/rustc_codegen_spirv/src/linker/mod.rs +++ b/crates/rustc_codegen_spirv/src/linker/mod.rs @@ -55,6 +55,9 @@ pub struct Options { /// **Note**: currently only used for unit testing, and not exposed elsewhere. pub keep_link_exports: bool, + /// Allow fragment shaders with no output operations (disables Issue #284 validation) + pub allow_fragment_no_output: bool, + // NOTE(eddyb) these are debugging options that used to be env vars // (for more information see `docs/src/codegen-args.md`). pub dump_post_merge: Option, @@ -711,7 +714,9 @@ pub fn link( } // Validate fragment shaders after DCE to catch silent optimization failures - validate_fragment_shader_outputs(sess, output)?; + if !opts.allow_fragment_no_output { + validate_fragment_shader_outputs(sess, output)?; + } { let _timer = sess.timer("link_remove_duplicate_debuginfo"); @@ -851,6 +856,8 @@ fn validate_fragment_shader_outputs(sess: &Session, module: &Module) -> Result<( "use complete assignment like `*out_frag_color = vec4(r, g, b, a)` instead of partial component assignments" ).with_note( "partial component assignments may be optimized away if not all components are written" + ).with_note( + "to disable this validation (e.g. for testing), use `--allow-fragment-no-output`" ); // Look for the function to provide better diagnostics @@ -864,6 +871,8 @@ fn validate_fragment_shader_outputs(sess: &Session, module: &Module) -> Result<( "detected partial component writes (e.g., `out.x = value`) which were optimized away" ).with_help( "write all components at once: `*out_frag_color = vec4(r, g, b, 1.0)`" + ).with_note( + "alternatively, use `--allow-fragment-no-output` to disable this validation" ); } } diff --git a/tests/compiletests/ui/dis/issue-284-dead-fragment.stderr b/tests/compiletests/ui/dis/issue-284-dead-fragment.stderr index 7386d31246..20f9aae5f5 100644 --- a/tests/compiletests/ui/dis/issue-284-dead-fragment.stderr +++ b/tests/compiletests/ui/dis/issue-284-dead-fragment.stderr @@ -3,6 +3,7 @@ error: fragment shader `main_fs` produces no output = help: fragment shaders must write to output parameters to produce visible results = note: use complete assignment like `*out_frag_color = vec4(r, g, b, a)` instead of partial component assignments = note: partial component assignments may be optimized away if not all components are written + = note: to disable this validation (e.g. for testing), use `--allow-fragment-no-output` error: aborting due to 1 previous error From 05010c17eea2b21f50aa2c5f3734e3e9dda6df45 Mon Sep 17 00:00:00 2001 From: zmr233 Date: Thu, 26 Jun 2025 13:16:22 +0800 Subject: [PATCH 6/7] Update fragment shader tests to use --allow-fragment-no-output flag Updates 190 fragment shader test files to include the new --allow-fragment-no-output compiler flag, allowing them to compile successfully despite producing no output operations. Changes: - Add `--allow-fragment-no-output` flag to fragment shader tests - Handle both new compile-flags lines and comma-separated additions to existing llvm-args parameters - Update corresponding .stderr files to reflect new line numbers - Preserve issue-284-dead-fragment.rs test to validate error detection This ensures all existing fragment shader tests pass while maintaining the ability to detect genuine fragment shader output issues through the dedicated error test case. --- tests/compiletests/ui/arch/all.rs | 1 + tests/compiletests/ui/arch/all.stderr | 4 +- tests/compiletests/ui/arch/any.rs | 1 + tests/compiletests/ui/arch/any.stderr | 4 +- tests/compiletests/ui/arch/control_barrier.rs | 1 + tests/compiletests/ui/arch/debug_printf.rs | 1 + .../ui/arch/debug_printf_type_checking.rs | 1 + .../ui/arch/debug_printf_type_checking.stderr | 72 ++++++------ .../ui/arch/demote_to_helper_invocation.rs | 1 + tests/compiletests/ui/arch/derivative.rs | 2 +- .../ui/arch/derivative_control.rs | 2 +- tests/compiletests/ui/arch/index_unchecked.rs | 1 + .../ui/arch/integer_min_and_max.rs | 1 + tests/compiletests/ui/arch/kill.rs | 1 + tests/compiletests/ui/arch/memory_barrier.rs | 1 + .../ray_query_confirm_intersection_khr.rs | 1 + ...query_get_intersection_barycentrics_khr.rs | 1 + ..._intersection_candidate_aabb_opaque_khr.rs | 1 + ...y_query_get_intersection_front_face_khr.rs | 1 + ...ery_get_intersection_geometry_index_khr.rs | 1 + ..._intersection_instance_custom_index_khr.rs | 1 + ..._query_get_intersection_instance_id_khr.rs | 1 + ...t_intersection_object_ray_direction_khr.rs | 1 + ..._get_intersection_object_ray_origin_khr.rs | 1 + ...ry_get_intersection_object_to_world_khr.rs | 1 + ...ry_get_intersection_primitive_index_khr.rs | 1 + ..._shader_binding_table_record_offset_khr.rs | 1 + .../arch/ray_query_get_intersection_t_khr.rs | 1 + .../ray_query_get_intersection_type_khr.rs | 1 + .../ui/arch/ray_query_get_ray_flags_khr.rs | 1 + .../ui/arch/ray_query_get_ray_t_min_khr.rs | 1 + .../ray_query_get_world_ray_direction_khr.rs | 1 + .../ray_query_get_world_ray_origin_khr.rs | 1 + .../ui/arch/ray_query_initialize_khr.rs | 1 + .../ui/arch/ray_query_terminate_khr.rs | 1 + tests/compiletests/ui/arch/read_clock_khr.rs | 1 + .../ui/arch/vector_extract_dynamic.rs | 1 + .../ui/arch/vector_insert_dynamic.rs | 1 + .../ui/byte_addressable_buffer/arr.rs | 1 + .../ui/byte_addressable_buffer/big_struct.rs | 1 + .../ui/byte_addressable_buffer/complex.rs | 1 + .../byte_addressable_buffer/empty_struct.rs | 1 + .../ui/byte_addressable_buffer/f32.rs | 1 + .../byte_addressable_buffer/small_struct.rs | 1 + .../ui/byte_addressable_buffer/u32.rs | 1 + .../ui/byte_addressable_buffer/vec.rs | 1 + tests/compiletests/ui/dis/add_two_ints.rs | 2 +- tests/compiletests/ui/dis/asm.rs | 2 +- tests/compiletests/ui/dis/asm_add_two_ints.rs | 2 +- tests/compiletests/ui/dis/asm_op_decorate.rs | 2 +- .../ui/dis/complex_image_sample_inst.rs | 2 +- .../ui/dis/custom_entry_point.stderr | 23 ++-- .../ui/dis/entry-pass-mode-cast-array.rs | 2 +- .../compiletests/ui/dis/generic-fn-op-name.rs | 2 +- tests/compiletests/ui/dis/index_user_dst.rs | 2 +- tests/compiletests/ui/dis/issue-1062.rs | 2 +- tests/compiletests/ui/dis/issue-373.rs | 2 +- tests/compiletests/ui/dis/issue-723-output.rs | 2 +- tests/compiletests/ui/dis/issue-731.rs | 2 +- .../ui/dis/non-writable-storage_buffer.rs | 2 +- .../ui/dis/panic_builtin_bounds_check.rs | 2 +- .../ui/dis/panic_sequential_many.rs | 2 +- .../ui/dis/pass-mode-cast-struct.rs | 2 +- tests/compiletests/ui/dis/ptr_copy.rs | 2 +- tests/compiletests/ui/dis/ptr_read.rs | 2 +- tests/compiletests/ui/dis/ptr_read_method.rs | 2 +- tests/compiletests/ui/dis/ptr_write.rs | 2 +- tests/compiletests/ui/dis/ptr_write_method.rs | 2 +- .../compiletests/ui/dis/spec_constant-attr.rs | 2 +- .../ui/glam/mat3_vec3_multiply.rs | 1 + tests/compiletests/ui/hello_world.rs | 1 + tests/compiletests/ui/image/components.rs | 1 + tests/compiletests/ui/image/fetch.rs | 1 + tests/compiletests/ui/image/format.rs | 1 + tests/compiletests/ui/image/gather.rs | 1 + tests/compiletests/ui/image/gather_err.rs | 1 + tests/compiletests/ui/image/gather_err.stderr | 8 +- tests/compiletests/ui/image/image_with.rs | 1 + tests/compiletests/ui/image/issue-330.rs | 1 + .../ui/image/query/cubemap_query_size.rs | 1 + .../ui/image/query/query_levels.rs | 1 + .../ui/image/query/query_levels_err.rs | 1 + .../ui/image/query/query_levels_err.stderr | 4 +- .../compiletests/ui/image/query/query_lod.rs | 1 + .../ui/image/query/query_lod_err.rs | 1 + .../ui/image/query/query_lod_err.stderr | 4 +- .../ui/image/query/query_samples.rs | 1 + .../compiletests/ui/image/query/query_size.rs | 1 + .../ui/image/query/query_size_err.rs | 1 + .../ui/image/query/query_size_err.stderr | 4 +- .../ui/image/query/query_size_lod.rs | 1 + .../ui/image/query/query_size_lod_err.rs | 1 + .../ui/image/query/query_size_lod_err.stderr | 4 +- .../ui/image/query/rect_image_query_size.rs | 1 + .../sampled_image_multisampled_query_size.rs | 1 + .../image/query/sampled_image_query_size.rs | 1 + .../sampled_image_rect_query_size_lod_err.rs | 1 + .../image/query/storage_image_query_size.rs | 1 + tests/compiletests/ui/image/read.rs | 1 + tests/compiletests/ui/image/read_subpass.rs | 1 + tests/compiletests/ui/image/sample.rs | 1 + tests/compiletests/ui/image/sample_bias.rs | 1 + .../ui/image/sample_depth_reference/sample.rs | 1 + .../sample_depth_reference/sample_gradient.rs | 1 + .../sample_depth_reference/sample_lod.rs | 1 + .../sample.rs | 1 + .../sample_gradient.rs | 1 + .../sample_lod.rs | 1 + .../compiletests/ui/image/sample_gradient.rs | 1 + tests/compiletests/ui/image/sample_lod.rs | 1 + .../sample_with_project_coordinate/sample.rs | 1 + .../sample_gradient.rs | 1 + .../sample_lod.rs | 1 + tests/compiletests/ui/image/write.rs | 1 + .../ui/lang/asm/block_tracking_fail.rs | 1 + .../ui/lang/asm/block_tracking_fail.stderr | 20 ++-- .../ui/lang/asm/block_tracking_pass.rs | 1 + tests/compiletests/ui/lang/asm/const_args.rs | 1 + .../ui/lang/asm/infer-access-chain-array.rs | 1 + .../ui/lang/asm/infer-access-chain-slice.rs | 1 + tests/compiletests/ui/lang/asm/issue-1002.rs | 1 + .../ui/lang/asm/issue-1002.stderr | 46 ++++---- .../compiletests/ui/lang/consts/issue-1024.rs | 1 + .../compiletests/ui/lang/consts/issue-329.rs | 1 + .../compiletests/ui/lang/consts/issue-834.rs | 1 + .../ui/lang/consts/nested-ref-in-composite.rs | 1 + .../consts/nested-ref-in-composite.stderr | 24 ++-- .../compiletests/ui/lang/consts/nested-ref.rs | 1 + .../ui/lang/consts/nested-ref.stderr | 8 +- .../ui/lang/consts/shallow-ref.rs | 1 + .../ui/lang/control_flow/closure_multi.rs | 1 + .../ui/lang/control_flow/defer.rs | 1 + .../ui/lang/control_flow/for_range.rs | 1 + .../ui/lang/control_flow/for_range_signed.rs | 1 + .../for_with_custom_range_iter.rs | 1 + tests/compiletests/ui/lang/control_flow/if.rs | 1 + .../ui/lang/control_flow/if_else.rs | 1 + .../ui/lang/control_flow/if_else_if_else.rs | 1 + .../ui/lang/control_flow/if_if.rs | 1 + .../ui/lang/control_flow/if_return_else.rs | 1 + .../control_flow/if_return_else_return.rs | 1 + .../ui/lang/control_flow/if_while.rs | 1 + .../compiletests/ui/lang/control_flow/ifx2.rs | 1 + .../ui/lang/control_flow/issue_283.rs | 1 + .../compiletests/ui/lang/control_flow/loop.rs | 1 + .../ui/lang/control_flow/while.rs | 1 + .../ui/lang/control_flow/while_break.rs | 1 + .../ui/lang/control_flow/while_continue.rs | 1 + .../ui/lang/control_flow/while_if_break.rs | 1 + .../control_flow/while_if_break_else_break.rs | 1 + .../control_flow/while_if_break_if_break.rs | 1 + .../ui/lang/control_flow/while_if_continue.rs | 1 + .../while_if_continue_else_continue.rs | 1 + .../ui/lang/control_flow/while_return.rs | 1 + .../ui/lang/control_flow/while_while.rs | 1 + .../ui/lang/control_flow/while_while_break.rs | 1 + .../lang/control_flow/while_while_continue.rs | 1 + .../lang/control_flow/while_while_if_break.rs | 1 + .../control_flow/while_while_if_continue.rs | 1 + .../ui/lang/core/array/init_array_i16.rs | 1 + .../ui/lang/core/array/init_array_i32.rs | 1 + .../ui/lang/core/array/init_array_i64.rs | 1 + .../ui/lang/core/array/init_array_i8.rs | 1 + .../ui/lang/core/intrinsics/leading_zeros.rs | 1 + .../ui/lang/core/intrinsics/trailing_zeros.rs | 1 + .../core/mem/create_unitialized_memory.rs | 1 + .../ui/lang/core/ops/logical_and.rs | 1 + .../ui/lang/core/ops/range-contains.rs | 1 + .../ui/lang/core/ptr/allocate_const_scalar.rs | 1 + .../core/ptr/allocate_const_scalar.stderr | 12 +- .../ui/lang/core/ptr/allocate_null.rs | 1 + .../ui/lang/core/ptr/allocate_vec_like.rs | 1 + .../ui/lang/core/ptr/allocate_vec_like.stderr | 4 +- .../ui/lang/core/ref/member_ref_arg-broken.rs | 1 + .../core/ref/member_ref_arg-broken.stderr | 16 +-- .../ui/lang/core/ref/member_ref_arg.rs | 1 + .../ui/lang/core/ref/member_ref_arg.stderr | 8 +- .../core/ref/zst_member_ref_arg-broken.rs | 1 + .../core/ref/zst_member_ref_arg-broken.stderr | 108 +++++++++--------- .../ui/lang/core/ref/zst_member_ref_arg.rs | 1 + tests/compiletests/ui/lang/core/unwrap_or.rs | 2 +- tests/compiletests/ui/lang/f32/packing.rs | 1 + tests/compiletests/ui/lang/f32/signum.rs | 1 + tests/compiletests/ui/lang/issue-415.rs | 1 + tests/compiletests/ui/lang/issue-46.rs | 1 + tests/compiletests/ui/lang/issue-836.rs | 1 + tests/compiletests/ui/lang/panic/builtin.rs | 1 + .../ui/lang/panic/builtin_bounds_check.rs | 1 + tests/compiletests/ui/lang/panic/simple.rs | 1 + .../ui/lang/panic/track_caller.rs | 1 + .../ui/lang/panic/track_caller.stderr | 4 +- tests/compiletests/ui/lang/u32/bit_reverse.rs | 1 + tests/compiletests/ui/lang/u32/count_ones.rs | 1 + .../ui/spirv-attr/all-builtins.rs | 1 + .../ui/spirv-attr/bool-inputs-err.rs | 1 + .../ui/spirv-attr/bool-inputs-err.stderr | 16 +-- .../compiletests/ui/spirv-attr/bool-inputs.rs | 1 + .../ui/spirv-attr/int-without-flat.rs | 1 + .../ui/spirv-attr/int-without-flat.stderr | 8 +- .../spirv-attr/invalid-matrix-type-empty.rs | 1 + .../invalid-matrix-type-empty.stderr | 4 +- .../ui/spirv-attr/invalid-matrix-type.rs | 1 + .../ui/spirv-attr/invalid-matrix-type.stderr | 12 +- .../compiletests/ui/spirv-attr/matrix-type.rs | 1 + .../ui/storage_class/mutability-errors.rs | 1 + .../ui/storage_class/mutability-errors.stderr | 52 ++++----- .../ui/storage_class/push_constant.rs | 1 + .../storage_class/runtime_descriptor_array.rs | 1 + .../runtime_descriptor_array_error.rs | 1 + .../runtime_descriptor_array_error.stderr | 8 +- .../ui/storage_class/storage_buffer-dst.rs | 1 + .../ui/storage_class/typed_buffer.rs | 1 + .../typed_buffer_descriptor_array.rs | 1 + .../typed_buffer_descriptor_array_slice.rs | 1 + .../ui/storage_class/typed_buffer_slice.rs | 1 + 215 files changed, 426 insertions(+), 266 deletions(-) diff --git a/tests/compiletests/ui/arch/all.rs b/tests/compiletests/ui/arch/all.rs index 088e07f0a5..1575c30fa8 100644 --- a/tests/compiletests/ui/arch/all.rs +++ b/tests/compiletests/ui/arch/all.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output #![feature(repr_simd)] diff --git a/tests/compiletests/ui/arch/all.stderr b/tests/compiletests/ui/arch/all.stderr index beed8baf22..c9dc83fdc7 100644 --- a/tests/compiletests/ui/arch/all.stderr +++ b/tests/compiletests/ui/arch/all.stderr @@ -1,7 +1,7 @@ warning: [Rust-GPU] temporarily re-allowing old-style `#[repr(simd)]` (with fields) - --> $DIR/all.rs:16:1 + --> $DIR/all.rs:17:1 | -16 | struct Vec2(T, T); +17 | struct Vec2(T, T); | ^^^^^^^^^^^^^^ | = note: removed upstream by https://github.com/rust-lang/rust/pull/129403 diff --git a/tests/compiletests/ui/arch/any.rs b/tests/compiletests/ui/arch/any.rs index 9e8e1d2f3f..da1ec13dca 100644 --- a/tests/compiletests/ui/arch/any.rs +++ b/tests/compiletests/ui/arch/any.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output #![feature(repr_simd)] diff --git a/tests/compiletests/ui/arch/any.stderr b/tests/compiletests/ui/arch/any.stderr index c01af8f3ba..df53931a56 100644 --- a/tests/compiletests/ui/arch/any.stderr +++ b/tests/compiletests/ui/arch/any.stderr @@ -1,7 +1,7 @@ warning: [Rust-GPU] temporarily re-allowing old-style `#[repr(simd)]` (with fields) - --> $DIR/any.rs:16:1 + --> $DIR/any.rs:17:1 | -16 | struct Vec2(T, T); +17 | struct Vec2(T, T); | ^^^^^^^^^^^^^^ | = note: removed upstream by https://github.com/rust-lang/rust/pull/129403 diff --git a/tests/compiletests/ui/arch/control_barrier.rs b/tests/compiletests/ui/arch/control_barrier.rs index 4947f4f19e..8586876e51 100644 --- a/tests/compiletests/ui/arch/control_barrier.rs +++ b/tests/compiletests/ui/arch/control_barrier.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/compiletests/ui/arch/debug_printf.rs b/tests/compiletests/ui/arch/debug_printf.rs index e396b2f538..8f153c92f1 100644 --- a/tests/compiletests/ui/arch/debug_printf.rs +++ b/tests/compiletests/ui/arch/debug_printf.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output // compile-flags: -Ctarget-feature=+ext:SPV_KHR_non_semantic_info use spirv_std::spirv; diff --git a/tests/compiletests/ui/arch/debug_printf_type_checking.rs b/tests/compiletests/ui/arch/debug_printf_type_checking.rs index 5efe7ecd3a..bc87b8b214 100644 --- a/tests/compiletests/ui/arch/debug_printf_type_checking.rs +++ b/tests/compiletests/ui/arch/debug_printf_type_checking.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail // normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/" // compile-flags: -Ctarget-feature=+ext:SPV_KHR_non_semantic_info diff --git a/tests/compiletests/ui/arch/debug_printf_type_checking.stderr b/tests/compiletests/ui/arch/debug_printf_type_checking.stderr index b8ce41a270..9543a0721b 100644 --- a/tests/compiletests/ui/arch/debug_printf_type_checking.stderr +++ b/tests/compiletests/ui/arch/debug_printf_type_checking.stderr @@ -1,76 +1,76 @@ error: Unterminated format specifier: missing type after precision - --> $DIR/debug_printf_type_checking.rs:11:23 + --> $DIR/debug_printf_type_checking.rs:12:23 | -11 | debug_printf!("%1"); +12 | debug_printf!("%1"); | ^^^^ error: Unterminated format specifier: missing type after decimal point - --> $DIR/debug_printf_type_checking.rs:12:23 + --> $DIR/debug_printf_type_checking.rs:13:23 | -12 | debug_printf!("%1."); +13 | debug_printf!("%1."); | ^^^^^ error: Unrecognised format specifier: '.' - --> $DIR/debug_printf_type_checking.rs:13:23 + --> $DIR/debug_printf_type_checking.rs:14:23 | -13 | debug_printf!("%."); +14 | debug_printf!("%."); | ^^^^ error: Unrecognised format specifier: '.' - --> $DIR/debug_printf_type_checking.rs:14:23 + --> $DIR/debug_printf_type_checking.rs:15:23 | -14 | debug_printf!("%.1"); +15 | debug_printf!("%.1"); | ^^^^^ error: Unterminated format specifier: missing type after fraction precision - --> $DIR/debug_printf_type_checking.rs:15:23 + --> $DIR/debug_printf_type_checking.rs:16:23 | -15 | debug_printf!("%1.1"); +16 | debug_printf!("%1.1"); | ^^^^^^ error: Missing vector dimensions specifier - --> $DIR/debug_printf_type_checking.rs:16:23 + --> $DIR/debug_printf_type_checking.rs:17:23 | -16 | debug_printf!("%1.1v"); +17 | debug_printf!("%1.1v"); | ^^^^^^^ error: Invalid width for vector: 5 - --> $DIR/debug_printf_type_checking.rs:17:23 + --> $DIR/debug_printf_type_checking.rs:18:23 | -17 | debug_printf!("%1.1v5"); +18 | debug_printf!("%1.1v5"); | ^^^^^^^^ error: Missing vector type specifier - --> $DIR/debug_printf_type_checking.rs:18:23 + --> $DIR/debug_printf_type_checking.rs:19:23 | -18 | debug_printf!("%1.1v2"); +19 | debug_printf!("%1.1v2"); | ^^^^^^^^ error: Unrecognised vector type specifier: 'r' - --> $DIR/debug_printf_type_checking.rs:19:23 + --> $DIR/debug_printf_type_checking.rs:20:23 | -19 | debug_printf!("%1.1v2r"); +20 | debug_printf!("%1.1v2r"); | ^^^^^^^^^ error: Unrecognised format specifier: 'r' - --> $DIR/debug_printf_type_checking.rs:20:23 + --> $DIR/debug_printf_type_checking.rs:21:23 | -20 | debug_printf!("%r", 11_i32); +21 | debug_printf!("%r", 11_i32); | ^^^^ error[E0308]: mismatched types - --> $DIR/debug_printf_type_checking.rs:21:29 + --> $DIR/debug_printf_type_checking.rs:22:29 | -21 | debug_printf!("%f", 11_u32); +22 | 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 + --> $DIR/debug_printf_type_checking.rs:22:9 | -21 | debug_printf!("%f", 11_u32); +22 | debug_printf!("%f", 11_u32); | ^^^^^^^^^^^^^^^^^^^^------^ | | | this argument influences the return type of `spirv_std` @@ -82,22 +82,22 @@ note: function defined here = 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_f32); +22 | debug_printf!("%f", 11_f32); | ~~~ error[E0308]: mismatched types - --> $DIR/debug_printf_type_checking.rs:22:29 + --> $DIR/debug_printf_type_checking.rs:23:29 | -22 | debug_printf!("%u", 11.0_f32); +23 | 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 + --> $DIR/debug_printf_type_checking.rs:23:9 | -22 | debug_printf!("%u", 11.0_f32); +23 | debug_printf!("%u", 11.0_f32); | ^^^^^^^^^^^^^^^^^^^^--------^ | | | this argument influences the return type of `spirv_std` @@ -109,13 +109,13 @@ note: function defined here = 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", 11u32); +23 | debug_printf!("%u", 11u32); | ~~~ error[E0277]: the trait bound `{float}: Vector` is not satisfied - --> $DIR/debug_printf_type_checking.rs:23:9 + --> $DIR/debug_printf_type_checking.rs:24:9 | -23 | debug_printf!("%v2f", 11.0); +24 | debug_printf!("%v2f", 11.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Vector` is not implemented for `{float}` | = help: the following other types implement trait `Vector`: @@ -139,18 +139,18 @@ note: required by a 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 + --> $DIR/debug_printf_type_checking.rs:25:29 | -24 | debug_printf!("%f", Vec2::splat(33.3)); +25 | 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 + --> $DIR/debug_printf_type_checking.rs:25:9 | -24 | debug_printf!("%f", Vec2::splat(33.3)); +25 | debug_printf!("%f", Vec2::splat(33.3)); | ^^^^^^^^^^^^^^^^^^^^-----------------^ | | | this argument influences the return type of `spirv_std` diff --git a/tests/compiletests/ui/arch/demote_to_helper_invocation.rs b/tests/compiletests/ui/arch/demote_to_helper_invocation.rs index 862b1f4a6b..a581190bb3 100644 --- a/tests/compiletests/ui/arch/demote_to_helper_invocation.rs +++ b/tests/compiletests/ui/arch/demote_to_helper_invocation.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output // // compile-flags: -C target-feature=+DemoteToHelperInvocationEXT,+ext:SPV_EXT_demote_to_helper_invocation diff --git a/tests/compiletests/ui/arch/derivative.rs b/tests/compiletests/ui/arch/derivative.rs index 06b63ab154..947ec02a2c 100644 --- a/tests/compiletests/ui/arch/derivative.rs +++ b/tests/compiletests/ui/arch/derivative.rs @@ -1,5 +1,5 @@ // build-pass -// compile-flags: -C llvm-args=--disassemble-fn=derivative::derivative +// compile-flags: -C llvm-args=--disassemble-fn=derivative::derivative,--allow-fragment-no-output use spirv_std::arch::Derivative; use spirv_std::spirv; diff --git a/tests/compiletests/ui/arch/derivative_control.rs b/tests/compiletests/ui/arch/derivative_control.rs index 3ff44dc4b4..5ca9852229 100644 --- a/tests/compiletests/ui/arch/derivative_control.rs +++ b/tests/compiletests/ui/arch/derivative_control.rs @@ -1,6 +1,6 @@ // build-pass // compile-flags: -C target-feature=+DerivativeControl -// compile-flags: -C llvm-args=--disassemble-fn=derivative_control::derivative +// compile-flags: -C llvm-args=--disassemble-fn=derivative_control::derivative,--allow-fragment-no-output use spirv_std::arch::Derivative; use spirv_std::spirv; diff --git a/tests/compiletests/ui/arch/index_unchecked.rs b/tests/compiletests/ui/arch/index_unchecked.rs index e4a6ad9c19..c2a6545a17 100644 --- a/tests/compiletests/ui/arch/index_unchecked.rs +++ b/tests/compiletests/ui/arch/index_unchecked.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::arch::IndexUnchecked; use spirv_std::spirv; diff --git a/tests/compiletests/ui/arch/integer_min_and_max.rs b/tests/compiletests/ui/arch/integer_min_and_max.rs index 3adeb183ab..22cf2e2094 100644 --- a/tests/compiletests/ui/arch/integer_min_and_max.rs +++ b/tests/compiletests/ui/arch/integer_min_and_max.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::arch::{signed_max, signed_min, unsigned_max, unsigned_min}; use spirv_std::spirv; diff --git a/tests/compiletests/ui/arch/kill.rs b/tests/compiletests/ui/arch/kill.rs index 62b2c9b1c2..40924bb93f 100644 --- a/tests/compiletests/ui/arch/kill.rs +++ b/tests/compiletests/ui/arch/kill.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/arch/memory_barrier.rs b/tests/compiletests/ui/arch/memory_barrier.rs index 3c6033b910..829d3d49ec 100644 --- a/tests/compiletests/ui/arch/memory_barrier.rs +++ b/tests/compiletests/ui/arch/memory_barrier.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output #![feature(adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/compiletests/ui/arch/ray_query_confirm_intersection_khr.rs b/tests/compiletests/ui/arch/ray_query_confirm_intersection_khr.rs index d75c69878c..24b7ec0395 100644 --- a/tests/compiletests/ui/arch/ray_query_confirm_intersection_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_confirm_intersection_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_barycentrics_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_barycentrics_khr.rs index 4e859c6fea..482a044430 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_barycentrics_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_barycentrics_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_candidate_aabb_opaque_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_candidate_aabb_opaque_khr.rs index 87376f005c..41bb529b21 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_candidate_aabb_opaque_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_candidate_aabb_opaque_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_front_face_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_front_face_khr.rs index ba6006988e..af1196b65f 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_front_face_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_front_face_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_geometry_index_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_geometry_index_khr.rs index 69323141d3..08af2a2ece 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_geometry_index_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_geometry_index_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_instance_custom_index_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_instance_custom_index_khr.rs index 2dfc5bb17e..4efa322ac9 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_instance_custom_index_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_instance_custom_index_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_instance_id_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_instance_id_khr.rs index 20b413deec..d5601d8153 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_instance_id_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_instance_id_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_object_ray_direction_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_object_ray_direction_khr.rs index 177490b1b2..35c93ece92 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_object_ray_direction_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_object_ray_direction_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_object_ray_origin_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_object_ray_origin_khr.rs index a0ea175b89..8df0ef6ae1 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_object_ray_origin_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_object_ray_origin_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_object_to_world_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_object_to_world_khr.rs index ac3f9c3ac7..91b548eaa7 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_object_to_world_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_object_to_world_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_primitive_index_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_primitive_index_khr.rs index a4f9ab84cc..1d1d739aa5 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_primitive_index_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_primitive_index_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_shader_binding_table_record_offset_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_shader_binding_table_record_offset_khr.rs index 159c4aa16d..f8a02e5f36 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_shader_binding_table_record_offset_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_shader_binding_table_record_offset_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_t_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_t_khr.rs index 39cd3dde59..f6362c9095 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_t_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_t_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_intersection_type_khr.rs b/tests/compiletests/ui/arch/ray_query_get_intersection_type_khr.rs index 39b848003e..3ec1bf4517 100644 --- a/tests/compiletests/ui/arch/ray_query_get_intersection_type_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_intersection_type_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_ray_flags_khr.rs b/tests/compiletests/ui/arch/ray_query_get_ray_flags_khr.rs index 816e808b93..29e1c675f5 100644 --- a/tests/compiletests/ui/arch/ray_query_get_ray_flags_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_ray_flags_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_ray_t_min_khr.rs b/tests/compiletests/ui/arch/ray_query_get_ray_t_min_khr.rs index b5c0d82c3f..ef9a0f0bbd 100644 --- a/tests/compiletests/ui/arch/ray_query_get_ray_t_min_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_ray_t_min_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_world_ray_direction_khr.rs b/tests/compiletests/ui/arch/ray_query_get_world_ray_direction_khr.rs index 1f579e38b5..2451906255 100644 --- a/tests/compiletests/ui/arch/ray_query_get_world_ray_direction_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_world_ray_direction_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_get_world_ray_origin_khr.rs b/tests/compiletests/ui/arch/ray_query_get_world_ray_origin_khr.rs index f56a47e67b..1bc1727891 100644 --- a/tests/compiletests/ui/arch/ray_query_get_world_ray_origin_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_get_world_ray_origin_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_initialize_khr.rs b/tests/compiletests/ui/arch/ray_query_initialize_khr.rs index ac2e5f0fab..b6ff60a652 100644 --- a/tests/compiletests/ui/arch/ray_query_initialize_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_initialize_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayTracingKHR,+RayQueryKHR,+ext:SPV_KHR_ray_tracing,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/ray_query_terminate_khr.rs b/tests/compiletests/ui/arch/ray_query_terminate_khr.rs index 02c5b4fde6..227cd10fda 100644 --- a/tests/compiletests/ui/arch/ray_query_terminate_khr.rs +++ b/tests/compiletests/ui/arch/ray_query_terminate_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayQueryKHR,+ext:SPV_KHR_ray_query +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec3; use spirv_std::ray_tracing::{AccelerationStructure, RayFlags, RayQuery}; diff --git a/tests/compiletests/ui/arch/read_clock_khr.rs b/tests/compiletests/ui/arch/read_clock_khr.rs index 681388db1b..ea71c8cd13 100644 --- a/tests/compiletests/ui/arch/read_clock_khr.rs +++ b/tests/compiletests/ui/arch/read_clock_khr.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+Int64,+ShaderClockKHR,+ext:SPV_KHR_shader_clock +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::UVec2; use spirv_std::spirv; diff --git a/tests/compiletests/ui/arch/vector_extract_dynamic.rs b/tests/compiletests/ui/arch/vector_extract_dynamic.rs index 7cd86580cc..1e064d40ba 100644 --- a/tests/compiletests/ui/arch/vector_extract_dynamic.rs +++ b/tests/compiletests/ui/arch/vector_extract_dynamic.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpVectorExtractDynamic` // build-pass diff --git a/tests/compiletests/ui/arch/vector_insert_dynamic.rs b/tests/compiletests/ui/arch/vector_insert_dynamic.rs index b66a4b1a85..4e35bac8db 100644 --- a/tests/compiletests/ui/arch/vector_insert_dynamic.rs +++ b/tests/compiletests/ui/arch/vector_insert_dynamic.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpVectorInsertDynamic` // build-pass diff --git a/tests/compiletests/ui/byte_addressable_buffer/arr.rs b/tests/compiletests/ui/byte_addressable_buffer/arr.rs index b9396ffb85..32cc429d89 100644 --- a/tests/compiletests/ui/byte_addressable_buffer/arr.rs +++ b/tests/compiletests/ui/byte_addressable_buffer/arr.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{ByteAddressableBuffer, glam::Vec4}; diff --git a/tests/compiletests/ui/byte_addressable_buffer/big_struct.rs b/tests/compiletests/ui/byte_addressable_buffer/big_struct.rs index 5ffe96c097..191ee82abd 100644 --- a/tests/compiletests/ui/byte_addressable_buffer/big_struct.rs +++ b/tests/compiletests/ui/byte_addressable_buffer/big_struct.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::ByteAddressableBuffer; use spirv_std::spirv; diff --git a/tests/compiletests/ui/byte_addressable_buffer/complex.rs b/tests/compiletests/ui/byte_addressable_buffer/complex.rs index 1932755415..1769821be3 100644 --- a/tests/compiletests/ui/byte_addressable_buffer/complex.rs +++ b/tests/compiletests/ui/byte_addressable_buffer/complex.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{ByteAddressableBuffer, glam::Vec2}; diff --git a/tests/compiletests/ui/byte_addressable_buffer/empty_struct.rs b/tests/compiletests/ui/byte_addressable_buffer/empty_struct.rs index e8afc34c4c..4adbe54bc7 100644 --- a/tests/compiletests/ui/byte_addressable_buffer/empty_struct.rs +++ b/tests/compiletests/ui/byte_addressable_buffer/empty_struct.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::ByteAddressableBuffer; use spirv_std::spirv; diff --git a/tests/compiletests/ui/byte_addressable_buffer/f32.rs b/tests/compiletests/ui/byte_addressable_buffer/f32.rs index 602016a10d..4ea0c40716 100644 --- a/tests/compiletests/ui/byte_addressable_buffer/f32.rs +++ b/tests/compiletests/ui/byte_addressable_buffer/f32.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::ByteAddressableBuffer; use spirv_std::spirv; diff --git a/tests/compiletests/ui/byte_addressable_buffer/small_struct.rs b/tests/compiletests/ui/byte_addressable_buffer/small_struct.rs index 2fb315ac13..6b57eeff22 100644 --- a/tests/compiletests/ui/byte_addressable_buffer/small_struct.rs +++ b/tests/compiletests/ui/byte_addressable_buffer/small_struct.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::ByteAddressableBuffer; use spirv_std::spirv; diff --git a/tests/compiletests/ui/byte_addressable_buffer/u32.rs b/tests/compiletests/ui/byte_addressable_buffer/u32.rs index 0b4b709608..290b05797d 100644 --- a/tests/compiletests/ui/byte_addressable_buffer/u32.rs +++ b/tests/compiletests/ui/byte_addressable_buffer/u32.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::ByteAddressableBuffer; use spirv_std::spirv; diff --git a/tests/compiletests/ui/byte_addressable_buffer/vec.rs b/tests/compiletests/ui/byte_addressable_buffer/vec.rs index 2f3342aa0b..d663940d02 100644 --- a/tests/compiletests/ui/byte_addressable_buffer/vec.rs +++ b/tests/compiletests/ui/byte_addressable_buffer/vec.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{ByteAddressableBuffer, glam::Vec4}; diff --git a/tests/compiletests/ui/dis/add_two_ints.rs b/tests/compiletests/ui/dis/add_two_ints.rs index 81dccc353d..257586e757 100644 --- a/tests/compiletests/ui/dis/add_two_ints.rs +++ b/tests/compiletests/ui/dis/add_two_ints.rs @@ -1,5 +1,5 @@ // build-pass -// compile-flags: -C llvm-args=--disassemble-fn=add_two_ints::add_two_ints +// compile-flags: -C llvm-args=--disassemble-fn=add_two_ints::add_two_ints,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/asm.rs b/tests/compiletests/ui/dis/asm.rs index 1e2a5a6f01..579500b042 100644 --- a/tests/compiletests/ui/dis/asm.rs +++ b/tests/compiletests/ui/dis/asm.rs @@ -1,5 +1,5 @@ // build-pass -// compile-flags: -C llvm-args=--disassemble-fn=asm::asm +// compile-flags: -C llvm-args=--disassemble-fn=asm::asm,--allow-fragment-no-output use core::arch::asm; use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/asm_add_two_ints.rs b/tests/compiletests/ui/dis/asm_add_two_ints.rs index e7cbedf191..e9a5ad3db1 100644 --- a/tests/compiletests/ui/dis/asm_add_two_ints.rs +++ b/tests/compiletests/ui/dis/asm_add_two_ints.rs @@ -1,5 +1,5 @@ // build-pass -// compile-flags: -C llvm-args=--disassemble-fn=asm_add_two_ints::add_two_ints +// compile-flags: -C llvm-args=--disassemble-fn=asm_add_two_ints::add_two_ints,--allow-fragment-no-output use core::arch::asm; use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/asm_op_decorate.rs b/tests/compiletests/ui/dis/asm_op_decorate.rs index a46835ee64..bc141c1c29 100644 --- a/tests/compiletests/ui/dis/asm_op_decorate.rs +++ b/tests/compiletests/ui/dis/asm_op_decorate.rs @@ -2,7 +2,7 @@ // build-pass // compile-flags: -C target-feature=+RuntimeDescriptorArray,+ext:SPV_EXT_descriptor_indexing -// compile-flags: -C llvm-args=--disassemble-globals +// compile-flags: -C llvm-args=--disassemble-globals,--allow-fragment-no-output // normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> "" // normalize-stderr-test "OpSource .*\n" -> "" // normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> "" diff --git a/tests/compiletests/ui/dis/complex_image_sample_inst.rs b/tests/compiletests/ui/dis/complex_image_sample_inst.rs index f42cce8d0b..1cb0a80866 100644 --- a/tests/compiletests/ui/dis/complex_image_sample_inst.rs +++ b/tests/compiletests/ui/dis/complex_image_sample_inst.rs @@ -1,6 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RuntimeDescriptorArray,+ext:SPV_EXT_descriptor_indexing -// compile-flags: -C llvm-args=--disassemble-fn=complex_image_sample_inst::sample_proj_lod +// compile-flags: -C llvm-args=--disassemble-fn=complex_image_sample_inst::sample_proj_lod,--allow-fragment-no-output use core::arch::asm; use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/custom_entry_point.stderr b/tests/compiletests/ui/dis/custom_entry_point.stderr index e243af37f7..9540af9b13 100644 --- a/tests/compiletests/ui/dis/custom_entry_point.stderr +++ b/tests/compiletests/ui/dis/custom_entry_point.stderr @@ -1,14 +1,9 @@ -OpCapability Shader -OpCapability Float64 -OpCapability Int64 -OpCapability Int16 -OpCapability Int8 -OpCapability ShaderClockKHR -OpExtension "SPV_KHR_shader_clock" -OpMemoryModel Logical Simple -OpEntryPoint Fragment %1 "hello_world" -OpExecutionMode %1 OriginUpperLeft -%2 = OpString "$OPSTRING_FILENAME/custom_entry_point.rs" -OpName %3 "custom_entry_point::main" -%4 = OpTypeVoid -%5 = OpTypeFunction %4 +error: fragment shader `hello_world` produces no output + | + = help: fragment shaders must write to output parameters to produce visible results + = note: use complete assignment like `*out_frag_color = vec4(r, g, b, a)` instead of partial component assignments + = note: partial component assignments may be optimized away if not all components are written + = note: to disable this validation (e.g. for testing), use `--allow-fragment-no-output` + +error: aborting due to 1 previous error + diff --git a/tests/compiletests/ui/dis/entry-pass-mode-cast-array.rs b/tests/compiletests/ui/dis/entry-pass-mode-cast-array.rs index 0e1314465e..7aa61ec8ea 100644 --- a/tests/compiletests/ui/dis/entry-pass-mode-cast-array.rs +++ b/tests/compiletests/ui/dis/entry-pass-mode-cast-array.rs @@ -5,7 +5,7 @@ // the default Rust ABI adjustments, that we now override through query hooks) // build-pass -// compile-flags: -C llvm-args=--disassemble-entry=main +// compile-flags: -C llvm-args=--disassemble-entry=main,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/generic-fn-op-name.rs b/tests/compiletests/ui/dis/generic-fn-op-name.rs index 1f07f69b5a..b76516225e 100644 --- a/tests/compiletests/ui/dis/generic-fn-op-name.rs +++ b/tests/compiletests/ui/dis/generic-fn-op-name.rs @@ -3,7 +3,7 @@ // Test that generic functions' `OpName` correctly include generic arguments. // build-pass -// compile-flags: -C llvm-args=--disassemble-globals +// compile-flags: -C llvm-args=--disassemble-globals,--allow-fragment-no-output // normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> "" // normalize-stderr-test "OpSource .*\n" -> "" // normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> "" diff --git a/tests/compiletests/ui/dis/index_user_dst.rs b/tests/compiletests/ui/dis/index_user_dst.rs index f1b4142e9d..99a4ecdc10 100644 --- a/tests/compiletests/ui/dis/index_user_dst.rs +++ b/tests/compiletests/ui/dis/index_user_dst.rs @@ -1,7 +1,7 @@ #![crate_name = "index_user_dst"] // build-pass -// compile-flags: -C llvm-args=--disassemble-entry=main +// compile-flags: -C llvm-args=--disassemble-entry=main,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/issue-1062.rs b/tests/compiletests/ui/dis/issue-1062.rs index 759c506317..9b8bb3b86c 100644 --- a/tests/compiletests/ui/dis/issue-1062.rs +++ b/tests/compiletests/ui/dis/issue-1062.rs @@ -3,7 +3,7 @@ // Test that rotates take the correct path for non-zero bit amounts. // build-pass -// compile-flags: -C llvm-args=--disassemble-entry=main +// compile-flags: -C llvm-args=--disassemble-entry=main,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/issue-373.rs b/tests/compiletests/ui/dis/issue-373.rs index 482136d448..523c8b336e 100644 --- a/tests/compiletests/ui/dis/issue-373.rs +++ b/tests/compiletests/ui/dis/issue-373.rs @@ -5,7 +5,7 @@ // the default Rust ABI adjustments, that we now override through query hooks). // build-pass -// compile-flags: -C llvm-args=--disassemble-entry=main +// compile-flags: -C llvm-args=--disassemble-entry=main,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/issue-723-output.rs b/tests/compiletests/ui/dis/issue-723-output.rs index 39bad58bcc..60594bc31d 100644 --- a/tests/compiletests/ui/dis/issue-723-output.rs +++ b/tests/compiletests/ui/dis/issue-723-output.rs @@ -13,7 +13,7 @@ // all interface `OpVariables` in `OpEntryPoint`, not just `Input`/`Output` // build-pass -// compile-flags: -C debuginfo=0 -C llvm-args=--disassemble-globals +// compile-flags: -C debuginfo=0 -C llvm-args=--disassemble-globals,--allow-fragment-no-output // normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> "" // normalize-stderr-test "OpSource .*\n" -> "" // normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> "" diff --git a/tests/compiletests/ui/dis/issue-731.rs b/tests/compiletests/ui/dis/issue-731.rs index ccd8d39ef4..fd6a0c6cb5 100644 --- a/tests/compiletests/ui/dis/issue-731.rs +++ b/tests/compiletests/ui/dis/issue-731.rs @@ -3,7 +3,7 @@ // only ever done on `fn`-local `OpVariable`s, not on the original global. // build-pass -// compile-flags: -C llvm-args=--disassemble-entry=main +// compile-flags: -C llvm-args=--disassemble-entry=main,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/non-writable-storage_buffer.rs b/tests/compiletests/ui/dis/non-writable-storage_buffer.rs index 483f7c75ad..b109274d6b 100644 --- a/tests/compiletests/ui/dis/non-writable-storage_buffer.rs +++ b/tests/compiletests/ui/dis/non-writable-storage_buffer.rs @@ -3,7 +3,7 @@ // Tests that only `&T` (where `T: Freeze`) storage buffers get `NonWritable`. // build-pass -// compile-flags: -C llvm-args=--disassemble-globals +// compile-flags: -C llvm-args=--disassemble-globals,--allow-fragment-no-output // normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> "" // normalize-stderr-test "OpSource .*\n" -> "" // normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> "" diff --git a/tests/compiletests/ui/dis/panic_builtin_bounds_check.rs b/tests/compiletests/ui/dis/panic_builtin_bounds_check.rs index 93b5e62a8f..1c3219df85 100644 --- a/tests/compiletests/ui/dis/panic_builtin_bounds_check.rs +++ b/tests/compiletests/ui/dis/panic_builtin_bounds_check.rs @@ -4,7 +4,7 @@ // build-pass // compile-flags: -C target-feature=+ext:SPV_KHR_non_semantic_info -// compile-flags: -C llvm-args=--abort-strategy=debug-printf +// compile-flags: -C llvm-args=--abort-strategy=debug-printf,--allow-fragment-no-output // compile-flags: -C llvm-args=--disassemble // // FIXME(eddyb) consider using such replacements also for dealing diff --git a/tests/compiletests/ui/dis/panic_sequential_many.rs b/tests/compiletests/ui/dis/panic_sequential_many.rs index 4cb7db174d..0ae0e107c2 100644 --- a/tests/compiletests/ui/dis/panic_sequential_many.rs +++ b/tests/compiletests/ui/dis/panic_sequential_many.rs @@ -5,7 +5,7 @@ // build-pass // compile-flags: -C target-feature=+ext:SPV_KHR_non_semantic_info -// compile-flags: -C llvm-args=--abort-strategy=debug-printf +// compile-flags: -C llvm-args=--abort-strategy=debug-printf,--allow-fragment-no-output // compile-flags: -C llvm-args=--disassemble // // FIXME(eddyb) consider using such replacements also for dealing diff --git a/tests/compiletests/ui/dis/pass-mode-cast-struct.rs b/tests/compiletests/ui/dis/pass-mode-cast-struct.rs index 5ed7442537..509f9a815c 100644 --- a/tests/compiletests/ui/dis/pass-mode-cast-struct.rs +++ b/tests/compiletests/ui/dis/pass-mode-cast-struct.rs @@ -5,7 +5,7 @@ // the default Rust ABI adjustments, that we now override through query hooks) // build-pass -// compile-flags: -C llvm-args=--disassemble-entry=main +// compile-flags: -C llvm-args=--disassemble-entry=main,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/ptr_copy.rs b/tests/compiletests/ui/dis/ptr_copy.rs index 89f1a83d84..c7351e0221 100644 --- a/tests/compiletests/ui/dis/ptr_copy.rs +++ b/tests/compiletests/ui/dis/ptr_copy.rs @@ -2,7 +2,7 @@ //[normal] build-fail // normalize-stderr-test "\S*/library/core/src/" -> "$$CORE_SRC/" //[via_intrinsic] build-pass -// compile-flags: -C llvm-args=--disassemble-fn=ptr_copy::copy_via_raw_ptr +// compile-flags: -C llvm-args=--disassemble-fn=ptr_copy::copy_via_raw_ptr,--allow-fragment-no-output #![cfg_attr(via_intrinsic, allow(internal_features), feature(intrinsics))] diff --git a/tests/compiletests/ui/dis/ptr_read.rs b/tests/compiletests/ui/dis/ptr_read.rs index 494bcdb3fa..63385039dd 100644 --- a/tests/compiletests/ui/dis/ptr_read.rs +++ b/tests/compiletests/ui/dis/ptr_read.rs @@ -1,5 +1,5 @@ // build-pass -// compile-flags: -C llvm-args=--disassemble-fn=ptr_read::copy_via_raw_ptr +// compile-flags: -C llvm-args=--disassemble-fn=ptr_read::copy_via_raw_ptr,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/ptr_read_method.rs b/tests/compiletests/ui/dis/ptr_read_method.rs index 41620e9ebb..f5c1caeaf9 100644 --- a/tests/compiletests/ui/dis/ptr_read_method.rs +++ b/tests/compiletests/ui/dis/ptr_read_method.rs @@ -1,5 +1,5 @@ // build-pass -// compile-flags: -C llvm-args=--disassemble-fn=ptr_read_method::copy_via_raw_ptr +// compile-flags: -C llvm-args=--disassemble-fn=ptr_read_method::copy_via_raw_ptr,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/ptr_write.rs b/tests/compiletests/ui/dis/ptr_write.rs index fcfdc4cd8d..8ea42f8149 100644 --- a/tests/compiletests/ui/dis/ptr_write.rs +++ b/tests/compiletests/ui/dis/ptr_write.rs @@ -1,5 +1,5 @@ // build-pass -// compile-flags: -C llvm-args=--disassemble-fn=ptr_write::copy_via_raw_ptr +// compile-flags: -C llvm-args=--disassemble-fn=ptr_write::copy_via_raw_ptr,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/ptr_write_method.rs b/tests/compiletests/ui/dis/ptr_write_method.rs index bdc969df38..d8984fae8b 100644 --- a/tests/compiletests/ui/dis/ptr_write_method.rs +++ b/tests/compiletests/ui/dis/ptr_write_method.rs @@ -1,5 +1,5 @@ // build-pass -// compile-flags: -C llvm-args=--disassemble-fn=ptr_write_method::copy_via_raw_ptr +// compile-flags: -C llvm-args=--disassemble-fn=ptr_write_method::copy_via_raw_ptr,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/dis/spec_constant-attr.rs b/tests/compiletests/ui/dis/spec_constant-attr.rs index ce04ba674b..918aedf36d 100644 --- a/tests/compiletests/ui/dis/spec_constant-attr.rs +++ b/tests/compiletests/ui/dis/spec_constant-attr.rs @@ -3,7 +3,7 @@ // Tests the various forms of `#[spirv(spec_constant)]`. // build-pass -// compile-flags: -C llvm-args=--disassemble-globals +// compile-flags: -C llvm-args=--disassemble-globals,--allow-fragment-no-output // normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> "" // normalize-stderr-test "OpSource .*\n" -> "" // normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> "" diff --git a/tests/compiletests/ui/glam/mat3_vec3_multiply.rs b/tests/compiletests/ui/glam/mat3_vec3_multiply.rs index 1aa0c8c3bb..81c7f495e8 100644 --- a/tests/compiletests/ui/glam/mat3_vec3_multiply.rs +++ b/tests/compiletests/ui/glam/mat3_vec3_multiply.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests multiplying a `Mat3` by a `Vec3`. // build-pass diff --git a/tests/compiletests/ui/hello_world.rs b/tests/compiletests/ui/hello_world.rs index 3916fb4e91..79be7da9ba 100644 --- a/tests/compiletests/ui/hello_world.rs +++ b/tests/compiletests/ui/hello_world.rs @@ -1,5 +1,6 @@ // Simple single entrypoint function test. // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/image/components.rs b/tests/compiletests/ui/image/components.rs index 34e010fbcd..6249609237 100644 --- a/tests/compiletests/ui/image/components.rs +++ b/tests/compiletests/ui/image/components.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+StorageImageExtendedFormats +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::{Vec2, Vec3, Vec4}; use spirv_std::spirv; diff --git a/tests/compiletests/ui/image/fetch.rs b/tests/compiletests/ui/image/fetch.rs index 674c3400bb..5f8e6f4b76 100644 --- a/tests/compiletests/ui/image/fetch.rs +++ b/tests/compiletests/ui/image/fetch.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch}; diff --git a/tests/compiletests/ui/image/format.rs b/tests/compiletests/ui/image/format.rs index e9f2386c10..92a05a111e 100644 --- a/tests/compiletests/ui/image/format.rs +++ b/tests/compiletests/ui/image/format.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch}; diff --git a/tests/compiletests/ui/image/gather.rs b/tests/compiletests/ui/image/gather.rs index 012bcf3f86..c665876a8b 100644 --- a/tests/compiletests/ui/image/gather.rs +++ b/tests/compiletests/ui/image/gather.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageGather` // build-pass diff --git a/tests/compiletests/ui/image/gather_err.rs b/tests/compiletests/ui/image/gather_err.rs index e44da14565..8e63b7be3f 100644 --- a/tests/compiletests/ui/image/gather_err.rs +++ b/tests/compiletests/ui/image/gather_err.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail // normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/" // compile-flags: -Ctarget-feature=+Sampled1D diff --git a/tests/compiletests/ui/image/gather_err.stderr b/tests/compiletests/ui/image/gather_err.stderr index 550fdfd018..712c0ac736 100644 --- a/tests/compiletests/ui/image/gather_err.stderr +++ b/tests/compiletests/ui/image/gather_err.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Image: HasGather` is not satisfied - --> $DIR/gather_err.rs:15:34 + --> $DIR/gather_err.rs:16:34 | -15 | let r1: glam::Vec4 = image1d.gather(*sampler, 0.0f32, 0); +16 | let r1: glam::Vec4 = image1d.gather(*sampler, 0.0f32, 0); | ^^^^^^ the trait `HasGather` is not implemented for `Image` | = help: the following other types implement trait `HasGather`: @@ -18,9 +18,9 @@ note: required by a bound in `Image::::gather` error[E0277]: the trait bound `Image: HasGather` is not satisfied - --> $DIR/gather_err.rs:16:34 + --> $DIR/gather_err.rs:17:34 | -16 | let r2: glam::Vec4 = image3d.gather(*sampler, v3, 0); +17 | let r2: glam::Vec4 = image3d.gather(*sampler, v3, 0); | ^^^^^^ the trait `HasGather` is not implemented for `Image` | = help: the following other types implement trait `HasGather`: diff --git a/tests/compiletests/ui/image/image_with.rs b/tests/compiletests/ui/image/image_with.rs index 90d8d62b2f..f585f8a173 100644 --- a/tests/compiletests/ui/image/image_with.rs +++ b/tests/compiletests/ui/image/image_with.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, Sampler, arch, image::ImageWithMethods, image::sample_with}; diff --git a/tests/compiletests/ui/image/issue-330.rs b/tests/compiletests/ui/image/issue-330.rs index 37130eac4f..1e9f12dd82 100644 --- a/tests/compiletests/ui/image/issue-330.rs +++ b/tests/compiletests/ui/image/issue-330.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::glam::Vec4; use spirv_std::spirv; use spirv_std::{Sampler, image::Image2dArray}; diff --git a/tests/compiletests/ui/image/query/cubemap_query_size.rs b/tests/compiletests/ui/image/query/cubemap_query_size.rs index 72210879ad..20308c01ab 100644 --- a/tests/compiletests/ui/image/query/cubemap_query_size.rs +++ b/tests/compiletests/ui/image/query/cubemap_query_size.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch, image::Cubemap}; diff --git a/tests/compiletests/ui/image/query/query_levels.rs b/tests/compiletests/ui/image/query/query_levels.rs index 061dc4bacc..5f31b1d1f6 100644 --- a/tests/compiletests/ui/image/query/query_levels.rs +++ b/tests/compiletests/ui/image/query/query_levels.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch}; diff --git a/tests/compiletests/ui/image/query/query_levels_err.rs b/tests/compiletests/ui/image/query/query_levels_err.rs index 1fa5581a41..6f7e87429f 100644 --- a/tests/compiletests/ui/image/query/query_levels_err.rs +++ b/tests/compiletests/ui/image/query/query_levels_err.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail // normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/" // compile-flags: -C target-feature=+ImageQuery diff --git a/tests/compiletests/ui/image/query/query_levels_err.stderr b/tests/compiletests/ui/image/query/query_levels_err.stderr index c49926bd05..3a07ccc4e9 100644 --- a/tests/compiletests/ui/image/query/query_levels_err.stderr +++ b/tests/compiletests/ui/image/query/query_levels_err.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Image: HasQueryLevels` is not satisfied - --> $DIR/query_levels_err.rs:12:21 + --> $DIR/query_levels_err.rs:13:21 | -12 | *output = image.query_levels(); +13 | *output = image.query_levels(); | ^^^^^^^^^^^^ the trait `HasQueryLevels` is not implemented for `Image` | = help: the following other types implement trait `HasQueryLevels`: diff --git a/tests/compiletests/ui/image/query/query_lod.rs b/tests/compiletests/ui/image/query/query_lod.rs index 4d764d0514..48267d566f 100644 --- a/tests/compiletests/ui/image/query/query_lod.rs +++ b/tests/compiletests/ui/image/query/query_lod.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, Sampler, arch}; diff --git a/tests/compiletests/ui/image/query/query_lod_err.rs b/tests/compiletests/ui/image/query/query_lod_err.rs index 74e86972f1..2b1b2debc6 100644 --- a/tests/compiletests/ui/image/query/query_lod_err.rs +++ b/tests/compiletests/ui/image/query/query_lod_err.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail // normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/" // compile-flags: -C target-feature=+ImageQuery diff --git a/tests/compiletests/ui/image/query/query_lod_err.stderr b/tests/compiletests/ui/image/query/query_lod_err.stderr index e985e690b5..71df5d97c0 100644 --- a/tests/compiletests/ui/image/query/query_lod_err.stderr +++ b/tests/compiletests/ui/image/query/query_lod_err.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Image: HasQueryLevels` is not satisfied - --> $DIR/query_lod_err.rs:13:21 + --> $DIR/query_lod_err.rs:14:21 | -13 | *output = image.query_lod(*sampler, glam::Vec2::new(0.0, 1.0)); +14 | *output = image.query_lod(*sampler, glam::Vec2::new(0.0, 1.0)); | ^^^^^^^^^ the trait `HasQueryLevels` is not implemented for `Image` | = help: the following other types implement trait `HasQueryLevels`: diff --git a/tests/compiletests/ui/image/query/query_samples.rs b/tests/compiletests/ui/image/query/query_samples.rs index fb5db92ded..00203a281f 100644 --- a/tests/compiletests/ui/image/query/query_samples.rs +++ b/tests/compiletests/ui/image/query/query_samples.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch}; diff --git a/tests/compiletests/ui/image/query/query_size.rs b/tests/compiletests/ui/image/query/query_size.rs index ba2b12afa4..abde2e699e 100644 --- a/tests/compiletests/ui/image/query/query_size.rs +++ b/tests/compiletests/ui/image/query/query_size.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch}; diff --git a/tests/compiletests/ui/image/query/query_size_err.rs b/tests/compiletests/ui/image/query/query_size_err.rs index c526f3bd6b..28146998f2 100644 --- a/tests/compiletests/ui/image/query/query_size_err.rs +++ b/tests/compiletests/ui/image/query/query_size_err.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail // normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/" // compile-flags: -C target-feature=+ImageQuery diff --git a/tests/compiletests/ui/image/query/query_size_err.stderr b/tests/compiletests/ui/image/query/query_size_err.stderr index c94971162e..ef9bf2fc75 100644 --- a/tests/compiletests/ui/image/query/query_size_err.stderr +++ b/tests/compiletests/ui/image/query/query_size_err.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Image: HasQuerySize` is not satisfied - --> $DIR/query_size_err.rs:12:21 + --> $DIR/query_size_err.rs:13:21 | -12 | *output = image.query_size(); +13 | *output = image.query_size(); | ^^^^^^^^^^ the trait `HasQuerySize` is not implemented for `Image` | = help: the following other types implement trait `HasQuerySize`: diff --git a/tests/compiletests/ui/image/query/query_size_lod.rs b/tests/compiletests/ui/image/query/query_size_lod.rs index dd6c7f1855..e59922e86c 100644 --- a/tests/compiletests/ui/image/query/query_size_lod.rs +++ b/tests/compiletests/ui/image/query/query_size_lod.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch}; diff --git a/tests/compiletests/ui/image/query/query_size_lod_err.rs b/tests/compiletests/ui/image/query/query_size_lod_err.rs index 8b2e9e8ff1..081d7ff537 100644 --- a/tests/compiletests/ui/image/query/query_size_lod_err.rs +++ b/tests/compiletests/ui/image/query/query_size_lod_err.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail // normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/" // compile-flags: -C target-feature=+ImageQuery diff --git a/tests/compiletests/ui/image/query/query_size_lod_err.stderr b/tests/compiletests/ui/image/query/query_size_lod_err.stderr index bbad070b0a..741ea1ff93 100644 --- a/tests/compiletests/ui/image/query/query_size_lod_err.stderr +++ b/tests/compiletests/ui/image/query/query_size_lod_err.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Image: HasQuerySizeLod` is not satisfied - --> $DIR/query_size_lod_err.rs:12:21 + --> $DIR/query_size_lod_err.rs:13:21 | -12 | *output = image.query_size_lod(0); +13 | *output = image.query_size_lod(0); | ^^^^^^^^^^^^^^ the trait `HasQuerySizeLod` is not implemented for `Image` | = help: the following other types implement trait `HasQuerySizeLod`: diff --git a/tests/compiletests/ui/image/query/rect_image_query_size.rs b/tests/compiletests/ui/image/query/rect_image_query_size.rs index 3182412157..d6c85ec3f7 100644 --- a/tests/compiletests/ui/image/query/rect_image_query_size.rs +++ b/tests/compiletests/ui/image/query/rect_image_query_size.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery,+SampledRect +// compile-flags: -C llvm-args=--allow-fragment-no-output // ignore-vulkan1.0 // ignore-vulkan1.1 // ignore-vulkan1.1spv1.4 diff --git a/tests/compiletests/ui/image/query/sampled_image_multisampled_query_size.rs b/tests/compiletests/ui/image/query/sampled_image_multisampled_query_size.rs index 82ce6c07a2..d3a60598b6 100644 --- a/tests/compiletests/ui/image/query/sampled_image_multisampled_query_size.rs +++ b/tests/compiletests/ui/image/query/sampled_image_multisampled_query_size.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch, image::SampledImage}; diff --git a/tests/compiletests/ui/image/query/sampled_image_query_size.rs b/tests/compiletests/ui/image/query/sampled_image_query_size.rs index fbde16285c..5f9ac920b8 100644 --- a/tests/compiletests/ui/image/query/sampled_image_query_size.rs +++ b/tests/compiletests/ui/image/query/sampled_image_query_size.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery,+Sampled1D +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch, image::SampledImage}; diff --git a/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.rs b/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.rs index acfe0a61a3..cdc4aaffe7 100644 --- a/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.rs +++ b/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail // normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$SPIRV_STD_SRC/" // compile-flags: -C target-feature=+ImageQuery,+SampledRect diff --git a/tests/compiletests/ui/image/query/storage_image_query_size.rs b/tests/compiletests/ui/image/query/storage_image_query_size.rs index 42234aebeb..26239dfbea 100644 --- a/tests/compiletests/ui/image/query/storage_image_query_size.rs +++ b/tests/compiletests/ui/image/query/storage_image_query_size.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+ImageQuery,+Sampled1D,+SampledBuffer +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch}; diff --git a/tests/compiletests/ui/image/read.rs b/tests/compiletests/ui/image/read.rs index 0c1fb23ba3..edecba7ad7 100644 --- a/tests/compiletests/ui/image/read.rs +++ b/tests/compiletests/ui/image/read.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageRead` // build-pass // compile-flags: -C target-feature=+StorageImageReadWithoutFormat diff --git a/tests/compiletests/ui/image/read_subpass.rs b/tests/compiletests/ui/image/read_subpass.rs index 1dd84965d0..593ffdb06b 100644 --- a/tests/compiletests/ui/image/read_subpass.rs +++ b/tests/compiletests/ui/image/read_subpass.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+InputAttachment +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, arch}; diff --git a/tests/compiletests/ui/image/sample.rs b/tests/compiletests/ui/image/sample.rs index e480828900..b390469d17 100644 --- a/tests/compiletests/ui/image/sample.rs +++ b/tests/compiletests/ui/image/sample.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleImplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_bias.rs b/tests/compiletests/ui/image/sample_bias.rs index 4aace83047..36e20c89a6 100644 --- a/tests/compiletests/ui/image/sample_bias.rs +++ b/tests/compiletests/ui/image/sample_bias.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleImplicitLod` Bias // build-pass diff --git a/tests/compiletests/ui/image/sample_depth_reference/sample.rs b/tests/compiletests/ui/image/sample_depth_reference/sample.rs index f0a379b254..2dc52ac12d 100644 --- a/tests/compiletests/ui/image/sample_depth_reference/sample.rs +++ b/tests/compiletests/ui/image/sample_depth_reference/sample.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleDrefImplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_depth_reference/sample_gradient.rs b/tests/compiletests/ui/image/sample_depth_reference/sample_gradient.rs index e10213e6d5..29da41bd9c 100644 --- a/tests/compiletests/ui/image/sample_depth_reference/sample_gradient.rs +++ b/tests/compiletests/ui/image/sample_depth_reference/sample_gradient.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleDrefExplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_depth_reference/sample_lod.rs b/tests/compiletests/ui/image/sample_depth_reference/sample_lod.rs index 39bda69dff..ab00765afc 100644 --- a/tests/compiletests/ui/image/sample_depth_reference/sample_lod.rs +++ b/tests/compiletests/ui/image/sample_depth_reference/sample_lod.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleDrefExplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample.rs b/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample.rs index b846e8b5f3..53fd714119 100644 --- a/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample.rs +++ b/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleProjDrefImplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample_gradient.rs b/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample_gradient.rs index d1f5aba513..cbfff26942 100644 --- a/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample_gradient.rs +++ b/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample_gradient.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleProjDrefExplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample_lod.rs b/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample_lod.rs index 7c9e75693a..4cbb4ee705 100644 --- a/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample_lod.rs +++ b/tests/compiletests/ui/image/sample_depth_reference_with_project_coordinate/sample_lod.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleProjDrefExplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_gradient.rs b/tests/compiletests/ui/image/sample_gradient.rs index ca2930276e..138ae43480 100644 --- a/tests/compiletests/ui/image/sample_gradient.rs +++ b/tests/compiletests/ui/image/sample_gradient.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleExplicitLod` Grad // build-pass diff --git a/tests/compiletests/ui/image/sample_lod.rs b/tests/compiletests/ui/image/sample_lod.rs index 7d4a628514..5f60e01a08 100644 --- a/tests/compiletests/ui/image/sample_lod.rs +++ b/tests/compiletests/ui/image/sample_lod.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleExplicitLod` Lod // build-pass diff --git a/tests/compiletests/ui/image/sample_with_project_coordinate/sample.rs b/tests/compiletests/ui/image/sample_with_project_coordinate/sample.rs index 580b26b7d5..2f168f5a57 100644 --- a/tests/compiletests/ui/image/sample_with_project_coordinate/sample.rs +++ b/tests/compiletests/ui/image/sample_with_project_coordinate/sample.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleProjImplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_with_project_coordinate/sample_gradient.rs b/tests/compiletests/ui/image/sample_with_project_coordinate/sample_gradient.rs index 73ce1eb6ee..0b046e186a 100644 --- a/tests/compiletests/ui/image/sample_with_project_coordinate/sample_gradient.rs +++ b/tests/compiletests/ui/image/sample_with_project_coordinate/sample_gradient.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleProjExplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/sample_with_project_coordinate/sample_lod.rs b/tests/compiletests/ui/image/sample_with_project_coordinate/sample_lod.rs index 99361164d4..03176ca459 100644 --- a/tests/compiletests/ui/image/sample_with_project_coordinate/sample_lod.rs +++ b/tests/compiletests/ui/image/sample_with_project_coordinate/sample_lod.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageSampleProjExplicitLod` // build-pass diff --git a/tests/compiletests/ui/image/write.rs b/tests/compiletests/ui/image/write.rs index 34dfae1350..b29ec48f1c 100644 --- a/tests/compiletests/ui/image/write.rs +++ b/tests/compiletests/ui/image/write.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `OpImageWrite` // build-pass // compile-flags: -C target-feature=+StorageImageWriteWithoutFormat diff --git a/tests/compiletests/ui/lang/asm/block_tracking_fail.rs b/tests/compiletests/ui/lang/asm/block_tracking_fail.rs index d0e229bae0..5af78abf70 100644 --- a/tests/compiletests/ui/lang/asm/block_tracking_fail.rs +++ b/tests/compiletests/ui/lang/asm/block_tracking_fail.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests validating tracking of basic blocks // within the `asm!` macro. // build-fail diff --git a/tests/compiletests/ui/lang/asm/block_tracking_fail.stderr b/tests/compiletests/ui/lang/asm/block_tracking_fail.stderr index c2979ce7fa..d60b92707a 100644 --- a/tests/compiletests/ui/lang/asm/block_tracking_fail.stderr +++ b/tests/compiletests/ui/lang/asm/block_tracking_fail.stderr @@ -1,23 +1,23 @@ error: `noreturn` requires a terminator at the end - --> $DIR/block_tracking_fail.rs:11:9 + --> $DIR/block_tracking_fail.rs:12:9 | -11 | asm!("", options(noreturn)); +12 | asm!("", options(noreturn)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: trailing terminator `OpUnreachable` requires `options(noreturn)` - --> $DIR/block_tracking_fail.rs:18:9 + --> $DIR/block_tracking_fail.rs:19:9 | -18 | asm!("OpUnreachable"); +19 | asm!("OpUnreachable"); | ^^^^^^^^^^^^^^^^^^^^^ error: expected `OpLabel` after terminator `OpKill` - --> $DIR/block_tracking_fail.rs:25:9 + --> $DIR/block_tracking_fail.rs:26:9 | -25 | / asm!( -26 | | "OpKill", -27 | | "%sum = OpFAdd _ {x} {x}", -28 | | x = in(reg) x, -29 | | ); +26 | / asm!( +27 | | "OpKill", +28 | | "%sum = OpFAdd _ {x} {x}", +29 | | x = in(reg) x, +30 | | ); | |_________^ error: aborting due to 3 previous errors diff --git a/tests/compiletests/ui/lang/asm/block_tracking_pass.rs b/tests/compiletests/ui/lang/asm/block_tracking_pass.rs index 6caa7b3478..d62a4faa0d 100644 --- a/tests/compiletests/ui/lang/asm/block_tracking_pass.rs +++ b/tests/compiletests/ui/lang/asm/block_tracking_pass.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests validating tracking of basic blocks // within the `asm!` macro. // build-pass diff --git a/tests/compiletests/ui/lang/asm/const_args.rs b/tests/compiletests/ui/lang/asm/const_args.rs index 4a42533c31..7e2430d863 100644 --- a/tests/compiletests/ui/lang/asm/const_args.rs +++ b/tests/compiletests/ui/lang/asm/const_args.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests using `asm!` with a const argument. // build-pass diff --git a/tests/compiletests/ui/lang/asm/infer-access-chain-array.rs b/tests/compiletests/ui/lang/asm/infer-access-chain-array.rs index cd3649989a..ab9a776d9a 100644 --- a/tests/compiletests/ui/lang/asm/infer-access-chain-array.rs +++ b/tests/compiletests/ui/lang/asm/infer-access-chain-array.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests that `asm!` can infer the result type of `OpAccessChain`, // when used to index arrays. diff --git a/tests/compiletests/ui/lang/asm/infer-access-chain-slice.rs b/tests/compiletests/ui/lang/asm/infer-access-chain-slice.rs index 1b726d7993..cc82caeed5 100644 --- a/tests/compiletests/ui/lang/asm/infer-access-chain-slice.rs +++ b/tests/compiletests/ui/lang/asm/infer-access-chain-slice.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests that `asm!` can infer the result type of `OpAccessChain`, // when used to index slices. diff --git a/tests/compiletests/ui/lang/asm/issue-1002.rs b/tests/compiletests/ui/lang/asm/issue-1002.rs index 07bae5b294..0cc8a7302f 100644 --- a/tests/compiletests/ui/lang/asm/issue-1002.rs +++ b/tests/compiletests/ui/lang/asm/issue-1002.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests that we don't allow returning from `asm!` (which would always be UB). // build-fail diff --git a/tests/compiletests/ui/lang/asm/issue-1002.stderr b/tests/compiletests/ui/lang/asm/issue-1002.stderr index 42a35d8968..b117699013 100644 --- a/tests/compiletests/ui/lang/asm/issue-1002.stderr +++ b/tests/compiletests/ui/lang/asm/issue-1002.stderr @@ -1,42 +1,42 @@ error: using `OpReturn` to return from within `asm!` is disallowed - --> $DIR/issue-1002.rs:9:9 - | -9 | asm!("OpReturn", options(noreturn)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior + --> $DIR/issue-1002.rs:10:9 + | +10 | asm!("OpReturn", options(noreturn)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior error: using `OpReturnValue` to return from within `asm!` is disallowed - --> $DIR/issue-1002.rs:15:9 + --> $DIR/issue-1002.rs:16:9 | -15 | / asm!( -16 | | "OpReturnValue {x}", -17 | | x = in(reg) x, -18 | | options(noreturn), -19 | | ); +16 | / asm!( +17 | | "OpReturnValue {x}", +18 | | x = in(reg) x, +19 | | options(noreturn), +20 | | ); | |_________^ | = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior error: using `OpReturn` to return from within `asm!` is disallowed - --> $DIR/issue-1002.rs:25:9 + --> $DIR/issue-1002.rs:26:9 | -25 | / asm!( -26 | | "OpReturn", // close active block -27 | | "%unused = OpLabel", // open new block -28 | | ); +26 | / asm!( +27 | | "OpReturn", // close active block +28 | | "%unused = OpLabel", // open new block +29 | | ); | |_________^ | = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior error: using `OpReturnValue` to return from within `asm!` is disallowed - --> $DIR/issue-1002.rs:34:9 + --> $DIR/issue-1002.rs:35:9 | -34 | / asm!( -35 | | "OpReturnValue {x}", // close active block -36 | | "%unused = OpLabel", // open new block -37 | | x = in(reg) x -38 | | ); +35 | / asm!( +36 | | "OpReturnValue {x}", // close active block +37 | | "%unused = OpLabel", // open new block +38 | | x = in(reg) x +39 | | ); | |_________^ | = note: resuming execution, without falling through the end of the `asm!` block, is always undefined behavior diff --git a/tests/compiletests/ui/lang/consts/issue-1024.rs b/tests/compiletests/ui/lang/consts/issue-1024.rs index a02057f0b5..3a3263964d 100644 --- a/tests/compiletests/ui/lang/consts/issue-1024.rs +++ b/tests/compiletests/ui/lang/consts/issue-1024.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests that the zombie `bool` from `overflowing_*` (the "has overflowed" value) // isn't kept alive by the user's own (unrelated) `bool` constants. // diff --git a/tests/compiletests/ui/lang/consts/issue-329.rs b/tests/compiletests/ui/lang/consts/issue-329.rs index 8026968496..b32d8b9e79 100644 --- a/tests/compiletests/ui/lang/consts/issue-329.rs +++ b/tests/compiletests/ui/lang/consts/issue-329.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/consts/issue-834.rs b/tests/compiletests/ui/lang/consts/issue-834.rs index 387c1e1131..16244a2f7a 100644 --- a/tests/compiletests/ui/lang/consts/issue-834.rs +++ b/tests/compiletests/ui/lang/consts/issue-834.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/consts/nested-ref-in-composite.rs b/tests/compiletests/ui/lang/consts/nested-ref-in-composite.rs index c2a852333f..9e7cd942b5 100644 --- a/tests/compiletests/ui/lang/consts/nested-ref-in-composite.rs +++ b/tests/compiletests/ui/lang/consts/nested-ref-in-composite.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `&'static T` constants where the `T` values themselves contain references, // nested in `OpConstantComposite` (structs/arrays) - currently these are disallowed. diff --git a/tests/compiletests/ui/lang/consts/nested-ref-in-composite.stderr b/tests/compiletests/ui/lang/consts/nested-ref-in-composite.stderr index 632757f31d..bc7fd67f52 100644 --- a/tests/compiletests/ui/lang/consts/nested-ref-in-composite.stderr +++ b/tests/compiletests/ui/lang/consts/nested-ref-in-composite.stderr @@ -1,35 +1,35 @@ error: constant arrays/structs cannot contain pointers to other constants - --> $DIR/nested-ref-in-composite.rs:20:17 + --> $DIR/nested-ref-in-composite.rs:21:17 | -20 | *pair_out = pair_deep_load(&(&123, &3.14)); +21 | *pair_out = pair_deep_load(&(&123, &3.14)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: used from within `nested_ref_in_composite::main_pair` - --> $DIR/nested-ref-in-composite.rs:20:17 + --> $DIR/nested-ref-in-composite.rs:21:17 | -20 | *pair_out = pair_deep_load(&(&123, &3.14)); +21 | *pair_out = pair_deep_load(&(&123, &3.14)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: called by `main_pair` - --> $DIR/nested-ref-in-composite.rs:19:8 + --> $DIR/nested-ref-in-composite.rs:20:8 | -19 | pub fn main_pair(pair_out: &mut (u32, f32)) { +20 | pub fn main_pair(pair_out: &mut (u32, f32)) { | ^^^^^^^^^ error: constant arrays/structs cannot contain pointers to other constants - --> $DIR/nested-ref-in-composite.rs:25:19 + --> $DIR/nested-ref-in-composite.rs:26:19 | -25 | *array3_out = array3_deep_load(&[&0, &1, &2]); +26 | *array3_out = array3_deep_load(&[&0, &1, &2]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: used from within `nested_ref_in_composite::main_array3` - --> $DIR/nested-ref-in-composite.rs:25:19 + --> $DIR/nested-ref-in-composite.rs:26:19 | -25 | *array3_out = array3_deep_load(&[&0, &1, &2]); +26 | *array3_out = array3_deep_load(&[&0, &1, &2]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: called by `main_array3` - --> $DIR/nested-ref-in-composite.rs:24:8 + --> $DIR/nested-ref-in-composite.rs:25:8 | -24 | pub fn main_array3(array3_out: &mut [u32; 3]) { +25 | pub fn main_array3(array3_out: &mut [u32; 3]) { | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/tests/compiletests/ui/lang/consts/nested-ref.rs b/tests/compiletests/ui/lang/consts/nested-ref.rs index 293325475c..a5c40f21c1 100644 --- a/tests/compiletests/ui/lang/consts/nested-ref.rs +++ b/tests/compiletests/ui/lang/consts/nested-ref.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `&'static &'static T` constants where the `T` values don't themselves // contain references, and where the `T` values aren't immediately loaded from. diff --git a/tests/compiletests/ui/lang/consts/nested-ref.stderr b/tests/compiletests/ui/lang/consts/nested-ref.stderr index e66427d0a3..c15ce314ca 100644 --- a/tests/compiletests/ui/lang/consts/nested-ref.stderr +++ b/tests/compiletests/ui/lang/consts/nested-ref.stderr @@ -1,16 +1,16 @@ warning: `#[inline(never)]` function `nested_ref::deep_load` has been inlined - --> $DIR/nested-ref.rs:12:4 + --> $DIR/nested-ref.rs:13:4 | -12 | fn deep_load(r: &'static &'static u32) -> u32 { +13 | fn deep_load(r: &'static &'static u32) -> u32 { | ^^^^^^^^^ | = note: inlining was required due to illegal parameter type = note: called from `nested_ref::main` warning: `#[inline(never)]` function `nested_ref::deep_transpose` has been inlined - --> $DIR/nested-ref.rs:19:4 + --> $DIR/nested-ref.rs:20:4 | -19 | fn deep_transpose(r: &'static &'static Mat2) -> Mat2 { +20 | fn deep_transpose(r: &'static &'static Mat2) -> Mat2 { | ^^^^^^^^^^^^^^ | = note: inlining was required due to illegal parameter type diff --git a/tests/compiletests/ui/lang/consts/shallow-ref.rs b/tests/compiletests/ui/lang/consts/shallow-ref.rs index e0d8094e13..650d92b205 100644 --- a/tests/compiletests/ui/lang/consts/shallow-ref.rs +++ b/tests/compiletests/ui/lang/consts/shallow-ref.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test `&'static T` constants where the `T` values don't themselves contain // references, and where the `T` values aren't immediately loaded from. diff --git a/tests/compiletests/ui/lang/control_flow/closure_multi.rs b/tests/compiletests/ui/lang/control_flow/closure_multi.rs index 0bedf85361..8587d563ad 100644 --- a/tests/compiletests/ui/lang/control_flow/closure_multi.rs +++ b/tests/compiletests/ui/lang/control_flow/closure_multi.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std; use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/defer.rs b/tests/compiletests/ui/lang/control_flow/defer.rs index d09881fc48..6d64dbd4bd 100644 --- a/tests/compiletests/ui/lang/control_flow/defer.rs +++ b/tests/compiletests/ui/lang/control_flow/defer.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/for_range.rs b/tests/compiletests/ui/lang/control_flow/for_range.rs index 84cb95a7fb..0b26156e15 100644 --- a/tests/compiletests/ui/lang/control_flow/for_range.rs +++ b/tests/compiletests/ui/lang/control_flow/for_range.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/for_range_signed.rs b/tests/compiletests/ui/lang/control_flow/for_range_signed.rs index bd868ba7a5..f49dc815ac 100644 --- a/tests/compiletests/ui/lang/control_flow/for_range_signed.rs +++ b/tests/compiletests/ui/lang/control_flow/for_range_signed.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/for_with_custom_range_iter.rs b/tests/compiletests/ui/lang/control_flow/for_with_custom_range_iter.rs index cc25fb7262..3d3423b719 100644 --- a/tests/compiletests/ui/lang/control_flow/for_with_custom_range_iter.rs +++ b/tests/compiletests/ui/lang/control_flow/for_with_custom_range_iter.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // NOTE(eddyb) this tests `for` loop desugaring (with its call to `Iterator::next` // and matching on the resulting `Option`), without relying on a `Range` iterator. // More precisely, `Range` used to not compile, due to it using `mem::replace`, diff --git a/tests/compiletests/ui/lang/control_flow/if.rs b/tests/compiletests/ui/lang/control_flow/if.rs index 324c61ad7a..f854149fda 100644 --- a/tests/compiletests/ui/lang/control_flow/if.rs +++ b/tests/compiletests/ui/lang/control_flow/if.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/if_else.rs b/tests/compiletests/ui/lang/control_flow/if_else.rs index 87a89eba0b..be667ce982 100644 --- a/tests/compiletests/ui/lang/control_flow/if_else.rs +++ b/tests/compiletests/ui/lang/control_flow/if_else.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/if_else_if_else.rs b/tests/compiletests/ui/lang/control_flow/if_else_if_else.rs index d92948b3d7..548a4806ab 100644 --- a/tests/compiletests/ui/lang/control_flow/if_else_if_else.rs +++ b/tests/compiletests/ui/lang/control_flow/if_else_if_else.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/if_if.rs b/tests/compiletests/ui/lang/control_flow/if_if.rs index 3394b268e3..7250fe87d5 100644 --- a/tests/compiletests/ui/lang/control_flow/if_if.rs +++ b/tests/compiletests/ui/lang/control_flow/if_if.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/if_return_else.rs b/tests/compiletests/ui/lang/control_flow/if_return_else.rs index cf49a68ac3..81a9dc838b 100644 --- a/tests/compiletests/ui/lang/control_flow/if_return_else.rs +++ b/tests/compiletests/ui/lang/control_flow/if_return_else.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/if_return_else_return.rs b/tests/compiletests/ui/lang/control_flow/if_return_else_return.rs index 221c8fd269..9d7d143029 100644 --- a/tests/compiletests/ui/lang/control_flow/if_return_else_return.rs +++ b/tests/compiletests/ui/lang/control_flow/if_return_else_return.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/if_while.rs b/tests/compiletests/ui/lang/control_flow/if_while.rs index af749c1d28..80a93b9cd6 100644 --- a/tests/compiletests/ui/lang/control_flow/if_while.rs +++ b/tests/compiletests/ui/lang/control_flow/if_while.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/ifx2.rs b/tests/compiletests/ui/lang/control_flow/ifx2.rs index 19563d32a6..8e5adc3121 100644 --- a/tests/compiletests/ui/lang/control_flow/ifx2.rs +++ b/tests/compiletests/ui/lang/control_flow/ifx2.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/issue_283.rs b/tests/compiletests/ui/lang/control_flow/issue_283.rs index 0d5352a13a..6216a34ad3 100644 --- a/tests/compiletests/ui/lang/control_flow/issue_283.rs +++ b/tests/compiletests/ui/lang/control_flow/issue_283.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/loop.rs b/tests/compiletests/ui/lang/control_flow/loop.rs index d231078164..daf8666f16 100644 --- a/tests/compiletests/ui/lang/control_flow/loop.rs +++ b/tests/compiletests/ui/lang/control_flow/loop.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while.rs b/tests/compiletests/ui/lang/control_flow/while.rs index ae130cb632..7e77491422 100644 --- a/tests/compiletests/ui/lang/control_flow/while.rs +++ b/tests/compiletests/ui/lang/control_flow/while.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_break.rs b/tests/compiletests/ui/lang/control_flow/while_break.rs index d6d21d0b1f..5d10bbe1c0 100644 --- a/tests/compiletests/ui/lang/control_flow/while_break.rs +++ b/tests/compiletests/ui/lang/control_flow/while_break.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_continue.rs b/tests/compiletests/ui/lang/control_flow/while_continue.rs index 9810cf4b10..184c2b346e 100644 --- a/tests/compiletests/ui/lang/control_flow/while_continue.rs +++ b/tests/compiletests/ui/lang/control_flow/while_continue.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_if_break.rs b/tests/compiletests/ui/lang/control_flow/while_if_break.rs index f413f9cdf6..4aefa7b2d9 100644 --- a/tests/compiletests/ui/lang/control_flow/while_if_break.rs +++ b/tests/compiletests/ui/lang/control_flow/while_if_break.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_if_break_else_break.rs b/tests/compiletests/ui/lang/control_flow/while_if_break_else_break.rs index 96d1d25219..7c1a01eca6 100644 --- a/tests/compiletests/ui/lang/control_flow/while_if_break_else_break.rs +++ b/tests/compiletests/ui/lang/control_flow/while_if_break_else_break.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_if_break_if_break.rs b/tests/compiletests/ui/lang/control_flow/while_if_break_if_break.rs index 84212019df..2c78e7d5e2 100644 --- a/tests/compiletests/ui/lang/control_flow/while_if_break_if_break.rs +++ b/tests/compiletests/ui/lang/control_flow/while_if_break_if_break.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_if_continue.rs b/tests/compiletests/ui/lang/control_flow/while_if_continue.rs index 9ec2e082f5..ba42ab034d 100644 --- a/tests/compiletests/ui/lang/control_flow/while_if_continue.rs +++ b/tests/compiletests/ui/lang/control_flow/while_if_continue.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_if_continue_else_continue.rs b/tests/compiletests/ui/lang/control_flow/while_if_continue_else_continue.rs index a2cb50b6c7..66c8f745ac 100644 --- a/tests/compiletests/ui/lang/control_flow/while_if_continue_else_continue.rs +++ b/tests/compiletests/ui/lang/control_flow/while_if_continue_else_continue.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_return.rs b/tests/compiletests/ui/lang/control_flow/while_return.rs index 8150330c92..5aab6f6725 100644 --- a/tests/compiletests/ui/lang/control_flow/while_return.rs +++ b/tests/compiletests/ui/lang/control_flow/while_return.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_while.rs b/tests/compiletests/ui/lang/control_flow/while_while.rs index fc88f5a255..08303516dc 100644 --- a/tests/compiletests/ui/lang/control_flow/while_while.rs +++ b/tests/compiletests/ui/lang/control_flow/while_while.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_while_break.rs b/tests/compiletests/ui/lang/control_flow/while_while_break.rs index d90c9779ac..288a2e57b1 100644 --- a/tests/compiletests/ui/lang/control_flow/while_while_break.rs +++ b/tests/compiletests/ui/lang/control_flow/while_while_break.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_while_continue.rs b/tests/compiletests/ui/lang/control_flow/while_while_continue.rs index 5ae1d793e0..55584e3ac3 100644 --- a/tests/compiletests/ui/lang/control_flow/while_while_continue.rs +++ b/tests/compiletests/ui/lang/control_flow/while_while_continue.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_while_if_break.rs b/tests/compiletests/ui/lang/control_flow/while_while_if_break.rs index 0e294ea3da..ef1cab090f 100644 --- a/tests/compiletests/ui/lang/control_flow/while_while_if_break.rs +++ b/tests/compiletests/ui/lang/control_flow/while_while_if_break.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/control_flow/while_while_if_continue.rs b/tests/compiletests/ui/lang/control_flow/while_while_if_continue.rs index b770476995..9319e3b27d 100644 --- a/tests/compiletests/ui/lang/control_flow/while_while_if_continue.rs +++ b/tests/compiletests/ui/lang/control_flow/while_while_if_continue.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/core/array/init_array_i16.rs b/tests/compiletests/ui/lang/core/array/init_array_i16.rs index d0f3269e0c..0c09df06a6 100644 --- a/tests/compiletests/ui/lang/core/array/init_array_i16.rs +++ b/tests/compiletests/ui/lang/core/array/init_array_i16.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test creating an array. // build-pass diff --git a/tests/compiletests/ui/lang/core/array/init_array_i32.rs b/tests/compiletests/ui/lang/core/array/init_array_i32.rs index c6fea6b900..6dbb3aef6b 100644 --- a/tests/compiletests/ui/lang/core/array/init_array_i32.rs +++ b/tests/compiletests/ui/lang/core/array/init_array_i32.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test creating an array. // build-pass diff --git a/tests/compiletests/ui/lang/core/array/init_array_i64.rs b/tests/compiletests/ui/lang/core/array/init_array_i64.rs index 8f5120c27c..54bb081cc5 100644 --- a/tests/compiletests/ui/lang/core/array/init_array_i64.rs +++ b/tests/compiletests/ui/lang/core/array/init_array_i64.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test creating an array. // build-pass diff --git a/tests/compiletests/ui/lang/core/array/init_array_i8.rs b/tests/compiletests/ui/lang/core/array/init_array_i8.rs index fda9b1abcd..395f7679a9 100644 --- a/tests/compiletests/ui/lang/core/array/init_array_i8.rs +++ b/tests/compiletests/ui/lang/core/array/init_array_i8.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test creating an array. // build-pass diff --git a/tests/compiletests/ui/lang/core/intrinsics/leading_zeros.rs b/tests/compiletests/ui/lang/core/intrinsics/leading_zeros.rs index d0009ffd1c..358d28946b 100644 --- a/tests/compiletests/ui/lang/core/intrinsics/leading_zeros.rs +++ b/tests/compiletests/ui/lang/core/intrinsics/leading_zeros.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/core/intrinsics/trailing_zeros.rs b/tests/compiletests/ui/lang/core/intrinsics/trailing_zeros.rs index a5de0cf946..68c0d81220 100644 --- a/tests/compiletests/ui/lang/core/intrinsics/trailing_zeros.rs +++ b/tests/compiletests/ui/lang/core/intrinsics/trailing_zeros.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/core/mem/create_unitialized_memory.rs b/tests/compiletests/ui/lang/core/mem/create_unitialized_memory.rs index 6eef32d8a6..8e3b5ce0cd 100644 --- a/tests/compiletests/ui/lang/core/mem/create_unitialized_memory.rs +++ b/tests/compiletests/ui/lang/core/mem/create_unitialized_memory.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test creating uninitialized memory. // build-pass diff --git a/tests/compiletests/ui/lang/core/ops/logical_and.rs b/tests/compiletests/ui/lang/core/ops/logical_and.rs index 9982280c17..e5085352ae 100644 --- a/tests/compiletests/ui/lang/core/ops/logical_and.rs +++ b/tests/compiletests/ui/lang/core/ops/logical_and.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test using `&&` operator. // build-pass diff --git a/tests/compiletests/ui/lang/core/ops/range-contains.rs b/tests/compiletests/ui/lang/core/ops/range-contains.rs index 0372795793..3c87166d4c 100644 --- a/tests/compiletests/ui/lang/core/ops/range-contains.rs +++ b/tests/compiletests/ui/lang/core/ops/range-contains.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that using `(a..b).contains(&x)`, which is starting to get used // in `core` (see https://github.com/rust-lang/rust/pull/87723), cannot // cause a fatal error, but at most a zombie or SPIR-V validation error. diff --git a/tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.rs b/tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.rs index 02596f69c3..770575518e 100644 --- a/tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.rs +++ b/tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Doesn't work, only worked before because I think it got optimized away before // hitting the backend. diff --git a/tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.stderr b/tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.stderr index b52a31b6a3..affd2d2052 100644 --- a/tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.stderr +++ b/tests/compiletests/ui/lang/core/ptr/allocate_const_scalar.stderr @@ -1,7 +1,7 @@ warning: the feature `ptr_internals` is internal to the compiler or standard library - --> $DIR/allocate_const_scalar.rs:6:12 + --> $DIR/allocate_const_scalar.rs:7:12 | -6 | #![feature(ptr_internals)] +7 | #![feature(ptr_internals)] | ^^^^^^^^^^^^^ | = note: using it is strongly discouraged @@ -10,14 +10,14 @@ warning: the feature `ptr_internals` is internal to the compiler or standard lib error: pointer has non-null integer address | note: used from within `allocate_const_scalar::main` - --> $DIR/allocate_const_scalar.rs:16:5 + --> $DIR/allocate_const_scalar.rs:17:5 | -16 | *output = POINTER; +17 | *output = POINTER; | ^^^^^^^^^^^^^^^^^ note: called by `main` - --> $DIR/allocate_const_scalar.rs:15:8 + --> $DIR/allocate_const_scalar.rs:16:8 | -15 | pub fn main(output: &mut Unique<[u8; 4]>) { +16 | pub fn main(output: &mut Unique<[u8; 4]>) { | ^^^^ error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/compiletests/ui/lang/core/ptr/allocate_null.rs b/tests/compiletests/ui/lang/core/ptr/allocate_null.rs index 7182d94252..c39e5af52e 100644 --- a/tests/compiletests/ui/lang/core/ptr/allocate_null.rs +++ b/tests/compiletests/ui/lang/core/ptr/allocate_null.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests allocating a null pointer at `const` time. // build-pass diff --git a/tests/compiletests/ui/lang/core/ptr/allocate_vec_like.rs b/tests/compiletests/ui/lang/core/ptr/allocate_vec_like.rs index 7319a25ca6..1b3734f924 100644 --- a/tests/compiletests/ui/lang/core/ptr/allocate_vec_like.rs +++ b/tests/compiletests/ui/lang/core/ptr/allocate_vec_like.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests using a vector like pointer at `const` time. // build-pass diff --git a/tests/compiletests/ui/lang/core/ptr/allocate_vec_like.stderr b/tests/compiletests/ui/lang/core/ptr/allocate_vec_like.stderr index d4376b8486..f7bacbe6c7 100644 --- a/tests/compiletests/ui/lang/core/ptr/allocate_vec_like.stderr +++ b/tests/compiletests/ui/lang/core/ptr/allocate_vec_like.stderr @@ -1,7 +1,7 @@ warning: the feature `ptr_internals` is internal to the compiler or standard library - --> $DIR/allocate_vec_like.rs:4:12 + --> $DIR/allocate_vec_like.rs:5:12 | -4 | #![feature(ptr_internals)] +5 | #![feature(ptr_internals)] | ^^^^^^^^^^^^^ | = note: using it is strongly discouraged diff --git a/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.rs b/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.rs index e0f13873ba..05db095d3f 100644 --- a/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.rs +++ b/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // FIXME(eddyb) this is like `member_ref_arg`, but testing the error messages // in some broken cases - this test should eventually pass, but for now // we care more that the error messages do not regress too much. diff --git a/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.stderr b/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.stderr index 21d8dd55b6..20d826917e 100644 --- a/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.stderr +++ b/tests/compiletests/ui/lang/core/ref/member_ref_arg-broken.stderr @@ -1,34 +1,34 @@ warning: `#[inline(never)]` function `member_ref_arg_broken::f` has been inlined - --> $DIR/member_ref_arg-broken.rs:20:4 + --> $DIR/member_ref_arg-broken.rs:21:4 | -20 | fn f(x: &u32) -> u32 { +21 | fn f(x: &u32) -> u32 { | ^ | = note: inlining was required due to illegal (pointer) argument = note: called from `member_ref_arg_broken::main` warning: `#[inline(never)]` function `member_ref_arg_broken::g` has been inlined - --> $DIR/member_ref_arg-broken.rs:25:4 + --> $DIR/member_ref_arg-broken.rs:26:4 | -25 | fn g(xy: (&u32, &u32)) -> (u32, u32) { +26 | fn g(xy: (&u32, &u32)) -> (u32, u32) { | ^ | = note: inlining was required due to illegal (pointer) argument = note: called from `member_ref_arg_broken::main` warning: `#[inline(never)]` function `member_ref_arg_broken::h` has been inlined - --> $DIR/member_ref_arg-broken.rs:30:4 + --> $DIR/member_ref_arg-broken.rs:31:4 | -30 | fn h(xyz: (&u32, &u32, &u32)) -> (u32, u32, u32) { +31 | fn h(xyz: (&u32, &u32, &u32)) -> (u32, u32, u32) { | ^ | = note: inlining was required due to illegal parameter type = note: called from `member_ref_arg_broken::main` warning: `#[inline(never)]` function `member_ref_arg_broken::h_newtyped` has been inlined - --> $DIR/member_ref_arg-broken.rs:41:4 + --> $DIR/member_ref_arg-broken.rs:42:4 | -41 | fn h_newtyped(xyz: ((&u32, &u32, &u32),)) -> (u32, u32, u32) { +42 | fn h_newtyped(xyz: ((&u32, &u32, &u32),)) -> (u32, u32, u32) { | ^^^^^^^^^^ | = note: inlining was required due to illegal parameter type diff --git a/tests/compiletests/ui/lang/core/ref/member_ref_arg.rs b/tests/compiletests/ui/lang/core/ref/member_ref_arg.rs index fdf6b1b356..46768a088d 100644 --- a/tests/compiletests/ui/lang/core/ref/member_ref_arg.rs +++ b/tests/compiletests/ui/lang/core/ref/member_ref_arg.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/core/ref/member_ref_arg.stderr b/tests/compiletests/ui/lang/core/ref/member_ref_arg.stderr index fd875abfcc..7c682ae9e9 100644 --- a/tests/compiletests/ui/lang/core/ref/member_ref_arg.stderr +++ b/tests/compiletests/ui/lang/core/ref/member_ref_arg.stderr @@ -1,16 +1,16 @@ warning: `#[inline(never)]` function `member_ref_arg::f` has been inlined - --> $DIR/member_ref_arg.rs:14:4 + --> $DIR/member_ref_arg.rs:15:4 | -14 | fn f(x: &u32) {} +15 | fn f(x: &u32) {} | ^ | = note: inlining was required due to illegal (pointer) argument = note: called from `member_ref_arg::main` warning: `#[inline(never)]` function `member_ref_arg::g` has been inlined - --> $DIR/member_ref_arg.rs:17:4 + --> $DIR/member_ref_arg.rs:18:4 | -17 | fn g(xy: (&u32, &u32)) {} +18 | fn g(xy: (&u32, &u32)) {} | ^ | = note: inlining was required due to illegal (pointer) argument diff --git a/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg-broken.rs b/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg-broken.rs index cdb10e4fbd..db14b93b7c 100644 --- a/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg-broken.rs +++ b/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg-broken.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // FIXME(eddyb) this is like `zst_member_ref_arg`, but testing the error messages // in some broken cases (see issue #1037) - this test should eventually pass, but // for now we care more that the error messages do not regress too much. diff --git a/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg-broken.stderr b/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg-broken.stderr index 126ff058ac..3155eff5dc 100644 --- a/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg-broken.stderr +++ b/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg-broken.stderr @@ -1,166 +1,166 @@ error: cannot offset a pointer to an arbitrary element - --> $DIR/zst_member_ref_arg-broken.rs:23:7 + --> $DIR/zst_member_ref_arg-broken.rs:24:7 | -23 | f(&s.y); +24 | f(&s.y); | ^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar` - --> $DIR/zst_member_ref_arg-broken.rs:23:7 + --> $DIR/zst_member_ref_arg-broken.rs:24:7 | -23 | f(&s.y); +24 | f(&s.y); | ^^^^ note: called by `main_scalar` - --> $DIR/zst_member_ref_arg-broken.rs:22:8 + --> $DIR/zst_member_ref_arg-broken.rs:23:8 | -22 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { +23 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { | ^^^^^^^^^^^ error: cannot cast between pointer types from `*u32` to `*u8` - --> $DIR/zst_member_ref_arg-broken.rs:23:7 + --> $DIR/zst_member_ref_arg-broken.rs:24:7 | -23 | f(&s.y); +24 | f(&s.y); | ^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar` - --> $DIR/zst_member_ref_arg-broken.rs:23:7 + --> $DIR/zst_member_ref_arg-broken.rs:24:7 | -23 | f(&s.y); +24 | f(&s.y); | ^^^^ note: called by `main_scalar` - --> $DIR/zst_member_ref_arg-broken.rs:22:8 + --> $DIR/zst_member_ref_arg-broken.rs:23:8 | -22 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { +23 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { | ^^^^^^^^^^^ error: cannot cast between pointer types from `*u8` to `*struct B { }` - --> $DIR/zst_member_ref_arg-broken.rs:23:5 + --> $DIR/zst_member_ref_arg-broken.rs:24:5 | -23 | f(&s.y); +24 | f(&s.y); | ^^^^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar` - --> $DIR/zst_member_ref_arg-broken.rs:23:5 + --> $DIR/zst_member_ref_arg-broken.rs:24:5 | -23 | f(&s.y); +24 | f(&s.y); | ^^^^^^^ note: called by `main_scalar` - --> $DIR/zst_member_ref_arg-broken.rs:22:8 + --> $DIR/zst_member_ref_arg-broken.rs:23:8 | -22 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { +23 | pub fn main_scalar(#[spirv(push_constant)] s: &S) { | ^^^^^^^^^^^ error: cannot offset a pointer to an arbitrary element - --> $DIR/zst_member_ref_arg-broken.rs:28:7 + --> $DIR/zst_member_ref_arg-broken.rs:29:7 | -28 | f(&s.y); +29 | f(&s.y); | ^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar_pair` - --> $DIR/zst_member_ref_arg-broken.rs:28:7 + --> $DIR/zst_member_ref_arg-broken.rs:29:7 | -28 | f(&s.y); +29 | f(&s.y); | ^^^^ note: called by `main_scalar_pair` - --> $DIR/zst_member_ref_arg-broken.rs:27:8 + --> $DIR/zst_member_ref_arg-broken.rs:28:8 | -27 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { +28 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { | ^^^^^^^^^^^^^^^^ error: cannot cast between pointer types from `*struct S { u32, u32 }` to `*u8` - --> $DIR/zst_member_ref_arg-broken.rs:28:7 + --> $DIR/zst_member_ref_arg-broken.rs:29:7 | -28 | f(&s.y); +29 | f(&s.y); | ^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar_pair` - --> $DIR/zst_member_ref_arg-broken.rs:28:7 + --> $DIR/zst_member_ref_arg-broken.rs:29:7 | -28 | f(&s.y); +29 | f(&s.y); | ^^^^ note: called by `main_scalar_pair` - --> $DIR/zst_member_ref_arg-broken.rs:27:8 + --> $DIR/zst_member_ref_arg-broken.rs:28:8 | -27 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { +28 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { | ^^^^^^^^^^^^^^^^ error: cannot cast between pointer types from `*u8` to `*struct B { }` - --> $DIR/zst_member_ref_arg-broken.rs:28:5 + --> $DIR/zst_member_ref_arg-broken.rs:29:5 | -28 | f(&s.y); +29 | f(&s.y); | ^^^^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar_pair` - --> $DIR/zst_member_ref_arg-broken.rs:28:5 + --> $DIR/zst_member_ref_arg-broken.rs:29:5 | -28 | f(&s.y); +29 | f(&s.y); | ^^^^^^^ note: called by `main_scalar_pair` - --> $DIR/zst_member_ref_arg-broken.rs:27:8 + --> $DIR/zst_member_ref_arg-broken.rs:28:8 | -27 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { +28 | pub fn main_scalar_pair(#[spirv(push_constant)] s: &S) { | ^^^^^^^^^^^^^^^^ error: cannot offset a pointer to an arbitrary element - --> $DIR/zst_member_ref_arg-broken.rs:33:7 + --> $DIR/zst_member_ref_arg-broken.rs:34:7 | -33 | f(&s.y); +34 | f(&s.y); | ^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar_scalar_pair_nested` - --> $DIR/zst_member_ref_arg-broken.rs:33:7 + --> $DIR/zst_member_ref_arg-broken.rs:34:7 | -33 | f(&s.y); +34 | f(&s.y); | ^^^^ note: called by `main_scalar_scalar_pair_nested` - --> $DIR/zst_member_ref_arg-broken.rs:32:8 + --> $DIR/zst_member_ref_arg-broken.rs:33:8 | -32 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { +33 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: cannot cast between pointer types from `*struct (usize, usize) { u32, u32 }` to `*u8` - --> $DIR/zst_member_ref_arg-broken.rs:33:7 + --> $DIR/zst_member_ref_arg-broken.rs:34:7 | -33 | f(&s.y); +34 | f(&s.y); | ^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar_scalar_pair_nested` - --> $DIR/zst_member_ref_arg-broken.rs:33:7 + --> $DIR/zst_member_ref_arg-broken.rs:34:7 | -33 | f(&s.y); +34 | f(&s.y); | ^^^^ note: called by `main_scalar_scalar_pair_nested` - --> $DIR/zst_member_ref_arg-broken.rs:32:8 + --> $DIR/zst_member_ref_arg-broken.rs:33:8 | -32 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { +33 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: cannot cast between pointer types from `*u8` to `*struct B { }` - --> $DIR/zst_member_ref_arg-broken.rs:33:5 + --> $DIR/zst_member_ref_arg-broken.rs:34:5 | -33 | f(&s.y); +34 | f(&s.y); | ^^^^^^^ | note: used from within `zst_member_ref_arg_broken::main_scalar_scalar_pair_nested` - --> $DIR/zst_member_ref_arg-broken.rs:33:5 + --> $DIR/zst_member_ref_arg-broken.rs:34:5 | -33 | f(&s.y); +34 | f(&s.y); | ^^^^^^^ note: called by `main_scalar_scalar_pair_nested` - --> $DIR/zst_member_ref_arg-broken.rs:32:8 + --> $DIR/zst_member_ref_arg-broken.rs:33:8 | -32 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { +33 | pub fn main_scalar_scalar_pair_nested(#[spirv(push_constant)] s: &S<(usize, usize)>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 9 previous errors diff --git a/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg.rs b/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg.rs index 4e99f1e2e3..ee99831421 100644 --- a/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg.rs +++ b/tests/compiletests/ui/lang/core/ref/zst_member_ref_arg.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; struct A; diff --git a/tests/compiletests/ui/lang/core/unwrap_or.rs b/tests/compiletests/ui/lang/core/unwrap_or.rs index d6644a902f..06ddca8a49 100644 --- a/tests/compiletests/ui/lang/core/unwrap_or.rs +++ b/tests/compiletests/ui/lang/core/unwrap_or.rs @@ -4,7 +4,7 @@ // OpINotEqual, as well as %bool, should not appear in the output. // build-pass -// compile-flags: -C llvm-args=--disassemble-entry=main +// compile-flags: -C llvm-args=--disassemble-entry=main,--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/f32/packing.rs b/tests/compiletests/ui/lang/f32/packing.rs index 0cb1c47da9..30356d5806 100644 --- a/tests/compiletests/ui/lang/f32/packing.rs +++ b/tests/compiletests/ui/lang/f32/packing.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that various packing methods work. // build-pass diff --git a/tests/compiletests/ui/lang/f32/signum.rs b/tests/compiletests/ui/lang/f32/signum.rs index 205d4b85f4..a45f286bba 100644 --- a/tests/compiletests/ui/lang/f32/signum.rs +++ b/tests/compiletests/ui/lang/f32/signum.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that `signum` works. // build-pass diff --git a/tests/compiletests/ui/lang/issue-415.rs b/tests/compiletests/ui/lang/issue-415.rs index d689f91f33..e575d48dbc 100644 --- a/tests/compiletests/ui/lang/issue-415.rs +++ b/tests/compiletests/ui/lang/issue-415.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that zero sized unions don't ICE (even if unions are generally not supported yet) // build-pass diff --git a/tests/compiletests/ui/lang/issue-46.rs b/tests/compiletests/ui/lang/issue-46.rs index 99a0835a95..59e2dea320 100644 --- a/tests/compiletests/ui/lang/issue-46.rs +++ b/tests/compiletests/ui/lang/issue-46.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/lang/issue-836.rs b/tests/compiletests/ui/lang/issue-836.rs index 1919fa3b32..9256a02401 100644 --- a/tests/compiletests/ui/lang/issue-836.rs +++ b/tests/compiletests/ui/lang/issue-836.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that newtypes of `ScalarPair` can have references taken to their field. // build-pass diff --git a/tests/compiletests/ui/lang/panic/builtin.rs b/tests/compiletests/ui/lang/panic/builtin.rs index fca1b971bc..972173c7e6 100644 --- a/tests/compiletests/ui/lang/panic/builtin.rs +++ b/tests/compiletests/ui/lang/panic/builtin.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test panics coming from the Rust language such as `1 / 0`. // build-pass diff --git a/tests/compiletests/ui/lang/panic/builtin_bounds_check.rs b/tests/compiletests/ui/lang/panic/builtin_bounds_check.rs index 0b94fedbdf..a1202a8fae 100644 --- a/tests/compiletests/ui/lang/panic/builtin_bounds_check.rs +++ b/tests/compiletests/ui/lang/panic/builtin_bounds_check.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that bounds checking causes panics. // build-pass diff --git a/tests/compiletests/ui/lang/panic/simple.rs b/tests/compiletests/ui/lang/panic/simple.rs index 8405097916..ca658add8d 100644 --- a/tests/compiletests/ui/lang/panic/simple.rs +++ b/tests/compiletests/ui/lang/panic/simple.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that calling `panic!` works. // build-pass diff --git a/tests/compiletests/ui/lang/panic/track_caller.rs b/tests/compiletests/ui/lang/panic/track_caller.rs index 436136876c..7acbfc89fd 100644 --- a/tests/compiletests/ui/lang/panic/track_caller.rs +++ b/tests/compiletests/ui/lang/panic/track_caller.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that propagating `#[track_caller]` doesn't cause constant-related errors. // build-pass diff --git a/tests/compiletests/ui/lang/panic/track_caller.stderr b/tests/compiletests/ui/lang/panic/track_caller.stderr index 0b97060a71..46e0aa551d 100644 --- a/tests/compiletests/ui/lang/panic/track_caller.stderr +++ b/tests/compiletests/ui/lang/panic/track_caller.stderr @@ -1,7 +1,7 @@ warning: `#[inline(never)]` function `track_caller::track_caller_maybe_panic::panic_cold_explicit` has been inlined - --> $DIR/track_caller.rs:10:9 + --> $DIR/track_caller.rs:11:9 | -10 | panic!(); +11 | panic!(); | ^^^^^^^^ | = note: inlining was required due to panicking diff --git a/tests/compiletests/ui/lang/u32/bit_reverse.rs b/tests/compiletests/ui/lang/u32/bit_reverse.rs index 41bfa8aac1..2caace597e 100644 --- a/tests/compiletests/ui/lang/u32/bit_reverse.rs +++ b/tests/compiletests/ui/lang/u32/bit_reverse.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test all trailing and leading zeros. No need to test ones, they just call the zero variant with !value // build-pass diff --git a/tests/compiletests/ui/lang/u32/count_ones.rs b/tests/compiletests/ui/lang/u32/count_ones.rs index 11058eea4c..682331581f 100644 --- a/tests/compiletests/ui/lang/u32/count_ones.rs +++ b/tests/compiletests/ui/lang/u32/count_ones.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test all trailing and leading zeros. No need to test ones, they just call the zero variant with !value // build-pass diff --git a/tests/compiletests/ui/spirv-attr/all-builtins.rs b/tests/compiletests/ui/spirv-attr/all-builtins.rs index cd83259d39..5cae20a2c0 100644 --- a/tests/compiletests/ui/spirv-attr/all-builtins.rs +++ b/tests/compiletests/ui/spirv-attr/all-builtins.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output // only-vulkan1.1 // compile-flags: -Ctarget-feature=+DeviceGroup,+DrawParameters,+FragmentBarycentricNV,+FragmentBarycentricKHR,+FragmentDensityEXT,+FragmentFullyCoveredEXT,+Geometry,+GroupNonUniform,+GroupNonUniformBallot,+MeshShadingNV,+MultiView,+MultiViewport,+RayTracingKHR,+SampleRateShading,+ShaderSMBuiltinsNV,+ShaderStereoViewNV,+StencilExportEXT,+Tessellation,+ext:SPV_AMD_shader_explicit_vertex_parameter,+ext:SPV_EXT_fragment_fully_covered,+ext:SPV_EXT_fragment_invocation_density,+ext:SPV_EXT_shader_stencil_export,+ext:SPV_KHR_ray_tracing,+ext:SPV_NV_fragment_shader_barycentric,+ext:SPV_NV_mesh_shader,+ext:SPV_NV_shader_sm_builtins,+ext:SPV_NV_stereo_view_rendering diff --git a/tests/compiletests/ui/spirv-attr/bool-inputs-err.rs b/tests/compiletests/ui/spirv-attr/bool-inputs-err.rs index d157703a06..4526be29bf 100644 --- a/tests/compiletests/ui/spirv-attr/bool-inputs-err.rs +++ b/tests/compiletests/ui/spirv-attr/bool-inputs-err.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail use spirv_std::spirv; diff --git a/tests/compiletests/ui/spirv-attr/bool-inputs-err.stderr b/tests/compiletests/ui/spirv-attr/bool-inputs-err.stderr index 2f79db13b5..a1b8311037 100644 --- a/tests/compiletests/ui/spirv-attr/bool-inputs-err.stderr +++ b/tests/compiletests/ui/spirv-attr/bool-inputs-err.stderr @@ -1,25 +1,25 @@ error: entry-point parameter cannot contain `bool`s - --> $DIR/bool-inputs-err.rs:13:12 + --> $DIR/bool-inputs-err.rs:14:12 | -13 | input: bool, +14 | input: bool, | ^^^^ error: entry-point parameter cannot contain `bool`s - --> $DIR/bool-inputs-err.rs:14:13 + --> $DIR/bool-inputs-err.rs:15:13 | -14 | output: &mut bool, +15 | output: &mut bool, | ^^^^^^^^^ error: entry-point parameter cannot contain `bool`s - --> $DIR/bool-inputs-err.rs:15:35 + --> $DIR/bool-inputs-err.rs:16:35 | -15 | #[spirv(push_constant)] push: &bool, +16 | #[spirv(push_constant)] push: &bool, | ^^^^^ error: entry-point parameter cannot contain `bool`s - --> $DIR/bool-inputs-err.rs:16:32 + --> $DIR/bool-inputs-err.rs:17:32 | -16 | #[spirv(uniform)] uniform: &Boolthing, +17 | #[spirv(uniform)] uniform: &Boolthing, | ^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/tests/compiletests/ui/spirv-attr/bool-inputs.rs b/tests/compiletests/ui/spirv-attr/bool-inputs.rs index c0d74df93b..c3fce8f037 100644 --- a/tests/compiletests/ui/spirv-attr/bool-inputs.rs +++ b/tests/compiletests/ui/spirv-attr/bool-inputs.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+FragmentFullyCoveredEXT,+ext:SPV_EXT_fragment_fully_covered +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/spirv-attr/int-without-flat.rs b/tests/compiletests/ui/spirv-attr/int-without-flat.rs index 5536f1a2b9..5aa437fed4 100644 --- a/tests/compiletests/ui/spirv-attr/int-without-flat.rs +++ b/tests/compiletests/ui/spirv-attr/int-without-flat.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail use spirv_std::spirv; diff --git a/tests/compiletests/ui/spirv-attr/int-without-flat.stderr b/tests/compiletests/ui/spirv-attr/int-without-flat.stderr index 45b5fcbc6b..ac6526f8b7 100644 --- a/tests/compiletests/ui/spirv-attr/int-without-flat.stderr +++ b/tests/compiletests/ui/spirv-attr/int-without-flat.stderr @@ -1,13 +1,13 @@ error: `Fragment` entry-point `Input` parameter must be decorated with `#[spirv(flat)]` - --> $DIR/int-without-flat.rs:6:22 + --> $DIR/int-without-flat.rs:7:22 | -6 | pub fn fragment(int: u32, double: f64) {} +7 | pub fn fragment(int: u32, double: f64) {} | ^^^ error: `Fragment` entry-point `Input` parameter must be decorated with `#[spirv(flat)]` - --> $DIR/int-without-flat.rs:6:35 + --> $DIR/int-without-flat.rs:7:35 | -6 | pub fn fragment(int: u32, double: f64) {} +7 | pub fn fragment(int: u32, double: f64) {} | ^^^ error: aborting due to 2 previous errors diff --git a/tests/compiletests/ui/spirv-attr/invalid-matrix-type-empty.rs b/tests/compiletests/ui/spirv-attr/invalid-matrix-type-empty.rs index f323a3f17a..d6eb4187f7 100644 --- a/tests/compiletests/ui/spirv-attr/invalid-matrix-type-empty.rs +++ b/tests/compiletests/ui/spirv-attr/invalid-matrix-type-empty.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests that matrix type inference fails correctly, for empty struct // build-fail diff --git a/tests/compiletests/ui/spirv-attr/invalid-matrix-type-empty.stderr b/tests/compiletests/ui/spirv-attr/invalid-matrix-type-empty.stderr index d34ef0ac5e..34c01f2b9f 100644 --- a/tests/compiletests/ui/spirv-attr/invalid-matrix-type-empty.stderr +++ b/tests/compiletests/ui/spirv-attr/invalid-matrix-type-empty.stderr @@ -1,7 +1,7 @@ error: #[spirv(matrix)] type must have at least two fields - --> $DIR/invalid-matrix-type-empty.rs:7:1 + --> $DIR/invalid-matrix-type-empty.rs:8:1 | -7 | pub struct EmptyStruct {} +8 | pub struct EmptyStruct {} | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 1 previous error diff --git a/tests/compiletests/ui/spirv-attr/invalid-matrix-type.rs b/tests/compiletests/ui/spirv-attr/invalid-matrix-type.rs index 1fba8e60af..fe9254c740 100644 --- a/tests/compiletests/ui/spirv-attr/invalid-matrix-type.rs +++ b/tests/compiletests/ui/spirv-attr/invalid-matrix-type.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests that matrix type inference fails correctly // build-fail diff --git a/tests/compiletests/ui/spirv-attr/invalid-matrix-type.stderr b/tests/compiletests/ui/spirv-attr/invalid-matrix-type.stderr index eda87f4c6e..6f5cb89be0 100644 --- a/tests/compiletests/ui/spirv-attr/invalid-matrix-type.stderr +++ b/tests/compiletests/ui/spirv-attr/invalid-matrix-type.stderr @@ -1,21 +1,21 @@ error: #[spirv(matrix)] type must have at least two fields - --> $DIR/invalid-matrix-type.rs:7:1 + --> $DIR/invalid-matrix-type.rs:8:1 | -7 | pub struct _FewerFields { +8 | pub struct _FewerFields { | ^^^^^^^^^^^^^^^^^^^^^^^ error: #[spirv(matrix)] type fields must all be vectors - --> $DIR/invalid-matrix-type.rs:12:1 + --> $DIR/invalid-matrix-type.rs:13:1 | -12 | pub struct _NotVectorField { +13 | pub struct _NotVectorField { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: field type is f32 error: #[spirv(matrix)] type fields must all be the same type - --> $DIR/invalid-matrix-type.rs:19:1 + --> $DIR/invalid-matrix-type.rs:20:1 | -19 | pub struct _DifferentType { +20 | pub struct _DifferentType { | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/tests/compiletests/ui/spirv-attr/matrix-type.rs b/tests/compiletests/ui/spirv-attr/matrix-type.rs index ef8ca60349..089ee92764 100644 --- a/tests/compiletests/ui/spirv-attr/matrix-type.rs +++ b/tests/compiletests/ui/spirv-attr/matrix-type.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -Ctarget-feature=+RayTracingKHR,+ext:SPV_KHR_ray_tracing +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; diff --git a/tests/compiletests/ui/storage_class/mutability-errors.rs b/tests/compiletests/ui/storage_class/mutability-errors.rs index e31ed99c80..3d0e953839 100644 --- a/tests/compiletests/ui/storage_class/mutability-errors.rs +++ b/tests/compiletests/ui/storage_class/mutability-errors.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Tests that using `&mut` (or interior mutability) with read-only storage classes // does actually error (see `mutability-errors.stderr` for the error messages). // build-fail diff --git a/tests/compiletests/ui/storage_class/mutability-errors.stderr b/tests/compiletests/ui/storage_class/mutability-errors.stderr index dc0a1c17dc..de04294825 100644 --- a/tests/compiletests/ui/storage_class/mutability-errors.stderr +++ b/tests/compiletests/ui/storage_class/mutability-errors.stderr @@ -1,79 +1,79 @@ error: entry-point requires a mutable reference... - --> $DIR/mutability-errors.rs:10:78 + --> $DIR/mutability-errors.rs:11:78 | -10 | #[spirv(descriptor_set = 0, binding = 0)] implicit_uniform_constant_mut: &mut Image2d, +11 | #[spirv(descriptor_set = 0, binding = 0)] implicit_uniform_constant_mut: &mut Image2d, | ^^^^^^^^^^^^ | note: ...but storage class `UniformConstant` is read-only - --> $DIR/mutability-errors.rs:10:78 + --> $DIR/mutability-errors.rs:11:78 | -10 | #[spirv(descriptor_set = 0, binding = 0)] implicit_uniform_constant_mut: &mut Image2d, +11 | #[spirv(descriptor_set = 0, binding = 0)] implicit_uniform_constant_mut: &mut Image2d, | ^^^^^^^^^^^^ `UniformConstant` deduced from type warning: redundant storage class attribute, storage class is deduced from type - --> $DIR/mutability-errors.rs:11:13 + --> $DIR/mutability-errors.rs:12:13 | -11 | #[spirv(uniform_constant, descriptor_set = 0, binding = 0)] uniform_constant_mut: &mut Image2d, +12 | #[spirv(uniform_constant, descriptor_set = 0, binding = 0)] uniform_constant_mut: &mut Image2d, | ^^^^^^^^^^^^^^^^ error: entry-point requires a mutable reference... - --> $DIR/mutability-errors.rs:11:87 + --> $DIR/mutability-errors.rs:12:87 | -11 | #[spirv(uniform_constant, descriptor_set = 0, binding = 0)] uniform_constant_mut: &mut Image2d, +12 | #[spirv(uniform_constant, descriptor_set = 0, binding = 0)] uniform_constant_mut: &mut Image2d, | ^^^^^^^^^^^^ | note: ...but storage class `UniformConstant` is read-only - --> $DIR/mutability-errors.rs:11:13 + --> $DIR/mutability-errors.rs:12:13 | -11 | #[spirv(uniform_constant, descriptor_set = 0, binding = 0)] uniform_constant_mut: &mut Image2d, +12 | #[spirv(uniform_constant, descriptor_set = 0, binding = 0)] uniform_constant_mut: &mut Image2d, | ^^^^^^^^^^^^^^^^ `UniformConstant` specified in attribute error: entry-point requires a mutable reference... - --> $DIR/mutability-errors.rs:12:69 + --> $DIR/mutability-errors.rs:13:69 | -12 | #[spirv(uniform, descriptor_set = 0, binding = 0)] uniform_mut: &mut u32, +13 | #[spirv(uniform, descriptor_set = 0, binding = 0)] uniform_mut: &mut u32, | ^^^^^^^^ | note: ...but storage class `Uniform` is read-only - --> $DIR/mutability-errors.rs:12:13 + --> $DIR/mutability-errors.rs:13:13 | -12 | #[spirv(uniform, descriptor_set = 0, binding = 0)] uniform_mut: &mut u32, +13 | #[spirv(uniform, descriptor_set = 0, binding = 0)] uniform_mut: &mut u32, | ^^^^^^^ `Uniform` specified in attribute error: entry-point requires interior mutability... - --> $DIR/mutability-errors.rs:13:78 + --> $DIR/mutability-errors.rs:14:78 | -13 | #[spirv(uniform, descriptor_set = 0, binding = 0)] uniform_interior_mut: &AtomicU32, +14 | #[spirv(uniform, descriptor_set = 0, binding = 0)] uniform_interior_mut: &AtomicU32, | ^^^^^^^^^^ | note: ...but storage class `Uniform` is read-only - --> $DIR/mutability-errors.rs:13:13 + --> $DIR/mutability-errors.rs:14:13 | -13 | #[spirv(uniform, descriptor_set = 0, binding = 0)] uniform_interior_mut: &AtomicU32, +14 | #[spirv(uniform, descriptor_set = 0, binding = 0)] uniform_interior_mut: &AtomicU32, | ^^^^^^^ `Uniform` specified in attribute error: entry-point requires a mutable reference... - --> $DIR/mutability-errors.rs:14:48 + --> $DIR/mutability-errors.rs:15:48 | -14 | #[spirv(push_constant)] push_constant_mut: &mut u32, +15 | #[spirv(push_constant)] push_constant_mut: &mut u32, | ^^^^^^^^ | note: ...but storage class `PushConstant` is read-only - --> $DIR/mutability-errors.rs:14:13 + --> $DIR/mutability-errors.rs:15:13 | -14 | #[spirv(push_constant)] push_constant_mut: &mut u32, +15 | #[spirv(push_constant)] push_constant_mut: &mut u32, | ^^^^^^^^^^^^^ `PushConstant` specified in attribute error: entry-point requires interior mutability... - --> $DIR/mutability-errors.rs:15:57 + --> $DIR/mutability-errors.rs:16:57 | -15 | #[spirv(push_constant)] push_constant_interior_mut: &AtomicU32, +16 | #[spirv(push_constant)] push_constant_interior_mut: &AtomicU32, | ^^^^^^^^^^ | note: ...but storage class `PushConstant` is read-only - --> $DIR/mutability-errors.rs:15:13 + --> $DIR/mutability-errors.rs:16:13 | -15 | #[spirv(push_constant)] push_constant_interior_mut: &AtomicU32, +16 | #[spirv(push_constant)] push_constant_interior_mut: &AtomicU32, | ^^^^^^^^^^^^^ `PushConstant` specified in attribute error: aborting due to 6 previous errors; 1 warning emitted diff --git a/tests/compiletests/ui/storage_class/push_constant.rs b/tests/compiletests/ui/storage_class/push_constant.rs index 3dd63231e0..5a7b0f0155 100644 --- a/tests/compiletests/ui/storage_class/push_constant.rs +++ b/tests/compiletests/ui/storage_class/push_constant.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that using push constants passes (Vulkan) validation. // build-pass diff --git a/tests/compiletests/ui/storage_class/runtime_descriptor_array.rs b/tests/compiletests/ui/storage_class/runtime_descriptor_array.rs index 0596b56725..989995e814 100644 --- a/tests/compiletests/ui/storage_class/runtime_descriptor_array.rs +++ b/tests/compiletests/ui/storage_class/runtime_descriptor_array.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+RuntimeDescriptorArray,+ext:SPV_EXT_descriptor_indexing +// compile-flags: -C llvm-args=--allow-fragment-no-output use spirv_std::spirv; use spirv_std::{Image, RuntimeArray, Sampler}; diff --git a/tests/compiletests/ui/storage_class/runtime_descriptor_array_error.rs b/tests/compiletests/ui/storage_class/runtime_descriptor_array_error.rs index 5ccefec3de..7a0cbfc07d 100644 --- a/tests/compiletests/ui/storage_class/runtime_descriptor_array_error.rs +++ b/tests/compiletests/ui/storage_class/runtime_descriptor_array_error.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // build-fail use spirv_std::{Image, RuntimeArray, spirv}; diff --git a/tests/compiletests/ui/storage_class/runtime_descriptor_array_error.stderr b/tests/compiletests/ui/storage_class/runtime_descriptor_array_error.stderr index a3c0d1b0b6..15d94679c3 100644 --- a/tests/compiletests/ui/storage_class/runtime_descriptor_array_error.stderr +++ b/tests/compiletests/ui/storage_class/runtime_descriptor_array_error.stderr @@ -1,13 +1,13 @@ error: descriptor indexing must use &RuntimeArray, not &[T] - --> $DIR/runtime_descriptor_array_error.rs:7:52 + --> $DIR/runtime_descriptor_array_error.rs:8:52 | -7 | #[spirv(descriptor_set = 0, binding = 0)] one: &[Image!(2D, type=f32, sampled)], +8 | #[spirv(descriptor_set = 0, binding = 0)] one: &[Image!(2D, type=f32, sampled)], | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use &[T] instead of &RuntimeArray - --> $DIR/runtime_descriptor_array_error.rs:8:61 + --> $DIR/runtime_descriptor_array_error.rs:9:61 | -8 | #[spirv(uniform, descriptor_set = 0, binding = 0)] two: &RuntimeArray, +9 | #[spirv(uniform, descriptor_set = 0, binding = 0)] two: &RuntimeArray, | ^^^^^^^^^^^^^^^^^^ error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/compiletests/ui/storage_class/storage_buffer-dst.rs b/tests/compiletests/ui/storage_class/storage_buffer-dst.rs index 8f9176ee73..0943fabf88 100644 --- a/tests/compiletests/ui/storage_class/storage_buffer-dst.rs +++ b/tests/compiletests/ui/storage_class/storage_buffer-dst.rs @@ -1,3 +1,4 @@ +// compile-flags: -C llvm-args=--allow-fragment-no-output // Test that using DST (i.e. slice) storage buffers passes (Vulkan) validation. // build-pass diff --git a/tests/compiletests/ui/storage_class/typed_buffer.rs b/tests/compiletests/ui/storage_class/typed_buffer.rs index f9f74bd3bd..bf7c6937dc 100644 --- a/tests/compiletests/ui/storage_class/typed_buffer.rs +++ b/tests/compiletests/ui/storage_class/typed_buffer.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec4; use spirv_std::TypedBuffer; diff --git a/tests/compiletests/ui/storage_class/typed_buffer_descriptor_array.rs b/tests/compiletests/ui/storage_class/typed_buffer_descriptor_array.rs index 1383707dec..02c9c222de 100644 --- a/tests/compiletests/ui/storage_class/typed_buffer_descriptor_array.rs +++ b/tests/compiletests/ui/storage_class/typed_buffer_descriptor_array.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+RuntimeDescriptorArray,+ext:SPV_EXT_descriptor_indexing +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec4; use spirv_std::spirv; diff --git a/tests/compiletests/ui/storage_class/typed_buffer_descriptor_array_slice.rs b/tests/compiletests/ui/storage_class/typed_buffer_descriptor_array_slice.rs index 9e62e99706..f5875c2760 100644 --- a/tests/compiletests/ui/storage_class/typed_buffer_descriptor_array_slice.rs +++ b/tests/compiletests/ui/storage_class/typed_buffer_descriptor_array_slice.rs @@ -1,5 +1,6 @@ // build-pass // compile-flags: -C target-feature=+RuntimeDescriptorArray,+ext:SPV_EXT_descriptor_indexing +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec4; use spirv_std::spirv; diff --git a/tests/compiletests/ui/storage_class/typed_buffer_slice.rs b/tests/compiletests/ui/storage_class/typed_buffer_slice.rs index b5bb2b84d9..127eba6ae6 100644 --- a/tests/compiletests/ui/storage_class/typed_buffer_slice.rs +++ b/tests/compiletests/ui/storage_class/typed_buffer_slice.rs @@ -1,4 +1,5 @@ // build-pass +// compile-flags: -C llvm-args=--allow-fragment-no-output use glam::Vec4; use spirv_std::TypedBuffer; From 1a5054c34eeeb8e98277129550b3afe42ef75805 Mon Sep 17 00:00:00 2001 From: zmr233 Date: Fri, 27 Jun 2025 13:51:41 +0800 Subject: [PATCH 7/7] Fix CI issues: rustfmt and compiletest stderr update - Fix rustfmt formatting in codegen_cx/mod.rs - Update expected stderr for sampled_image_rect_query_size_lod_err test --- crates/rustc_codegen_spirv/src/codegen_cx/mod.rs | 7 +++++-- .../query/sampled_image_rect_query_size_lod_err.stderr | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs b/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs index 57f62dc6b3..1372165095 100644 --- a/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs +++ b/crates/rustc_codegen_spirv/src/codegen_cx/mod.rs @@ -339,11 +339,14 @@ impl CodegenArgs { pub fn from_session(sess: &Session) -> Self { // Split comma-separated arguments within each llvm_args entry // This handles cases like "--disassemble-fn=foo,--allow-fragment-no-output" - let expanded_args: Vec = sess.opts.cg.llvm_args + let expanded_args: Vec = sess + .opts + .cg + .llvm_args .iter() .flat_map(|arg| arg.split(',').map(|s| s.to_string())) .collect(); - + match CodegenArgs::parse(&expanded_args) { Ok(ok) => ok, Err(err) => sess diff --git a/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.stderr b/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.stderr index 32c369a9bd..9c6a0fe48c 100644 --- a/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.stderr +++ b/tests/compiletests/ui/image/query/sampled_image_rect_query_size_lod_err.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Image: HasQuerySizeLod` is not satisfied - --> $DIR/sampled_image_rect_query_size_lod_err.rs:21:28 + --> $DIR/sampled_image_rect_query_size_lod_err.rs:22:28 | -21 | *output = rect_sampled.query_size_lod(0); +22 | *output = rect_sampled.query_size_lod(0); | ^^^^^^^^^^^^^^ the trait `HasQuerySizeLod` is not implemented for `Image` | = help: the following other types implement trait `HasQuerySizeLod`: