Skip to content

Conversation

@JoeCitizen
Copy link
Collaborator

Add a new HLSL attribute for Compute, Amp and Mesh shaders: GroupSharedLimit.

This is used to limit the amount of group shared memory a shader is allowed to statically declare, and validation will fail if the limit is exceeded.

There is no upper limit on this attribute, and it is expected that shader writers set the limit as the lowest common denominator for their target hardware and software use case (typically 48k or 64k for modern GPUs).

If no attribute is declared the existing 32k limit is used to be compatible with existing shaders.

Extends the PSV structures to include the selected limit so that runtime validation can reject the shader if it exceeds the device support.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

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

Some superficial things that'll need to be addressed at some point, I'm afraid I can't really comment on the actual details of how this works.

I suspect that the whole thing needs to be run through clang-format as well.

@JoeCitizen JoeCitizen marked this pull request as ready for review December 1, 2025 19:10
@damyanp damyanp linked an issue Jan 5, 2026 that may be closed by this pull request
@JoeCitizen JoeCitizen force-pushed the Variable-Shared-Memory branch from 4da0fb8 to 0407f1e Compare January 13, 2026 22:06
@@ -0,0 +1,85 @@
// RUN: %dxc -E MainPass -T cs_6_10 %s | FileCheck %s
Copy link
Collaborator

@bob80905 bob80905 Jan 14, 2026

Choose a reason for hiding this comment

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

You will need to add REQUIRES: dxil-1-10 in order to disable older validator testing for this test. And while you're here, might as well add a new line to end of file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

[SM 6.10] Groupshared Memory Size preview

4 participants