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

Always generate MemoryAccessAlignedMask for loads/stores #1356

Closed
olvaffe opened this issue May 21, 2024 · 0 comments
Closed

Always generate MemoryAccessAlignedMask for loads/stores #1356

olvaffe opened this issue May 21, 2024 · 0 comments

Comments

@olvaffe
Copy link
Contributor

olvaffe commented May 21, 2024

half4 loads/stores are aligned to 8 bytes. Without MemoryAccessAlignedMask to explicitly specify the alignment, vulkan drivers might need to assume the worst case which is sizeof(half) or VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment.

In the case with radv (mesa amd driver), instead of generating 2 buffer_load_dwordx4 to load a 4x4 half4 matrix, it would generate 4x buffer_load_dwordx3 plus bit manipulations instead.

olvaffe added a commit to olvaffe/clspv that referenced this issue May 21, 2024
Drivers can use the stronger alignments to vectorize loads/stores.
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

No branches or pull requests

1 participant