This document describes an optional end-to-end (E2E) testing option for hardware vendors that publish their offline compiler plugin through Nuget. Vendors may use it to confirm that the precompiled shader databases (PSDBs) produced from a pre-release compiler are consumed correctly by their driver at runtime.
E2E testing is not a requirement for publishing a compiler plugin package, and it does not change the package requirements in the D3D12 State Object Compiler Plugin NuGet Packages specification. Vendors can choose whether to use it and which supported store to test with.
Testing is performed by running the SODBCompilerValidation.exe test in validate mode on the vendor’s own hardware and
drivers. For the full test design, see the
SODB Compiler Validation Test Specification.
A vendor that chooses to perform E2E testing can follow these steps:
releaseType set to preview).SODBCompilerValidation in validate mode, as described
in Running the Test in Validate Mode.releaseType set to
release).E2E testing is available through stores that support ASD. Xbox Store currently supports it. Other stores will become available for testing in the future.
If you choose to test with Xbox, the test and the PSDBs compiled by Xbox services are distributed through an Xbox app.
Xbox services use the following titles to test pre-release compilers by compiling their SODBs:
| Title |
|---|
| SODBCompilerValidation |
| Avowed |
| Forza Horizon 6 |
The Xbox playtest is limited to approved Microsoft Accounts (MSAs). To request access, send the list of MSAs that will install the test to ASD-Developer Engagement (asd-questions@microsoft.com). Access is granted per account, so include every account that installs the test.
After your MSAs are approved:
Open the following link to go to the playtest game page:
msxbox://playtest/?productId=2SDT4X91KJ6S&featuregates=EnableXPlaytestScreen:true
SODBCompilerValidation title from the playtest game page.<XboxGames Folder>\grgony GDK Test\Content\SODBCompilerValidation.exe.
XboxGames folder by clicking the “…” button, then selecting
Manage > Files > Browse.Validate mode does not load a compiler plugin. It uses the reference SODB bundled with the test to issue the corresponding D3D12 pipeline state and state object creation calls, using the PSDB delivered by the store. It then uses the device’s shader cache statistics to confirm that every object is a PSDB cache hit.
Run the test from its installed location:
SODBCompilerValidation --mode validate --output <path_to_output>.json
The run passes when the process exits with code 0 and the JSON report contains "result": "PASS". Any cache miss
indicates that the PSDB produced by the pre-release compiler does not match what the driver expects at runtime, and is
worth investigating before publishing the compiler as a release.
| Option | Mode | Description |
|---|---|---|
--mode <full\|validate> |
Required | Execution mode. Use validate to check the delivered PSDB against the bundled SODB. |
--output <path> |
Both | Path for the JSON results report. If omitted, the report is written to stdout. |
--sodb <path> |
Both | Reference SODB file. Defaults to the SODB bundled next to the executable. |
--verbose |
Both | Emits per-object compilation and validation detail. |
--plugin <path> |
Full only | Compiler plugin DLL. Rejected in validate mode. |
--psdb <path> |
Full only | Where to write the produced PSDB. Defaults to a temporary file. |
--force-validation |
Full only | Runs PSDB validation even if compilation fails. |
| Exit Code | Meaning |
|---|---|
0 |
All checks passed. |
1 |
Invalid command-line arguments, such as missing or malformed values or non-existent files. |
2 |
SODB-to-PSDB compilation failed (full mode only). |
3 |
Runtime cache hit rate is below 100%. |
4 |
Runtime error, such as a device creation or file I/O failure. |
The following is an example of a successful validate-mode JSON report:
{
"test": "SODBCompilerValidation",
"version": "1.1.3.0",
"mode": "validate",
"adapter": "Example GPU",
"shader_cache_abi_supported": true,
"statistics_available": true,
"app_identity": "SODB Compiler Validation",
"default_psdb_registered": true,
"validation": {
"total_objects": 256,
"create_failures": 0,
"unsupported_skipped": 0,
"cache_misses": 0,
"hit_rate_check": "pass"
},
"result": "PASS"
}