Skip to content

Commit 3b1e8da

Browse files
style: use concat!(…)'d string for DIFFERENT_BGL_ORDER_BW_SHADER_AND_API
1 parent 94dba0b commit 3b1e8da

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

tests/tests/device.rs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -770,21 +770,22 @@ static DIFFERENT_BGL_ORDER_BW_SHADER_AND_API: GpuTestConfiguration = GpuTestConf
770770
// resource type) in the wrong list of a different resource type. Let's reproduce that
771771
// here.
772772

773-
let trivial_shaders_with_some_reversed_bindings = "\
774-
@group(0) @binding(3) var myTexture2: texture_2d<f32>;
775-
@group(0) @binding(2) var myTexture1: texture_2d<f32>;
776-
@group(0) @binding(1) var mySampler: sampler;
777-
778-
@fragment
779-
fn fs_main(@builtin(position) pos: vec4<f32>) -> @location(0) vec4f {
780-
return textureSample(myTexture1, mySampler, pos.xy) + textureSample(myTexture2, mySampler, pos.xy);
781-
}
782-
783-
@vertex
784-
fn vs_main() -> @builtin(position) vec4<f32> {
785-
return vec4<f32>(0.0, 0.0, 0.0, 1.0);
786-
}
787-
";
773+
let trivial_shaders_with_some_reversed_bindings = concat!(
774+
"@group(0) @binding(3) var myTexture2: texture_2d<f32>;\n",
775+
"@group(0) @binding(2) var myTexture1: texture_2d<f32>;\n",
776+
"@group(0) @binding(1) var mySampler: sampler;\n",
777+
"\n",
778+
"@fragment\n",
779+
"fn fs_main(@builtin(position) pos: vec4<f32>) -> @location(0) vec4f {\n",
780+
" return textureSample(myTexture1, mySampler, pos.xy) \n",
781+
" + textureSample(myTexture2, mySampler, pos.xy);\n",
782+
"}\n",
783+
"\n",
784+
"@vertex\n",
785+
"fn vs_main() -> @builtin(position) vec4<f32> {\n",
786+
" return vec4<f32>(0.0, 0.0, 0.0, 1.0);\n",
787+
"}\n",
788+
);
788789

789790
let trivial_shaders_with_some_reversed_bindings =
790791
ctx.device
@@ -852,7 +853,7 @@ fn vs_main() -> @builtin(position) vec4<f32> {
852853
depth_stencil: None,
853854
multisample: wgt::MultisampleState::default(),
854855
multiview: None,
855-
cache: None
856+
cache: None,
856857
});
857858

858859
// fail(&ctx.device, || {

0 commit comments

Comments
 (0)