Skip to content

Commit a01aafb

Browse files
committed
nonuniform: sampling images is always declared NonUniform
1 parent 02073b0 commit a01aafb

38 files changed

+219
-95
lines changed

crates/spirv-std/src/image.rs

Lines changed: 136 additions & 29 deletions
Large diffs are not rendered by default.

tests/ui/image/components.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags: -Ctarget-feature=+StorageImageExtendedFormats
2+
// compile-flags: -Ctarget-feature=+StorageImageExtendedFormats,+ShaderNonUniform,+ext:SPV_EXT_descriptor_indexing
33

44
use glam::{Vec2, Vec3, Vec4};
55
use spirv_std::spirv;

tests/ui/image/fetch.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// build-pass
2+
// compile-flags: -Ctarget-feature=+ShaderNonUniform,+ext:SPV_EXT_descriptor_indexing
23

34
use spirv_std::spirv;
45
use spirv_std::{Image, arch};

tests/ui/image/format.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// build-pass
2+
// compile-flags: -Ctarget-feature=+ShaderNonUniform,+ext:SPV_EXT_descriptor_indexing
23

34
use spirv_std::spirv;
45
use spirv_std::{Image, arch};

tests/ui/image/gather.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test `OpImageGather`
22
// build-pass
3+
// compile-flags: -Ctarget-feature=+ShaderNonUniform,+ext:SPV_EXT_descriptor_indexing
34

45
use core::arch::asm;
56
use spirv_std::spirv;

tests/ui/image/gather_err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// build-fail
22
// normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/"
3-
// compile-flags: -Ctarget-feature=+Sampled1D
3+
// compile-flags: -Ctarget-feature=+Sampled1D,+ShaderNonUniform,+ext:SPV_EXT_descriptor_indexing
44

55
use spirv_std::{Image, Sampler, arch, spirv};
66

tests/ui/image/gather_err.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ error[E0277]: the trait bound `Image<f32, 0, 2, 0, 0, 1, 0, 4>: HasGather` is no
99
Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
1010
Image<SampledType, 4, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
1111
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#1}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>::gather`
12-
--> $SPIRV_STD_SRC/image.rs:197:15
12+
--> $SPIRV_STD_SRC/image.rs:199:15
1313
|
14-
190 | pub fn gather<F>(
14+
192 | pub fn gather<F>(
1515
| ------ required by a bound in this associated function
1616
...
17-
197 | Self: HasGather,
17+
199 | Self: HasGather,
1818
| ^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#1}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>::gather`
1919

2020
error[E0277]: the trait bound `Image<f32, 2, 2, 0, 0, 1, 0, 4>: HasGather` is not satisfied
@@ -28,12 +28,12 @@ error[E0277]: the trait bound `Image<f32, 2, 2, 0, 0, 1, 0, 4>: HasGather` is no
2828
Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
2929
Image<SampledType, 4, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
3030
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#1}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>::gather`
31-
--> $SPIRV_STD_SRC/image.rs:197:15
31+
--> $SPIRV_STD_SRC/image.rs:199:15
3232
|
33-
190 | pub fn gather<F>(
33+
192 | pub fn gather<F>(
3434
| ------ required by a bound in this associated function
3535
...
36-
197 | Self: HasGather,
36+
199 | Self: HasGather,
3737
| ^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#1}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>::gather`
3838

3939
error: aborting due to 2 previous errors

tests/ui/image/image_with.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// build-pass
2+
// compile-flags: -Ctarget-feature=+ShaderNonUniform,+ext:SPV_EXT_descriptor_indexing
23

34
use spirv_std::spirv;
45
use spirv_std::{Image, Sampler, arch, image::ImageWithMethods, image::sample_with};

tests/ui/image/issue_527.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags: -C target-feature=+StorageImageWriteWithoutFormat
2+
// compile-flags: -C target-feature=+StorageImageWriteWithoutFormat,+ShaderNonUniform,+ext:SPV_EXT_descriptor_indexing
33

44
use glam::*;
55
use spirv_std::spirv;

tests/ui/image/query/query_levels.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags: -C target-feature=+ImageQuery
2+
// compile-flags: -C target-feature=+ImageQuery,+ShaderNonUniform,+ext:SPV_EXT_descriptor_indexing
33

44
use spirv_std::spirv;
55
use spirv_std::{Image, arch};

0 commit comments

Comments
 (0)