Translator tests: the integer heap slice's refusal is checked by its cause field
an_imageblock_slice_writes_an_argument_buffer_texture checked for the text "Imageblocks:
SliceWrite;", but a refusal that names its intrinsic prints it after the feature ("Imageblocks
(air.write_imageblock_slice_to_texture_2d.i16.v4i16): SliceWrite; needs NotImplemented"), so
the text check failed on a refusal whose cause was SliceWrite. The test now compares
Unsupported::cause with Cause::Imageblocks(ImageblockCause::SliceWrite).
Verified: job m3-max-84245 (CPU) printed the refusal above, cause SliceWrite, with the text check
failing; the field check's run follows.
This commit is contained in:
1 parent
71a5393966
commit
e498cbaa54
1 file changed
+7
-2
@@ -33,7 +33,8 @@ use crate::device::profile::DeviceProfile;
|
||||
use crate::device::DevicePolicy;
|
||||
use crate::device::{Device, DeviceDescription, Requirements, VkFeature};
|
||||
use crate::error::{
|
||||
AbiError, Error, Feature, InputErrorKind, LowerFamily, Needs, RuntimeInput, Unsupported,
|
||||
AbiError, Cause, Error, Feature, ImageblockCause, InputErrorKind, LowerFamily, Needs,
|
||||
RuntimeInput, Unsupported,
|
||||
};
|
||||
use crate::library::{FunctionArtifact, Library};
|
||||
use crate::metal::sampler::SamplerWord;
|
||||
@@ -2622,7 +2623,11 @@ fn an_imageblock_slice_writes_an_argument_buffer_texture() {
|
||||
let u = unsupported(compile(&bc, "heap_slice", &m3()).expect_err("heap_slice_integer"));
|
||||
assert_eq!(u.feature, Feature::Imageblocks);
|
||||
assert_eq!(u.needs, Needs::NotImplemented);
|
||||
assert!(u.to_string().contains("Imageblocks: SliceWrite;"), "{u}");
|
||||
assert_eq!(
|
||||
u.cause,
|
||||
Some(Cause::Imageblocks(ImageblockCause::SliceWrite)),
|
||||
"{u}"
|
||||
);
|
||||
}
|
||||
|
||||
pub(super) const OP_IMAGE_SAMPLE_DREF_EXPLICIT_LOD: u16 = 90;
|
||||
|
||||
Reference in new issue
Block a user