5.5 KiB
DRP2 Fixtures
This directory contains canonical DRP2 conformance fixtures for the active 2.0 contract.
Fixtures are both:
- authoritative machine-readable test vectors,
- worked examples that explain how the spec should be interpreted.
Layout
The active corpus is split into:
negative/positive/negative_schema/
The negative fixtures lock the failure boundary for the active DRP2 2.0 command set, schemas,
error codes, and lifetime/state rules. The positive fixtures lock clean command shapes and portable
runtime pressure cases. The schema-negative fixtures keep command-schema validation explicit without
making malformed command payloads look like semantic failures.
Active Corpus
The negative corpus should stay focused and cover the core validation surface:
- duplicate id rejection,
- unsupported major protocol version during handshake,
- active command issued before explicit handshake completion,
- active command issued after a failed handshake,
- unknown id rejection,
- wrong object type rejection,
- draw outside render pass,
- dispatch outside compute pass,
- copy inside a pass,
- finishing an encoder with an open pass,
- pass-kind mismatch,
- destroying a resource still referenced by recorded work,
- buffer range violation,
- texture range violation,
- texture mip-level violation,
- invalid texture transfer layout metadata such as undersized row stride, undersized rows-per-image, or insufficient write payload footprint,
- missing command discriminator,
- wrong field names,
- missing required command fields,
- unsupported texture format,
- unsupported sample count,
- draw without a bound render pipeline,
- dispatch without a bound compute pipeline,
- render-only state command used in a compute pass,
- resubmitting an already submitted command buffer,
- draw missing a required vertex-buffer binding,
- indexed draw missing an index-buffer binding,
- bind group set before any pipeline is bound,
- destroying a bind group still referenced by recorded work,
- bind-group entry with structurally incompatible resource kind,
- bind-group entry with incompatible resource usage bits,
- bind-group entries that do not match the declared layout,
- bind group bound into a pipeline slot expecting a different layout,
- bind group dynamic offsets missing, extra, or applied in the wrong layout order,
- dynamic buffer binding created without an explicit buffer range,
- destroying a bind-group layout, shader module, or pipeline still referenced by recorded work,
- destroying a bind-group layout, shader module, or pipeline still referenced by already submitted work,
- pipeline creation with a shader module whose stage does not match the pipeline slot,
- pipeline creation with a shader module that declares an unsupported required feature,
- pipeline rebind followed by SetBindGroup validated against the newly bound pipeline,
- pipeline rebind followed by Draw validated against the newly bound pipeline.
- texture-to-buffer copies with invalid mip selection or inconsistent layout metadata.
- duplicate handshake commands after negotiation has started,
- draw or dispatch commands targeting passes that already ended,
- copy commands targeting encoders that were already finished.
- diagnostic
Errorcommands before stream start are invalid, - diagnostic
Errorcommands after handshake failure remain valid, - diagnostic
Errorcommands in a ready session do not by themselves poison later active commands. - queue submission with the same command buffer id listed more than once,
- queue submission with an empty command-buffer list.
- texture view created with an unknown parent texture id,
- texture view destroyed while still referenced by recorded work.
The positive corpus should stay minimal and focus on clean command shapes:
- buffer upload only,
- successful
HelloRendererplusRendererHelloReplynegotiation, - texture upload only,
- command encoder plus compute pass plus successful finish,
- buffer-to-texture copy,
- texture-to-buffer copy,
- queue submit of a finished command buffer,
- shader-module creation only,
- render pass with pipeline bind plus draw,
- compute pass with pipeline bind plus dispatch,
- render pass with pipeline plus vertex and index bindings for
DrawIndexed, - render pass with pipeline plus bind-group binding before draw,
- render pass with bind-group dynamic offsets applied in layout order before draw,
- render pass pipeline rebind with refreshed bind-group and vertex-buffer state before draw,
- texture view lifecycle: create texture, create view, bind via bind group, destroy in reverse order.
Metadata Policy
Fixtures may include human-readable metadata such as:
descriptionreasonfixnotes
These fields are non-normative.
They exist to make the corpus readable and reviewable.
Only the normative fields described in FORMAT.md determine conformance.
Schema-Negative Policy
Fixtures under negative_schema/ are expected to fail during schema_validation.
Those fixtures must still satisfy the fixture envelope itself. Only the embedded DRP command objects are intentionally malformed.
Reuse
Fixtures should remain backend-agnostic and reusable by both native and browser runtimes.
See FORMAT.md for the fixture envelope and naming rules.
See schema/drp_fixture.schema.json for the machine-readable fixture envelope.
See RUNNER.md for the minimal runner and result-matching contract.