diff --git a/crates/metal2vulkan-validation/src/candidate/engine.rs b/crates/metal2vulkan-validation/src/candidate/engine.rs index 2abe64092..372fae8aa 100644 --- a/crates/metal2vulkan-validation/src/candidate/engine.rs +++ b/crates/metal2vulkan-validation/src/candidate/engine.rs @@ -675,12 +675,12 @@ pub struct RuntimeKernel<'a> { /// too), function constants and linked functions, its vertex buffers, its color targets and a depth/stencil /// attachment of one aspect, or none (a fragment case's pass of no attachment is the oracle's 1x1 /// at its samples), layered or not (`RenderCase::render_target_array_length`), the encoder's depth-stencil state, cull mode and winding, and -/// one direct or indexed draw of primitives or one patch draw with no patch or control-point index -/// buffer (a post-tessellation vertex function's, its factors bound as the tessellation factor -/// buffer), observing a buffer, a texture, an argument-buffer member, a color target, the -/// depth/stencil attachment's aspect or nothing, whose out-of-bounds targets, if any, are attribute -/// buffers -/// (`runtime_bounds::drawn` reads their facts). Decided by the case's structure alone: +/// one direct or indexed draw of primitives or one patch draw (a post-tessellation vertex +/// function's, its factors bound as the tessellation factor buffer; the case's mapping names no +/// patch or control-point index buffer, `graphics::patch_draw`), observing a buffer, a texture, +/// an argument-buffer member, a color target, the depth/stencil attachment's aspect or nothing, +/// whose out-of-bounds targets, if any, are attribute buffers (`runtime_bounds::drawn` reads their +/// facts). Decided by the case's structure alone: /// every field the mapping fills is named here, so a new one is decided when it is added. pub fn runs_render_through_runtime(case: &graphics::RenderCase) -> bool { let graphics::RenderCase { @@ -715,14 +715,7 @@ pub fn runs_render_through_runtime(case: &graphics::RenderCase) -> bool { ( graphics::Assembly::Primitives(_), DrawCall::Primitives { .. } | DrawCall::Indexed { .. } - ) | ( - graphics::Assembly::Patches { .. }, - DrawCall::Patches { - patch_index: None, - control_point_index: None, - .. - } - ) + ) | (graphics::Assembly::Patches { .. }, DrawCall::Patches { .. }) ) && out_of_bounds .iter() @@ -1506,8 +1499,7 @@ fn run_prepared(prepared: &PreparedCase) -> RunAttempt { } Mapped::Render(_) => RunAttempt::of(Err(NotSupported::NotImplemented( "engine candidate: a draw the runtime route does not make: a depth/stencil attachment \ - of both aspects, a patch draw through a patch or control-point index buffer, or an \ - out-of-bounds target other than an attribute buffer" + of both aspects or an out-of-bounds target other than an attribute buffer" .into(), ) .into())), diff --git a/crates/metal2vulkan-validation/src/candidate/engine/tests.rs b/crates/metal2vulkan-validation/src/candidate/engine/tests.rs index 612ee69f5..576456329 100644 --- a/crates/metal2vulkan-validation/src/candidate/engine/tests.rs +++ b/crates/metal2vulkan-validation/src/candidate/engine/tests.rs @@ -910,7 +910,7 @@ fn a_plain_draw_and_only_one_runs_through_the_runtime() { ..plain.clone() }; assert!(runs_render_through_runtime(&unrasterized)); - let patches = |patch_index| RenderCase { + let patches = RenderCase { assembly: graphics::Assembly::Patches { tessellation: metal2vulkan::pipeline::TessellationDescriptor::default(), factors: vec![0; 12], @@ -919,14 +919,14 @@ fn a_plain_draw_and_only_one_runs_through_the_runtime() { control_points: 3, patch_start: 0, patch_count: 1, - patch_index, + patch_index: None, instance_count: 1, base_instance: 0, control_point_index: None, }, ..plain.clone() }; - assert!(runs_render_through_runtime(&patches(None))); + assert!(runs_render_through_runtime(&patches)); // An attribute buffer's out-of-bounds target draws through the runtime, whose facts refuse or // run it (`runtime_bounds::drawn`); no other target does (an index buffer's case carries the // runtime's limit, `index_buffer_past_end`, which stops it before either context). @@ -1077,12 +1077,8 @@ fn a_plain_draw_and_only_one_runs_through_the_runtime() { OutOfBoundsResource::IndexBuffer, ContainmentForm::IndexBuffer, ), - patches(Some(( - metal2vulkan::bind::IndexBufferRef::new(graphics::INDEX_BUFFER_TOKEN, 4), - 0, - ))), RenderCase { - draw: patches(None).draw, + draw: patches.draw, ..plain.clone() }, ]; diff --git a/docs/VALIDATION.md b/docs/VALIDATION.md index b01b0d7b8..f7f11869e 100644 --- a/docs/VALIDATION.md +++ b/docs/VALIDATION.md @@ -587,11 +587,10 @@ cargo run -p metal2vulkan-validation --release --bin corpus-vulkan -- \ `not_supported{uncontained:unchecked vertex_input}`. A rasterization-disabled vertex case renders into the oracle's 1x1 `R8Unorm` attachment, and a fragment case of no attachment into the oracle's pass of none: `renderTargetWidth` and `renderTargetHeight` 1, `defaultRasterSampleCount` - the case's samples. A depth/stencil attachment of both aspects, a patch draw through a patch or - control-point index buffer, or an out-of-bounds target other than an attribute buffer is refused - `not_supported{executor_not_implemented}`: the runtime route makes no such draw. A vertex - buffer's dynamic stride carries `dynamic_vertex_stride` and a fragment - function's imageblock `fragment_imageblock`, each the runtime's limit. An indexed + the case's samples. A depth/stencil attachment of both aspects or an out-of-bounds target other + than an attribute buffer is refused `not_supported{executor_not_implemented}`: the runtime + route makes no such draw. A vertex buffer's dynamic stride carries `dynamic_vertex_stride` and a + fragment function's imageblock `fragment_imageblock`, each the runtime's limit. An indexed draw past its index buffer, which the runtime refuses as Metal's validation does (`Refusal::IndexBufferOffset`), carries `index_buffer_past_end`, and a depth/stencil attachment of both aspects, the oracle's two textures, which the runtime renders into in no one pass yet