Skip to content
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

Disallow only resources in constant buffers in parameterblocks on metal #6342

Merged
merged 4 commits into from
Feb 13, 2025

Conversation

expipiplus1
Copy link
Collaborator

This loosens the check on constant buffers in parameter blocks in metal

Disallow only resources in constant buffers in parameterblocks on metal

closes #6200

@expipiplus1 expipiplus1 added the pr: non-breaking PRs without breaking changes label Feb 12, 2025
@expipiplus1 expipiplus1 requested a review from a team as a code owner February 12, 2025 10:45
Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

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

We need a test to confirm that if you get the element type layout for parameterBlock.cbuffer, the type layout is produced from constant buffer rules (e.g. oridinary data fields has uniform byte offsets) instead of from metal argument buffer rules (where orindary data fields does not have uniform byte offsets and instead have argument buffer ids).

@expipiplus1
Copy link
Collaborator Author

ok, I added a test for a cbuffer and non cbuffer wrapped struct, verifying the offsets.

@csyonghe csyonghe merged commit 1ea2ab1 into shader-slang:master Feb 13, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow nesting pure ConstantBuffer<T> in ParameterBlock<T> when targeting Metal
2 participants