Page MenuHomePhabricator

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

Authored by antiagainst on Tue, Apr 13, 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.Tue, Apr 13, 7:22 AM
antiagainst requested review of this revision.Tue, Apr 13, 7:22 AM
hanchung accepted this revision.Tue, Apr 13, 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.Tue, Apr 13, 8:22 AM
This revision was automatically updated to reflect the committed changes.
antiagainst marked an inline comment as done.