perf: fix deferred divide precision, threadlocal TLS, MSVC target
Removed deferred divide from both ray-tri functions -- the det-scaled epsilon comparisons lose precision for near-parallel rays, potentially accepting triangles the original rejects. Downstream SetupBoxFrustum then writes to wrong globals near 0xCE6738 (SGroupPtr), causing ERROR #124 on exit. inflate_hook: replaced manual FS:0x24 thread ID pool with Zig native threadlocal. Fixes potential crash on Wine where FS segment layout may differ. Build: switched from GNU to MSVC ABI (4-5K smaller per DLL, no .eh_frame unwind tables). Added setjmp.h stub for libdeflate MSVC build. Added noperf build variant (zig build noperf).
This commit is contained in:
+30
-5
@@ -38,7 +38,21 @@ git push origin main
|
||||
|
||||
After that, the remote `main` only needs updating when `DLL_README.md` changes.
|
||||
|
||||
## 1. Build DLLs
|
||||
## 1. Bump module versions
|
||||
|
||||
Each module has a `version` field in `build.zig`'s `module_list`. This is what
|
||||
`GetWeirdUtilsVersion()` reports to Lua addons. Before building, bump the
|
||||
version for any module that has changed since the last release:
|
||||
|
||||
```zig
|
||||
// build.zig — module_list
|
||||
.{ .name = "minimapicons", .version = "1.1", ... },
|
||||
```
|
||||
|
||||
Only bump modules that actually changed. Use `git log --oneline -- src/<module>/`
|
||||
to check what changed since the last release tag.
|
||||
|
||||
## 2. Build DLLs
|
||||
|
||||
Decide which modules to include in this release. Check `build.zig` for the
|
||||
current list of module flags (`b.option(bool, ...)` declarations) and their
|
||||
@@ -71,6 +85,16 @@ zig build all-variants -Doptimize=ReleaseSmall
|
||||
|
||||
This builds all variants - you only attach the ones for this release.
|
||||
|
||||
### No-performance variant
|
||||
|
||||
```sh
|
||||
zig build noperf -Doptimize=ReleaseSmall
|
||||
```
|
||||
|
||||
Builds `weirdutils_noperf.dll` - the combined DLL with all default modules
|
||||
except `weirdperformance`. Provided as a release asset for users who experience
|
||||
issues with the performance module (e.g. Wine compatibility).
|
||||
|
||||
### Output locations
|
||||
|
||||
| Artifact | Path |
|
||||
@@ -84,7 +108,7 @@ Verify:
|
||||
ls -lh zig-out/bin/weirdutils.dll zig-out/variants/*.dll
|
||||
```
|
||||
|
||||
## 2. Update the remote README
|
||||
## 3. Update the remote README
|
||||
|
||||
The remote README should match the features in this release. Start from
|
||||
`DLL_README.md` and remove the sections for modules not being released -
|
||||
@@ -103,7 +127,7 @@ git commit -m "Update README for vX.Y.Z"
|
||||
git push origin main
|
||||
```
|
||||
|
||||
## 3. Write the release notes
|
||||
## 4. Write the release notes
|
||||
|
||||
Use this template - fill in the sections that apply, delete the rest.
|
||||
Use `-` (not em dash) anywhere a dash would be used.
|
||||
@@ -132,7 +156,7 @@ of what they're getting:
|
||||
- `weirdutils.dll` includes all features; individual DLLs are also provided
|
||||
```
|
||||
|
||||
## 4. Create the release and upload DLLs
|
||||
## 5. Create the release and upload DLLs
|
||||
|
||||
Uses `tea` (Gitea/Forgejo CLI) which handles release creation, tagging, and
|
||||
asset upload in one command. The tag is created on the remote automatically.
|
||||
@@ -167,7 +191,7 @@ tea release assets delete --repo MarcelineVQ/WeirdUtils -y v0.4.0 minimapicons.d
|
||||
tea release assets create --repo MarcelineVQ/WeirdUtils v0.4.0 zig-out/variants/minimapicons.dll
|
||||
```
|
||||
|
||||
## 5. Hide source archives
|
||||
## 6. Hide source archives
|
||||
|
||||
Codeberg attaches empty source tar/zip by default. Hide them via API:
|
||||
|
||||
@@ -200,6 +224,7 @@ print(r[0]['id']) if r else print('not found')
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Module versions bumped in `build.zig` for changed modules
|
||||
- [ ] Check `RELEASE_NOTES.md` for unreleased changes — move into release notes
|
||||
- [ ] Built with `ReleaseSmall` (both default and `all-variants`)
|
||||
- [ ] Remote README updated — no unreleased module sections or names
|
||||
|
||||
Reference in New Issue
Block a user