Skip to content

0.0.8: let a session pick its matrix layout - #9

Merged
RefuX merged 2 commits into
mainfrom
release/0.0.8
Aug 25, 2026
Merged

RefuX merged 2 commits into
mainfrom
release/0.0.8

Conversation

@RefuX

@RefuX RefuX commented Aug 25, 2026

Copy link
Copy Markdown
Owner

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 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 — 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.

Release

The Slang pin is unchanged at v2026.14.1, so this is slang-java's own API moving, not Slang's.
gradle.properties goes 0.0.8-SNAPSHOT → 0.0.8, and README's coordinates, manifest example and
both dependency snippets move with it. Tagging v0.0.8 after merge is what publishes.

Verification

macos-aarch64 against the pinned payload: 39/39 tests, nothing skipped, spotless clean, javadoc
warning-free.

$ unzip -p slang-java-0.0.8.jar META-INF/MANIFEST.MF
Implementation-Version: 0.0.8
Slang-Version: 2026.14.1

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

RefuX and others added 2 commits August 25, 2026 11:17
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>
@RefuX
RefuX merged commit ae3787d into main Aug 25, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Qodana for JVM

It 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 report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2026.1.3
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@RefuX
RefuX deleted the release/0.0.8 branch October 2, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant