Skip to content

Commit

Permalink
Fixed Image::gather() not always returning a Vec4
Browse files Browse the repository at this point in the history
  • Loading branch information
oisyn committed Apr 21, 2023
1 parent 7b71878 commit 858c534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [PR#1029](https://github.com/EmbarkStudios/rust-gpu/pull/1029) fixed SampledImage::sample() fns being unnecessarily marked as unsafe

### Fixed 🩹
- [PR#1041](https://github.com/EmbarkStudios/rust-gpu/pull/1041) fixed `Image::gather()` not always returning a `Vec4`.
- [PR#1025](https://github.com/EmbarkStudios/rust-gpu/pull/1025) fixed [#1024](https://github.com/EmbarkStudios/rust-gpu/issues/1024) by keeping checked arithmetic "zombie" `bool`s disjoint from normal `bool` (`false`) consts
- [PR#1023](https://github.com/EmbarkStudios/rust-gpu/pull/1023) fixed [#1021](https://github.com/EmbarkStudios/rust-gpu/issues/1021) by always inlining calls with "not obviously legal" pointer args (instead of only inlining calls with "obviously illegal" pointer args)
- [PR#1009](https://github.com/EmbarkStudios/rust-gpu/pull/1009) fixed [#1008](https://github.com/EmbarkStudios/rust-gpu/issues/1008) by reinstating mutability checks for entry-point parameters pointing into read-only storage classes (e.g. `#[spirv(uniform)] x: &mut u32` is now again an error)
Expand Down
4 changes: 2 additions & 2 deletions crates/spirv-std/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl<
sampler: Sampler,
coordinate: impl ImageCoordinate<F, DIM, ARRAYED>,
component: u32,
) -> SampledType::SampleResult
) -> SampledType::Vec4
where
Self: HasGather,
F: Float,
Expand All @@ -212,7 +212,7 @@ impl<
component = in(reg) component,
}
}
result.truncate_into()
result
}

/// Sample texels at `coord` from the image using `sampler`.
Expand Down

0 comments on commit 858c534

Please sign in to comment.