Vixen
caa30e12
csharp
public static class Spirv

Runs spirv-val over a generated module.

Read the guide page for this →

Remarks

The one oracle here that is not the compiler checking itself. Everything else in this target compares two things Vixen wrote; this asks Khronos's own validator whether the module is a module. That is what makes it able to catch a backend that emitted something valid and wrong — the class no crash-finder finds, and the class the implicit-LOD-in-a-compute-stage defect belonged to.

⚠ The target environment is picked from the module's own header, not hardcoded. A ray-query module is emitted as SPIR-V 1.4, and validating that against vulkan1.0 reports the version rather than the module — a green run that checked nothing. Same rule as SpirvTestBase.Validate, which is where it was worked out.

⚠ Absence of the validator is not a silent skip. The precedent is SpirvBackendTests.The_validator_is_installed_so_these_tests_mean_something: a skip would make every case vacuous while the run still printed "clean". Here the harness cannot fail a test from inside a target, so absence is recorded and TheSpirvValidatorIsInstalled beside the gate is what says so out loud. CI installs it on both legs.

It ran quarantined for exactly as long as it took to fix what it found, and that is the whole of the story worth keeping. Its first run turned up two one-token edits of Example2.rvn that compiled with no diagnostic at all and emitted modules a driver would reject: a bool in a uniform block, and OpConstantNull of void. Both are fixed in the front end — RVN2137 refuses a boolean binding and RVN2030 refuses a call to a namespace — both inputs are committed under Corpus/raven, and both now replay on every build. There is no switch: an oracle with an off position is an oracle somebody turns off.

Fields and properties (1)

  • public static bool Available

    Whether the validator was found, so a test can say if it was not.

Methods (1)

  • public static void Validate(string name, byte[] binary)

    Validates a module, or does nothing if there is no validator.

Used by (2)

  • FuzzGateTestsVixen.Fuzz.Tests
  • RavenTargetVixen.Fuzz