Skip to content

Fix Texture3D parameters failing with "invalid dimensionality 1" #754

Merged
ccummingsNV merged 6 commits intoshader-slang:mainfrom
wlewNV:texture3d_dimensionality
Feb 4, 2026
Merged

Fix Texture3D parameters failing with "invalid dimensionality 1" #754
ccummingsNV merged 6 commits intoshader-slang:mainfrom
wlewNV:texture3d_dimensionality

Conversation

@wlewNV
Copy link
Contributor

@wlewNV wlewNV commented Jan 22, 2026

Fixes #655

TextureMarshall was not overriding resolve_dimensionality(), causing the default implementation to incorrectly calculate call_dimensionality=1 for textures passed as function arguments.

Added resolve_dimensionality() to TextureMarshall that returns:

  • 0 when target type is a texture (broadcast as-is)
  • texture_dims for per-pixel operations

@wlewNV wlewNV requested a review from a team as a code owner January 22, 2026 20:50
ccummingsNV
ccummingsNV previously approved these changes Jan 23, 2026
Copy link
Contributor

@ccummingsNV ccummingsNV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. If you have time to modify the texture tests to use none-square textures and none-zero coordinates that'd be great - generally good practice with graphics unit tests.

Approved either way though!

@ccummingsNV
Copy link
Contributor

I'll deploy this if the merged version passes.

@ccummingsNV ccummingsNV enabled auto-merge (squash) February 4, 2026 11:42
@ccummingsNV ccummingsNV merged commit 247539d into shader-slang:main Feb 4, 2026
15 checks passed
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.

Texture3D parameters fail with “invalid dimensionality 1” in module calls

2 participants