We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba4bfe7 commit 3389d2bCopy full SHA for 3389d2b
crates/spirv-std/src/image.rs
@@ -174,22 +174,7 @@ impl<
174
where
175
I: Integer,
176
{
177
- let mut result = SampledType::Vec4::default();
178
- unsafe {
179
- asm! {
180
- "OpDecorate %image NonUniform",
181
- "OpDecorate %result NonUniform",
182
- "%image = OpLoad _ {this}",
183
- "%coordinate = OpLoad _ {coordinate}",
184
- "%result = OpImageFetch typeof*{result} %image %coordinate Lod {lod}",
185
- "OpStore {result} %result",
186
- result = in(reg) &mut result,
187
- this = in(reg) self,
188
- coordinate = in(reg) &coordinate,
189
- lod = in(reg) lod,
190
- }
191
192
- result.truncate_into()
+ self.fetch_with(coordinate, sample_with::lod(lod))
193
}
194
195
0 commit comments