diff options
author | Jakub Kuderski <jakub@nod-labs.com> | 2024-02-01 18:33:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 18:33:26 -0500 |
commit | 8fd0bce43c4c8334bcb31d214a32260914f59515 (patch) | |
tree | f00445df16f170f319a24c7f6232a1a6ca72c121 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 4a653b4df5d84c4d2df8f6d4040ef46413ac3816 (diff) | |
download | llvm-8fd0bce43c4c8334bcb31d214a32260914f59515.zip llvm-8fd0bce43c4c8334bcb31d214a32260914f59515.tar.gz llvm-8fd0bce43c4c8334bcb31d214a32260914f59515.tar.bz2 |
[mlir][spirv][memref] Calculate alignment for `PhysicalStorageBuffer`s (#80243)
The SPIR-V spec requires that memory accesses to
`PhysicalStorageBuffer`s are annotated with appropriate alignment
attributes [1]. Calculate these based on memref alignment attributes or
scalar type sizes.
[1] Otherwise spirv-val complains:
```
[VULKAN] ! Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01379 ] | MessageID = 0x2a1bf17f | SPIR-V module not valid: [VUID-StandaloneSpirv-PhysicalStorageBuffer64-04708] Memory accesses with PhysicalStorageBuffer must use Aligned.
%48 = OpLoad %float %47
```
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions