- '#' not followed by a parameter in a function-like macro is an error
(object-like macros keep '#' literally), as in dxc.
- _Pragma("...") is destringized and handled like a #pragma line;
"#pragma once in main file" now warns instead of registering.
- GNU line markers (`# 40 "file" 1 3`, `#40`) work like #line.
- Macro-argument pre-expansion and #if parentheses are limited to 512
levels of nesting with a diagnostic, instead of overflowing the stack
(dxc segfaults at a few thousand levels).
- Quoted includes now search the directory of every file on the include
stack (innermost first) before -I, and angled includes search only -I
and the compiled-in headers, matching dxc. Angled lookups that only a
quoted include would find get dxc's "use quotes" diagnostic.
- #if evaluation short-circuits &&, || and ?:; division by zero in an
unevaluated operand is no longer an error (dxc accepts these).
- File contents are read once per path (with negative caching); each
inclusion still gets its own FileId so #line state stays per inclusion.
- Include-guarded files (#ifndef X / #if !defined(X) wrapping the whole
file) are not re-entered once X is defined. 2000 guarded includes:
65 ms -> 2 ms per run (dxc: 3 ms).
- Skipped lines are now skipped token by token, so "/*" inside a string
in an #if 0 block no longer swallows the #endif.
- Source manager (line splicing, UTF-8 BOM) and clang-style diagnostics.
- Lexer producing preprocessing tokens.
- Preprocessor modelled on clang's: object and function-like macros, #/##,
variadics with GNU comma elision, painted recursion blocking, nested
argument pre-expansion, #if/#elif expressions, #include with -I and
#pragma once, #line, #error/#warning, pass-through #pragma, and dxc's
predefined macros (__HLSL_VERSION, __SHADER_TARGET_*, __spirv__, ...).
- dxc's compiled-in HLSL headers (<dx/linalg.h>, <vk/spirv.h>, ...) are
vendored as data and used as the fallback for angled includes.
- -P/-Fi/-D/-I/-HV 2021/-enable-16bit-types options; profiles now cover
lib_, ms_, as_ and SM 6.0-6.11.
- `zig build oracle-pp`: token-for-token comparison with dxc -P. 2060 of
2060 corpus files dxc accepts match.
- Port of DXC's container hash (ComputeHashRetail); matches dxc-signed
containers on both padding paths.
- DXIL container reader/writer that signs its output.
- LLVM bitstream writer and a minimal LLVM 3.7 IR model that encodes types,
constants, functions, core instructions and metadata as bitcode.
- An empty compute shader that dxv accepts for SM 6.0 through 6.9.
- SPIR-V builder; the empty compute module passes spirv-val (Vulkan 1.0).
- `zig build oracle` runs these checks against the DXC build.