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

spirv-val: Add Vulkan Aligned PowerOfTwo check #6027

Merged

Conversation

spencer-lunarg
Copy link
Contributor

hit in KhronosGroup/Vulkan-ValidationLayers#9531 and creating spec VU in https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/7210

The Aligned literal value should be allowed to be things like 0 or 3

(related Glslang issue KhronosGroup/glslang#3893)

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-aligned-pot branch from 25fe4da to 19d9913 Compare March 5, 2025 14:49
@alan-baker
Copy link
Contributor

I think this should be safe for all APIs. OpenCL makes it undefined behaviour for unaligned loads and stores.

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-aligned-pot branch from 19d9913 to e0912c2 Compare March 5, 2025 18:30
@spencer-lunarg
Copy link
Contributor Author

I think this should be safe for all APIs. OpenCL makes it undefined behaviour for unaligned loads and stores.

Yep, and the SPIR-V spec was updated and removed the Vulkan-only part

@alan-baker alan-baker merged commit f6b40e7 into KhronosGroup:main Mar 5, 2025
22 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.

2 participants