validation: the runtime's command shape raises indirect_indexed_draws in the contract test
What: executor_contract::tests::engine_case_families_follow_the_case_literals asserted that the runtime's indirect command shape raises nothing. It now asserts that the shape raises indirect_indexed_draws alone. Its comment says the engine's candidate does not map the shape. The test already holds every departure from the shape to its runtime limit, so the case test the_runtime_s_command_shape_is_a_typed_gap_of_the_engine_candidate drops its own two departures and keeps the typed refusal and the checker's gap. unsupported_observation_requirements, a public item, linked to the private replay_observes_commands, which workspace Rustdoc -D warnings refuses. It now links case_requirements. Why: job m3-max-65502 at 4ffd256717's previous base (277e388fe0) failed these two: doc (one private-intra-doc-links error) and that one validation test. fmt, signatures and clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd were green; m3-max-65550 then passed all 1333. Verified: m3-max-65550 and m3-max-65585, as the commit before says.
This commit is contained in:
1 parent
38104834d4
commit
2a3cc1cf47
2 files changed
+10
-26
No files matched your search
@@ -113,8 +113,9 @@ fn assert_engine_refuses(case: &AuthoredCase, requirement: ToolingRequirement) {
|
||||
|
||||
/// A command buffer of the one shape the runtime builds (indexed draws alone that inherit the
|
||||
/// pipeline state and bind their own buffers, none host-encoded) carries `indirect_indexed_draws`
|
||||
/// alone, which the checker cannot evidence and the engine candidate refuses typed; a departure
|
||||
/// from the shape carries its runtime limit instead.
|
||||
/// alone (`executor_contract::tests::engine_case_families_follow_the_case_literals` holds each
|
||||
/// departure from the shape to its runtime limit), which the checker cannot evidence and the
|
||||
/// engine candidate refuses typed.
|
||||
#[test]
|
||||
fn the_runtime_s_command_shape_is_a_typed_gap_of_the_engine_candidate() {
|
||||
use crate::case::indirect_commands::{CommandBufferResource, CommandDescriptor, RenderDraws};
|
||||
@@ -150,23 +151,6 @@ fn the_runtime_s_command_shape_is_a_typed_gap_of_the_engine_candidate() {
|
||||
Some("engine_candidate: indirect_indexed_draws (the candidate is stopped)")
|
||||
);
|
||||
assert_engine_refuses(&case, R::IndirectIndexedDraws);
|
||||
let departs = |change: &dyn Fn(&mut CommandBufferResource), limit: R| {
|
||||
let mut variant = case.clone();
|
||||
change(&mut variant.command_buffers[0]);
|
||||
assert_eq!(case_requirements(&variant), [limit].into(), "{limit}");
|
||||
};
|
||||
departs(
|
||||
&|buffer| buffer.inherit_buffers = true,
|
||||
R::IndirectCommandInheritance,
|
||||
);
|
||||
departs(
|
||||
&|buffer| {
|
||||
if let CommandDescriptor::Render { draws, .. } = &mut buffer.descriptor {
|
||||
draws.primitives = true;
|
||||
}
|
||||
},
|
||||
R::IndirectDrawTypes,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1065,8 +1065,8 @@ pub fn require_executor(
|
||||
/// an observable experiment for an otherwise reflected interface. A vertex function's effect is
|
||||
/// its position, a writable resource, or the commands it encodes where replaying them observes
|
||||
/// them ([`CommandsOnly::Replayed`]): the Metal oracle draws it with rasterization off and then
|
||||
/// executes those commands, as a kernel's are (the engine's candidate executes none:
|
||||
/// [`replay_observes_commands`]), and a case of it must execute them
|
||||
/// executes those commands, as a kernel's are (the engine's candidate executes none: every
|
||||
/// indirect command buffer stops it, [`case_requirements`]), and a case of it must execute them
|
||||
/// ([`require_reflection`]). Their contents stay an [`UnobservedEffect`]. A vertex function with
|
||||
/// none of these raises [`ToolingRequirement::VertexSideEffectObservation`].
|
||||
pub fn unsupported_observation_requirements(
|
||||
@@ -3178,10 +3178,10 @@ entry:
|
||||
ToolingRequirement::RasterizationDisabledRenderTarget,
|
||||
);
|
||||
// What the runtime builds of an indirect command buffer: kernel-encoded indexed draws that
|
||||
// inherit the pipeline state and bind their own buffers, which raise nothing here. Its
|
||||
// compute commands, its other draw types, its other inheritance and a command the host
|
||||
// encodes are each the runtime's limit, and so is a pipeline state an argument buffer
|
||||
// holds.
|
||||
// inherit the pipeline state and bind their own buffers, which the engine's candidate does
|
||||
// not map. Its compute commands, its other draw types, its other inheritance and a command
|
||||
// the host encodes are each the runtime's limit, and so is a pipeline state an argument
|
||||
// buffer holds.
|
||||
use crate::case::indirect_commands::{CommandDescriptor, HostCommand, RenderDraws};
|
||||
let indexed = crate::case::indirect_commands::CommandBufferResource {
|
||||
inherit_pipeline_state: true,
|
||||
@@ -3197,7 +3197,7 @@ entry:
|
||||
};
|
||||
let mut encoding = kernel.clone();
|
||||
encoding.command_buffers = vec![indexed.clone()];
|
||||
assert!(case_requirements(&encoding).is_empty());
|
||||
only(&encoding, ToolingRequirement::IndirectIndexedDraws);
|
||||
encoding.command_buffers = vec![command_buffer(None)];
|
||||
only(&encoding, ToolingRequirement::IndirectComputeCommands);
|
||||
for draws in [
|
||||
|
||||
Reference in new issue
Block a user