Repository navigation
0.0.8: let a session pick its matrix layout - #9
Merged
Merged
Conversation
Slang's own two defaults disagree. `SessionDesc` in the C++ header defaults to row-major, and this library allocates that descriptor, so a session created here follows the header. The `slangc` command line defaults to column-major instead. A project that compiles some shaders offline with `slangc` and others at run time through these bindings therefore gets one half silently transposed against the other: both SPIR-V modules are valid, both load, and the only symptom is wrong geometry. `SessionBuilder.matrixLayout(MatrixLayout.COLUMN_MAJOR)` is the one line that makes the two halves agree. Leaving it unset keeps the header default, so nothing already compiled moves. The naming inverts on the way to SPIR-V — COLUMN_MAJOR emits `RowMajor` member decorations — which is exactly the kind of thing that turns into an afternoon of disbelief, so `MatrixLayoutTest` reads the decorations back out of the compiled module rather than trusting the enum: each layout emits its opposite-named decoration, the two differ, and an unset layout still lands on the header default. Verified on macos-aarch64 against the pinned 2026.14.1 payload: 39/39 tests, nothing skipped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Ships the matrix-layout knob from the previous commit — the first thing in this library a
consumer could get silently wrong without it, since the header default this library follows
and the one `slangc` uses are opposites.
The Slang pin is unchanged at v2026.14.1, so this release is slang-java's own API moving, not
Slang's. The library and both natives artifacts share one version by design (gradle.properties
is the single source), so a consumer's two coordinates always agree; README's coordinates,
manifest example and both dependency snippets move to 0.0.8 with it.
Verified on macos-aarch64 against the pinned payload: 39/39 tests, nothing skipped, javadoc
warning-free, and the jar states what it binds without being run:
$ unzip -p slang-java-0.0.8.jar META-INF/MANIFEST.MF
Implementation-Version: 0.0.8
Slang-Version: 2026.14.1
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Qodana for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2026.1.3
with:
upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slang's own two defaults disagree.
SessionDescin the C++ header defaults to row-major and thislibrary allocates that descriptor, so a session created here follows the header; the
slangccommand line defaults to column-major instead. A project that compiles some shaders offline with
slangcand others at run time through these bindings gets one half silently transposed againstthe other — both SPIR-V modules are valid, both load, and the only symptom is wrong geometry.
SessionBuilder.matrixLayout(MatrixLayout.COLUMN_MAJOR)is the one line that makes the two halvesagree. Leaving it unset keeps the header default, so nothing already compiled moves.
The naming inverts on the way to SPIR-V —
COLUMN_MAJORemitsRowMajormember decorations — soMatrixLayoutTestreads the decorations back out of the compiled module rather than trusting theenum: each layout emits its opposite-named decoration, the two differ, and an unset layout still
lands on the header default.
Release
The Slang pin is unchanged at v2026.14.1, so this is slang-java's own API moving, not Slang's.
gradle.propertiesgoes0.0.8-SNAPSHOT→0.0.8, and README's coordinates, manifest example andboth dependency snippets move with it. Tagging
v0.0.8after merge is what publishes.Verification
macos-aarch64 against the pinned payload: 39/39 tests, nothing skipped, spotless clean, javadoc
warning-free.
Note for review: the local payload on hand was a stale 2026.13 while the pin is 2026.14.1, so the
first run of this work was against the older binaries. It was re-downloaded and re-run against the
pinned 2026.14.1 (both the C export and COM vtable paths report 2026.14.1). CI is the first check of
the other five platforms.
🤖 Generated with Claude Code