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

vload_half and vload_store implementations are overly simplified when 16bit-storage extension is not available #6

Open
2 tasks
dneto0 opened this issue Jul 13, 2017 · 2 comments
Milestone

Comments

@dneto0
Copy link
Collaborator

dneto0 commented Jul 13, 2017

  • They assume the pointer argument points to an even-numbered index into a half array. That's why they can get away with casting out to pointer-to-int and then using the GLSL std 450 half-packing instruction.
  • The vstore_half implementation assumes there is no contention for the word we're storing into. This can be fixed with a retry loop around the atomic_xor trick.
@dneto0
Copy link
Collaborator Author

dneto0 commented Jun 8, 2018

We could remove support for these functions and force use of a new __clspv_vload_half(size_t, uint*ptr) that forces the pointer to be aligned.

@dneto0
Copy link
Collaborator Author

dneto0 commented Jun 8, 2018

Better name is __clspv_vloada_half since the pointer is aligned more stringently than just pointer-to-half.

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

2 participants