-
Notifications
You must be signed in to change notification settings - Fork 337
Format code for PR #7711 #7765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
csyonghe
merged 1 commit into
shader-slang:claude/issue-7701-20250710_213741
from
slangbot:format-7711-claude/issue-7701-20250710_213741
Jul 15, 2025
Merged
Format code for PR #7711 #7765
csyonghe
merged 1 commit into
shader-slang:claude/issue-7701-20250710_213741
from
slangbot:format-7711-claude/issue-7701-20250710_213741
Jul 15, 2025
Conversation
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
4219884
into
shader-slang:claude/issue-7701-20250710_213741
1 check passed
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 16, 2025
* Add diagnostic for const/uniform global variables with initializers Global const and uniform variables without the static modifier are treated as uniform parameters in HLSL, which cannot have default values. This change adds error 31224 to catch this case early and provide clear guidance to users. Fixes #7701 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * Add test case for global const/uniform variable diagnostic Add test for diagnostic 31224 which catches global const and uniform variables with initializers that aren't declared static. The test verifies both error cases and valid cases to ensure the diagnostic works correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * Fix failing tests due to new global const diagnostic Add 'static' keyword to global const variables with initializers to resolve diagnostic 31224: "global const variable with initializer must be declared static" Co-authored-by: Jay Kwak <[email protected]> * Allow specialization constants with initializers without static - Modified diagnostic logic in slang-check-decl.cpp to allow specialization constants (SpecializationConstantAttribute and VkConstantIdAttribute) to have initializers without requiring the static keyword - Updated 8 SPIRV test files to remove unnecessary static keywords from specialization constant declarations - Enhanced diagnostic test case to include specialization constant examples - All tests passing with the new behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * format code (#7765) Co-authored-by: slangbot <[email protected]> * Remove static keyword from specialization constants and add comprehensive test cases - Remove static from specialization constants in test files as they are semantically meaningless - Update tests to use existing diagnostic 31219 for static specialization constant errors - Add comprehensive test cases that verify the error occurs when static is used with specialization constants - Fixes suggested in PR review to make static specialization constants an error Co-authored-by: ArielG-NV <[email protected]> * Add error for static specialization constants Static specialization constants are semantically meaningless and should produce an error. This change adds logic to trigger diagnostic 31219 when both 'static' and specialization constant attributes are present. The existing diagnostic 31219 'push or specialization constants cannot be static' is now correctly triggered for: - [SpecializationConstant] static const variables - [vk::constant_id] static const variables Co-authored-by: ArielG-NV <[email protected]> * Update source/slang/slang-check-decl.cpp * Update tests/glsl/compute-shader-layout-id.slang * Update tests/glsl/compute-shader-layout-id.slang * Fix test case Claude broke * Update global-uniform.slang * Update global-uniform.slang.expected --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Yong He <[email protected]> Co-authored-by: ArielG-NV <[email protected]> Co-authored-by: Jay Kwak <[email protected]> Co-authored-by: slangbot <[email protected]> Co-authored-by: slangbot <[email protected]> Co-authored-by: ArielG-NV <[email protected]>
ArielG-NV
added a commit
to ArielG-NV/slang
that referenced
this pull request
Jul 20, 2025
* Add diagnostic for const/uniform global variables with initializers Global const and uniform variables without the static modifier are treated as uniform parameters in HLSL, which cannot have default values. This change adds error 31224 to catch this case early and provide clear guidance to users. Fixes shader-slang#7701 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * Add test case for global const/uniform variable diagnostic Add test for diagnostic 31224 which catches global const and uniform variables with initializers that aren't declared static. The test verifies both error cases and valid cases to ensure the diagnostic works correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * Fix failing tests due to new global const diagnostic Add 'static' keyword to global const variables with initializers to resolve diagnostic 31224: "global const variable with initializer must be declared static" Co-authored-by: Jay Kwak <[email protected]> * Allow specialization constants with initializers without static - Modified diagnostic logic in slang-check-decl.cpp to allow specialization constants (SpecializationConstantAttribute and VkConstantIdAttribute) to have initializers without requiring the static keyword - Updated 8 SPIRV test files to remove unnecessary static keywords from specialization constant declarations - Enhanced diagnostic test case to include specialization constant examples - All tests passing with the new behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * format code (shader-slang#7765) Co-authored-by: slangbot <[email protected]> * Remove static keyword from specialization constants and add comprehensive test cases - Remove static from specialization constants in test files as they are semantically meaningless - Update tests to use existing diagnostic 31219 for static specialization constant errors - Add comprehensive test cases that verify the error occurs when static is used with specialization constants - Fixes suggested in PR review to make static specialization constants an error Co-authored-by: ArielG-NV <[email protected]> * Add error for static specialization constants Static specialization constants are semantically meaningless and should produce an error. This change adds logic to trigger diagnostic 31219 when both 'static' and specialization constant attributes are present. The existing diagnostic 31219 'push or specialization constants cannot be static' is now correctly triggered for: - [SpecializationConstant] static const variables - [vk::constant_id] static const variables Co-authored-by: ArielG-NV <[email protected]> * Update source/slang/slang-check-decl.cpp * Update tests/glsl/compute-shader-layout-id.slang * Update tests/glsl/compute-shader-layout-id.slang * Fix test case Claude broke * Update global-uniform.slang * Update global-uniform.slang.expected --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Yong He <[email protected]> Co-authored-by: ArielG-NV <[email protected]> Co-authored-by: Jay Kwak <[email protected]> Co-authored-by: slangbot <[email protected]> Co-authored-by: slangbot <[email protected]> Co-authored-by: ArielG-NV <[email protected]>
ArielG-NV
added a commit
to ArielG-NV/slang
that referenced
this pull request
Jul 21, 2025
* Add diagnostic for const/uniform global variables with initializers Global const and uniform variables without the static modifier are treated as uniform parameters in HLSL, which cannot have default values. This change adds error 31224 to catch this case early and provide clear guidance to users. Fixes shader-slang#7701 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * Add test case for global const/uniform variable diagnostic Add test for diagnostic 31224 which catches global const and uniform variables with initializers that aren't declared static. The test verifies both error cases and valid cases to ensure the diagnostic works correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * Fix failing tests due to new global const diagnostic Add 'static' keyword to global const variables with initializers to resolve diagnostic 31224: "global const variable with initializer must be declared static" Co-authored-by: Jay Kwak <[email protected]> * Allow specialization constants with initializers without static - Modified diagnostic logic in slang-check-decl.cpp to allow specialization constants (SpecializationConstantAttribute and VkConstantIdAttribute) to have initializers without requiring the static keyword - Updated 8 SPIRV test files to remove unnecessary static keywords from specialization constant declarations - Enhanced diagnostic test case to include specialization constant examples - All tests passing with the new behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Yong He <[email protected]> * format code (shader-slang#7765) Co-authored-by: slangbot <[email protected]> * Remove static keyword from specialization constants and add comprehensive test cases - Remove static from specialization constants in test files as they are semantically meaningless - Update tests to use existing diagnostic 31219 for static specialization constant errors - Add comprehensive test cases that verify the error occurs when static is used with specialization constants - Fixes suggested in PR review to make static specialization constants an error Co-authored-by: ArielG-NV <[email protected]> * Add error for static specialization constants Static specialization constants are semantically meaningless and should produce an error. This change adds logic to trigger diagnostic 31219 when both 'static' and specialization constant attributes are present. The existing diagnostic 31219 'push or specialization constants cannot be static' is now correctly triggered for: - [SpecializationConstant] static const variables - [vk::constant_id] static const variables Co-authored-by: ArielG-NV <[email protected]> * Update source/slang/slang-check-decl.cpp * Update tests/glsl/compute-shader-layout-id.slang * Update tests/glsl/compute-shader-layout-id.slang * Fix test case Claude broke * Update global-uniform.slang * Update global-uniform.slang.expected --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Yong He <[email protected]> Co-authored-by: ArielG-NV <[email protected]> Co-authored-by: Jay Kwak <[email protected]> Co-authored-by: slangbot <[email protected]> Co-authored-by: slangbot <[email protected]> Co-authored-by: ArielG-NV <[email protected]>
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.
Automated code formatting for #7711