Keep the plugin list a refusal; compare the typed fixture's module words

The empty !gld.plugin_info list is what this Mac's (macOS 27) OpenGL front end writes, and its
modules then stop at other module-level shapes (an `OpenGL GLSL` language version beside
Metal's, repeated versions, contradictory compile options); the guests' modules, from macOS
26, reached the entries. So the module-level shapes stay refusals, and only the two entry
shapes the guests met change. The engine test compares FunctionArtifact::module.words.
This commit is contained in:
Anees Iqbal committed 2026-11-12 04:10:11 -08:00
1 parent 797a440edd
commit 9081edca8e
3 files changed
+1 -27

No files matched your search

@@ -39,7 +39,6 @@ enum Named {
WorkingDirectory,
RecordedSources,
DebugCompileUnits,
GlPluginInfo,
}
const NAMED: &[(&str, Named)] = &[
@@ -67,7 +66,6 @@ const NAMED: &[(&str, Named)] = &[
("llvm_utils.workingdir", Named::WorkingDirectory),
("llvm_utils.sources", Named::RecordedSources),
("llvm.dbg.cu", Named::DebugCompileUnits),
("gld.plugin_info", Named::GlPluginInfo),
];
/// Apple's named list of a module's program-scope buffer bindings (MSL 3.2): each entry
@@ -193,13 +191,6 @@ pub(super) fn decode(
}
}
}
// Apple's OpenGL front end names an empty list here in every module it writes. What
// an entry of it would say is unknown, so one is refused as a key outside the contract.
Named::GlPluginInfo => {
if !ops.is_empty() {
return Err(site.err(AbiError::UnknownKey, Some("gld.plugin_info")));
}
}
Named::Kernel | Named::Vertex | Named::Fragment | Named::Object | Named::Mesh => {}
Named::FunctionConstants => {
cx.meter.reserve(&mut abi.function_constants, ops.len())?;
-17
View File
@@ -2926,23 +2926,6 @@ fn debug_info_and_recorded_sources_leave_the_abi_unchanged() {
assert_eq!(debug, plain);
}
/// Apple's OpenGL front end adds an empty `!gld.plugin_info` list to every module it writes: the
/// module decodes to the ABI it has without it. An entry in the list says something unknown, and
/// is refused as a key outside the contract.
#[test]
fn an_empty_opengl_plugin_list_leaves_the_abi_unchanged() {
let plain = module_with(|_| {}).unwrap();
let listed = module_with(|b| b.named_md("gld.plugin_info", &[])).unwrap();
assert_eq!(listed, plain);
expect_abi(
module_with(|b| {
let n = node(b, &[S("plugin")]);
b.named_md("gld.plugin_info", &[n]);
}),
AbiError::UnknownKey,
);
}
/// The debug-info and recorded-source lists are read by their shapes: a compile unit that is not a
/// debug-info record, a recorded source without its text, or a file that is not a node is refused.
#[test]
@@ -129,6 +129,6 @@ fn the_typed_fixture_compiles_as_its_opaque_form_does() {
let [typed, opaque] = [&typed, &opaque].map(|bc| {
compile(bc, "read_through_constant", &p).unwrap_or_else(|e| panic!("{stem}: {e}"))
});
assert_eq!(typed.spirv, opaque.spirv, "{stem}");
assert_eq!(typed.module.words, opaque.module.words, "{stem}");
}
}