Skip to content

Commit

Permalink
Add type punning rules to vk::BufferPointer (#55)
Browse files Browse the repository at this point in the history
* Add type punning rules to vk::BufferPointer

Fixes #43

* Clarify that type punning with buffer pointers leads to undefined
behavior.
  • Loading branch information
greg-lunarg authored Sep 1, 2023
1 parent 77f5b4d commit 3b49496
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proposals/0010-vk-buffer-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ A vk::BufferPointer can otherwise be used whereever the HLSL spec does not other

Applying HLSL semantic annotations to objects of type vk::BufferPointer is disallowed.

### Buffer Pointers and Type Punning Through Unions

While buffer pointer types are allowed in unions, type punning with buffer pointer types is disallowed as it is with all other types in HLSL. Specifically, when a member of a union is defined, all other members become undefined, no matter the types.

## SPIR-V Appendices

### Appendix A: SPIR-V for RawBufferLoad
Expand Down

0 comments on commit 3b49496

Please sign in to comment.