| e0ea1fc6 | 25-May-2022 |
Lei Zhang <[email protected]> |
[mlir][spirv] Fix capability check for 64-bit element types
Using 64-bit integer/float type in interface storage classes would require Int64/Float64 capability, per the Vulkan spec:
``` shaderInt64
[mlir][spirv] Fix capability check for 64-bit element types
Using 64-bit integer/float type in interface storage classes would require Int64/Float64 capability, per the Vulkan spec:
``` shaderInt64 specifies whether 64-bit integers (signed and unsigned) are supported in shader code. If this feature is not enabled, 64-bit integer types must not be used in shader code. This also specifies whether shader modules can declare the Int64 capability. Declaring and using 64-bit integers is enabled for all storage classes that SPIR-V allows with the Int64 capability. ```
This is different from, say, 16-bit element types, where:
``` shaderInt16 specifies whether 16-bit integers (signed and unsigned) are supported in shader code. If this feature is not enabled, 16-bit integer types must not be used in shader code. This also specifies whether shader modules can declare the Int16 capability. However, this only enables a subset of the storage classes that SPIR-V allows for the Int16 SPIR-V capability: Declaring and using 16-bit integers in the Private, Workgroup (for non-Block variables), and Function storage classes is enabled, while declaring them in the interface storage classes (e.g., UniformConstant, Uniform, StorageBuffer, Input, Output, and PushConstant) is not enabled. ```
Reviewed By: hanchung
Differential Revision: https://reviews.llvm.org/D126256
show more ...
|
| bbffece3 | 28-Apr-2022 |
Lei Zhang <[email protected]> |
[mlir][spirv] Remove layout decoration on unneeded storage classes
Per SPIR-V validation rules, explict layout decorations are only needed for StorageBuffer, PhysicalStorageBuffer, Uniform, and Push
[mlir][spirv] Remove layout decoration on unneeded storage classes
Per SPIR-V validation rules, explict layout decorations are only needed for StorageBuffer, PhysicalStorageBuffer, Uniform, and PushConstant storage classes. (And even that is for Shader capabilities). So we don't need such decorations on the rest.
Reviewed By: hanchung
Differential Revision: https://reviews.llvm.org/D124543
show more ...
|
| 0065bd2a | 30-Jul-2021 |
Lei Zhang <[email protected]> |
[mlir][spirv] Fix loading bool with proper storage capabilities
If the source value to load is bool, and we have native storage capability support for the source bitwidth, we still cannot directly r
[mlir][spirv] Fix loading bool with proper storage capabilities
If the source value to load is bool, and we have native storage capability support for the source bitwidth, we still cannot directly rewrite uses; we need to perform casting to bool first.
Reviewed By: hanchung
Differential Revision: https://reviews.llvm.org/D107119
show more ...
|