Skip to content

Commit e3c1b77

Browse files
committed
Run cargo fmt across workspace
1 parent 712ad0b commit e3c1b77

4 files changed

Lines changed: 3 additions & 14 deletions

File tree

rust/spirv-tools-core/src/disassembly/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
use super::{disassemble_binary, FRIENDLY_NAME_SAMPLE_BINARY};
32
use crate::assembly::{
43
assemble_text, assemble_text_with_options, BinaryToTextOptions, TextToBinaryOptions,

rust/spirv-tools-core/src/validation/error.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4230,9 +4230,7 @@ pub enum ValidationError {
42304230
type_id: Option<TypeId>,
42314231
},
42324232
/// OpTypeImage with 64-bit int sampled type requires Int64ImageEXT capability.
4233-
#[error(
4234-
"Capability Int64ImageEXT is required when using Sampled Type of 64-bit int"
4235-
)]
4233+
#[error("Capability Int64ImageEXT is required when using Sampled Type of 64-bit int")]
42364234
ImageTypeRequiresInt64ImageCapability,
42374235
/// OpTypeImage multisampled storage image requires StorageImageMultisample capability.
42384236
#[error(

rust/spirv-tools-core/src/validation/rules/image.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,7 @@ impl ValidationRule for ImageTypeRule {
194194
// Int64ImageEXT capability check: 64-bit int sampled type requires it
195195
if st_inst.class.opcode == Op::TypeInt {
196196
if let Some(Operand::LiteralBit32(width)) = st_inst.operands.first() {
197-
if *width == 64
198-
&& !ctx.has_capability(Capability::Int64ImageEXT)
199-
{
197+
if *width == 64 && !ctx.has_capability(Capability::Int64ImageEXT) {
200198
return Err(
201199
ValidationError::ImageTypeRequiresInt64ImageCapability
202200
.into(),

rust/spirv-tools-core/src/validation/tests/image.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ fn image_query_format_valid_kernel() {
145145
let text = [
146146
"OpCapability Kernel",
147147
"OpCapability Addresses",
148-
149148
"OpMemoryModel Physical64 OpenCL",
150149
"OpEntryPoint Kernel %main \"main\"",
151150
"%void = OpTypeVoid",
@@ -174,7 +173,6 @@ fn image_query_order_valid_kernel() {
174173
let text = [
175174
"OpCapability Kernel",
176175
"OpCapability Addresses",
177-
178176
"OpMemoryModel Physical64 OpenCL",
179177
"OpEntryPoint Kernel %main \"main\"",
180178
"%void = OpTypeVoid",
@@ -203,7 +201,6 @@ fn image_query_format_requires_int_scalar_result_kernel() {
203201
let text = [
204202
"OpCapability Kernel",
205203
"OpCapability Addresses",
206-
207204
"OpMemoryModel Physical64 OpenCL",
208205
"OpEntryPoint Kernel %main \"main\"",
209206
"%void = OpTypeVoid",
@@ -225,10 +222,7 @@ fn image_query_format_requires_int_scalar_result_kernel() {
225222
let err = validate_module(&binary, TargetEnv::Universal1_3)
226223
.expect_err("OpImageQueryFormat with float result should fail");
227224
assert!(
228-
matches!(
229-
err,
230-
ValidationError::ImageQueryResultTypeInvalid { .. }
231-
),
225+
matches!(err, ValidationError::ImageQueryResultTypeInvalid { .. }),
232226
"Expected ImageQueryResultTypeInvalid, got: {err:?}"
233227
);
234228
}

0 commit comments

Comments
 (0)