[all-commits] [llvm/llvm-project] 5b15fe: [mlir][spirv] Only attach struct offset for requir...

Lei Zhang via All-commits all-commits at lists.llvm.org
Tue Apr 13 12:30:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b15fe9334b802b928f2f6cfedde31bb8cba72ee
      https://github.com/llvm/llvm-project/commit/5b15fe9334b802b928f2f6cfedde31bb8cba72ee
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2021-04-13 (Tue, 13 Apr 2021)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
    M mlir/test/Conversion/GPUToSPIRV/module-structure-opencl.mlir
    M mlir/test/Conversion/StandardToSPIRV/std-types-to-spirv.mlir

  Log Message:
  -----------
  [mlir][spirv] Only attach struct offset for required storage classes

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.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D100386




More information about the All-commits mailing list