4.2 KiB
DRP2 Conformance
This document defines what it means for a runtime to claim DRP2 2.0 conformance.
It distinguishes three levels of conformance and states which levels are required for 2.0.
Conformance Levels
Level 1 — Validation Conformance
A runtime passes Level 1 if it classifies every fixture in the active corpus correctly.
Requirements:
- all
negative_schema/fixtures must be rejected during schema validation with the expected error code, - all
negative/fixtures must be rejected during semantic or capability validation with the expected error code at the expected command index, - all
positive/fixtures must pass schema and semantic validation without error.
Verification: run the fixture corpus with just drp2-fixtures or
python3 tools/drp2_fixture_runner.py. All fixtures must report PASS.
Level 1 is required for DRP2 2.0 conformance.
Level 2 — Execution Conformance
A runtime passes Level 2 if it can execute every positive fixture on a GPU without producing a protocol-level error.
Requirements:
- the runtime must successfully execute every
positive/fixture end-to-end, - for fixtures that contain a
QueueSubmitwith readbacks, the runtime must reply with aQueueSubmitReplywhose shape mirrors the request exactly: samesubmission_id, samebuffer_id,offset, andsizeentries in the same order, QueueSubmitReply.datavalues are not verified against golden checksums in2.0because the current positive corpus uses stub shaders that do not produce defined pixel output,- WGSL is the required shader language for
2.0execution conformance; every positive fixture uses WGSL, - a runtime may additionally accept GLSL or SPIR-V behind explicit
supported_shader_formatscapability entries, but WGSL support is still required.
Level 2 is required for DRP2 2.0 conformance but is not mechanically verified by the current
fixture runner. It is a prose commitment until a GPU execution harness is defined.
The planned verification path for 2.1 is a harness that executes each positive fixture against
a real GPU backend and checks that no protocol-level error is returned and all readback replies
have the correct shape.
Level 3 — Output Conformance
A runtime passes Level 3 if its readback output matches golden checksums across runtimes.
Requirements (deferred — not part of DRP2 2.0):
- positive fixtures must encode expected readback checksums in their
expectedblock, - fixture shaders must compute deterministic values rather than stubs,
- tolerance rules must be defined for floating-point and format conversions,
- the runner must verify
QueueSubmitReply.dataagainst the declared hash.
Level 3 is deferred to DRP2 2.1. Cross-backend pixel parity requires real shader payloads
and golden generation against actual hardware.
Shader Language Requirements
For 2.0:
- WGSL is the mandatory shader language for all conformance fixtures,
- GLSL and SPIR-V support are optional and must be declared via
supported_shader_formatsin the capability report, - a runtime that claims
2.0conformance must accept WGSL inCreateShaderModulecommands.
These rules keep the conformance corpus usable by both native Vulkan runtimes and browser WebGPU runtimes without requiring backend-specific shader compilation in the fixture set itself.
Native vs. Browser Parity
Both a native runtime and a browser runtime claim the same 2.0 conformance if they satisfy
Level 1 and Level 2.
Differences in backend behavior that do not affect the protocol result — such as tile-based vs.
immediate-mode rendering, or GPU-vendor-specific texture layouts — are out of scope for 2.0
conformance.
Cross-backend output parity (same readback bytes from the same fixture) is a Level 3 concern and
is deferred to 2.1.
Summary Table
| Level | Name | Required for 2.0 |
Mechanically verified |
|---|---|---|---|
| 1 | Validation | yes | yes — fixture runner |
| 2 | Execution | yes | no — prose commitment |
| 3 | Output | no | deferred to 2.1 |