-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCHANGELOG
More file actions
67 lines (46 loc) · 7.12 KB
/
Copy pathCHANGELOG
File metadata and controls
67 lines (46 loc) · 7.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Changelog
All notable changes to slangmake are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.4.1] - 2026-05-02
### Added
- Standalone runtime library `slangmake-rt` (`slangmake-rt.dll` / `libslangmake-rt.so`). Exports the read side only — `BlobReader`, `BlobWriter`, `ReflectionView`, permutation parsers, hashing, compression — and links neither slang nor DXC. Consumers that only crack open shipped blobs no longer have to redistribute `slang.dll` / `slang-glslang.dll` / `slang-llvm.dll` / `dxcompiler.dll` / `dxil.dll`. The full `slangmake-lib` (with `Compiler` + `BatchCompiler`) is unchanged and still ships as `slangmake.dll`.
- `SLANG_MAKE_EXPOSE_RUNTIME` / `SLANG_MAKE_EXPOSE_COMPILER` preprocessor gates in `slangmake.hpp` and `slangmake.h`. Default behaviour (neither defined) is unchanged: the full surface is exposed. Define just `SLANG_MAKE_EXPOSE_RUNTIME` to compile against the read side only — calls into `Compiler` / `BatchCompiler` then become a compile error instead of a deferred link error against the missing slangmake-rt symbols.
### Changed
- Source tree split along the runtime / compiler axis. `slangmake_internal.h` keeps the slang-using helpers; new `slangmake_internal_rt.h` holds everything pure (FNV mixers, alignment helpers, compression glue, options hashing, target↔blob-code mapping). Reflection serializer moved to `slangmake_reflection_serialize.cpp`; `toSlangCompileTarget` to `slangmake_util_compiler.cpp`; compiler / batch C ABI to `slangmake_c_compiler.cpp`. No public-API changes from this refactor — same headers, same symbols.
- `BlobReader::target()` and `BlobWriter::finalize()` no longer call into Slang to encode `BlobHeader::target`. The integer codes (matching `SlangCompileTarget`) are kept verbatim for on-disk compatibility and pinned via `static_assert` in the compiler-side TU; existing blobs round-trip unchanged.
## [0.4.0] - 2026-05-02
### Added
- Pure C ABI wrapper (`include/slangmake.h` + `src/slangmake_c.cpp`) covering compiler, blob writer/reader, reflection view (raw tables only), and batch compiler. Format POD types are mirrored as `sm_fmt_*_t` and pinned layout-equal to their `fmt::*` C++ counterparts via `static_assert`. New `tests/test_capi.cpp` exercises the wrapper end-to-end.
### Changed
- The C++ public header has been renamed from `include/slangmake.h` to `include/slangmake.hpp`. The old filename is now the C ABI header described above. C++ consumers must update `#include "slangmake.h"` to `#include "slangmake.hpp"`.
### Removed
- `ReflectionView::Cursor` (and its `rootCursor` / `entryPointCursor` / `findGlobalParam` accessors) is gone, along with `tests/test_cursor.cpp` and `docs/cursor.md`. Walking the reflection tables to compute concrete `(set, slot, byte-offset)` tuples is the consuming engine's RHI concern, not slangmake's — `ReflectionView` still exposes every raw table needed to do that walk. References from `README.md`, `CLAUDE.md`, and the rest of `docs/` have been updated to match.
## [0.3.0] - 2026-04-28
### Added
- End-to-end CLI tests (`tests/test_cli.cpp`) that drive the built `slangmake` executable via `std::system` and cover `--version`, missing-arg errors, unknown targets, compile + `--dump` round-trip, missing / malformed blob handling, file-declared permutation expansion, `-P` overrides and `--dump-reflection`.
- Linux ASan + UBSan CI job (`linux-asan` preset + `sanitizers` job in `.github/workflows/ci.yml`) exercising the full test suite on every push and PR.
- `cmake/ConfigureDxc.cmake` fetches a pinned DirectX Shader Compiler release at configure time and copies / installs `dxcompiler.dll` + `dxil.dll` next to `slangmake.exe`, so DXIL targets work out of the box without a Windows SDK install. Version is controlled by `SLANG_MAKE_FETCH_DXC_VERSION` / `SLANG_MAKE_FETCH_DXC_DATE` cache vars (defaults: 1.9.2602 / 2026_02_20).
### Fixed
- `BlobReader::at` and `BlobReader::dependencies` widened their offset + size bounds checks to `size_t` before adding, so a crafted entry record with `keyOffset = 0xFFFFFFF0, keySize = 0x20` can no longer wrap a `uint32_t` sum past `m_blob.size()` and read out of bounds.
- `tests/test_include.cpp` now includes `<cstring>` explicitly so the `std::memcpy` call builds under libstdc++ / clang (MSVC's STL pulled it in transitively).
### Changed
- `BlobWriter` now deduplicates identical bytecode payloads across entries via the same FNV-1a + full-compare scheme already used for reflection. Two permutations that produce byte-identical SPIR-V / DXIL (dead-stripped axes, reflection-only differences, etc.) now share one on-disk payload. Blob format is unchanged; readers see no behavioural difference.
- `slangmake.h` no longer includes `<slang.h>` / `<slang-com-ptr.h>`. The `Compiler` class hides its `Slang::ComPtr<slang::IGlobalSession>` behind a PImpl, and `toSlangCompileTarget` was moved to the internal header. Reader-only consumers (`BlobReader`, `ReflectionView`, `Cursor`) can now compile against `slangmake.h` without any Slang SDK on their include path. Removed `Compiler::globalSession()` and the public `toSlangCompileTarget` declaration.
### Removed
- Dead `${_slang_inc}/../prelude` compatibility branch in `ConfigureSlang.cmake`: current Slang releases ship prelude headers flat inside `include/`, so the parallel `prelude/` directory the branch was guarding against never exists.
## [0.2.0] - 2026-04-23
### Added
- Type-parameter permutation axes via `// [permutation type] NAME={T1,T2}` magic comments and `--permutation-type` CLI overrides. Each combination is specialised at compile time through `IComponentType::specialize` — no runtime Slang session needed.
- `ReflectionView::Cursor`, a Slang-`ShaderCursor`-style navigator over the serialised reflection: `rootCursor()["gMat"]["albedo"]` returns the resource's absolute `(space, slot)`, auto-dereferences `ConstantBuffer` / `ParameterBlock`, tracks per-category offsets and spaces, and exposes `container()` for the implicit CB plus `descriptorSetLayout()` for full `VkDescriptorSetLayout` construction.
- `BlobReader::find(const Permutation&)` overload so type-aware lookup doesn't need to pre-build a key string.
- Documentation under `docs/` covering cursor, permutations, integration and the raw reflection API.
- `.github/workflows/format.yml` — clang-format-18 CI gate on every push / PR.
### Changed
- Project version is now centralised in `CMakeLists.txt`'s `project(VERSION ...)` and injected into code through a generated `slangmake_version.h`. No more hand-updating `main.cpp`.
- `Permutation::key()` appends type-arg axes after a `|` separator; backward compatible with old constants-only keys.
### Fixed
- `Cursor::resourceBinding()` now folds enclosing `SubElementRegisterSpace` / `RegisterSpace` contributions into the returned space, so resources inside a `ParameterBlock` report the correct absolute descriptor set.
## [0.1.0] - 2026-04-23
### Added
- Initial release: Slang permutation batch compiler, reflection-embedding blob format, incremental rebuilds, parallel compile, LZ4 / zstd compression, CLI + C++ library API.