Skip to content

Commit

Permalink
[wgpu-tests] Use concrete error messages for failures
Browse files Browse the repository at this point in the history
resolves gfx-rs#5727
  • Loading branch information
dv29 committed Jul 25, 2024
1 parent 205f1e3 commit 3bfdcc7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/tests/bind_group_layout_dedup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ static SEPARATE_PROGRAMS_HAVE_INCOMPATIBLE_DERIVED_BGLS: GpuTestConfiguration =

fn separate_programs_have_incompatible_derived_bgls(ctx: TestingContext) {
let buffer = ctx.device.create_buffer(&wgpu::BufferDescriptor {
label: None,
label: Some("buffer"),
size: 4,
usage: wgpu::BufferUsages::UNIFORM,
mapped_at_creation: false,
Expand All @@ -335,7 +335,7 @@ fn separate_programs_have_incompatible_derived_bgls(ctx: TestingContext) {
});

let desc = wgpu::ComputePipelineDescriptor {
label: None,
label: Some("pipeline"),
layout: None,
module: &module,
entry_point: "resources",
Expand All @@ -347,7 +347,7 @@ fn separate_programs_have_incompatible_derived_bgls(ctx: TestingContext) {
let pipeline2 = ctx.device.create_compute_pipeline(&desc);

let bg2 = ctx.device.create_bind_group(&wgpu::BindGroupDescriptor {
label: None,
label: Some("bg2"),
layout: &pipeline2.get_bind_group_layout(0),
entries: &[wgpu::BindGroupEntry {
binding: 0,
Expand All @@ -358,7 +358,7 @@ fn separate_programs_have_incompatible_derived_bgls(ctx: TestingContext) {
let mut encoder = ctx.device.create_command_encoder(&Default::default());

let mut pass = encoder.begin_compute_pass(&wgpu::ComputePassDescriptor {
label: None,
label: Some("pass"),
timestamp_writes: None,
});

Expand All @@ -373,7 +373,7 @@ fn separate_programs_have_incompatible_derived_bgls(ctx: TestingContext) {
|| {
drop(pass);
},
None,
Some("the bindgrouplayout with '' label of current set bindgroup with 'bg2' label at index 0 is not compatible with the corresponding bindgrouplayout with '' label of computepipeline with 'pipeline' label"),
);
}

Expand Down

0 comments on commit 3bfdcc7

Please sign in to comment.