Skip to content

Commit

Permalink
undo analyzer change
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Dec 5, 2022
1 parent 93649ea commit 9ddf38e
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/valid/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ impl FunctionInfo {
E::ImageSample {
image,
sampler,
gather,
gather: _,
coordinate,
array_index,
offset: _,
Expand All @@ -581,17 +581,15 @@ impl FunctionInfo {
let image_storage = GlobalOrArgument::from_expression(expression_arena, image)?;
let sampler_storage = GlobalOrArgument::from_expression(expression_arena, sampler)?;

if gather.is_none() {
match (image_storage, sampler_storage) {
(GlobalOrArgument::Global(image), GlobalOrArgument::Global(sampler)) => {
self.sampling_set.insert(SamplingKey { image, sampler });
}
_ => {
self.sampling.insert(Sampling {
image: image_storage,
sampler: sampler_storage,
});
}
match (image_storage, sampler_storage) {
(GlobalOrArgument::Global(image), GlobalOrArgument::Global(sampler)) => {
self.sampling_set.insert(SamplingKey { image, sampler });
}
_ => {
self.sampling.insert(Sampling {
image: image_storage,
sampler: sampler_storage,
});
}
}

Expand Down

0 comments on commit 9ddf38e

Please sign in to comment.