This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Only attach struct offset for required storage classes
ClosedPublic

Authored by antiagainst on Apr 13 2021, 7:22 AM.

Details

Summary

Per the SPIR-V spec "2.16.2. Validation Rules for Shader Capabilities":

Composite objects in the StorageBuffer, PhysicalStorageBuffer,
Uniform, and PushConstant Storage Classes must be explicitly
laid out.

For other cases we don't need to attach the struct offsets.

Diff Detail

Event Timeline

antiagainst created this revision.Apr 13 2021, 7:22 AM
antiagainst requested review of this revision.Apr 13 2021, 7:22 AM
hanchung accepted this revision.Apr 13 2021, 8:22 AM
hanchung added inline comments.
mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
106

adding a comment for arguments looks better to me.

This revision is now accepted and ready to land.Apr 13 2021, 8:22 AM
This revision was automatically updated to reflect the committed changes.
antiagainst marked an inline comment as done.